After long discussions on IRC:
Attached (or soon to be) patch is against INSTALL.txt from HEAD and makes the following changes:
1) Adds a friendly instruction on how to actually install MySQL
Reason
we provide an apt-get instruction for pretty much everything else
2) Adds a friendly instruction on how to actually install CVS
Reason
See 1)
3) Adds a note that one assumes the 'aegir' user has already been created. Add friendly howto on creating user for debian based distros with --home /var/aegir
Reason
We tell the user to run following commands as 'aegir' but haven't told them to create it yet, and it also attempts to mkdir /var/aegir which should be created as the home dir of the user. add -p flag to mkdir.
4) Force drush download hosting and install_profile_api to the profiles/hostmaster/modules directory
Reason
A '/var/aegir/drush/drush.php hosting install_profile_api' always puts these in sites/all/modules no matter whether one executes it from inside the profiles/hostmaster dir, or in the drupal root, whether the modules dir exists in /profiles/hostmaster/modules or not. We should use the --destination flag to ensure it goes into the right place, and we have to create the 'modules' subdir first or else drush'll fail.
5) Small typo 'projets'
Reason
French speakers most likely, I do this sometimes too :)
6) Force drush download eldir and admin_menu to the profiles/hostmaster/(modules|themes) directory
Reason
Same as 4) - get them in the right place with drush dl --destination=.... I still think at the moment due to other bugs, eldir *should* go to sites/all/themes. See 534302 on what's going on here.
7) Small typo 'run' rather than past tense 'ran'.
Reason
mig5's pedantic :)
8) Change permissions on the /var/aegir/config dir and subdirs
Reason
We tell the user to create them as root (doesn't need to do so actually, but other commands below do), so they should be changed to be owned by aegir afterward. For good measure, set 0700 permissions on config too, since initial Platform verification does this anyway, or at least the install wizard suggests to later as well.
9) Create backups dir, set permissions
Reason
We now provide a filesystem layout of how things 'should' look after getting to this point, encouraging users to follow the recommended layout. Backups are included in this layout per anarcat's earlier commit
10) Change wording so that we create the /var/aegir/drupal-6.*/sites/aegir.example.com, its settings.php and files dir *before* we instruct the user to go to the browser to begin installation.
Reason
It just makes sense to do this first
11) Actually provide the step that copies the sites/default/default.settings.php to sites/aegir.example.com/settings.php
Reason
You can't make a settings.php executable that you haven't told the user to create yet :)
12) Create the sites/aegir.example.com/files dir with appropriate permissions at this point
Reason
Install won't proceed without this simple step, may as well include it in the docs.
Feedback welcome. Cheers
Comment | File | Size | Author |
---|---|---|---|
#29 | 553230.patch | 10.96 KB | jonhattan |
#26 | 553230.patch | 11.05 KB | jonhattan |
#21 | 553230.patch | 10.66 KB | jonhattan |
#19 | 553230.patch | 11.21 KB | jonhattan |
#17 | 553230.patch | 10.9 KB | jonhattan |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedPatch. Cheers
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedUpdated patch attached, there was a duplicate line of text.
Comment #3
steveparks CreditAttribution: steveparks commentedNice work!
I'll reflect this in the g.d.o docs as well.
Steve
Comment #4
anarcat CreditAttribution: anarcat commentedyou want --system here.
do we really need the full path for the destination? or can't we just put "." here?
same here:
this won't work if the settings.php is in site.example.com:
Should be made clearer.
Thanks for the hard work!
Comment #5
Annakan CreditAttribution: Annakan commentedThis mean that the recommended setting IS to install the AEgir hosting into /site/Aegir.xxxx.com and NOT as the default site ?
I thought is was not the case anymore following issues and some docs, and more importantly it does not work without a patch because some drush commands are ran without a --uri="Aegir.xxxx.com" parameter. Theres is an open issue about this and a pending patch. just FYI.
Thanks for the work, I'll try to finish my Aegir install and review the new doc ASAP
Comment #6
anarcat CreditAttribution: anarcat commented@annakan: the recommend setting IS to install AEgir in sites/aegir.example.com and NOT the default site. It has never been the case before, it's a new feature of 0.3 that this actually works. The other patch will be committed shortly (i assume you are talking about #553202: Hosting 'Initial Setup' drush command requires --uri parameter or else looks up sites/default/settings.php, testing appreciated...).
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedOkie.. in my case it's not needed on Debian.
Trust me I did test a bit, and drush didn't seem to accept relative paths. I'm trying to do us a favour here really! :)
I'll do some more testing. I hear jonhattan is working on another patch too.
Comment #8
jonhattanI've reworked it a bit taking as a starting point mig5 patch.
Quick and dirty changelog:
* moved some general info (no windows, unix like) from "Web Server" to previous main "Aegir" section. Added a note indicating example instructions for debian-like systems are provided.
* updated all references to Aegir 0.2 to 0.3.
* changed all "sudo apt-get" to just apt-get.
* added a Aegir system user section. Some sentences literally copied from hostmaster profile.
*
dropped all CVS instructions in favor of drush dl.Both CVS and drush instructions given.* removed "other requirements" section.
* install_profile_api instructions still present. Just drop it when situation is cleared up.
* changed drupal-6.* to drupal-6.x and put a message warning to make the replacement to drupal version just downloaded.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedchange to Needs Review due to jonhattan's reroll
Comment #10
jonhattanNew changes:
1) Forced to 72 chars length when possible. more rst style.
2) Added two environment variables to use in the install instructions:
- export DRUPAL=drupal-6.13
- export AEGIR_TAG=DRUPAL-6--0-3-RC3
This way all version specific instructions are isolated to those two lines and the drush 2.0 section.
3) Use another export for drush:
export DRUSH=/var/aegir/drush/drush.php
4) Be more verbose in each component installation. Just a little paragraph with some info for drush, provision, drupal, hostmaster, hosting,..
5) Install profile API instructions still present. Forced to download version 2.1.
6) creation of config and backup folders moved up to Aegir user section.
7) Added a DNS Configuration section instructing about etc/hosts
8) Use relative paths almost all the time. Minimal usage of `cd`
9) Added /var/aegir/platforms as recommended location for extra platforms
Finally, some instructions are duplicated in INSTALL.txt and hostmater.profile and should be dropped from hostmaster.profile. They are:
* first page of the wizard (complete). " A system capable of running drupal. UNIX. No windows".
* second page of the wizard. Almost complete (create user account, add to web server group) but sudo instructions. Sudo line can be moved to INSTALL.txt. Perhaps Aegir's user home dorectory can be known via php ¿? and used as a base for next paths (drush, backup, config)
* third page:
- drush and provision are already installed. Just ask for the drush path. It can be prepopulated with location recommended in INSTALL.txt (/var/aegir/drush/drush.php). Currently it shows an example on /home/aegir...
- config, backup: verbose can be moved to install.txt and simply ask for the paths (possibly prepopulated from Aegir's user home directory path)
- apache config is already done. Related issue for conflicting apache configuration: #553416: Redundant/oudated instruction between install.txt, install.sh and the install wizard
* Forth page: database: ok
* Fifth page: optional hosting features: ok
Comment #11
jonhattanNew changes include more verbosity:
Comment #12
jonhattanNew patch with validated rest syntax. Attached is the generated html with `rest2web`.
I've uploaded it to http://faita.net/~jonhattan/INSTALL.html for if you wanna quickly put an eye on it.
Comment #13
anarcat CreditAttribution: anarcat commentedOverall: the patch should be generated with cvs diff -u (unified format).
That really belongs to the frontend documentation, not install.txt:
Heck, we could build a manual out of stuff like this and it won't fit in INSTALL.txt. INSTALL needs to be quick and to the point, an easy howto for people to install without having to clikety their way all over the wizard. ... Besides, that's a bit misleading: Aegir can not only create site_N databases, but manage *any* database on the server provided it's associated with a drupal. So it can backup and remove other databases.
That belongs to the configuration file itself, it should be a comment in it:
People are expected to edit the template anyways (that should be very clear in INSTALL), and they can notice the comment and fix it if required. Also, the duplicate NameVirtualHost are harmless and may in fact help diagnose configuration problems (for example if the server is already configured for NameVirtualHost 1.2.3.4:80, aegir may break).
That should be chown -R aegir /var/aegir, no?
That's not actually true: UPGRADE.txt is what makes upgrades easier and you should *never* use CVS to upgrade hosting or hostmaster.
That's just weird, why the double su?
Add: "You should use the latest stable version of the 2.x branch."
belongs to provision, below, so we avoid duplication.
I don't see that anywhere on http://faita.net/~jonhattan/INSTALL.html... I would remove 'Installing new platforms' altogether, it's documented in the "create platform" page and will eventually be automated anyways.
Regarding duplication:
I don't mind that duplication.
I think we can keep this duplication too... As vertice said, when we verify, we can point people to errors and also how to fix it in the wizard...
1. not sure what you mean in drush
2. i would keep the config/backup instructions
3. let's treat the apache config situation separate
In general, about the duplication, let's deal with it when we get there. Just reroll (sorry :) the patch with the recommendations here and we'll deal with the wizard later.
Also, a catch by mig5:
Great work, thanks!
Comment #14
jonhattan1. site_$nid paragraph removed
2. vhost paragraph removed (should I fill an issue against hosting for that?)
3.
chown -R aegir /var/aegir/*
It is ok because adduser will create /var/aegir owned by aegir.4. removed "checking out from cvs is easy to update". It was just a try to give a difference between using cvs and drush.
5. double su: coppied out from /usr/share/doc/postgresql-8.3/README.Debian.gz (we suppose at that momento we are not root)
6. added 2.x drush branch message
7. moved mkdir .drush below to provision.
8. /var/aegir/platforms was removed in one of last changes. All additional platforms info removed now.
9. eldir path fixed
10. unified patch attached :)
Comment #15
anarcat CreditAttribution: anarcat commentedalright, committed. a few issues:
* you included an unrelated chunk in the patch (hostmaster.forms.inc), don't do that
* please do mark as "needs review" when you upload a new patch... for review. :)
otherwise: thanks!
Comment #16
jonhattanSome new changes:
* reverted to rst
System commands::
as sugested by anarcat. It was not working before because of a missing blank line. Each time INSTALL.txt is changed. It should be parsed to verify. I use to parse to html withrst2html INSTALL.txt > INSTALL.html
.* changed
adduser --system --home /var/aegir --ingroup www-data aegir
tobecause "explicit is better than implicit", to be more consistent with hostmaster.profile and perhaps os-wide.
Comment #17
jonhattanEven more:
* changing eldir and admin_menu instructions to use ./profile instead of $DRUSH_DIR/profile to be consistent with above instructions
* introduced $AEGIR_DOMAIN to allow for easy replacing `aegir.example.com`
* added an advice to not exit the aegir shell during installation. Perform root commands in other terminal
Aditionally two changes to install.sh.txt:
* changed version to RC4
* added install_profile_api installation
Credits line:
mig5
Comment #18
Anonymous (not verified) CreditAttribution: Anonymous commentedPatch applies cleanly.
Much discussion has occurred on IRC. There is some opinion that much of the instructions need to be appropriately ported to the Hostmaster profile / relevant parts of Hosting etc so that the install wizard becomes the primary source of instruction for install.
For this reason I think the ticket #553416: Redundant/oudated instruction between install.txt, install.sh and the install wizard is a dependency on this one. My patch over there covers one small part of the wizard but really much more needs to be done to the wizard if we are to treat it as the main guide as opposed to INSTALL.txt (disclaimer: as I've said before, personally I believe one either needs to duplicate in full, consistently, or discard one source of documentation in favour of the other)
Comment #19
jonhattanOugh spects it is the last for today:
A bug was introduced in #16 when removing --in-group from adduser. Now permissions for www-data must be set:
chgrp www-data sites/$AEGIR_DOMAIN/{settings.php,files}
. This is the only difference with previous patch.Comment #20
anarcat CreditAttribution: anarcat commentedQuick review.
That's explicit only to some people. I, for a long time, didn't know what that meant, maybe because of BSD-land, I don't know. I find --ingroup much more explicit. But then that's nitpicking.
Isn't DRUPAL_DIR /var/aegir/drupal6.x?
Regarding changes to install.sh: great, but we have a systemic problem here: the release process needs to be aware of all the places where we need to change that tag when releasing, not sure install.sh or even install.txt is documented there.
The patch otherwise has my go.
The redundancy issue is another issue.
Comment #21
jonhattanChanges:
1. revert Checkpoint to literals. removing variables (/var/aegir/$DRUPAL_DIR thing)
2. added --group aegir to adduser ->
adduser --system --group aegir --home /var/aegir aegir
because --system put the user in `nogroup`.3. added a comment to ->
adduser aegir www-data #make aegir a user of group www-data
For completeness those could be defined: $AEGIR_USER, $AEGIR_GROUP, $AEGIR_HOME
I wonder if there's a way to automatically propagate the current cvs tag to install.txt and install.sh as Drupal does with $Id$. Or it is even possible in git land.
Comment #22
doka CreditAttribution: doka commentedpatch runs fine, except last line in aegir_vhost () function, where the insert of "Include /var/aegir/config/vhost.d/*" line is not executed, also the /ect/apache2/httpd.conf remains empty. Symptom is when I start Aegir (http://aegir.local), the default index.html of /var/www appears.
Quick-and-dirty solution is to manually include the line into httpd.conf.
I use a fresh Ubuntu 9.04 server.
Here is my output:
Comment #23
doka CreditAttribution: doka commentedI set it back to active, see #22.
Comment #24
jonhattandoka: this issue is mainly about INSTALL.txt (at present the first source of information for installing Aegir). In my last patch I added two little changes to install.sh.txt to update it to current RC4.
install.sh.txt is a script to ease the installation on a debian-like system and is not supposed to be used for end users (it also installs git-core and other things). It is not in sync with INSTALL.txt and is not a priority at all to sync them. So please use INSTALL.txt as a reference. I think this is why you are having this issue: #556548: Misleading instructions at "Configure your database server" page.
That said, install.sh.txt do the inclusion of "Include /var/aegir/config/vhost.d/" to file apache2.conf not httpd.conf. The command to find the file where to do the inclusion is:
Comment #25
doka CreditAttribution: doka commentedThanks for the clarification, my issue has been around install.sh.txt.
You are right, after running install.sh, there is a line at the end of /etc/apache2/apache2.conf
But the closing / is missing there. And even I put the slash to the end, the aegir site is broken in Ubuntu (no clear URL in Drupal, i.e.).
What helped me is to put
into httpd.conf
Comment #26
jonhattandoka. The line has always worked for me is
and at least this instruction is the same across all aegir's install instruction docs :)
As an example this is what debian (and for sure ubuntu) do at the end of apache2.conf:
----
returning to INSTALL.txt issues. Attached is a patch with better and simplified instructions for "becoming aegir user". This ensure the aegir user has the correct environment (set $HOME,...) and `/var/aegir/.drush` is visible to drush.
Comment #27
doka CreditAttribution: doka commentedYou are right, the /etc/apache2/apache2.conf looks exactly like in my case also as you described.
My issue is, that in spite of the correct content of /etc/apache2/apache2.conf, if I start aegir in the browser, I get the content from Debians /var/www/index.html, and not the Aegir start page. And if I put Include /var/aegir/config/vhost.d/* into the httpd.conf, than I have the Aegir start page.
Comment #28
jonhattandoka: it happens to you that apache default vhost (sites-available/default) is taking precedence over aegir's vhosts.
If fact apache2.conf do this:
So If you put the line in httpd.conf it will take the highest precedence. INSTALL.txt puts the line in `/etc/apache2/conf.d/aegir`. And if you put the line at the end of apache2.conf it will get the lowest precedence. Other thing you can do is disable default vhost (a2dissite default). Anyway, `install.sh.txt`is to be used internally, in the "you know what your doing" case :)
Currently there is an ongoing effort to unify documentation and, as I've already said, INSTALL.txt is the only recommended source at present (wizard must be updated, wiki page must be updated and install.sh.txt is not for end-users usage --it is not mentioned anywhere.. it's just an undocummented file in the cvs).
Comment #29
jonhattan#534302: installation profile requires writable settings.php for one step further than expected/advised is finally fixed. Extra advice about that bug is removed in latest patch.
Comment #30
adrian CreditAttribution: adrian commentedcommitted. thanks.
Comment #31
Annakan CreditAttribution: Annakan commentedHello, again :)
(nobody expects the Spanish inquisition... right ? :)
About Install.txtredoing the install with the new install.txt
I was able to redo a full install from CVS (mostly RC4 I think) following the INSTALL.TXT from end to end.
No frill.
No added value.
It went mostly fine and the instruction were much more clear and efficient.
99% copy and paste with a little bit of brain added there and there.
Only one think stopped me to have a first install verify check that passed :
It seems the INSTALL.TXT doc is still missing the "MySQL-ism" bit
after
we should do
aegir.%
the % thing ...
source : http://drupal.org/node/553348#comment-1942496
After I did it the verify step passed cleanly.
Cron and *BSD problem
As for FreeBSD-ism I have one nagging problem : the cron does not run.
To be more specific it does run but does nothing, it is a typical case of the command not being runnable by the Cron "shell".
Cron "task" run under a specific environment that is even more reduced in the BSD than in the linux world..
I am quite sure I just need to figure the env vars I need to pass for the PhP script to run ... still searching though.
One sure thing is that it is widely recommend to use FULL PATHS in cron jobs, so even under linux the line should be based on the output of
whereis php
and not just "PhP".If anybody already encountered the problem of PhP scripts not running in Cron and knows what's missing I am all ears :)
I'll keep you posted if I find anything ...
small details maybe worth mentioning
One small comment : maybe the "hostname" part "aegir.example.com" should be abstracted in an environment variable and the command use that.
That way once you have set all you env var with the export things the rest is really only a simple replay of the procedure...
And last, maybe we should mention that is is better to have the rewrite rule in the xxxx.conf file and document and support that, and so be able to lock the .htaccess down, .. and it prevents "brutal" drupal-xxx untarring to overwrite or impose a wrongly configured .htaccess ..
About the file layoutPreviously the .htaccess always was the 'thing to remember" to put aside while doing an upgrade, getting rid of it (don't caring about it any more) would be a plus.
Finally, I have several questions about the file layout and the expected use of AEgir.
Maybe someone could answer me to help me better express my "critics".
What I feel bad about in the current layout :
To better form my judgment could one respond to these questions :
how are we expected to upgrade the hosting platform ? :
If we had the hosting platform separated from the other platforms we would have a cleaner upgrade path :
The only price is a small code duplication of the AEgir hosting platform if it is used as a hosted sites platform too , yes I hate that too but is seems like a good trade off to me ...
Am I way off ? or is it something worth investigating and me redoing an install with a bit different layout that goes into that direction ?
I could then submit it to criticism and we'll see if it is worth including into the install.txt document ?
I am open to all comments ....
Thanks again to the AEgir team ...
Comment #32
anarcat CreditAttribution: anarcat commentedWow, too much information here. Please open a new issue if there is a real problem to be solved here. I'll try to tackle some of the stuff you raised...
uh? aegir.%? I've been using aegir.* for ages, am I missing something?
For the cronjob issue, you may want to contribute to #323732: Improve the crontab entry to enhance portability.
Regarding the .htaccess, it simply is ignored in aegir: the generated apache configuration contains all the goods (which doubles as a performance enhancement).
Having the site as 'default' is confusing and error-prone, and it makes processing of existing sites harder (because we ignore default sites (see #453540: consider the 'default' site like a regular site, with exceptions).
I actually agree with that.
Good point, open a separate issue please.
See UPGRADE.txt.
The UPGRADE.txt process doesn't (need to) impact your production platform.
All in all, before adding more stuff to the issue, please consider if it is related to upgrade.txt instead (in which case you should open a separate issue), if it's something else than the recent changes that happened in INSTALL.txt (in which case you should open a separate issue) or if it's , well, a separate issue (in which case... )
All in all, please try to keep things issues isolated, you have a tendency of trying to do everything at once and while it's nice to have feedback, it makes it very hard to followup on your work because it's all over the place. ;) You could have opened at least 4 separate issues with the things you raised here.
keep it simple, but no simpler.
Comment #33
Annakan CreditAttribution: Annakan commentedOk thanks for the feedback, I am bit new at "collaborating" on an open source project (more like ranting sometime for me, sorry about that)
I am often reluctant to open new issues because I am not sure my judgment is sound but I am wrong about that. Opening an issue focused on a problem that can be closed quickly is better than opening a discussion here.
I'll try do to better.
Comment #34
anarcat CreditAttribution: anarcat commented@annakan - absolutely no harm done here, you are doing this pretty well if you are a beginning in open source. you are documenting properly and extensive in what you write, that's great. it's just a matter of getting used to the various policies in each project that's tricky. :)
here I rather have separate issues opened for each issues as we like to fix stuff, it's gratifying and it's clearer.
don't hesitate to open issues if you feel there is a problem and you have read the bug reporting guidelines and the FAQ. if you are unsure, categorize it as a "Support request" so it doesn't show up as a bug to us (we can always change it back later if it's really a bug).
thank you for you contribution.
Comment #36
steveparks CreditAttribution: steveparks commentedI'm working on updates to INSTALL.txt to roll in...
http://drupal.org/node/556548#comment-2043552
http://drupal.org/node/558498
and draw on some of the comments here:
http://drupal.org/node/553416
As well as some more descriptive text from the g.d.o docs.
I've reopened this ticket so I can also bear in mind previous discussions while I work.
Comment #37
Anonymous (not verified) CreditAttribution: Anonymous commentedI'm pretty comfortable with the INSTALL.txt at the moment, we've wiped out many issues and the g.d.o docs are consistent.
I'm closing this as requested by Adrian to drop the list of critical issues blocking an alpha2 release. Let's open individual tickets for specific items in the docs i.e theoretically 'MySQL configuration section is missing XYZ', if we need to.