Using deployer for migrations - Good idea? If so, how to get a list of available hosts? #3861
-
Occasionally I need to migrate a site from one server to another. I currently manage this as follows using deployer at each step before updating the DNS:
The problem with this is everything is going via my local environment so it's not as fast as it would be going direct from server to server which increases downtime. I'm wondering if it makes sense to do:
I'm currently resigned to doing this with three deployer tasks. One for step 1, another for steps 2 and 3 and a third for step 4. The first two are easy and standard, but for the second I'm not quite sure how to get a list of current hosts that the user can select from and I can then use in the scp command (I've already set up and tested the SSH connection manually). So the first question is whether this is a good idea or if it could be done better (sticking with deployer)? I'm aware of other tools but I like to keep things simple. If this seems reasonable then it would be useful to be able to get a list of hosts like those presented when running a deploy without specifying a host or stage. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
After spending a day I think I can answer "yes" to the first part and "not needed" to the second (better to specify in the host config). Furthermore I'd forgotten the on( host() ) capability which means I can wrap it all up in a single task, happy days. |
Beta Was this translation helpful? Give feedback.
After spending a day I think I can answer "yes" to the first part and "not needed" to the second (better to specify in the host config). Furthermore I'd forgotten the on( host() ) capability which means I can wrap it all up in a single task, happy days.