Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes, I do this all of the time (with the same application stack, actually).</p> <ol> <li><p>Use a base AMI from a trusted source, such as the default "Amazon Linux" ones, or roll your own.</p></li> <li><p>As part of the launch configuration, use the "user data" field to bootstrap a provisioning process on boot. This can be as simple as a shell script that runs <code>yum install nginx php-fpm -y</code> and copies files down from a S3 bucket or do a pull from your repo. The Amazon-authored AMI's also include support for <a href="https://launchpad.net/cloud-init">cloud-init</a> scripts if you need a bit more flexibility. If you need even greater power, you can use a change management and orchestration tool like <a href="http://puppetlabs.com/">Puppet</a>, <a href="http://www.opscode.com/chef/">Chef</a>, or <a href="http://saltstack.org/">Salt</a> (my personal favorite).</p></li> <li><p>As far as updating code on existing instances: there are two schools of thought:</p> <ul> <li>Make full use of the cloud and just spin up an entirely new fleet of instances that grab the new code at boot. Then you flip the load balancer to point at the new fleet. It's instantaneous and gives you a really quick way to revert to the old fleet if something goes wrong. Hours (or days) later, you then spin down the old instances.</li> <li>You can use a tool like <a href="http://docs.fabfile.org/en/1.5/">Fabric</a> or <a href="https://github.com/capistrano/capistrano">Capistrano</a> to do a parallel "push" deployment to all the instances at once. This is generally just re-executing the same script that the servers ran at boot. Salt and Puppet's MCollective also provide similar functionality that mesh with their basic "pull" provisioning.</li> </ul></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload