? 553230.patch
? INSTALL.html
? INSTALL.html.txt
Index: INSTALL.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/profiles/hostmaster/INSTALL.txt,v
retrieving revision 1.30
diff -u -r1.30 INSTALL.txt
--- INSTALL.txt	19 Aug 2009 02:40:51 -0000	1.30
+++ INSTALL.txt	20 Aug 2009 14:40:46 -0000
@@ -1,15 +1,33 @@
--*-rst-*-
+.. This document is formatted using the ReST syntax.
 
-This document describes briefly how to install a multi-platform,
-single-server Aegir Drupal provisionning system. 
+=================================
+ Aegir Installation Instructions
+=================================
 
-This document is formatted using the ReST syntax.
+------------------------------------------------------------------------------------------------------------------
+ This document describes briefly how to install a multi-platform, single-server Aegir Drupal provisionning system.
+------------------------------------------------------------------------------------------------------------------
 
-Aegir 0.2 requirements
-======================
 
-This section describes what is expected of the servers Aegir is
-running on.
+Aegir requirements
+==================
+
+This section describes what is expected of the servers Aegir is running
+on.
+
+Aegir must run some UNIX flavour because the majority of functionality
+in this system occurs in the back-end, through command line scripting.
+There are also several features (such as symlinks), that are not
+available to users on Windows. There are no plans currently to add
+windows support.
+
+The level of access required to be able to configure this system is
+very far beyond what is commonly available to users with shared hosting.
+
+Following instructions will provide example commands for a Debian-like
+distribution. They are assumed to be run as root user. Prefix them with
+sudo if you are working with a privileges user instead of root.
+
 
 Web server
 ----------
@@ -21,15 +39,12 @@
 such as Cpanel, Plesk or AlternC will very likely create problems and
 is not supported.
 
-That webserver should probably run some UNIX flavour because the
-majority of functionality in this system occurs in the back-end,
-through command line scripting. There are also several features (such
-as symlinks), that are not available to users on Windows. There are no
-plans currently to add windows support.
+Shell commands:
+::
 
-Shell commands::
  apt-get install apache2
 
+
 PHP 5.2
 -------
 
@@ -37,122 +52,316 @@
 or above. You also need to have the commandline version of PHP to run
 Drush properly and the MySQL extensions.
 
-Shell commands::
+Shell commands:
+::
+
  apt-get install php5 php5-cli php5-mysql
 
-MySQL server
-------------
 
-You will require a MySQL server, obviously. It is preferable to use a
-dedicated server since Aegir will create MySQL users, since it will
-require a "root" MySQL user.
+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 require a privileged user.
+
+Shell commands:
+::
+
+ apt-get install mysql-server
+
 
 Mail transfer agent
 -------------------
 
-Aegir requires an MTA (Mail Transfer Agent) installed on your
-webserver in order to be able to install a new site to your new
-platform. If you don't have an MTA you the site installation will fail
-with message like "could not send 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.  On Debian-based systems do:
-
-Shell commands::
- sudo apt-get install postfix
-    
-Once that is done you should be able to install a site to the new platform. 
+Aegir requires an MTA (Mail Transfer Agent) installed on your webserver
+in order to be able to install new sites to your new platform. If you
+don't have an MTA you the site installation will fail with message like
+"could not send 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 requirements
-------------------
+Shell commands:
+::
+
+ apt-get install postfix
+
+
+Aegir user
+----------
+
+The provision framework of Aegir requires that the scripts run as a 
+non-root system account, to ensure that it can correctly set the file
+permissions on the hosted files. 
+
+Also to ensure that the file permissions of the hosted sites are
+always as safe as can be, and especially to make sure that the web
+server does not have the ability to modify the code of the site, the
+configured system account needs to be a member of the web server group,
+in order to be able to correctly set the file permissions.
+
+More detailed instructions on this topic will be given later in the web 
+installation wizard.
+
+This document assumes the Aegir user is ``aegir``, its home directory is
+``/var/aegir`` and the webserver group is ``www-data``. You can choose
+another username if desired.
+
+In addition we will create a directory layout for Aegir configuration
+and backups.
+
+Shell commands:
+::
+
+ adduser --system --home /var/aegir --ingroup www-data aegir
+ mkdir -p /var/aegir/config/vhost.d
+ mkdir -p /var/aegir/backups
+ chmod -R 0700 /var/aegir/{config,backups}
+ chown -R aegir /var/aegir/*
+
+
+CVS commands
+------------
+
+If you want to install Aegir from CVS you will need to install ``cvs``
+command in the server system.
+
+Shell commands:
+::
+
+ apt-get install cvs
 
-* never run drush as root. aegir is designed to be ran as its own user.
-* the "aegir directory" (/var/aegir) *must* be the home directory of
-  that user (the "aegir user", below)
 
-Aegir 0.2 installation instructions
-===================================
+Aegir installation instructions
+===============================
 
 This section deals with the installation of Aegir proper. Those
 instructions limit themselves to getting you into the Aegir wizard,
 which will then give you further configuration instructions.
 
-This document assumes the Aegir home is in /var/aegir, adapt as desired,
-but make sure that the user you create (as suggested in the install
-wizard) has this directory configured as its home directory.
+You can choose to install Aegir from CVS or by using drush. If you 
+opt for drush, make sure the versions reported in the output is correct.
 
-Checking out the code
----------------------
+Installation instructions presents you in each step both
+alternative instructions to checkout from CVS or download with drush 
+each component of Aegir. Be warned that in the hours following a new
+release, drush will not catch up the correct versions.
 
-This assumes you have installed CVS. Those commands should be ran as the
-aegir user and assume it can write to /var/aegir.
+All instructions and in general all commands must be run as aegir user,
+so all permissions are always set correctly.
 
+To become aegir user depends on your system configuration: if you have
+root password (usually debian) or alternatively you have a privileged
+user with sudo (usually ubuntu).
+
+If you have root password:
+::
+
+ su -c "su -s /bin/bash aegir"
+
+If you have sudo privileges:
+::
+
+ sudo -u aegir bash
+
+Aditionally to make following instructions generic and not dependant on
+a concrete Drupal or Aegir version. We will use bash environment
+variables for this. So current Drupal is 6.13 and Aegir release
+is 0.3-RC3.
+You should replace following command for current versions at the time
+you are reading this document.
+
+Shell commands:
+::
+
+  export DRUPAL_DIR=/var/aegir/drupal-6.13
+  export AEGIR_TAG=DRUPAL-6--0-3-RC3
+
+
+Installing drush 2.0
+--------------------
+
+At the time this document is being written current drush stable version
+is 2.0. Perhaps a newer version does exist and this document is not
+updated yet. You should use the latest stable version of the 2.x branch.
+
+Shell commands for cvs:
+::
 
-Shell commands::
- export CVSROOT=:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal
- mkdir /var/aegir
  cd /var/aegir
+ export CVSROOT=:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal
  cvs co -d drush -rDRUPAL-6--2-0 contributions/modules/drush
+
+Shell commands for package download:
+::
+
+ cd /var/aegir
+ wget http://ftp.drupal.org/files/projects/drush-All-Versions-2.0.tar.gz
+ tar -xvzf drush-All-Versions-2.0.tar.gz
+
+Aditionally we will export another envorinment variable for the purpose
+of referencing drush executable in a shorter way.
+
+Shell commands:
+::
+
+  export DRUSH=/var/aegir/drush/drush.php
+
+
+Downloading provision framework
+-------------------------------
+
+The provision framework is not a drupal module but a drush extension. So
+it must be placed in ``/var/aegir/.drush`` for drush to be able to find it.
+
+Shell commands for cvs:
+::
+
  mkdir .drush
- cd .drush && /var/aegir/drush/drush.php dl provision
- cd ../
- /var/aegir/drush/drush.php dl drupal
- cd drupal-6.*
- cvs co -d profiles/hostmaster -rDRUPAL-6--0-3 contributions/profiles/hostmaster
- cd profiles/hostmaster
- /var/aegir/drush/drush.php dl hosting install_profile_api 
-
-We still use CVS to checkout the hostmaster profile because drush has
-problems downloading profiles: http://drupal.org/node/500324
-
-The above should install version 2.1 of install_profile_api and the
-proper versions (0.3) of the hosting, hostmaster and provision
-projets. Make sure the versions reported by drush in the output seem
-right.
+ cvs co -d .drush/provision -r$AEGIR_TAG contributions/modules/provision
+
+Shell commands for drush:
+::
+
+ $DRUSH dl provision --destination=.drush
+
+
+Installing drupal
+-----------------
+
+Drush is able to download latest version of Drupal. Be sure that the
+downloaded version is the same you put in $DRUPAL_DIR in above.
+
+Shell commands:
+::
+
+ $DRUSH dl drupal
+ cd $DRUPAL_DIR
+
+
+Installing hostmaster profile
+-----------------------------
+
+Shell commands for cvs:
+::
+
+ cvs co -d profiles/hostmaster -r$AEGIR_TAG contributions/profiles/hostmaster
+ 
+Shell commands for drush:
+::
+
+ $DRUSH dl --destination=./profiles hostmaster
+
+
+Installing hosting module
+-------------------------
+
+Shell commands for cvs:
+::
+
+ cvs co -d profiles/hostmaster/modules/hosting -r$AEGIR_TAG contributions/modules/hosting
+
+Shell commands for drush:
+::
+
+ mkdir profiles/hostmaster/modules
+ $DRUSH dl --destination=./profiles/hostmaster/modules hosting
+
+
+Installing install_profile_api module
+-------------------------------------
+
+Hostmaster profile depends on Install Profile API module version 2.1. 
+Following command will force to download correct version.
+
+Shell commands:
+::
+
+ $DRUSH dl --destination=./profiles/hostmaster/modules install_profile_api-6.x-2.1
+
 
 Checking out the optional components
 ------------------------------------
 
-Aegir now has its own theme which you can use. It is also suggested
-that you install admin_menu to ease administration.
+Aegir has its own theme which you can use. Theme is called Eldir. It is
+also suggested that you install admin_menu to ease administration.
+
+
+Installing Eldir theme
+~~~~~~~~~~~~~~~~~~~~~~
+
+Shell commands for cvs:
+::
+
+ cvs co -d profiles/hostmaster/themes/eldir -r$AEGIR_TAG contributions/themes/eldir
+ 
+Shell commands for drush:
+::
+
+ mkdir profiles/hostmaster/themes
+ $DRUSH dl --destination=$DRUPAL_DIR/profiles/hostmaster/themes eldir
+
+
+Installing Admin menu module
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Shell commands:
+::
+
+ $DRUSH dl --destination=$DRUPAL_DIR/profiles/hostmaster/modules admin_menu
 
-Note that now your drush installation should be up and running so you
-can start using it to download modules directly. This is how
-admin_menu is installed below. The theme is installed using CVS
-because the release may not yet be available when you read this
-document.
-
-Shell commands::
- cd drupal-6.*/profiles/hostmaster
- /var/aegir/drush/drush.php dl eldir admin_menu
 
 Apache configuration
 --------------------
 
-Those instructions assume you are running Debian specific and
-installing aegir in http://aegir.example.com. If you are running
-another system you basically need to:
-
- 1. create a directory for Aegir configs
- 2. activate the mod_rewrite engine
- 3. include the Aegir apache configurations in Apache
- 4. create a base configuration file for Aegir in /var/aegir/config/vhost.d/aegir.example.com
- 5. restart apache
+Those instructions assume you are installing aegir in http://aegir.example.com
+If you are running another non-Debian system you basically need to:
 
-So this needs to be ran as root too.
+ 1. create a virtual host for Aegir in /var/aegir/config/vhost.d/aegir.example.com
+ 2. include the Aegir apache configurations in Apache
+ 3. activate the mod_rewrite engine
+ 4. restart apache
+
+Note some of those instructions must be run as a privileged user (root)
+instead of Aegir's user.
+
+
+Creating Aegir's virtualhost
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Hostmaster provides an example virtualhost for apache. Copy it to Aegir's
+virtual hosts directory and **modify** it to suit your needs,
+particularly the path leading to the Drupal core ($DRUPAL_DIR in the
+examples above).
+
+Shell commands:
+::
+
+ cp profiles/hostmaster/apache2.conf.txt ../config/vhost.d/aegir.example.com
+ # edit and configure
+
+
+Configuring Aegir in Apache
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Aegir VirtualHosts for Apache are stored at ``/var/aegir/config/vhost.d``
+(if you have not changed default locations). So Apache must be instruct
+to read configurations from there. In Debian systems each configuration
+file located at ``/etc/apache2/conf.d`` is read on inilialization. If you
+are using another system, you can put ``Include /var/aegir/config/vhost.d``
+in a file inside /etc/httpd/conf.d/ or directly at the end of httpd.conf.
+
+Aditionally rewrite module must be enabled and apache restarted.
+
+Following commands are to be run as root.
+
+Shell commands:
+::
 
-Shell commands::
- cd /var/aegir
- mkdir -p config/vhost.d/
  a2enmod rewrite
  echo "Include /var/aegir/config/vhost.d/" > /etc/apache2/conf.d/aegir
- echo "NameVirtualHost *:80" >> /etc/apache2/conf.d/aegir
- cp drupal-6.*/profiles/hostmaster/apache2.conf.txt config/vhost.d/aegir.example.com
  /etc/init.d/apache2 restart
 
-You MUST modify the config/vhost.d/aegir.example.com to suit your
-needs (particularly the path leading to the Drupal core
-(/var/aegir/drupal-6.* in the example above).
 
 Checkpoint!
 -----------
@@ -162,22 +371,25 @@
 Aegir frontend and the backend system (provision and drush). Your
 filesystem layout should look something like that:
 
-/var/aegir/drupal-6.13
-/var/aegir/drupal-6.13/profiles/hostmaster
-/var/aegir/drupal-6.13/profiles/hostmaster/modules/hosting
-/var/aegir/drupal-6.13/profiles/hostmaster/modules/install_profile_api
-/var/aegir/drupal-6.13/profiles/hostmaster/themes/eldir
-/var/aegir/drupal-6.13/sites/aegir.example.com
-/var/aegir/config/vhost.d
-/var/aegir/backups
-/var/aegir/drush/drush.php
-/var/aegir/.drush/provision
+::
+
+ /var/aegir/drupal-6.x
+ /var/aegir/drupal-6.x/profiles/hostmaster
+ /var/aegir/drupal-6.x/profiles/hostmaster/modules/hosting
+ /var/aegir/drupal-6.x/profiles/hostmaster/modules/install_profile_api
+ /var/aegir/drupal-6.x/profiles/hostmaster/themes/eldir
+ /var/aegir/drupal-6.x/sites/aegir.example.com
+ /var/aegir/config/vhost.d
+ /var/aegir/backups
+ /var/aegir/drush/drush.php
+ /var/aegir/.drush/provision
 
 Variations on this are acceptable (for example, the Drush Debian
-package works out of /usr/bin/drush and that's fine), but you are
+package works out of ``/usr/bin/drush`` and that's fine), but you are
 better to stick with those if you really want to get through this. The
 remaining of the documentation here will assume that layout.
 
+
 Database configuration
 ----------------------
 
@@ -185,33 +397,64 @@
 you are going to install. You want to run those commands using your
 database 'root' user.
 
-SQL commands::
+SQL commands:
+::
+
  CREATE DATABASE aegir;
  GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, \
   CREATE TEMPORARY TABLES, LOCK TABLES ON aegir.* TO \
   'aegir'@'localhost' IDENTIFIED BY 'XXXXXXXX';
 
+
+DNS Configuration
+-----------------
+
+Configuring DNS is up to you. Currently Aegir does nothing with DNS. 
+
+As a help trick, if you are installing Aegir in local to try ant test
+it, you can do local DNS by adding entries to file ``/etc/hosts``. First
+line of this file looks like:
+
+``127.0.0.1  localhost your-machine-name``
+
+Simply add all domains you want to this line. Ej:
+
+``127.0.0.1  localhost your-machine-name aegir.example.com other1 other2``
+
+
 Install the Drupal
 ------------------
 
-Now you are ready to install the first Drupal using this installation
-profile. Point your browser to http://aegir.example.com/ , assuming
-DNS is properly configured to point to your webserver, otherwise you
-may want to try http://localhost/ .
-
-The installer is going to complain about the missing settings.php. It
-is recommended that you create the aegir site as a real site.
-
-Shell commands::
- mkdir drupal-6.*/sites/aegir.example.com
- chmod a+w drupal-6.*/sites/aegir.example.com/settings.php
-
-Select the hostmaster install profile, enter the database credentials
-you setup above and then the installer will prompt you to secure the
-permissions on the settings.php file again:
+We are almost ready to install the first Drupal using this installation
+profile. The installer is going to complain about the missing
+settings.php.
+
+It is recommended that you create the aegir site as a real site in the 
+sites/ directory. The following commands will create this site directory
+and create the settings.php and files directory with the appropriate 
+permissions to proceed through the installer.
+
+Run these commands as the aegir user.
+
+Shell commands:
+::
+
+ mkdir sites/aegir.example.com
+ cp sites/default/default.settings.php sites/aegir.example.com/settings.php
+ chmod g+w sites/aegir.example.com/settings.php
+ mkdir sites/aegir.example.com/files
+ chmod 2770 sites/aegir.example.com/files
+
+Now point your browser to ``http://aegir.example.com/``, select the
+hostmaster install profile, enter the database credentials you setup 
+above and then the installer will prompt you to secure the permissions
+on the settings.php file again:
+
+Shell commands:
+::
+
+ chmod a-w sites/aegir.example.com/settings.php
 
-Shell commands::
- chmod a-w /var/aegir/drupal-6.*/sites/aegir.example.com/settings.php
 
 Follow the wizard
 -----------------
@@ -221,16 +464,3 @@
 in the wizard to configure Aegir to properly use the webserver and
 database server.
 
-Installing new platforms
-------------------------
-
-To deploy new platforms to provisions site to, you simply need to
-download the platform source code (which can be done with drush) and
-then, on the hostmaster site, create a new Platform node which points
-to where the source was downloaded.
-
-Shell commands::
- cd /var/aegir
- ./drush/drush.php dl drupal
-
-Use "drush dl drupal-5.x" to get the latest release of the 5.x branch.
Index: hostmaster.forms.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/profiles/hostmaster/hostmaster.forms.inc,v
retrieving revision 1.5
diff -u -r1.5 hostmaster.forms.inc
--- hostmaster.forms.inc	2 Jul 2009 15:56:00 -0000	1.5
+++ hostmaster.forms.inc	20 Aug 2009 14:40:46 -0000
@@ -31,7 +31,7 @@
   _hostmaster_clean_node_form($form);
 
   $own_link = _hosting_node_link(HOSTING_OWN_WEB_SERVER);
-
+/*
   $form['title']['#type'] = 'value';
   $form['ip_address']['#type'] = 'value';
   $form['backup_path']['#type'] = 'value';  
@@ -53,7 +53,7 @@
     '#configuration' => HOSTING_HELP_COLLAPSED
   ));
   $form['web_group']['#weight'] = 11;
-
+*/
   $form['restart_cmd_help'] = hostmaster_requirement_help('visudo', array(
     '#weight' => 19,
     '#summary' => HOSTING_HELP_ENABLED, 
