Posted by jamiet on October 14, 2010 at 4:50pm
I noticed there were a number of drush provision commands to backup, deploy backup, and install sites but I could not workout if there was a provision command to create a new platform within the Aegir environment? Does anyone know if this commands exist?
TIA,
JamieT
Comments
drush dl
I use:
drush dl [drupal-x.y]
So, for example, I just created a drupal 6.19 platform:
sudo su -s /bin/bash aegir
cd /var/aegir/platforms
drupal dl drupal-6.19
You can also create a make file that includes not only the core drupal code but also all of the modules and themes you want in your platform.
HAJ
Sorry not quite what I meant.
Sorry not quite what I meant. I have a few build scripts which run drush make or wget to build the platform and also setup some directories and permissions etc. So when it comes to creating a new platform I run the script then I have to switch back into Aegir front end and create the new platform in there. I was wondering if I could run a drush command instead of switching over to the frontend.
Something like:
drush provision-create-platform --name=platform1 --root=/var/aegir/platform/platform1
In theory this would then create an import and verify task for the new platform similar to the frontend action.
I know that command is completely made up but wasn't sure if there was an actual command for doing this Hope that helps clarify,
Regards,
JamieT
Here's how you can verify a
Here's how you can verify a site:
drush @hostmaster hosting-task @testhrweb-qa4.p040.localhost verify
[app_aegir@prod-040-cms drupal-6.19_ucb_20100921_00]$ drush @hostmaster help hosting-task
execute a specific queue item
Arguments:
@context_name Context to work on
command provision-[command] to invoke
You can probably figure out how to do the platform from the above.
Hint look in your ~aegir/.drush
This assumes you are using a recent version (>0.4-alpha9?) of aegir.
Thanks for the pointer - I'm
Thanks for the pointer - I'm not sure I am quite there yet ;). Looking in ~aegir/.drush I can see the drush.inc files for platforms as this:
$aliases['platform_pst_pf_201010012002'] = array (
'context_type' => 'platform',
'root' => '/var/aegir/platforms/pst_pf_20101001-2002',
'server' => '@server_master',
'web_server' => '@server_master',
'makefile' => '',
);
So I could verify an existing platform with:
drush @hostmaster hosting-task @platform_pst_pf_201010012002 verify
But how would I create the platform initially using drush - I'd like to script the node/add/platform part?
TIA,
JamieT
You can use drupal_execute in
You can use drupal_execute in conjuction with the FormAPI
http://api.drupal.org/api/function/drupal_execute/6
Some (old) examples here http://drupal.org/node/178506#comment-633762
You'd have to pass in all the same data that you put in the Create Platform form. You'd need to create your own drush command to run it.