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

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

add a hostmaster-install command, update the install.sh 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', '127.0.0.1'), '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');
......
<?php
/**
* @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(
$site,
'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 hostmaster-install $AEGIR_DOMAIN $HOSTMASTER_DIR $CLIENT_EMAIL
$DRUSH provision-install --root="$HOSTMASTER_DIR" --provision_context="site" --client_email=$CLIENT_EMAIL --profile="hostmaster" "$AEGIR_DOMAIN"
cd $HOSTMASTER_DIR
$DRUSH hosting-setup --uri="$AEGIR_DOMAIN" -y
msg "Initializing the hosting system"
$DRUSH hosting-setup --root="$HOSTMASTER_DIR" --uri="$AEGIR_DOMAIN" -y
fi
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
EOF
......@@ -175,6 +175,15 @@ function provision_drush_command() {
),
);
$items['hostmaster-install'] = array(
'description' => dt('Install and verify the Hostmaster frontend.'),
'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
'arguments' => array(
'example.com' => dt('The name of the site to install'),
'/path/to/platform' => dt('The platform to install the site on.'),
'you@example.com' => 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