Archive
What's new in Ansible 1.1 for AWS and Eucalyptus users?
Reblogged from Take that to the bank and cash it!:
I thought the Ansible 1.0 development cycle was busy but 1.1 is crammed full of orchestration goodness. On Tuesday, 1.1 was released and you can read more about it here: http://blog.ansibleworks.com/2013/04/02/ansible-1-1-released/
For those working on AWS and Eucalyptus, 1.1 brings some nice module improvements as well as a new cloudformation and s3 module. It's great to see the AWS-related modules becoming so popular so quickly.
Using Ansible to Deploy Neo4j HA Cluster on AWS/Eucalyptus
As a follow-up to my last Neo4j, AWS/Eucalyptus blog, this entry demonstrates another great example of AWS/Eucalyptus fidelity by using Ansible to deploy a Neo4j High Available cluster.
Pre-requisites
In order to use this Ansible playbook on AWS/Eucalyptus, the following is needed:
- An AWS or Eucalyptus account, with a user’s access key and secret access key.
- EC2 IAM Policy to allow launching of instances, and authorize ports in security group
- Ubuntu Cloud Image (Precise 12.04)
- EC2 API Client Tools
- git repository tools
Before deploying the cluster, a security group needs to be created that the cluster will use. The security group must allow the following:
- port 22 (SSH)
- all instances part of the security group allowed to community with each other (ports 0 - 65535)
To create the security group and authorize the ports, make sure the user’s access key, secret access key, and EC2 URL are noted, and do the following:
- Create the security group
ec2-create-group --aws-access-key <EC2_ACCESS_KEY> --aws-secret-key <EC2_SECRET_KEY> --url <EC2_URL> -g neo4j-cluster -d "Neo4j HA Cluster"
- Authorize port for SSH in neo4j-cluster security group
ec2-authorize --aws-access-key <EC2_ACCESS_KEY> --aws-secret-key <EC2_SECRET_KEY> --url <EC2_URL> -P tcp -p 22 -s 0.0.0.0/0 neo4j-cluster
- Authorize all port communication between cluster members
ec2-authorize --aws-access-key <EC2_ACCESS_KEY> --aws-secret-key <EC2_SECRET_KEY> --url <EC2_URL> -P tcp -o neo4j-cluster -p -1 neo4j-cluster
After completing these steps, use
ec2-describe-group
to view the security group:
ec2-describe-group --aws-access-key <EC2_ACCESS_KEY> --aws-secret-key <EC2_SECRET_KEY> --url <EC2_URL> neo4j-cluster GROUP sg-1cbc5777 986451091583 neo4j-cluster Neo4j HA Cluster PERMISSION 986451091583 neo4j-cluster ALLOWS tcp 0 65535 FROM USER 986451091583 NAME neo4j-cluster ID sg-1cbc5777 ingress PERMISSION 986451091583 neo4j-cluster ALLOWS tcp 22 22 FROM CIDR 0.0.0.0/0 ingress
Neo4j HA Cluster Deployment
Once the security group is created with the correct ports authorized, the cluster can be deployed. To deploy the cluster, do the following:
- Obtain Ansible from git and setup the environment by following the instructions mentioned here - http://ansible.cc/docs/gettingstarted.html#getting-ansible
- Obtain the Ansible Playbook for Neo4j HA Cluster using git
git clone https://github.com/hspencer77/ansible-neo4j-cluster.git
- Change directory into ansible-neo4j-cluster
cd ansible-neo4j-cluster
- Set up /etc/ansible/hosts with the following information:
[local] 127.0.0.1 - Populate vars/ec2-config with either Eucalyptus/AWS information. vars/ec2-config contains the following variables:
keypair: <EC2/Eucalyptus Keypair> ec2_access_key: <EC2_ACCESS_KEY> ec2_secret_key: <EC2_SECRET_KEY> ec2_url: <EC2_URL> instance_type: m1.small security_group: <AWS/Eucalyptus Security Group> image: <AMI/EMI> -
Execute the following command:
ansible-playbook neo4j-cluster.yml \ --private-key=<AWS/Eucalyptus Private Key file> --extra-vars "node_count=3" - After the playbook finishes, there will be an URL provided to access the cluster – similar to the example below:
TASK: [Display HAProxy URL] ********************* changed: [23.22.248.75] => {"changed": true, "cmd": "echo \"HAProxy URL for Neo4j - http://ec2-23-22-248-75.compute-1.amazonaws.com/webadmin/#/info/org.neo4j/High%20Availability/\" ", "delta": "0:00:00.006835", "end": "2013-03-30 19:54:31.104320", "rc": 0, "start": "2013-03-30 19:54:31.097485", "stderr": "", "stdout": "HAProxy URL for Neo4j - http://ec2-23-22-248-75.compute-1.amazonaws.com/webadmin/#/info/org.neo4j/High%20Availability/"}To view the status of cluster in the browser, open up http://ec2-23-22-248-75.compute-1.amazonaws.com/webadmin/#/info/org.neo4j/High%20Availability/.
- To get the status of the cluster, use curl:
curl -H "Content-Type:application/json" -d '["org.neo4j:*"]' http://ec2-23-22-248-75.compute-1.amazonaws.com/db/manage/server/jmx/query
Thats it! A Neo4j HA cluster with an HA Proxy server serving as an endpoint is available to be used. If a bigger cluster is desired, just change the
node_count
value. For additional information regarding this playbook, and how it handles the cluster membership, please refer to the following URL - https://github.com/hspencer77/ansible-neo4j-cluster/blob/master/README.md.
Hope you enjoy! As always, questions/comments/suggestions are always welcome.
Deploying Eucalyptus via Ansible playbook(s)
Reblogged from Take that to the bank and cash it!:
The first cut of the Ansible deployment playbook for deploying Eucalyptus private clouds is ready. I've merged the first "release" into the master branch here: https://github.com/lwade/eucalyptus-playbook. Feedback and contributions are very welcome, please file issues against the project.
This playbook allows a user to deploy a single front-end cloud (i.e. all component on a single system) and as many NC's as they want.
Ansible: playbook to deploy a workload using the ec2 module
Reblogged from Take that to the bank and cash it!:
My previous post talked a little bit about new functionality from (new and updated) ec2-related modules in the Ansible 1.0 release. In this post I'll go through the practical example of launching multiple instances with the ec2 module and then configuring them with a workload. In this case the workload will be the Eucalyptus User Console :)
For those who are unfamiliar with ansible, check out the online documentation…
Ansible 1.0 - Awesome.
Reblogged from Take that to the bank and cash it!:
You may be forgiven for thinking that a version 1.0 software release indicates some sort of significant milestone for the lifecycle of a project. Perhaps in many cases it does but with Ansible, not so much. Michael DeHaan articulates it much better than I could in this post to the project mailing list. My personal experience from using Ansible since v0.8 is that each release delivers consistency, quality and increased flexibility.
Eucalyptus Recipes Project
Reblogged from Technological Musings:
Automation and configuration management is a big part of any successful cloud deployment. Whether on AWS, Eucalyptus or another cloud provider, having services that can be easily spun up and down with a consistent configuration is a must at cloud scale. The recipes project is looking to assist new cloud users with a first step.
The recipes project is attempting to be as vendor agnostic as possible by using both…








