Commit a6de7200 authored by anarcat's avatar anarcat Committed by anarcat

Merge commit 'provision-0.4-rc1' into prod-koumbit

parents b42d1462 51f53511
......@@ -5,5 +5,5 @@ projects[drupal][type] = "core"
projects[hostmaster][type] = "profile"
projects[hostmaster][download][type] = "get"
projects[hostmaster][download][url] = "http://files.aegirproject.org/hostmaster-0.4-beta2.tgz"
projects[hostmaster][download][url] = "http://files.aegirproject.org/hostmaster-0.4-rc1.tgz"
projects[hostmaster][download][directory_name] = "hostmaster"
......@@ -71,7 +71,7 @@ class provisionService_db extends provisionService {
function suggest_db_name() {
$uri = $this->context->uri;
$suggest_base = substr(str_replace(array('.', '-'), '' , ereg_replace('^www\.', '', $uri)), 0, 16);
$suggest_base = substr(str_replace(array('.', '-'), '' , preg_replace('/^www\./', '', $uri)), 0, 16);
if (!$this->database_exists($suggest_base)) {
return $suggest_base;
......
......@@ -41,6 +41,9 @@ function drush_dns_provision_zone($action, $zone, $name = null, $type = null, $d
break;
case 'rr-add':
$record = d()->service('dns')->config('zone', $zone)->record_get($name);
if (!is_array($record[$type])) {
$record[$type] = array();
}
$record[$type] = array_merge($record[$type], array($destination));
$status = d()->service('dns')->config('zone', $zone)->record_set($name, $record)->write();
break;
......@@ -281,7 +284,7 @@ class provisionService_dns extends provisionService {
if ($status) {
drush_log(dt("creating zone configuration on slaves"));
$status = $this->_each_server("create_zone", $zone);
$status = $this->_each_server("create_zone", array($zone));
}
return $status;
}
......@@ -295,7 +298,7 @@ class provisionService_dns extends provisionService {
if ($status) {
drush_log(dt("deleting zone configuration from slaves"));
$status = $this->_each_server("delete_zone", $zone);
$status = $this->_each_server("delete_zone", array($zone));
}
return $status;
}
......
......@@ -16,7 +16,7 @@ fairly simple. It's 3 basic steps::
1. Install requirements
2. Configure system requirements, which include::
* create a Aegir user
* configure Apache, MySQL, DNS, etc
* configure Apache (or Nginx with PHP-FPM), MySQL, DNS, etc
3. Run the install script.
Those steps are detailed below. The following instructions provide example
......@@ -32,10 +32,11 @@ bullet-point summary of the steps required for the installation. In case of
conflict between INSTALL.txt and other documentation, INSTALL.txt should be
considered the canonical source of information.
Also note that those instructions setup a complete Aegir system. If you want
to only setup a new server, it should be sufficient to install requirement
(step 1) and configure them (step 2). You will just need the --backend-only flag
to avoid installing the frontend on the server.
Also note that these instructions setup a complete Aegir system. If you want
to only setup a new remote web/db server, it should be sufficient to install
requirements (step 1), configure them (step 2) and follow the Remote server
how-to which you can find at http://community.aegirproject.org/node/30.
1. Install software requirements
================================
......@@ -53,6 +54,7 @@ assumed to be run as root user.
A standard umask of 022 is assumed. This is the default on most systems.
Web server
----------
......@@ -62,6 +64,15 @@ need root access to that server and the server must be reserved for
Aegir. Sharing the server with other control panels such as Cpanel, Plesk or
AlternC will very likely create problems and is not supported.
Aegir also supports Nginx web server, but requires at least version 0.7.27 or
newer. Since Nginx doesn't provide php-cgi or php-fpm (recommended) modules,
you will need to install and run php-fpm server separately. You can find
useful examples and tips in the third party Barracuda installer available
at http://gitorious.org/aegir/barracuda-octopus. Note: this third party
installer is not supported by the core Aegir developers, but you can find
helpful community support at http://community.aegirproject.org.
PHP 5.2
-------
......@@ -75,12 +86,15 @@ load. As a result, we suggest using PHP 5.2 for the time-being.
See http://drupal.org/node/360605 (amongst other issues) for details.
Database server
---------------
You will require a database server, obviously. Aegir currently only supports
MySQL. It is preferable to use a dedicated server since Aegir will create
database users and will requires the use of the mysql 'root' user.
MySQL and MariaDB. It is preferable to use a dedicated (not shared-hosting)
server since Aegir will create database users and will require the use of the
MySQL 'root' user.
Mail transfer agent
-------------------
......@@ -92,6 +106,7 @@ email". Additional messages will show that site has been removed because of
this problem. To remedy the situation simply install an MTA like sendmail,
postfix, or exim and do the minimal configuration.
Other utilities: sudo, rsync, git and unzip
------------------------------
......@@ -104,13 +119,14 @@ The jQueryUI library is used in the Aegir UI, unzip is required to extract it.
Sudo is required to allow the aegir user the limited privilege to restart the
webserver when required. Rsync is used to sync files to remote servers.
Summary
-------
This may vary according to your platform, but under a Debian derivative, you
can install all those packages using the following.
Shell commands::
Shell commands as root::
apt-get install apache2 php5 php5-cli php5-gd php5-mysql mysql-server \
postfix sudo rsync git-core unzip
......@@ -150,6 +166,7 @@ the resolved IP address to be the '127.0.0.1' loopback address.
If you intend to manage multiple servers using Aegir, you will need to
make sure that the IP address is the public IP of this server.
Aegir user
----------
......@@ -170,7 +187,7 @@ username if desired.
In addition we will create a directory layout for Aegir configuration and
backups.
Shell commands::
Shell commands as root::
adduser --system --group --home /var/aegir aegir
adduser aegir www-data #make aegir a user of group www-data
......@@ -196,7 +213,6 @@ Change the memory_limit directive in /etc/php5/apache2/php.ini to read::
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)
Apache configuration
--------------------
......@@ -228,21 +244,47 @@ file.
/etc/sudoers configuration::
aegir ALL=NOPASSWD: /usr/sbin/apache2ctl
Nginx configuration
--------------------
Aegir assumes standard Nginx configuration is available on the server, and
generates its own configuration files. The way we enable this is by
symlinking a single file which contains all the configuration necessary.
In Debian-based systems, you should symlink this file inside
``/etc/nginx/conf.d`` that will be parsed on startup.
Shell command as root::
ln -s /var/aegir/config/nginx.conf /etc/nginx/conf.d/aegir.conf
**Do not reload/restart Nginx after running these commands, it will fail.**
The installer script creates the configuration file referenced by the newly
created symlink.
The aegir user needs to have sudo access. Add the relevant line to your sudoers
file.
/etc/sudoers configuration::
aegir ALL=NOPASSWD: /etc/init.d/nginx
Remote web servers
------------------
Any number of remote web servers may be configured. They need an aegir user and
Apache configuration as above, with the same user name and directory paths. SSH
public/private keys should be set up so hostmaster's Aegir user can access
remote web Aegir users with no passwords. The above apache configuration needs
remote web Aegir users with no passwords. The above Apache configuration needs
to be performed too.
They will also need a login shell, which can be modified using the ``chsh`` command.
Shell command as root::
Shell commands as root::
chsh -s /bin/sh aegir
apt-get install rsync apache2 php5 php5-cli php5-mysql
Database configuration
----------------------
......@@ -269,6 +311,7 @@ If you are concerned about MySQL being accessible in this way, you can also
configure your firewall to only allow incoming connections from certain addresses.
This is outside the scope of this document however.
3. Run the install script
=========================
......@@ -276,6 +319,7 @@ This section deals with the actual installation of Aegir. You can
install aegir in one of two ways: one assumes you have already
downloaded drush and provision, while the other will do that for you.
3.1 Installing aegir with only the install.sh script
----------------------------------------------------
......@@ -285,8 +329,8 @@ as the aegir user created above, so it needs to be placed somewhere that the
aegir user can access in order to execute it. This file is available in
Provision or can be downloaded through the web with this command::
Shell commands::
wget -O install.sh 'http://git.aegirproject.org/?p=provision.git;a=blob_plain;f=install.sh.txt;hb=provision-0.4-beta2'
Shell command::
wget -O install.sh 'http://git.aegirproject.org/?p=provision.git;a=blob_plain;f=install.sh.txt;hb=provision-0.4-rc1'
By default, the install script will install the "correct" version of Aegir
(ie. if it was downloaded through git, it will install the version from the
......@@ -294,9 +338,12 @@ git master branch. If you downloaded an official release, it should install
the official release.). You can modify which version to install by editing the
AEGIR_VERSION variable in the script.
Shell commands::
Shell command for Apache version::
su -s /bin/sh aegir -c "sh install.sh"
Shell command for Nginx version::
su -s /bin/sh aegir -c "sh install.sh --http_service_type=nginx"
Note you must run the above command as root or prefix with sudo.
You will be prompted for the information necessary to complete the
......@@ -306,6 +353,7 @@ Once you have run install.sh once, drush and provision should be
installed and you can use the more powerful hostmaster-install command
to retry the install if it failed the first time.
3.2 Installing aegir with drush and provision installed
-------------------------------------------------------
......@@ -315,7 +363,7 @@ provision in the commands directory of Drush (either ~aegir/.drush or
is properly installed, you can install all other aegir components using
the hostmaster-install command.
Shell commands::
Shell command::
drush hostmaster-install --version=HEAD
......@@ -335,6 +383,7 @@ or if not provided as a command line switch, the address prompted by the
installer process. This e-mail address will also be used as the default e-mail
address of the first user and client in Aegir, but can be changed later.
Checkpoint / Finished!
----------------------
......
......@@ -57,7 +57,7 @@ Make sure you download it to somewhere that the aegir user can access in order
to execute it.
Shell commands::
wget -O upgrade.sh.txt 'http://git.aegirproject.org/?p=provision.git;a=blob_plain;f=upgrade.sh.txt;hb=provision-0.4-beta2'
wget -O upgrade.sh.txt 'http://git.aegirproject.org/?p=provision.git;a=blob_plain;f=upgrade.sh.txt;hb=provision-0.4-rc1'
You may need to edit the script to set any variables that are different from the
defaults. Pay particular attention to the OLD_DRUPAL_DIR variable, as you may be
......@@ -86,20 +86,20 @@ you are reading this document.
Shell commands::
export AEGIR_VERSION=0.4-beta2
export AEGIR_DIR=/var/aegir
export DRUPAL_DIR=$AEGIR_DIR/hostmaster-$AEGIR_VERSION
export AEGIR_VERSION=0.4-rc1
export AEGIR_HOME="$HOME"
export DRUPAL_DIR=$AEGIR_HOME/hostmaster-$AEGIR_VERSION
export DRUSH_VERSION=6.x-3.3
export DRUSH_MAKE_VERSION=6.x-2.0-beta9
export DRUSH_MAKE_VERSION=6.x-2.0-beta11
export AEGIR_DOMAIN=aegir.example.com
export OLD_DRUPAL_DIR=$AEGIR_DIR/hostmaster-0.4-beta1
export OLD_DRUPAL_DIR=$AEGIR_HOME/hostmaster-0.4-beta2
This document also assumes drush is installed properly and we use an
environment variable to simplify the documentation again.
Shell commands::
export DRUSH="php $AEGIR_DIR/drush/drush.php"
export DRUSH="php $AEGIR_HOME/drush/drush.php"
Generic upgrade instructions
============================
......@@ -134,7 +134,7 @@ frontend.
Shell commands::
cd $AEGIR_DIR
cd $AEGIR_HOME
mv drush drush.bak
wget http://ftp.drupal.org/files/projects/drush-$DRUSH_VERSION.tar.gz
gunzip -c drush-$DRUSH_VERSION.tar.gz | tar -xf -
......
......@@ -146,7 +146,9 @@ class provisionService_http_public extends provisionService_http {
));
provision_file()->create_dir($this->server->http_platforms_path, dt("Platforms"), 0755);
$this->sync($this->server->http_platforms_path);
$this->sync($this->server->http_platforms_path, array(
'exclude' => $this->server->http_platforms_path . '/*', // Make sure remote directory is created
));
}
parent::verify_server_cmd();
......
This diff is collapsed.
......@@ -22,8 +22,9 @@ class provisionService_http_nginx extends provisionService_http_public {
$this->server->shell_exec('nginx -V');
$this->server->nginx_has_gzip = preg_match("/(with-http_gzip_static_module)/", implode('', drush_shell_exec_output()), $match);
$this->server->nginx_has_upload_progress = preg_match("/(nginx-upload-progress-module)/", implode('', drush_shell_exec_output()), $match);
$this->server->nginx_has_new_version = preg_match("/(nginx\/0\.8\.)/", implode('', drush_shell_exec_output()), $match);
$this->server->nginx_has_new_version = preg_match("/(Barracuda\/0\.9\.)/", implode('', drush_shell_exec_output()), $match);
$this->server->provision_db_cloaking = FALSE;
$this->server->nginx_web_server = 1;
}
function verify_server_cmd() {
......
This diff is collapsed.
......@@ -25,26 +25,54 @@
fastcgi_param REDIRECT_STATUS 200;
fastcgi_index index.php;
## Default index files
index index.php index.html;
## Size Limits
client_body_buffer_size 64k;
client_header_buffer_size 32k;
client_max_body_size 50m;
client_max_body_size 100m;
large_client_header_buffers 32 32k;
connection_pool_size 256;
request_pool_size 4k;
server_names_hash_bucket_size 128;
server_names_hash_bucket_size 512;
server_names_hash_max_size 8192;
types_hash_max_size 8192;
types_hash_bucket_size 128;
types_hash_bucket_size 512;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
## Timeouts
client_body_timeout 60;
client_header_timeout 60;
send_timeout 60;
lingering_time 30;
lingering_timeout 5;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
## Open File Performance
open_file_cache max=8000 inactive=30s;
open_file_cache_valid 60s;
open_file_cache_min_uses 3;
open_file_cache_errors on;
## FastCGI Caching
fastcgi_cache_path /var/lib/nginx/speed
levels=2:2:2
keys_zone=speed:50m
inactive=8h
max_size=1g;
## General Options
ignore_invalid_headers on;
limit_zone gulag $binary_remote_addr 10m;
recursive_error_pages on;
reset_timedout_connection on;
fastcgi_intercept_errors on;
## TCP options
tcp_nopush on;
......@@ -55,19 +83,21 @@
## Compression
gzip_buffers 16 8k;
gzip_comp_level 9;
gzip_comp_level 5;
gzip_http_version 1.1;
gzip_min_length 10;
gzip_types text/plain text/css image/png image/gif image/jpeg application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_vary on;
gzip_proxied any;
gzip_disable "MSIE [1-6]\.";
<?php
if ($server->nginx_has_gzip) {
print ' gzip_static on\;';
<?php
$nginx_has_gzip = drush_get_option('nginx_has_gzip');
if ($nginx_has_gzip) {
print " gzip_static on;\n";
}
if ($server->nginx_has_upload_progress) {
print ' upload_progress uploads 1m\;';
$nginx_has_upload_progress = drush_get_option('nginx_has_upload_progress');
if ($nginx_has_upload_progress) {
print " upload_progress uploads 1m;\n";
}
?>
......
server {
<?php
print " include " . $server->include_path . "/fastcgi_params.conf;\n";
<?php
if ($ssl_redirection || $this->redirection) {
// Redirect all aliases to the main http url using separate vhosts blocks to avoid if{} in Nginx.
foreach ($this->aliases as $alias_url) {
print "server {\n";
print " listen {$ip_address}:{$http_port};\n";
print " server_name {$alias_url};\n";
print " rewrite ^ \$scheme://{$this->uri}\$request_uri? permanent;\n";
print "}\n";
}
}
?>
server {
include <?php print "{$server->include_path}"; ?>/fastcgi_params.conf;
limit_conn gulag 10; # like mod_evasive - this allows max 10 simultaneous connections from one IP address
listen <?php print $ip_address . ':' . $http_port; ?>;
server_name <?php print $this->uri . ' ' . implode(' ', $this->aliases); ?>;
root <?php print $this->root; ?>;
index index.php index.html;
server_name <?php print $this->uri; ?><?php if (!$this->redirection && is_array($this->aliases)) : foreach ($this->aliases as $alias_url) : if (trim($alias_url)) : ?> <?php print $alias_url; ?><?php endif; endforeach; endif; ?>;
root <?php print "{$this->root}"; ?>;
<?php
$nginx_has_new_version = drush_get_option('nginx_has_new_version');
$nginx_has_upload_progress = drush_get_option('nginx_has_upload_progress');
if ($this->redirection || $ssl_redirection) {
if ($ssl_redirection && !$this->redirection) {
// redirect aliases in non-ssl to the same alias on ssl.
print "\n rewrite ^/(.*)$ https://\$host/$1 permanent;\n";
print "\n rewrite ^ https://\$host\$request_uri? permanent;\n";
}
elseif ($ssl_redirection && $this->redirection) {
// redirect all aliases + main uri to the main https uri.
print "\n rewrite ^/(.*)$ https://{$this->uri}/$1 permanent;\n";
print "\n rewrite ^ https://{$this->uri}\$request_uri? permanent;\n";
}
elseif (!$ssl_redirection && $this->redirection) {
// Redirect all aliases to the main http url.
print "\n if (\$host !~ ^({$this->uri})$ ) {\n rewrite ^/(.*)$ http://{$this->uri}/$1 permanent;\n }\n";
if ($server->nginx_has_new_version || $server->nginx_has_upload_progress) {
print " include " . $server->include_path . "/nginx_advanced_include.conf;\n";
}
......
server {
listen <?php print $ip_address . ':' . $http_port; ?>;
server_name <?php print $this->uri . ' ' . implode(' ', $this->aliases); ?>;
root <?php print $this->root; ?>;
index index.php index.html;
location / {
root /var/www/nginx-default;
index index.html index.htm;
rewrite ^/(.*)$ <?php print $this->platform->server->web_disable_url . '/' . $this->uri ?>? permanent;
}
root /var/www/nginx-default;
index index.html index.htm;
### Dont't reveal Aegir front-end URL here.
}
<?php if ($this->ssl_enabled && $this->ssl_key) : ?>
server {
<?php
print " include " . $server->include_path . "/fastcgi_ssl_params.conf;\n";
<?php
if ($this->redirection) {
// Redirect all aliases to the main https url using separate vhosts blocks to avoid if{} in Nginx.
foreach ($this->aliases as $alias_url) {
print "server {\n";
print " listen {$ip_address}:{$http_ssl_port};\n";
print " server_name {$alias_url};\n";
print " rewrite ^ \$scheme://{$this->uri}\$request_uri? permanent;\n";
print "}\n";
}
}
?>
server {
include <?php print "{$server->include_path}"; ?>/fastcgi_ssl_params.conf;
limit_conn gulag 10; # like mod_evasive - this allows max 10 simultaneous connections from one IP address
listen <?php print "{$ip_address}:{$http_ssl_port}"; ?>;
server_name <?php print $this->uri . ' ' . implode(' ', $this->aliases); ?>;
root <?php print $this->root; ?>;
index index.php index.html;
server_name <?php print $this->uri; ?><?php if (!$this->redirection && is_array($this->aliases)) : foreach ($this->aliases as $alias_url) : if (trim($alias_url)) : ?> <?php print $alias_url; ?><?php endif; endforeach; endif; ?>;
root <?php print "{$this->root}"; ?>;
ssl on;
ssl_certificate <?php print $ssl_cert; ?>;
ssl_certificate_key <?php print $ssl_cert_key; ?>;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers HIGH:!ADH:!MD5;
ssl_prefer_server_ciphers on;
keepalive_timeout 70;
<?php
if ($this->redirection) {
// Redirect all aliases to the main https url.
print "\n if (\$host !~ ^({$this->uri})$ ) {\n rewrite ^/(.*)$ https://{$this->uri}/$1 permanent;\n }\n";
}
if ($server->nginx_has_new_version || $server->nginx_has_upload_progress) {
$nginx_has_new_version = drush_get_option('nginx_has_new_version');
$nginx_has_upload_progress = drush_get_option('nginx_has_upload_progress');
if ($nginx_has_new_version || $nginx_has_upload_progress) {
print " include " . $server->include_path . "/nginx_advanced_include.conf;\n";
}
else {
......
......@@ -2,28 +2,21 @@
<?php if ($this->ssl_enabled && $this->ssl_key) : ?>
server {
<?php
print " include " . $server->include_path . "/fastcgi_ssl_params.conf;\n";
?>
include <?php print "{$server->include_path}"; ?>/fastcgi_ssl_params.conf;
limit_conn gulag 10; # like mod_evasive - this allows max 10 simultaneous connections from one IP address
listen <?php print "{$ip_address}:{$http_ssl_port}"; ?>;
server_name <?php print $this->uri . ' ' . implode(' ', $this->aliases); ?>;
root <?php print $this->root; ?>;
index index.php index.html;
root /var/www/nginx-default;
index index.html index.htm;
ssl on;
ssl_certificate <?php print $ssl_cert; ?>;
ssl_certificate_key <?php print $ssl_cert_key; ?>;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers HIGH:!ADH:!MD5;
ssl_prefer_server_ciphers on;
keepalive_timeout 70;
location / {
root /var/www/nginx-default;
index index.html index.htm;
rewrite ^/(.*)$ <?php print $this->platform->server->web_disable_url . '/' . $this->uri ?>? permanent;
}
### Dont't reveal Aegir front-end URL here.
}
<?php endif; ?>
......
......@@ -15,7 +15,7 @@ function drush_provision_hostmaster_install_validate($site = NULL) {
drush_set_default('script_user', provision_current_user());
drush_set_default('web_group', _provision_default_web_group());
drush_set_default('http_service_type', 'apache');
drush_set_default('drush_make_version', '6.x-2.0-beta9');
drush_set_default('drush_make_version', '6.x-2.0-beta11');
drush_set_default('aegir_db_user', 'root');
$aegir_db_user = drush_get_option('aegir_db_user');
drush_set_default('makefile', $aegir_root . '/.drush/provision/aegir.make');
......
......@@ -28,7 +28,7 @@
########################################################################
# guess the aegir version based on the info file
AEGIR_VERSION="0.4-beta2"
AEGIR_VERSION="0.4-rc1"
DRUSH_VERSION=6.x-3.3
########################################################################
......
......@@ -64,13 +64,18 @@ We are making the following assumptions:
// add a server record :
$server = '@server_master';
/**
* @deprecated in drush3 it's 'options', in drush 4 it's 'cli', drop
* 'options' when we drop drush3 support
*/
$context = drush_get_context('cli') ? 'cli' : 'options';
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'),
'http_service_type' => drush_get_option('http_service_type', 'apache', $context),
'web_group' => $data['web_group'],
'master_url' => $data['master_url'],
'restart_cmd' => $data['restart_cmd'],
......
......@@ -87,6 +87,11 @@ function drush_provision_drupal_provision_backup() {
$command = "tar cpf %s .";
}
$result = drush_shell_exec($command, $backup_file);
// Get the size of the backup
$size = filesize($backup_file);
drush_set_option('backup_file_size', $size);
chdir($olddir);
if (drush_get_option('cloaking_off_temp', FALSE)) {
......
......@@ -46,6 +46,13 @@ function drush_provision_drupal_provision_clone($new_uri, $platform = null) {
$options['aliases'] = array();
$options['redirection'] = 0;
// XXX: right now we just drop SSL configuration when cloning, because
// we do not check if the site name change is compatible with the
// certificate. This can be removed when we a) check for wildcard
// certs and b) allow the user to change the cert from the UI.
$options['ssl_enabled'] = 0;
unset($options['ssl_key']);
if ($profile = drush_get_option('profile', FALSE)) {
$options['profile'] = $profile;
}
......
......@@ -2,7 +2,12 @@
// $Id$
$new_url = d()->uri;
$old_url = drush_get_option('old_uri', $new_url, 'options');
/**
* @deprecated in drush3 it's 'options', in drush 4 it's 'cli', drop
* 'options' when we drop drush3 support
*/
$context = drush_get_context('cli') ? 'cli' : 'options';
$old_url = drush_get_option('old_uri', $new_url, $context);
/**
* @file
......
......@@ -101,6 +101,7 @@ function drush_provision_drupal_provision_install_backend() {
function provision_drupal_sync_site() {
d()->service('http')->sync(d()->root, array('exclude-sites' => TRUE));
if (d()->type === 'site') {
// Sync all filesystem changes to the remote server.
d()->service('http')->sync(d()->site_path, array('no-delete' => TRUE));
}
}
......@@ -174,27 +175,42 @@ function _provision_drupal_create_directories($url = NULL, $profile = NULL) {
$chgrp = array();
// special case: platform. do not handle files dir
if ($url != 'all') {
$mkdir["sites/$url/files"] = 02770;
$chgrp["sites/$url/files"] = d('@server_master')->web_group;
$mkdir["sites/$url/files"] = 02770;
$chgrp["sites/$url/files"] = d('@server_master')->web_group;
$mkdir["sites/$url/files/tmp"] = 02770;
$chgrp["sites/$url/files/tmp"] = d('@server_master')->web_group;
$mkdir["sites/$url/files/tmp"] = 02770;
$chgrp["sites/$url/files/tmp"] = d('@server_master')->web_group;
$mkdir["sites/$url/files/images"] = 02770;
$chgrp["sites/$url/files/images"] = d('@server_master')->web_group;
$mkdir["sites/$url/files/images"] = 02770;
$chgrp["sites/$url/files/images"] = d('@server_master')->web_group;
$mkdir["sites/$url/files/pictures"] = 02770;
$chgrp["sites/$url/files/pictures"] = d('@server_master')->web_group;
$mkdir["sites/$url/files/pictures"] = 02770;
$chgrp["sites/$url/files/pictures"] = d('@server_master')->web_group;
$mkdir["sites/$url/files/css"] = 02770;
$chgrp["sites/$url/files/css"] = d('@server_master')->web_group;
$mkdir["sites/$url/files/js"] = 02770;
$chgrp["sites/$url/files/js"] = d('@server_master')->web_group;
$mkdir["sites/$url/files/ctools"] = 02770;
$chgrp["sites/$url/files/ctools"] = d('@server_master')->web_group;
$mkdir["sites/$url/files/imagecache"] = 02770;
$chgrp["sites/$url/files/imagecache"] = d('@server_master')->web_group;
$mkdir["sites/$url/files/locations"] = 02770;
$chgrp["sites/$url/files/locations"] = d('@server_master')->web_group;
// d7 support
$mkdir["sites/$url/private"] = 02770;
$chgrp["sites/$url/private"] = d('@server_master')->web_group;
$mkdir["sites/$url/private"] = 02770;
$chgrp["sites/$url/private"] = d('@server_master')->web_group;
$mkdir["sites/$url/private/files"] = 02770;
$chgrp["sites/$url/private/files"] = d('@server_master')->web_group;
$mkdir["sites/$url/private/files"] = 02770;
$chgrp["sites/$url/private/files"] = d('@server_master')->web_group;
$mkdir["sites/$url/private/temp"] = 02770;
$chgrp["sites/$url/private/temp"] = d('@server_master')->web_group;
$mkdir["sites/$url/private/temp"] = 02770;
$chgrp["sites/$url/private/temp"] = d('@server_master')->web_group;
}
// These paths should not have recursive operations performed on them.
......
......@@ -60,7 +60,6 @@
$conf['install_profile'] = '<?php print $this->profile ?>';
$conf['file_directory_path'] = 'sites/<?php print $this->uri ?>/files';
$conf['file_directory_temp'] = 'sites/<?php print $this->uri ?>/files/tmp';
$conf['cache'] = 1;
$conf['clean_url'] = 1;
<?php if (!$this->site_enabled) : ?>
......@@ -85,12 +84,12 @@
}
}
# Additional site configuration settings.
if (file_exists('<?php print $this->site_path ?>/local.settings.php')) {
include_once('<?php print $this->site_path ?>/local.settings.php');
}