NetflixOSS Aminator Ansible Playbook and AMIs

View code on GitHub

Aminator is a tool for creating EBS AMIs for AWS. Before running the playbook, there are a few things we need to do:

Prerequisites

You need Ansible and AWS set up an configured. This is a 10 minute process, and you can watch Episode 2 to see how to do it.

Launch an EC2 instance for Aminator

  1. Create an Aminator IAM Role with this policy
  2. Create an Aminator security group
    • Allow port 22 for SSH
  3. If you don't already, create a new Key pair, and add it to your keychain or SSH agent so you don't need to specify it later:

    $ ssh-add mykey.pem
    
  4. Launch a new EC2 instance using the above IAM Role, Security Group and key pair. Use Ubuntu 12.04 LTS as the AMI.

  5. Set the Name tag of the instance to Aminator
  6. Confirm you can see the instance using the Ansible EC2 inventory
    $ /etc/ansible/hosts | grep 'Aminator'
    

Run Ansible playbook

Now you can run the playbook

$ ansible-playbook playbooks/aminator-ubuntu.yml -l 'tag_Name_Aminator'

If you are using this playbook, there is a decent chance you want to use the Ansible Provisioner for Aminator as well. Since this has not been merge yet (spam mtripoli and kvick if you want this merged), instead of pulling Aminator from their repo, it pulls from here: https://github.com/pas256/aminator.git. You can modify the file in roles/aminator/vars/main.yml and change the repo if you like. Aminator is installed to /usr/local/aminator.

The playbook also checks out this repo as well, so you can start baking your own AMIs based off these playbooks. You can find it here: /usr/local/netflixoss-ansible

One more thing. If you want to pay it forward, this playbook also installs DistAMI. Now there are no excuses for keeping useful AMIs private.

Using Aminator

Once the playbook is finished, you can SSH to the instance an start aminating. Example:

ssh ubuntu@ec2.xyz
sudo aminate -e ec2_ansible_linux -B ami-bb2ab88b aminator-ubuntu.yml

The easy way with CloudFormation

If all of that seems too hard, feel free to use the Aminator CloudFormation template to bring up Aminator in just a few clicks.

AMIs

You can find the list of pre-built AMIs here:

https://github.com/Answers4AWS/netflixoss-ansible/wiki/AMIs-for-NetflixOSS#aminator

Feedback

If you have feedback, comments or suggestions, please feel free to contact Peter at Answers for AWS, create an Issue, or submit a pull request.

View code on GitHub