This repository is a collection of all of of the files related to the Packer and Terraform series on the Joyent blog.
- Sign up for a Triton account.
- Download Packer.
- Download Terraform.
To use the environment variables, you must be in the Triton environment before building the Packer image or initializing Terraform.
$ eval "$(triton env)"
- Create images with Packer
- For the Happy Randomizer, there is an alternative JSON file,
thumbsup.json
, which uses only thumbs up GIFs. To create version 1.1 of this image, use that JSON file.- Edit
main.js
so that the url is equal to./resources/thumbsup.json
. - Edit the Packer configuration to change the
image_version
to1.1.0
. - Repeat the instructions for building an image
- Edit
- For the Happy Randomizer, there is an alternative JSON file,
- Infrastructure management with Terraform
- Blue-green deploys with Terraform
- You will need both version 1.0 and 1.1 of the Happy Randomizer
- Multi-data center deployment with Terraform
- You will need both version 1.0 and 1.1 of the Happy Randomizer on all of the data centers upon wish you want to deploy the application.
If you receive an error similar to:
* provider.triton: Error Creating SSH Agent Signer: No key in the SSH Agent matches fingerprint: <ssh fingerprint>
Use ssh-add
to fix it:
ssh-add <path to ssh key>
- Triton Terraform provider docs
- Triton CLI and CloudAPI documentation
- Read more tutorials on the Joyent blog