Fresh Debian Lenny install, 6.x-03.rc2 hostmaster, testing out the install.sh.txt after hearing about it.

Line 100 of install.sh.txt in create_user, we become $AEGIR_USER after creating with adduser.

(Incidentally the instruction reads 'enter the aegir user data and type exit...' it is not immediately obvious that adduser is going to be called, and thus that the username should be the first item to be entered into stdin. This is a usability thing, my patch edits the message slightly.

The problem is once we become the user, we lose the environment state and the rest of the script cannot proceed until one exits from the shell back to root (and the function continues).

Commenting out su - $AEGIR_USER fixes it, and is the only logical way forward since following commands such as visudo clearly require root privileges.

Also, the script hardcodes the mysql root user as 'root'.. this is pretty stock standard so the merit to not hardcoding it is debatable. A user on IRC changed their root username to something else and had issues. Patch reads the mysql root user from stdin and assumes 'root' as default.

Password stdin is hidden, I get uncomfortable seeing passwords in clear text on stdin :)

I could not find a case, rerunning (and I had to rerun many times testing my changes :) ) where create_user() would be called again if I chose a different username each time. It wanted to assume aegir because it set AEGIR_USER before create_user(), and create_user() didn't actually take the value from STDIN anyway. Patch includes a fix, maybe I got it wrong with this one and am drunk, so unsure, but it solved my problem.

And a very small typo in aegir_user() in patch.

Installing sendmail outright with apt-get -y install sendmail will force an uninstall of postfix or exim4 if either are installed. Patch checks if either postfix or exim4 are installed and only if neither are, goes ahead with the sendmail install.

How come php5-imap is required?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

FileSize
4.04 KB

Updated patch, checks if the vhost.d dir has already been included in the apache config (perhaps from a previous install) and doesn't add the Include again if so.

Anonymous’s picture

FileSize
4.05 KB

bah diffed from the wrong place again sorry.

Anonymous’s picture

FileSize
3.68 KB

Please disregard the stuff I said about AEGIR_USER, I've actually read the instructions properly this morning in the script.

ac’s picture

Had some issues with the install script and this patch - although all were minor. This was done on a clean install of ubunut 8.04 x86 on a virtualbox machine.

1) The downloaded drupal directory and all its files were owned by 1080 and part of the group 1080
2) Sendmail was not installed at all

apt-get install sendmail and chown -R aegir.aegir /var/aegir/drupal-6.13 fixed everything

anarcat’s picture

Status: Needs review » Needs work

Since ac reported some problems, i'd like this patch to be rerolled. Also keep in mind that this script could be used by packaging scripts. I wrote a similar script for my aegir-provision package which you can take a look at here:

http://git.koumbit.net/?p=drupal/modules/provision/.git;a=blob;f=debian/...

jmiccolis’s picture

Status: Needs work » Needs review
FileSize
3.99 KB

Attached is a version of the patch the checks for a sendmail command in the current path before installing exim. The other checks didn't work for me and seemed overly complex. Also I feel like exim is a better default than sendmail (I'm sure we can all agree on that)

I'm also experiencing the same permissions issue reported above in comment 4, but I'm not sure what exactly is going on there.

adrian’s picture

Priority: Normal » Critical

marking as critical

David Goode’s picture

FileSize
4.05 KB

works as long as the script runs under bash. Attached.

jmiccolis’s picture

The patch in #8 works better for me - the permissions issue is gone.

There was on gotcha for me locally - the script writes the 'Include /var/aegir/config/vhost.d/' at the very end of apache2.conf which gets processed very last by apache. Locally I had to disable the single d efault site in the 'sites-enabled' folder to get things working. Not sure if this is a big deal or not.

steveparks’s picture

Just tested the patch in comment #8.

Ran the patched install.sh on a clean Ubuntu 9.04 install.

Worked very well, and smoothly.

two comments

1. It wasn't clear at the end when told to run the drush hosting setup command that this must be run as the 'aegir' user. The script had left me logged in as root. The text in the browser seemed to be designed to tell me to run it as aegir, but was missing the variable - here it is verbatim:

How do I configure this?

Ensure that you are logged into the shell as , and then execute the following commands :

cd /var/aegir/drupal-6.13
/var/aegir/drush/drush.php hosting setup

2. at the end, the drush hosting setup command ran successfully - but there was the following error:
sh: crontab: not found

steveparks’s picture

Follow on comments from my last comment..

On the next screen there are the following warnings and errors:

Backup path does not exist.
Drupal sites directory is not writable by the provisioning script
An error occurred at function : drush_provision_drupal_provision_verify
Removing task from hosting queue
An error occurred at function : drush_hosting_hosting_task
Changes for drush_hosting_hosting_task module have been rolled back.

It offers me the chance to go back to the previous screens to check the setting - but pressing the previous button just reloads this screen.
There doesn't seem to be a way to rerun this verification at this stage which would make me panic if I was new that I was messing the whole thing up irretrevably - but of course it can be rerun once in aegir later.

On checking, the backup path does exist.

On checking, the drupal-6.13 path has been set with ownership 1080:1080

adrian’s picture

Status: Needs review » Fixed

I installed it on a clean system and it worked well. all the paths were correct and i installed a site first time.

committing this. we can create another issue if we find more issues.

thanks to all involved.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 07a39dc on 599758_edit_main_site, 640952_client_preview, dev-dns, dev-features, dev-headless_install, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newsiteform, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-relationships, dev-restore, dev-server_nodetype, dev-services, dev-site_rename, dev-ssl, dev_dns, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x authored by adrian:
    #536568 - install.sh.txt improvements and fixes
    
    

  • Commit 07a39dc on 599758_edit_main_site, 640952_client_preview, dev-dns, dev-features, dev-headless_install, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newsiteform, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-relationships, dev-restore, dev-server_nodetype, dev-services, dev-site_rename, dev-ssl, dev_dns, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x authored by adrian:
    #536568 - install.sh.txt improvements and fixes