Migrating from a hosted environment to AWS is a good opportunity to streamline deployment and site operations. This session shows how FillZ used AWS OpsWorks with other tools to automate site operations and deliver a highly available site that is used by large numbers of customers. Through code and examples, this session shows you how to automate deployments across an entire fleet, configure a patching strategy, use common tools to create useful alarms and monitor system performance, and employ security best-practices in AWS.
43. all_instances.eachdo|instance|
node_hostgroups={}
# add a hostgroupfor each layer the instance is in
instance['opsworks']['layers'].each do|layer_id, layer_info|
node_hostgroups[layer_id] = layer_info['name']
end
# add a hostgroupfor each availability zone
node_hostgroups[instance['availability_zone']]=
instance['availability_zone']
all_hosts[instance['hostname']] ={
:hostgroups=> node_hostgroups,
:private_ip=> instance['private_ip']
}
all_hostgroups=all_hostgroups.merge(node_hostgroups)
end
68. BEFORE
AFTER
Time to deploya new server
2 days + 2 hours
25 minutes
Time to deploy anew software release
2 hours
2 minutes
After-hours alerts
6 / week
< 1 / week