Skip to content

Instantly share code, notes, and snippets.

@botchagalupe
Created December 16, 2010 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save botchagalupe/744057 to your computer and use it in GitHub Desktop.
Save botchagalupe/744057 to your computer and use it in GitHub Desktop.
LOPSA-LA Demo

Demo Wordpress Stack

Notes

10.04 LTS Lucid -EBS boot - 32 - ami-a2f405cb supports - m1.small,c1.medium

10.04 LTS Lucid -EBS boot - 64 - ami-b8f405d1 supports - m1.large

10.04 LTS Lucid -EBS boot - 64 - ami-4a0df923 supports - t1.micro

ab -n 1000 -c 100 http://ec2-50-16-10-169.compute-1.amazonaws.com

Launch the demo servers....

 # Start the first Webserve on EC2  #
 #
 nohup knife ec2 server create "role[base]" "role[webserver]" -f t1.micro -i ami-4a0df923 -G default,wordpress -S botchagalupe -x ubuntu -I ~/chef-repo/.chef/botchagalupe.pem -N opsws01 -y >/tmp/opsws01.out &
 #
 # Start the Load Balancer (haproxy) Server on EC2  # 
 #
 nohup knife ec2 server create "role[base]" "role[load_balancer]" -f t1.micro -i ami-4a0df923 -G default,wordpress -S botchagalupe -x ubuntu -I ~/chef-repo/.chef/botchagalupe.pem -N opslb01 -y >/tmp/opslb01.out &
 # 
 # Start the Database Master Server on EC2 #
 #
 nohup knife ec2 server create "role[base]" "role[database_master]" -f t1.micro -i ami-4a0df923 -G default,wordpress -S botchagalupe -x ubuntu -I ~/chef-repo/.chef/botchagalupe.pem -N opsdm01 -y >/tmp/opsdm01.out &

 # Start the second Webserve on Rackspace  #
 #
nohup knife rackspace server create "role[base]" "role[webserver]" --server-name opsws02 --image 49 --flavor 2 -y >/tmp/opsws02.out &
 #

Launch the demo servers....

Run the status script

 echo "**** Status Nodes ***"
 knife status --run-list | grep ops
 echo "**** EC2 Nodes ***"
 knife ec2 server list  | grep wordpress | grep running
 echo "**** Rackspace Nodes ***"
 knife rackspace server list | grep ops

Look at the Node Attributes....

Show the name of the Database master tag name on the webserver node...

 knife node show opsws01 -a webserver

Show the wordpress hash on the database mater node...

 knife node show opsdm01 -a wordpress

Show the haproxy hash on the load balancer master node...

 knife node show opslb01 -a haproxy

How about some monitoring ...

 knife ec2 server create "role[monitoring]" -f t1.micro -i ami-4a0df923 -G default,wordpress -S botchagalupe -x ubuntu -I ~/chef-repo/.chef/botchagalupe.pem -N opsmn01 -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment