Commit 05ee9faa authored by Adrian Rossouw's avatar Adrian Rossouw

Merge branch 'master' into dev-dns

parents 1a3fb455 863579a1
......@@ -220,7 +220,7 @@ To make sure that the Aegir backend, and all the possible web servers can
reach your database server, you need to configure mysql to listen on all
the public IP addresses available to it.
/etc/mysql/my.conf configuration line to comment out::
/etc/mysql/my.cnf configuration line to comment out::
bind-address = 127.0.0.1
Now you need to restart mysql, to clear any caches.
......
......@@ -170,4 +170,4 @@ else
fi
msg "Installing the frontend"
$DRUSH hostmaster-install --aegir_host=$AEGIR_HOST --aegir_db_user=$AEGIR_DB_USER --aegir_db_pass=$AEGIR_DB_PASS $@
$DRUSH hostmaster-install --aegir_host=$AEGIR_HOST --aegir_db_user=$AEGIR_DB_USER --aegir_db_pass=$AEGIR_DB_PASS --version=$AEGIR_VERSION $@
......@@ -5,77 +5,105 @@
*/
function drush_provision_hostmaster_migrate_validate($site, $platform) {
$data = drush_get_merged_options();
// add a server record :
$server = '@server_master';
drush_backend_invoke_args("provision-save", array($server), array(
'context_type' => 'server',
'aegir_root' => dirname(rtrim($data['config_path'], '/')),
'remote_host' => php_uname('n'),
'script_user' => $data['script_user'],
// apache or nginx or..
'http_service_type' => drush_get_option('http_service_type', 'apache', 'options'),
'web_group' => $data['web_group'],
'master_url' => $data['master_url'],
'restart_cmd' => $data['restart_cmd'],
// mysql
'db_service_type' => 'mysql',
'master_db' => $data['master_db'],
));
provision_backend_invoke($server, 'provision-verify');
drush_set_option('server_name', $server);
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
$alias_file = drush_server_home() . '/.drush/server_master.alias.drushrc.php';
$old_platform = '@platform_' . preg_replace("/[!\W]/", "", basename(rtrim($data['publish_path'], '/')));
drush_backend_invoke_args("provision-save", array($old_platform), array(
'context_type' => 'platform',
'server' => $server,
'web_server' => $server,
'root' => $data['publish_path'],
));
provision_backend_invoke($old_platform, 'provision-verify');
drush_set_option('old_platform', $old_platform);
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
$new_platform = '@platform_' . preg_replace("/[!\W]/", "", basename(rtrim($platform, '/')));
drush_backend_invoke_args("provision-save", array($new_platform), array(
'context_type' => 'platform',
'server' => $server,
'web_server' => $server,
'root' => $platform,
'makefile' => dirname(__FILE__) . '/aegir.make',
));
provision_backend_invoke($new_platform, 'provision-verify');
drush_set_option('new_platform', $new_platform);
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
// If the alias file exists, it means we are migrating from a post alpha9 release.
if (file_exists($alias_file)) {
provision_backend_invoke('@server_master', 'provision-verify');
provision_backend_invoke('@hostmaster', 'provision-verify');
drush_set_option('site_name', '@hostmaster');
drush_set_option('old_platform', d('@hostmaster')->platform->name);
$site_name = '@hostmaster';
drush_backend_invoke_args("provision-save", array($site_name), array(
'context_type' => 'site',
'platform' => $old_platform,
'db_server' => $server,
'uri' => $site,
'profile' => 'hostmaster',
));
provision_backend_invoke($site_name, 'provision-verify');
drush_set_option('site_name', $site_name);
// exit if an error has occured.
if (drush_get_error()) {
return false;
$new_platform = '@platform_' . preg_replace("/[!\W]/", "", basename(rtrim($platform, '/')));
drush_backend_invoke_args("provision-save", array($new_platform), array(
'context_type' => 'platform',
'server' => '@server_master',
'web_server' => '@server_master',
'root' => $platform,
'makefile' => dirname(__FILE__) . '/aegir.make',
));
provision_backend_invoke($new_platform, 'provision-verify');
drush_set_option('new_platform', $new_platform);
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
}
else {
// add a server record :
$server = '@server_master';
drush_backend_invoke_args("provision-save", array($server), array(
'context_type' => 'server',
'aegir_root' => dirname(rtrim($data['config_path'], '/')),
'remote_host' => php_uname('n'),
'script_user' => $data['script_user'],
// apache or nginx or..
'http_service_type' => drush_get_option('http_service_type', 'apache', 'options'),
'web_group' => $data['web_group'],
'master_url' => $data['master_url'],
'restart_cmd' => $data['restart_cmd'],
// mysql
'db_service_type' => 'mysql',
'master_db' => $data['master_db'],
));
provision_backend_invoke($server, 'provision-verify');
drush_set_option('server_name', $server);
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
$old_platform = '@platform_' . preg_replace("/[!\W]/", "", basename(rtrim($data['publish_path'], '/')));
drush_backend_invoke_args("provision-save", array($old_platform), array(
'context_type' => 'platform',
'server' => $server,
'web_server' => $server,
'root' => $data['publish_path'],
));
provision_backend_invoke($old_platform, 'provision-verify');
drush_set_option('old_platform', $old_platform);
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
$new_platform = '@platform_' . preg_replace("/[!\W]/", "", basename(rtrim($platform, '/')));
drush_backend_invoke_args("provision-save", array($new_platform), array(
'context_type' => 'platform',
'server' => $server,
'web_server' => $server,
'root' => $platform,
'makefile' => dirname(__FILE__) . '/aegir.make',
));
provision_backend_invoke($new_platform, 'provision-verify');
drush_set_option('new_platform', $new_platform);
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
$site_name = '@hostmaster';
drush_backend_invoke_args("provision-save", array($site_name), array(
'context_type' => 'site',
'platform' => $old_platform,
'db_server' => $server,
'uri' => $site,
'profile' => 'hostmaster',
));
provision_backend_invoke($site_name, 'provision-verify');
drush_set_option('site_name', $site_name);
// exit if an error has occured.
if (drush_get_error()) {
return false;
}
}
}
......
......@@ -49,9 +49,11 @@ function drush_provision_drupal_provision_install() {
// Requires at least the database settings to complete.
provision_prepare_environment();
_provision_drupal_create_settings_file();
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_SITE);
provision_save_site_data();
drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_SITE);
// call a backend task to do the actual installation.
$result = provision_backend_invoke(d()->name, "provision-install-backend");
// pass the login link back to the front end.
......
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