Immutable Servers Infrastucture Demo Repository
These repositories demonstrates setting up a pipeline for building immutable servers, including:
- How to build AMIs using packer (incorporating existing config management via SaltStack)
- Create immutable infrastructure with terraform
- Fully automating Jenkins to:
- run on spot instances
- automate the installation using groovy scripts
- automatically create jobs for GitHub repositories
- spawn jenkins slaves as spot instances
Follow the steps below to setup the entire pipeline including initial AMI images, and Jenkins build pipeline.
git clone https://github.com/jamesridgway/demo-is-vm-images.git
Build all of the packer images using:
This needs to be run manually to initialise your AWS account with the AMIs. Once you've done this the Jenkins setup produced by the remaining steps can be used to produce new AMI images.
git clone https://github.com/jamesridgway/demo-is-infrastructure.git
varaibles.tffor a description of each varibale).
domain = "demo.james-ridgway.co.uk" admin_username = "james" admin_password = "********" github_token = "********" github_webhook_username = "github" github_webhook_password = "********" github_webhook_secret = "********" github_username = "jamesridgway" github_repos = "demo-salt,demo-is-vm-images,demo-is-infrastructure"
*.tfvarsfiles are gitignored.
Create the infrastructure