Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

iChange on RightScale

iChange on RightScale

Deploying iChange.com web application on RightScale.

Avatar for Neil Durbin

Neil Durbin

January 15, 2013
Tweet

More Decks by Neil Durbin

Other Decks in Programming

Transcript

  1. Deployment Full stack environment with all servers and server arrays

    required to run the app (db hosted on aws rds outside of RightScale). Nothing is really set in the deployment except the name and a brief description. Deployments currently broken up by Availability Zones in EC2 East region.
  2. Server & Server Arrays Servers in the deployment specify the

    AWS region, ServerTemplate, IP Address, Instance Type, Security Groups, etc. Server Arrays do the same things but can be scaled horizontally through the RightScale gui or through the alert system.
  3. ServerTemplates Specify Chef recipes to be run by a server

    on boot, during operation, or on shutdown. Set alert actions to perform if the server meets a certain condition (ie. CPU is not responding for 15 minutes).
  4. RepoPaths Location where RightScale can find private Chef recipes. Currently

    on the trac.ichange.com server. Chef recipes need to be refreshed on RightScale whenever a recipe is modified.
  5. Tags Tags are set on deployed servers to allow other

    servers in that deployment to find and communicate with them. Set a tag on a server in a Chef recipe with the following commands: right_link_tag "web:active=true" # tag server es=rightscale_server_collection "elasticsearch" do # find tagged server tags "elasticsearch:active=true" action :nothing end es.run_action(:load)
  6. RemoteRecipes Run a Chef recipe on another server in the

    deployment by using the RemoteRecipe call in a Chef recipe. remote_recipe "update the load balancer" do recipe "ichange-load-balancer::default" recipients_tags "balancer:active=true" end
  7. Starting Servers Theoretically all servers in a deployment could be

    launched at the same time from the GUI and work. In practice there are some race conditions. Start elastic-search, memcache, and redis. Then start task and web servers. Then start balancer. Run republishfeeds script/recipe on task server. Relaunch web/task servers if there is an issue. Attach elastic IP to balancer.