> Hi, > > I am using the Python AWS library, boto: > > http://code.google.com/p/boto/ > > I have extended the EC2 instance stuff to create a node class, and I > put in some basic code that allows you to run commands on the remote > server through SSH. Needless to say, I think fabric is much more > sophisticated in this area, and I would like to leverage it's command > running abilities. > > Is there a preferred way to tie into the API without using the command > line constructs? > > Thanks, > > Brad > Cloud Engineer
Hi Brad, I've been using Boto + Fabric + glue code to setup relatively large performance test environments (1 server, 20-100 clients). Take a look here: <https://community.openvpn.net/openvpn/wiki/PerformanceTesting#Deployingclients> Some parts of the code you could perhaps use for your own needs. Note that the code would need an upgrade to Fabric 1.3.x and a later version of Boto. This would make it less complex by - removing the thread wrapper (configurer.py) around "fab" command - allowing filtering of EC2 instances by tags instead of the current hackish "userData"-based filtering Essentially you'd just need to launch the VMs using Boto, wait until they're online (in my case, launcher_ec2.py) and then generate env.hosts based on that. Then all is needed to call "fab" with that env.hosts list should do the trick. If you got tons of servers to configure, the @parallel task decorator will help. Samuli
_______________________________________________ Fab-user mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/fab-user
