News for hackers. Stuff that matters.
Re:Why I left Heroku, and notes on my new AWS setup by druiid on Monday May 20, 2013 @12:50PM (#5738602)
That's actually, honestly, a bad way to do it. It's fine to pre-load an instance with source and application/package dependencies. At this point though, you really should be backing those up with it being deployed by Puppet/Chef.

Essentially you pre-run a puppet manifest and have it do all the first-run processing and then store THAT as the AMI/instance. This way you have an instance that only needs a few seconds to get itself ready while also integrating configuration management (which really you should be doing these days). Just some suggestions from a sysadmin.

Re:Why I left Heroku, and notes on my new AWS setup by rschmitty on Monday May 20, 2013 @01:44PM (#5738886)
Depends on how fast you want new instances to be online. Sometimes you want to respond to demand very fast, it can take a few minutes for an instance to register with ELB, if you have to download/build/configure packages prior you are just adding minutes on time. The faster you can spin up instances the higher you can run your servers as you need to tell amazon at what threshold should I spawn more instances

There are 3 general levels you can take with AMIs:

1) Vanilla instance AMI, have puppet/chef install everything for you, then fetch your app code and configure that

2) Use another tool to have your instance built with puppet/chef and then capture that into an AMI. Once it spins up it just needs to get your app code. Idea here is your services arent likely to need updated as fast as your app code.

3) Same as two, but when your production code is in release/maintenance mode, bake everything into an AMI. When you need to deploy new code, you need to create a new AMI, but you are creating an AMI with scripts so its no big deal :) All you have to do now is update your cloudformation

Re:Why I left Heroku, and notes on my new AWS setup by druiid on Monday May 20, 2013 @01:49PM (#5738917)
Well this is why I suggested pre-running with Puppet and 'install' your code and dependencies into the AMI before saving it. That way you get the best of both worlds.

Obviously if you have a setup with rapidly deployed code changes you'll want to have your puppet manifest grab the latest version before deploying live when spinning up a new instance.

Re:Why I left Heroku, and notes on my new AWS setup by brown9-2 on Monday May 20, 2013 @02:11PM (#5739034)
I believe #3 is what Netflix does.
Re:Why I left Heroku, and notes on my new AWS setup by raylu on Monday May 20, 2013 @02:46PM (#5739220)
Puppet/Chef is overkill for a site running a config this simple.
Re:Why I left Heroku, and notes on my new AWS setup by druiid on Monday May 20, 2013 @03:25PM (#5739444)
I don't really agree with this. If you're defining a whole crazy master/agent relationship with Puppet then it's overkill for them, no doubt.

There's a reason many Vagrant boxes I see use Puppet to instantiate though: It's friggin simple to get started with. More advanced configurations might even end up requiring you to build your own modules and extended manifests, but I expect this configuration detailed in the article would probably amount to a couple hundred lines for the entire manifest.

I think this also underscores one of the things I like the most about Puppet (instead of Chef, which is a fine CM system as well); It's easy to get started with but powerful enough to get things done down the road. Honestly, there's never a better time to start working with Puppet than from the very beginning of a project!

Re:Why I left Heroku, and notes on my new AWS setup by lnguyen on Monday May 20, 2013 @06:22PM (#5740510)
Overkill for now. But it's best to learn the tools you will need while things are still simple. You know how things should get set up and can ensure that what you're telling Puppet/Chef to do achieves that.

If you wait until you've got a more complex configuration, you're fighting both the tool syntax and system setup requirements. Not to mention the clock that's ticking and telling you that you needed to be all up and running yesterday.

Re:Why I left Heroku, and notes on my new AWS setup by tlrobinson on Monday May 20, 2013 @03:19PM (#5739417)
What do you recommend for simple configurations where you still want the repeatability/documentation/versioning tools like Chef/Puppet provide? Shell scripts?
Re:Why I left Heroku, and notes on my new AWS setup by shykes on Monday May 20, 2013 @11:13PM (#5741689)
You could build containers using Docker (http://docker.io) and Dockerfiles. Here's an example: https://github.com/steeve/docker-opencv
Re:Why I left Heroku, and notes on my new AWS setup by shimms on Monday May 20, 2013 @08:22PM (#5741132)
Re:Why I left Heroku, and notes on my new AWS setup by mbaukes on Monday May 20, 2013 @07:42PM (#5740940)
scriptrock.com - FD: I'm one of the founders, we think of it as a executable documentation tool.
Re:Why I left Heroku, and notes on my new AWS setup by chaz on Monday May 20, 2013 @05:05PM (#5740031)
After building a half dozen one-off sites, each with a simple, single-server config, I found that going sitting down and learning Chef was helpful for jumpstarting the next project. All of the basic needs are the same: nginx, unicorn, postgresql, etc, and I was tired of reading through my jumble of system configuration notes. Yes, I could have baked AMIs and created new AMIs, but not everything was Amazon-based.