Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Aside from packages and system_setup, which are run on all new machines, the following three optional software installation roles are run:

Sample Ansible role

What it does

When it runs

ruby

Compiles and installs Ruby

If you pass --extra-vars "build=ruby_ami"

imagemagick

Compiles and installs imagemagick

If you pass --extra-vars "build=ruby_image_ami"

dzi

Compiles and installs vips

If you pass --extra-vars "build=ruby_image_ami"

Important files

...

(we use the production key private-key here, as it will end up kind of permanently allowing ssh access to the machine, and we don’t want staging/test key to have access to production machines)

An AMI with ruby on top of ubuntu:

ansible-playook --ask-vault-pass build_ami.yml --private-key=~/.ssh/chf_prod.pem --extra-vars "build=ruby_ami"ansible-playook --ask-vault-pass build_ami.yml --private-key=~/.ssh/chf_prod.pem --extra-vars "build=ruby_image_ami"

An AMI with ruby and image utilities (vips and imagemagick) (used for jobs servers)

ansible-playook --ask-vault-pass build_ami.yml --private-key=~/.ssh/chf_prod.pem --extra-vars "build=ruby_image_ami"

Viewing created AMIs in the AWS console

...