Immutable servers infrastructure demo repository
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Immutable Servers Infrastucture Demo Repository

This repository is designed to be used alongside demo-is-vm-images and demo-salt.

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

Getting started

Follow the steps below to setup the entire pipeline including initial AMI images, and Jenkins build pipeline.

  1. Clone demo-is-vm-images:

    git clone
  2. 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.

  3. Clone demo-is-infrastructure:

    git clone
  4. Create a terraform.tfvars (see for a description of each varibale).


    domain = ""
    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"

    Note that *.tfvars files are gitignored.

  5. Create the infrastructure

    terraform apply