简体   繁体   中英

Capistrano and Auto-Scaling AWS

We're trying to figure out the best way to deploy to an auto-scaling AWS setup using Capistrano, and stuck on the best way to ensure new servers automatically get the latest code, without having to rely on AMIs.

Any ideas?

Using User Data , you can have your EC2 instances pull the latest code each time a new instance is launched. More info on user data here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html

tldr: user data is pretty much a shell script thats executed when your ec2 instance launches. you can get it to pull the latest code and run it

@Moe's answer (or something like it is the right one). But just as another thought, you could write some Ruby which queries AWS on deploy to fetch the list of servers to which Capistrano will deploy. The issue with this approach is that you will have to manually deploy to all servers every time auto-scaling adds a server, which kind of defeats the purpose.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM