Asgard Ansible Playbook and AMIs

View code on GitHub

Asgard is an application deployments and cloud management web interface 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 EC2 instance for Asgard

  1. Create an Asgard security group
    • Allow port 80 for HTTP only from your IP address (very basic security)
    • Allow port 22 for SSH (optional)
  2. If you don't already have one, 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
    
  3. Launch a new EC2 instance using the above Security Group and Key Pair. Use Ubuntu 12.04 LTS as the AMI.

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

Run Ansible playbook

Now you can run the playbook by executing:

$ ansible-playbook playbooks/asgard-ubuntu.yml -l 'tag_Name_Asgard'

This will configure the instance to be running the latest release of Asgard. If you prefer to run the different version of Asgard, you want to build the WAR file yourself, and specify the path to the WAR file:

$ ansible-playbook playbooks/asgard-ubuntu.yml -l 'tag_Name_Asgard' -e "local_war=/path/to/asgard.war"

Access Asgard

Once the playbook is finished, you will have Asgard running inside Tomcat on your EC2 instance. You can access Asgard via HTTP as the ROOT application (no directory). Example:

http://ec2-12-12-12-12.us-west-2.compute.amazonaws.com/

Security

This playbook does nothing for security. It is highly recommended that you put some kind of restrictions on who can access Asgard, as it can do a lot to your AWS account. At the very minimum, please make sure your security group only allows port 80 access from your IP address only.

Adding authentication and running over an SSL connection is also recommended.

Launching from the AWS Marketplace

  1. * Watch the screencast explaining these steps on Youtube
  2. Launch Asgard from the AWS Marketplace
  3. Follow these instructions after launch

AMIs

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

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

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