Manually boot clusters with Terraform

The Tectonic Installer can be used to easily create Terraform assets and configuration files used to provision a Tectonic cluster via the terminal.

This process may be used to create multiple clusters with similar configurations, to deploy a single cluster multiple times, or to quickly generate cluster templates for distribution to your team.

Assets generated by Tectonic Installer allow you to make changes to the underlying infrastructure for a cluster. They do not provide support for changes to Tectonic components run in the cluster (such as etcd or clair). Changes to the Kubernetes manifests will end your ability to auto-update.

These downloaded assets are also necessary to destroy existing clusters, once they have been deployed.

Generate and download cluster assets

First, use Tectonic Installer to generate and download cluster assets.

Walk through the Installer in your browser, entering credentials and cluster information as prompted.

On the Submit screen, click Manually boot, rather than Submit, to exit out of the cluster submission process.

On the Download Assets screen that opens, click Download assets to download the Terraform files to your local machine.

Use assets.zip to create multiple deployments

If you wish to use downloaded assets to deploy multiple clusters, first make a copy of the directory for each planned instance. Then edit each directory's terraform.tfvars, and deploy individually.

For example, to create two matching clusters in two different regions, first create two copies of the assets folder. Edit terraform.tfvars in one directory to change one node's tectonic_aws_region value to a different region, and edit the subnets to reflect the new region. Leave the second directory's terraform.tfvars file in its default state.

Then, run terraform plan and terraform apply on each terraform.tfvars file in turn to deploy your Tectonic clusters.

Access the cluster

Tectonic Console will be running after the containers have downloaded. Access Console at the DNS name configured in your variables file.

Inside of the generated/ folder you should find any credentials, including the CA if generated, and a kubeconfig. You can use this to control the cluster with kubectl:

$ export KUBECONFIG=generated/auth/kubeconfig
$ kubectl cluster-info

Destroy existing clusters

assets.zip also includes terraform.tfstate, which is necessary to destroy existing clusters. For more information on using Terraform to destroy existing clusters, see Uninstall Tectonic.