Closed (duplicate)
Project:
Hostmaster (Aegir)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2010 at 19:39 UTC
Updated:
10 Mar 2017 at 08:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
steven jones commentedYup, it does. I came across this limitation, and it's a bit of a pain to workaround.
Subscribe.
Comment #2
Robin Millette commentedsubbing
Comment #3
tema commentedme too )
Comment #4
steven jones commentedWould love to have this.
Comment #5
steven jones commentedI need this, I don't think we can just grab the arguments directly from the command line, because they would also be used as arguments for the hosting-task command itself, which might have unexpected consequences. My current thinking is that we should just allow an additional option:
--task-argumentsthat accepts a JSON encoded array of arguments to pass directly into the task. This way we don't get any clashing. There is some precedent for using JSON to pass stuff around in Drush, that's how the backend invoke stuff works and can return data.Comment #6
steven jones commentedSo you can allow passing of the task args quite easily acutally, see the attached patch. But it's not actually much use, because the possible arguments are not defined anywhere, so you can't get default values etc. We should tighten the API in 2.x, also you can't really use it anyway, because most of the arguments are using internal hostmaster node IDs, instead of the context machine names, so we are expecting people using the command line to know the node IDs for the platforms they want etc. which is just silly.
This patch does work nicely for creating backup tasks with specific descriptions etc.
Comment #7
gmania commentedWe needed to be able to migrate from the command line as part of our "lite" continuous integration approach
http://community.aegirproject.org/discuss/our-zero-touch-build-setup-con...
This should be part of aegir core, but for now, Drush script to the rescue!
The following drush script takes as arguments the name of the site to migrate, and the name of the target platform, and looks up all the information needed to add a hosting migrate task to the front-end, and migrate the site on the backend. Since aegir tasks happen asynchronously, we also added a waiting period of up to 10 minutes for the platform to be available, since in the case of our automated deployment, we need to give it time to build
Here’s the drush script. Just add it anywhere in your /var/aegir directory (remember to chmod u+x it so that it can be run from the shell)
migrate.drush
To run it, call it within the hostmaster context:
/var/aegir/makes/migrate.drush @hostmaster SITE_TO_MIGRATE TARGET_PLATFORMComment #8
ergonlogicNew features need to be implemented in Aegir 3.x, then we can consider back-porting to Aegir 2.x.
Comment #9
helmo commentedThis is now fixed in #2845040: Allow task_args to be passed from `drush hosting-task` command.