This repository holds work-in-progress code for launching Flynn into Google Cloud using Terraform.
- Be sure you have the Google Cloud SDK
gcloud
CLI configured - Define the number of Flynn hosts desired in
terraform.tfvars
- Get HashiCorp's Terraform 0.11.1
- Install terraform-provider-flynn per its instructions. n.b.: requires golang >1.7
- (Optional) Set other variables as desired in
terraform.tfvars
- variable names are discoverable invars.tf
- Navigate to
./clusters
cd clusters
- Copy
template
folder to a folder with your new cluster name and enter the folder:
cp template NEW-CLUSTER
cd NEW-CLUSTER
- Amend
prefix = "NEW-CLUSTER"
inbackend.tf
.test-cluster
andother-cluster
are examples - Ensure settings in
terraform.tfvars
are correct for your cluster/project. - Use the "zone" from Google Cloud DNS in the
flynn_gce_zone
variable - Use the "name" from Google Cloud DNS in the
flynn_gce_name
variable.
- Be sure to omit the trailing dot.
- Initialize Terraform modules and storage:
terraform init
terraform init
- Generate a plan
terraform plan -out plan.tfplan
- Visually verify plan
- Execute the plan using
terraform apply plan.tfplan
- As needed, refresh the plan with another cycle of steps 2-5
- Delete the nodes by using
terraform destroy --force
- We're using regular gitflow, so branch and pull request as normal.
This will go from zero to fully-built Flynn cluster in about 5 minutes.