|
From: | Ian Stokes-Rees |
Subject: | [Fab-user] Parallel operations for container creation |
Date: | Tue, 14 May 2013 20:14:11 -0400 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 |
I have read http://docs.fabfile.org/en/1.6/usage/parallel.html and
many threads on this topic, but I thought I'd try in my own way to
phrase what I believe must be a common situation for many people. Short version: For simplicity, imagine a case with 3 VZ containers that I am trying to provision on the same container host. Right now I have to start 3 terminals, and I execute in each one of them: fab -H host --name container-1 --index 1 --mode prod --user jdoe fab -H host --name container-2 --index 2 --mode prod --user jdoe fab -H host --name container-3 --index 3 --mode prod --user jdoe I would much rather execute something like: fab -H host -P --name container-1, container-2,container-3 --index 1,2,3 --mode prod --user jdoe And have fab auto-magically map that one-liner to the 3 commands above and run them in parallel. That *seems* like a reasonable request, but I just can't find a way to make that happen. It is important enough for my work that I'd be willing to write some @map decorator or similar to facilitate an implementation. For a few more details, each container creation takes ~15 minutes. They parallelize almost perfectly, so rather than waiting 5 hours for 20 containers to all come up serially (20 x 15 minutes), I'd rather wait 15 minutes. There are some slight parameter differences for each container. Right now I need to start 20 terminal sessions and execute 20 slightly different commands. Error prone! TIA Ian |
[Prev in Thread] | Current Thread | [Next in Thread] |