Terraform RKE providers can easily deploy Kubernetes clusters with Rancher Kubernetes Engine.
- Website: https://www.terraform.io
- Mailing list: Google Groups
Clone repository to: $GOPATH/src/github.com/terraform-providers/terraform-provider-rancher2
$ mkdir -p $GOPATH/src/github.com/rancher; cd $GOPATH/src/github.com/rancher
$ git clone [email protected]:rancher/terraform-provider-rancher2Enter the provider directory and build the provider
$ cd $GOPATH/src/github.com/rancher/terraform-provider-rke
$ make buildCurrent master is focusing on RKE v1.0.x There are some breaking changes from previous provider version.
If you use RKE v0.2.x or v0.1.x, please set proper branch.
If you're building the provider, follow the instructions to install it as a plugin. After placing it into your plugins directory, run terraform init to initialize it. Documentation about the provider specific configuration options can be found on the provider's website.
If you wish to work on the provider, you'll first need Go installed on your machine (version 1.12+ is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to your $PATH.
To compile the provider, run make build. This will build the provider and put the provider binary in $GOPATH/bin .
$ make build
...
$ $GOPATH/bin/terraform-provider-rke
...To just compile provider binary on repo path and test on terraform:
$ make bin
$ terraform init
$ terraform plan
$ terraform applyIn order to test the provider, you can simply run make test.
$ make testIn order to run the full suite of Acceptance tests, a running rancher system, a rancher API key and a working k8s cluster imported are needed.
To run acceptance tests, you can simply run make testacc. scripts/gotestacc.sh will be run, deploying all needed requirements, running acceptance tests and cleanup.
$ make testaccCurrently acceptance tests only works on Linux platforms, on Mac OSX are not yet supported.
You can view some tf file examples, here.
