We are recommending that people create their platforms in ~aegir/platforms, but that path isn't created by the aegir installer. This should be done to improve usability and help people use best practices from the start.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

skwashd’s picture

The attached patch is untested, which is why the issue is marked as needs work. I am dropping it here so it doesn't get lost. I came out of a discussion with anarcat and mig5 on IRC - mig5 doesn't like it.

Anonymous’s picture

Bias aside,

At a quick glance, wouldn't this patch create the 'platforms' directory in /var/aegir/config/server_master/apache/ ?

It's operating in the context of the http service. It probably needs to be outside of here.

It should probably be somewhere like the 'server' conditional in drush_provision_drupal_pre_provision_verify() located in provision/platform/verify.provision.inc.

skwashd’s picture

Rerolled to fix the path problem found by mig5. Still untested. There is too much uncertainty on IRC for me to do any more on this for now.

Anonymous’s picture

Status: Needs work » Needs review

Thanks for your work on this and putting up with us in IRC,

So basically where we stand is anarcat and I are not sure whether the creating of dirs should be handled in the http class like the patch does, or (as I thought), in the '$type == server' conditional of drush_provision_drupal_pre_provision_verify in platform/verify.provision.inc.

We seem to create dirs in both places and I don't know why / what the significance of the difference is.

I think in either case, the stuff is synced to remote servers if necessary.

skwashd’s picture

I was trying to explain on IRC, the platform files are used by the http server (apache, nginx etc) and so I think the directory should be managed by the http class, not some generic aegir server verification function. This is why I have put the code where I did.

j2parker’s picture

The following excerpt is taken from INSTALL.txt:

"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."

Those are assumptions which are not always correct. Hardcoding the platform path will add another assumption which too will not always be correct.

Anonymous’s picture

Status: Needs review » Needs work

..not some generic aegir server verification function

but it is the job of the verify function to ensure such directories exist if it expects them too.

So even if it's in http.drush.inc, it should probably be in the verify_server_cmd().

And it should then sync but exclude the contents (probably), same as the other syncs in that function do.

Still waiting for Vertice expertise here

skwashd’s picture

Those are assumptions which are not always correct. Hardcoding the platform path will add another assumption which too will not always be correct.

All common desktop environments these days provide a "documents" folder of some form. It is an assumption that you will store your documents in there, but nothing forces you to do that. The same is true with the platforms path, it is advocated as best practice, but you don't have to use it.

It is a similar story for the /var/aegir path. You are free to use whatever path you want for installing Aegir, the script encourages you to do it in a common path, which in theory should make it easier to provide support.

anarcat’s picture

Status: Needs work » Needs review

This should have been marked as needs review, as the code seems ready.

Anybody strongly opposes this? We're just providing a useful default here, not starting a revolution. ;)

omega8cc’s picture

I vote +1 since it is another way to promote good practices. People tend to put platforms directly in the /var/aegir and it quickly becomes horrible mess, so introducing separate subdirectory by default is a good idea.

omega8cc’s picture

Status: Needs review » Reviewed & tested by the community

Re: #3 - It works as expected, but the chmod needs to be changed to 0755.

anarcat’s picture

Status: Reviewed & tested by the community » Fixed

alright, patch committed.

skwashd’s picture

A bit late now, but the permission should have been 0750 as it should only be available to aegir:www-data, not world readable.

omega8cc’s picture

I think it is correct (0755) to allow access when user (ssh/ftps) is a member of Aegir group but is not a member of www-data group?

anarcat’s picture

I agree: tools, not policy... in fact, i believe we should just not change the mode of that directory...

Status: Fixed » Closed (fixed)

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

  • Commit d41e1c5 on debian, dev-migrate_aliases, prod-koumbit, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x by anarcat:
    #956432 - create the platforms dir automatically