Skip to content

Instantly share code, notes, and snippets.

@afiune
Last active February 4, 2016 23:03
Show Gist options
  • Select an option

  • Save afiune/fdabdbd146e564b0ed0f to your computer and use it in GitHub Desktop.

Select an option

Save afiune/fdabdbd146e564b0ed0f to your computer and use it in GitHub Desktop.
Stand up Delivery Cluster with Terraform (tf_delivery_cluster)
➜ github git clone git@github.com:chef/tf_delivery_cluster.git
Cloning into 'tf_delivery_cluster'...
remote: Counting objects: 919, done.
remote: Compressing objects: 100% (607/607), done.
remote: Total 919 (delta 173), reused 919 (delta 173), pack-reused 0
Receiving objects: 100% (919/919), 721.34 KiB | 533.00 KiB/s, done.
Resolving deltas: 100% (173/173), done.
Checking connectivity... done.
➜ github cd tf_delivery_cluster
➜ tf_delivery_cluster git:(master) vi terraform.tfvars
# Terraform Variables File
# Delivery Cluster Settings
aws_access_key_id = "<KEY>"
aws_secret_access_key = "<SECRET>"
aws_default_region = "us-west-2"
aws_key_pair_name = "afiune"
chef-delivery-enterprise = "terraform"
chef-server-organization = "terraform"
➜ tf_delivery_cluster git:(master) cp ~/delivery.license .chef/delivery.license
➜ tf_delivery_cluster git:(master) cp ~/.ssh/afiune.pem .keys/afiune.pem
➜ tf_delivery_cluster git:(master) terraform get
Get: file:///Users/salimafiune/github/tf_delivery_cluster/ec2-network
Get: file:///Users/salimafiune/github/tf_delivery_cluster/chef-server
Get: file:///Users/salimafiune/github/tf_delivery_cluster/chef-delivery
Get: file:///Users/salimafiune/github/tf_delivery_cluster/chef-build-node
➜ tf_delivery_cluster git:(master) date
Thu Feb 4 17:29:48 EST 2016
➜ tf_delivery_cluster git:(master) terraform apply
module.chef-delivery.null_resource.generate_builder_key: Creating...
module.chef-delivery.null_resource.generate_builder_key: Provisioning with 'local-exec'...
...
<lots of cool stuff>
...
Apply complete! Resources: 61 added, 0 changed, 0 destroyed.
The state of your infrastructure has been saved to the path
below. This state is required to modify and destroy your
infrastructure, so keep it safe. To inspect the complete state
use the `terraform show` command.
State path: terraform.tfstate
➜ tf_delivery_cluster git:(master) ✗ date
Thu Feb 4 18:01:05 EST 2016
➜ tf_delivery_cluster git:(master) ✗ terraform output -module=chef-server
chef-server-organization = terraform
chef-server-public-ip = 52.24.223.201
chef-server-url = https://52.24.223.201/organizations/terraform
➜ tf_delivery_cluster git:(master) ✗ terraform output -module=chef-delivery
chef-delivery-creds = Created enterprise: terraform
Admin username: admin
Admin password: Rs68K0c8lLXhv0vCAUsgVoQn1c1iNg4dZ/w=
Builder Password: GBnpkUTKeqWLF0MZal8RhbnsNmn1UcJMn0o=
Web login: https://54.149.139.28/e/terraform/
chef-delivery-enterprise = terraform
chef-delivery-public-ip = 54.149.139.28
➜ tf_delivery_cluster git:(master) ✗ terraform output -module=chef-build-node
chef-build-node-public-ip = 54.149.225.166,54.149.225.117,52.35.8.96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment