Commit c3443e72 authored by Adrian Rossouw's avatar Adrian Rossouw Committed by adrian

An in progress commit of the better parameterized help, for use with the requirement_help element.

parent 65c06028
......@@ -42,14 +42,13 @@ function _provision_mysql_user_requirements() {
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
EOF;
$help['summary'] = t('<p><strong>Mysql user account capable of creating new databases.</strong>
To be able to create new sites, the provisioning framework will need to be able
to create new databases and users. It is not recommended using the mysql root password for this,
but any account with the correct permissions will do.</p>');
$help['configuration'] = t('<p><strong>To configure:</strong>
Log in to your mysql server as root, and type in the following command:
<pre>@command_text</pre></p>', array('@command_text' => $command));
$help['title'] = t('Mysql user account capable of creating new databases.');
$help['summary'] = t('To be able to create new sites, the provisioning framework will need to be able
to create new databases and users. It is not recommended using the mysql root password for this,
but any account with the correct permissions will do.');
$help['configuration'] = t('Log in to your mysql server as root, and type in the following command:
<pre>@command_text</pre>', array('@command_text' => $command));
return $help;
}
......
This diff is collapsed.
......@@ -54,6 +54,7 @@ function provision_init() {
define('PROVISION_DOMAIN', drush_get_option(array('l', 'uri'), $_SERVER['HTTP_HOST']));
}
else {
define('PROVISION_DOMAIN', $_SERVER['HTTP_HOST']);
$docroot = $_SERVER['pwd'];
}
......@@ -61,6 +62,7 @@ function provision_init() {
define('PROVISION_DOCROOT_PATH', rtrim($path, '/'));
define('PROVISION_SITES_PATH', rtrim($path, '/') . '/sites');
define('PROVISION_DRUSH_PATH', drupal_get_path('module', 'drush') . '/drush.php');
$parts = explode("/", rtrim($path, '/'));
array_pop($parts);
define('PROVISION_PARENT_PATH', rtrim(implode("/" , $parts), '/'));
......
......@@ -20,11 +20,9 @@ function provision_apache_provision_service() {
function provision_apache_help($section) {
switch ($section) {
case 'admin/help/provision#requirements':
$output .= "<ol>";
$output .= '<li>' . _provision_requirements('config_path') . '</li>';
$output .= '<li>' . _provision_requirements('httpd_conf') . '</li>';
$output .= '<li>' . _provision_requirements('visudo') . '</li>';
$output .= "</ol>";
$output .= _provision_requirements('config_path');
$output .= _provision_requirements('httpd_conf');
$output .= _provision_requirements('visudo');
return $output;
break;
}
......@@ -42,19 +40,17 @@ function _provision_config_path_requirements() {
[$username@hm2 ~]$ chmod 0700 $vhost_path
EOF;
$help['title'] = t('Web server inaccessible directory to store Virtual Host information.');
$help['summary'] = t('The provision framework takes special care to make sure that the file permissions of the
hosted sites are always as safe as can be, especially to make sure that the web server does
not have the ability to modify the code of the site, therefor this information is required
to assure that safety while keeping the sites accessible.
The recommended path is directly above your platform path, but it can be anywhere.');
$help['summary'] = t('<p><strong>Web server inaccessible directory to store Virtual Host information.</strong>
The provision framework takes special care to make sure that the file permissions of the
hosted sites are always as safe as can be, especially to make sure that the web server does
not have the ability to modify the code of the site, therefor this information is required
to assure that safety while keeping the sites accessible.
The recommended path is directly above your platform path, but it can be anywhere.</p>');
$help['configuration'] = t('<p>Based on your server configuration we have determined that your path should be <code>@vhost_path</code>,
$help['configuration'] = t('Based on your server configuration we have determined that your path should be <code>@vhost_path</code>,
but you can change it change them in the <a href="@provision_link">provisioning section</a></p>
<p><strong>To configure:</strong> this directory correctly, please enter the following commands :
<pre>@mkdir_cmd</pre></p>',$mkdir_cmd);
<pre>@mkdir_cmd</pre>',$mkdir_cmd);
return $help;
......@@ -65,16 +61,14 @@ function _provision_httpd_conf_requirements() {
$vhost_line = <<<EOF
Include $vhost_path
EOF;
$help['title'] = t('Access to the server\'s httpd.conf file.');
$help['summary'] = t('You are required to add a single line to the httpd.conf file, which allows
the system to load the additional virtual hosts that are generated.</p>
The location of this file differs between distributions,
but is most commonly found in <code>/etc/httpd</code> or <code>/etc/apache</a>.');
$help['summary'] = t('<p><strong>Access to the server\'s <code>httpd.conf</code> file.</strong>
You are required to add a single line to the httpd.conf file, which allows
the system to load the additional virtual hosts that are generated.</p>
The location of this file differs between distributions,
but is most commonly found in <code>/etc/httpd</code> or <code>/etc/apache</a>.</p>');
$help['configuration'] = t('<p><strong>To configure:</strong>
Once you have determined the location of your httpd.conf file, add the following line to it :
<pre>@vhost_line</pre></p>', array('@vhost_line' => $vhost_line));
$help['configuration'] = t('Once you have determined the location of your httpd.conf file, add the following line to it :
<pre>@vhost_line</pre>', array('@vhost_line' => $vhost_line));
return $help;
}
......@@ -90,14 +84,14 @@ EOF;
$username ALL=NOPASSWD: /usr/sbin/apachectl
EOF;
$help['summary'] = t('<p><strong>Ability to reload the httpd daemon.</strong>
As the provisioning framework should not be run as root,
and the web server group should not be allowed access to the
functionality to stop/start the web server, it is required that you provide access
to the Apache restart command for the user account the script will be running as.
If this is not configured, every command will ask for a sudo password when restarting the server.</p>');
$help['configuration'] = t('<p><strong>To configure:</strong> Run the visudo command: <pre>@visudo_cmd</pre>
Then add the following line to the file: <pre>@visudo_line</pre></p>',
$help['title'] = t('Permission to restart the httpd daemon as the user the script is running as');
$help['summary'] = t('As the provisioning framework should not be run as root,
and the web server group should not be allowed access to the
functionality to stop/start the web server, it is required that you provide access
to the Apache restart command for the user account the script will be running as.
If this is not configured, every command will ask for a sudo password when restarting the server.');
$help['configuration'] = t('Run the visudo command: <pre>@visudo_cmd</pre>
Then add the following line to the file: <pre>@visudo_line</pre>',
$visudo_cmd);
return $help;
......
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