This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function drush_db_provision_install_validate($url) { | |
provision_service('db', 'connect'); | |
} | |
function drush_db_pre_provision_install($url) { | |
provision_service('db', 'create_site_database', $url); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class provisionService { | |
} | |
class provisionService_null extends provisionService { | |
function __get($name) { | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class provisionServer { | |
public static function evaluate($options) { | |
return __CLASS__; | |
} | |
} | |
class provisionPlatform extends provisionServer { | |
public static function evaluate($options) { | |
if (isset($options['root'])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class provisionService_http_apache extends provisionService { | |
function create_site_config($url) { | |
$config = new provisionConfig_apache_site(drush_get_merged_options()); | |
return $config->write(); | |
} | |
function delete_site_config($url) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function environment_factory($options) { | |
$classes = array('provisionServer' => 'server_eval', 'provisionPlatform' => 'platform_eval', 'provisionSite' => 'site_eval'); | |
foreach ($classes as $class => $callback) { | |
if ($callback($options)) { | |
$className = $class; | |
} | |
else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function provision_environment_factory($options) { | |
$classes = array('provisionServer', 'provisionPlatform', 'provisionSite'); | |
if (provisionServer::evaluate($options)) { | |
$classname = array_shift($classes); | |
if (provisionPlatform::evaluate($options)) { | |
$classname = array_shift($classes); | |
if (provisionSite::evaluate($options)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moya:provision adrian$ cat ~/.drush/aliases/server_localhost.alias.drushrc.php | |
<?php | |
$options['aegir_root'] = '/Users/adrian/Projects/hosting'; | |
$options['db_service_type'] = 'mysql'; | |
$options['db_service_user'] = 'root'; | |
$options['db_service_pass'] = 'pass'; | |
$options['http_service_type'] = 'apache'; | |
$options['http_service_group'] = 'nogroup'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class provisionConfig_drushrc extends provisionConfig { | |
public $template = 'provision_drushrc.tpl.php'; | |
public $description = 'Drush configuration file'; | |
protected $mode = 0400; | |
protected $context_name = 'drush'; | |
function filename() { | |
return _drush_config_file($this->context_name); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$options['master_db'] = 'mysql://root:pass@localhost'; | |
$options['master_url'] = 'http://aegir.dev'; | |
$options['web_host'] = 'aegir.dev'; | |
$options['web_group'] = 'nogroup'; | |
$options['script_user'] = 'adrian'; | |
$options['restart_cmd'] = 'sudo /Applications/MAMP/bin/apache2/bin/apachectl graceful'; | |
$options['backup_path'] = '/Users/adrian/Projects/hosting/backups'; | |
$options['config_path'] = '/Users/adrian/Projects/hosting/config'; | |
$options['web_ip'] = '127.0.0.1'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$account_pass = provision_password(); | |
$settings = array( | |
'parameters' => array( | |
'profile' => $profile, | |
'locale' => $install_locale, | |
), | |
'settings_verified' => TRUE, /// this is supposed to mean, don't overwrite our generated settings.php | |
'forms' => array( | |
'install_settings_form' => $db_spec, | |
'install_configure_form' => array( |
OlderNewer