17.08.2017 Views

overview-of-deployment-options-on-aws (1)

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Amaz<strong>on</strong> Web Services – Deployment Opti<strong>on</strong>s <strong>on</strong> AWS March 2015<br />

Prebaking is a process <str<strong>on</strong>g>of</str<strong>on</strong>g> embedding a significant porti<strong>on</strong> <str<strong>on</strong>g>of</str<strong>on</strong>g> your applicati<strong>on</strong><br />

artifacts within your base AMI. During the <str<strong>on</strong>g>deployment</str<strong>on</strong>g> process you can<br />

customize applicati<strong>on</strong> installati<strong>on</strong>s by using EC2 instance artifacts such as<br />

instance tags, instance metadata, and Auto Scaling groups.<br />

For example, let’s say you are managing a Ruby applicati<strong>on</strong> that needs Nginx for<br />

the fr<strong>on</strong>t end; Elasticsearch, Logstash, and Kibana for log processing; and<br />

M<strong>on</strong>goDB for document management. You can have logical grouping <str<strong>on</strong>g>of</str<strong>on</strong>g> your base<br />

AMIs that can take 80% <str<strong>on</strong>g>of</str<strong>on</strong>g> applicati<strong>on</strong> binaries loaded <strong>on</strong> these AMI sets. You<br />

can choose to install most applicati<strong>on</strong>s during the bootstrapping process and<br />

alter the installati<strong>on</strong> based <strong>on</strong> c<strong>on</strong>figurati<strong>on</strong> sets grouped by instance tags, Auto<br />

Scaling groups, or other instance artifacts. You can set a tag <strong>on</strong> your Nginx<br />

instances (such as Nginx-v-1.6.2). Your update process can query for the instance<br />

tag, validate whether it’s the most current versi<strong>on</strong> <str<strong>on</strong>g>of</str<strong>on</strong>g> Nginx, and then proceed<br />

with the installati<strong>on</strong>. When it’s time to update the prebaked AMI, you can simply<br />

swap your existing AMI with the most recent versi<strong>on</strong> in the underlying<br />

<str<strong>on</strong>g>deployment</str<strong>on</strong>g> service and update the tag.<br />

Deployment services like AWS CloudFormati<strong>on</strong> and AWS OpsWorks are better<br />

suited for the prebaked AMI approach. You can also find multiple third-party<br />

tools for prebaking AMIs. Some well-known <strong>on</strong>es are packer.io 37 and aminator<br />

(built by Netflix). 38 You can also choose third-party tools for your c<strong>on</strong>figurati<strong>on</strong><br />

management such as Chef, Puppet, Salt, Ansible, and Capistrano.<br />

In-place vs Disposable Method<br />

The <str<strong>on</strong>g>deployment</str<strong>on</strong>g> services <str<strong>on</strong>g>of</str<strong>on</strong>g>fer two methods to help you update your applicati<strong>on</strong><br />

stack, namely in-place and disposable. An in-place upgrade involves performing<br />

applicati<strong>on</strong> updates <strong>on</strong> live Amaz<strong>on</strong> EC2 instances. A disposable upgrade, <strong>on</strong> the<br />

other hand, involves rolling out a new set <str<strong>on</strong>g>of</str<strong>on</strong>g> EC2 instances by terminating older<br />

instances.<br />

An in-place upgrade is typically useful in a rapid <str<strong>on</strong>g>deployment</str<strong>on</strong>g> with a c<strong>on</strong>sistent<br />

rollout schedule. It is designed for sessi<strong>on</strong>less applicati<strong>on</strong>s. You can still use the<br />

in-place upgrade method for stateful applicati<strong>on</strong>s by implementing a rolling<br />

<str<strong>on</strong>g>deployment</str<strong>on</strong>g> schedule and by following the guidelines menti<strong>on</strong>ed in the secti<strong>on</strong> <strong>on</strong><br />

blue-green <str<strong>on</strong>g>deployment</str<strong>on</strong>g>s.<br />

Page 13 <str<strong>on</strong>g>of</str<strong>on</strong>g> 23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!