Commit aa300de0 authored by mig5's avatar mig5 Committed by mig5
Browse files

add a hostmaster-install command, update the to use it, try to fix...

add a hostmaster-install command, update the to use it, try to fix many other various issues with the initial server/platform/site verifications
parent ca1c4d40
......@@ -21,6 +21,7 @@ function drush_http_post_provision_verify($url = null) {
drush_set_option('master_url', drush_get_option('master_url'), 'user');
drush_set_option('web_host', drush_get_option('web_host', ''), 'user');
drush_set_option('web_ip', drush_get_option('web_ip', ''), 'user');
drush_set_option('web_port', drush_get_option('web_port', 80), 'user');
drush_set_option('web_group', drush_get_option('web_group'), 'user');
drush_set_option('script_user', drush_get_option('script_user'), 'user');
drush_set_option('restart_cmd', drush_get_option('restart_cmd'), 'user');
* @file manual site migrate system
function drush_provision_hostmaster_install($site, $platform, $client_email) {
$data = drush_get_merged_options();
$data['publish_path'] = $data['r'] = $data['root'] = realpath($platform);
$data['provision_context'] = "server";
$data['init_http'] = "apache";
$data['restart_cmd'] = _provision_default_restart_cmd();
$data['web_port'] = drush_get_option('web_port', 80);
// Server verify
drush_backend_invoke('provision-verify', $data);
// verify the current platform
drush_backend_invoke('provision-verify', array(
'root' => $platform, //drush_get_option(array('r', 'root'), $platform),
'provision_context' => "platform",
'publish_path' => drush_locate_root(drush_get_option(array('r', 'root'), NULL)),
'platform' => '5') // dirty hardcoded to create the first platform apache config
// this will become unnecessary when we have drush
// verify the site prior to migration
drush_backend_invoke('provision-install', array(
'uri' => $site,
'root' => $platform,
'profile' => "hostmaster",
'provision_context' => "site",
'client_email' => $client_email,
'port' => drush_get_option('web_port', 80))
......@@ -206,17 +206,15 @@ if [ ! -d $HOSTMASTER_DIR ] ; then
msg "Deploying hostmaster application"
$DRUSH hostmaster-make $HOSTMASTER_DIR
$DRUSH provision-verify --root="$HOSTMASTER_DIR" --provision_context="platform"
msg "Installing hostmaster"
$DRUSH provision-install --root="$HOSTMASTER_DIR" --provision_context="site" --client_email=$CLIENT_EMAIL --profile="hostmaster" "$AEGIR_DOMAIN"
$DRUSH hosting-setup --uri="$AEGIR_DOMAIN" -y
msg "Initializing the hosting system"
$DRUSH hosting-setup --root="$HOSTMASTER_DIR" --uri="$AEGIR_DOMAIN" -y
cat <<EOF
Aegir is installed. You can visit it at http://$AEGIR_DOMAIN
Aegir is now installed. You can visit it at http://$AEGIR_DOMAIN
......@@ -175,6 +175,15 @@ function provision_drush_command() {
$items['hostmaster-install'] = array(
'description' => dt('Install and verify the Hostmaster frontend.'),
'arguments' => array(
'' => dt('The name of the site to install'),
'/path/to/platform' => dt('The platform to install the site on.'),
'' => dt('The email account to send a welcome mail to'),
$items['hostmaster-pause'] = array(
'description' => dt('Prepare the site to be migrated to a new platform.'),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment