Updated: Comment #45

Problem/Motivation

We need to support Drupal 8

Proposed resolution

Especially the provision code needs to be adapted to work with e.g. CMI.

Remaining tasks

  1. Site verify does not import packages info properly -- works
  2. Platform verify does not import packages info properly (?)
  3. Similarly importing a drupal 8 site originally created using drush si breaks the site
  4. TEST migrate tasks -- works
  5. TEST clone tasks -- works
  6. TEST delete tasks -- works
  7. TEST backup/restore -- works
  8. ?

User interface changes

API changes

#2008106: Prepare for REQUIRED sites/sites.php
#2104785: provision_drupal_system_map is using the old *.info construct.
#2104797: Load user-1 before drupal_flush_all_caches
#2104805: provision_drupal.drush.inc contains version specific code.

Original report by @tstoeckler

Currently it is impossible to install Drupal 8 sites with Provision.
Drush site-install supports D8 already, but there are no D8 equivalents of the D7 files in platform/drupal/.
Simply copying the *_7.inc files to *_8.inc files solves the problem. I would imagine simply removing the prefix would also work, but I didn't try that.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Steven Jones’s picture

Version: 6.x-1.1 » 7.x-2.x-dev
Category: task » feature

I think it would be safe to chase Drupal 8, in our 2.x branch..

tstoeckler’s picture

I'd roll a patch if I could get some feedback on what the correct approach is. If I understand how these commands work correctly, then codewise this should be trivial (see op).

Steven Jones’s picture

Basically a copy of the _7.inc files to _8.inc should be enough at the moment.

tstoeckler’s picture

Here we go.

$ ls ~/provision/platform/drupal
clear_5.inc     cron_key_7.inc  import_5.inc   install_6.inc      packages_7.inc
clear_6.inc     cron_key_8.inc  import_6.inc   install_7.inc      packages_8.inc
clear_7.inc     deploy.inc         import_7.inc   install_8.inc      verify.inc
clear_8.inc     deploy_7.inc      import_8.inc   packages.inc
cron_key.inc  deploy_8.inc      install_5.inc    packages_5.inc
tstoeckler’s picture

Status: Active » Needs review

Needs review.

Steven Jones’s picture

I reckon we'll put this in a dev-branch for now, and we can keep and eye on it, and maybe even have Jenkins do that for us, and we can try to chase Drupal 8.

Steven Jones’s picture

Status: Needs review » Postponed (maintainer needs more info)

Added a dev-drupal-8 branch. Thanks!

Steven Jones’s picture

Status: Postponed (maintainer needs more info) » Needs work

Actually we need to do the Jenkins stuff I reckon.

realityloop’s picture

Platforms verify but sites fail using the above:

Task starts processing
Running: /usr/local/bin/php /usr/local/drush/drush.php --php=/usr/local/bin/php --uri='d8x.ld' provision-save '@d8x.ld' --backend
Drush bootstrap phase : _drush_bootstrap_drush()
Found command: provision-save (commandfile=provision)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @self
Load alias @server_master
Loading mysql driver for the db service
Loading nginx driver for the http service
Load alias @platform_Drupal8x
Load alias @d8x.ld
Template loaded: /Users/brian/.drush/provision/provision_drushrc_alias.tpl.php
Generated config Drush configuration file
Changed permissions of /Users/brian/.drush/d8x.ld.alias.drushrc.php to 400
Command dispatch complete
Peak memory usage was 7.13 MB
Running: /usr/local/bin/php /usr/local/drush/drush.php --php=/usr/local/bin/php @d8x.ld provision-install --backend
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @d8x.ld
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Loading drushrc "/Users/brian/Sites/drupal-8.x/drushrc.php" into "drupal" scope.
Initialized Drupal 8.0-dev root directory at /var/aegir/platforms/drupal-8.x
Found command: provision-install (commandfile=provision)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @server_master
Loading mysql driver for the db service
Loading nginx driver for the http service
Load alias @platform_Drupal8x
Including /Users/brian/.drush/provision/db/install.provision.inc
Including /Users/brian/.drush/provision/dns/install.provision.inc
Including /Users/brian/.drush/provision/example/install.provision.inc
Including /Users/brian/.drush/provision/http/install.provision.inc
Including /Users/brian/.drush/provision/platform/install.provision.inc
Granting privileges to d8xld@localhost on d8xld
Created d8xld database
Created sites/d8x.ld
Changed permissions of sites/d8x.ld to 755
Created sites/d8x.ld/themes
Changed permissions of sites/d8x.ld/themes to 2775
Created sites/d8x.ld/modules
Changed permissions of sites/d8x.ld/modules to 2775
Created sites/d8x.ld/libraries
Changed permissions of sites/d8x.ld/libraries to 2775
Created sites/d8x.ld/files
Changed permissions of sites/d8x.ld/files to 2770
Created sites/d8x.ld/files/tmp
Changed permissions of sites/d8x.ld/files/tmp to 2770
Created sites/d8x.ld/files/images
Changed permissions of sites/d8x.ld/files/images to 2770
Created sites/d8x.ld/files/pictures
Changed permissions of sites/d8x.ld/files/pictures to 2770
Created sites/d8x.ld/files/css
Changed permissions of sites/d8x.ld/files/css to 2770
Created sites/d8x.ld/files/js
Changed permissions of sites/d8x.ld/files/js to 2770
Created sites/d8x.ld/files/ctools
Changed permissions of sites/d8x.ld/files/ctools to 2770
Created sites/d8x.ld/files/imagecache
Changed permissions of sites/d8x.ld/files/imagecache to 2770
Created sites/d8x.ld/files/locations
Changed permissions of sites/d8x.ld/files/locations to 2770
Created sites/d8x.ld/private
Changed permissions of sites/d8x.ld/private to 2770
Created sites/d8x.ld/private/files
Changed permissions of sites/d8x.ld/private/files to 2770
Created sites/d8x.ld/private/temp
Changed permissions of sites/d8x.ld/private/temp to 2770
Changed group ownership of sites/d8x.ld/files to www
Changed group ownership of sites/d8x.ld/files/tmp to www
Changed group ownership of sites/d8x.ld/files/images to www
Changed group ownership of sites/d8x.ld/files/pictures to www
Changed group ownership of sites/d8x.ld/files/css to www
Changed group ownership of sites/d8x.ld/files/js to www
Changed group ownership of sites/d8x.ld/files/ctools to www
Changed group ownership of sites/d8x.ld/files/imagecache to www
Changed group ownership of sites/d8x.ld/files/locations to www
Changed group ownership of sites/d8x.ld/private to www
Changed group ownership of sites/d8x.ld/private/files to www
Changed group ownership of sites/d8x.ld/private/temp to www
has no site config file
Template loaded: /Users/brian/.drush/provision/http/nginx/vhost.tpl.php
Generated config virtual host configuration file
Template loaded: /Users/brian/.drush/provision/platform/provision_drupal_settings.tpl.php
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/drupal-8.x/sites/d8x.ld/settings.php to 440
Change group ownership of /var/aegir/platforms/drupal-8.x/sites/d8x.ld/settings.php to www
Template loaded: /Users/brian/.drush/provision/provision_drushrc_site.tpl.php
Generated config Site Drush configuration file
Changed permissions of /var/aegir/platforms/drupal-8.x/sites/d8x.ld/drushrc.php to 400
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site d8x.ld at sites/d8x.ld
Loading drushrc "/Users/brian/Sites/drupal-8.x/sites/d8x.ld/drushrc.php" into "site" scope.
Running: /usr/local/bin/php /usr/local/drush/drush.php --php=/usr/local/bin/php --client_email='brian@realityloop.com' @d8x.ld provision-install-backend --backend
The external command could not be executed due to an application error.
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @d8x.ld
Loading drushrc "/Users/brian/Sites/drupal-8.x/sites/d8x.ld/drushrc.php" into "site" scope.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Loading drushrc "/Users/brian/Sites/drupal-8.x/drushrc.php" into "drupal" scope.
Initialized Drupal 8.0-dev root directory at /var/aegir/platforms/drupal-8.x
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site d8x.ld at sites/d8x.ld
Loading drushrc "/Users/brian/Sites/drupal-8.x/sites/d8x.ld/drushrc.php" into "site" scope.
Found command: provision-install-backend (commandfile=provision)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @server_master
Loading mysql driver for the db service
Loading nginx driver for the http service
Load alias @platform_Drupal8x
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Unable to include the drupal engine environment from /usr/local/drush/commands/core/drupal.
Drush command could not be completed.
Output from failed command : Fatal error: Call to undefined function core_watchdog_severity_levels() in /usr/local/drush/includes/drush.inc on line 1609
Undefined index: login_link install.provision.inc:60
Undefined index: driver environment.inc:939
Undefined index: driver environment.inc:939
PDO support available, but the driver has not been installed. Assuming success.
Template loaded: /Users/brian/.drush/provision/platform/provision_drupal_sites.tpl.php
Generated config Drupal sites.php file
Changed permissions of /var/aegir/platforms/drupal-8.x/sites/sites.php to 644
An error occurred at function : drush_provision_drupal_provision_install
Changes for drush_http_provision_install module have been rolled back.
has no site config file
Changes for drush_example_provision_install module have been rolled back.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/css directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/ctools directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/imagecache directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/images directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/js directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/locations directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/pictures directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/tmp directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/libraries directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/modules directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/private/files directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/private/temp directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/private directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/themes directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld directory successful.
Changes for drush_provision_drupal_pre_provision_install module have been rolled back.
Dropping database d8xld
Revoking privileges of d8xld@localhost from d8xld
Changes for drush_db_pre_provision_install module have been rolled back.
Command dispatch complete
Peak memory usage was 9.84 MB
Output from failed command :
An error occurred at function : drush_hosting_task
Command dispatch complete
Peak memory usage was 21.42 MB

realityloop’s picture

More Debug output:

drush @hostmaster hosting-task 875 --debug

Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.06 sec, 7.25 MB]                                         [bootstrap]
Loading drushrc "/private/var/aegir/hostmaster-6.x-1.3/drushrc.php" into "drupal" scope. [0.06 sec, 7.25 MB]       [bootstrap]
Initialized Drupal 6.22 root directory at /var/aegir/hostmaster-6.x-1.3 [0.07 sec, 8.28 MB]                           [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.08 sec, 8.28 MB]                                         [bootstrap]
Initialized Drupal site aegir.ld at sites/aegir.ld [0.08 sec, 8.33 MB]                                                [notice]
Loading drushrc "/private/var/aegir/hostmaster-6.x-1.3/sites/aegir.ld/drushrc.php" into "site" scope. [0.08 sec,   [bootstrap]
8.33 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.09 sec, 8.34 MB]                                [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.1 sec, 8.35 MB]                                      [bootstrap]
Successfully connected to the Drupal database. [0.11 sec, 8.35 MB]                                                 [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.12 sec, 8.76 MB]                                         [bootstrap]
PHP Fatal error:  Call to undefined function filter_xss() in /private/var/aegir/hostmaster-6.x-1.3/includes/common.inc on line 655
session_start(): Cannot send session cookie - headers already sent by (output started at                           [warning]
/usr/local/drush/includes/drush.inc:820) bootstrap.inc:1161 [0.12 sec, 8.84 MB]
session_start(): Cannot send session cache limiter - headers already sent (output started at                       [warning]
/usr/local/drush/includes/drush.inc:820) bootstrap.inc:1161 [0.12 sec, 8.84 MB]
Cannot modify header information - headers already sent by (output started at                                      [warning]
/usr/local/drush/includes/drush.inc:820) bootstrap.inc:725 [0.13 sec, 8.98 MB]
Cannot modify header information - headers already sent by (output started at                                      [warning]
/usr/local/drush/includes/drush.inc:820) bootstrap.inc:726 [0.13 sec, 8.98 MB]
Cannot modify header information - headers already sent by (output started at                                      [warning]
/usr/local/drush/includes/drush.inc:820) bootstrap.inc:727 [0.13 sec, 8.99 MB]
Cannot modify header information - headers already sent by (output started at                                      [warning]
/usr/local/drush/includes/drush.inc:820) bootstrap.inc:728 [0.13 sec, 8.99 MB]

Fatal error: Call to undefined function filter_xss() in /private/var/aegir/hostmaster-6.x-1.3/includes/common.inc on line 655
Drush command could not be completed. [0.15 sec, 12.71 MB]                                                         [error]
realityloop’s picture

Ok, so I had an old copy of drush in another location on my computer that was stopping this from working properly, I can confirm it's working properly once I updated links to the correct version of drush.

tstoeckler’s picture

Due to the /core move (can't be bothered to find issue ATM), this is completely broken right now.

The directory /var/aegir/platforms/drupal-8.x-0 does not contain a valid Drupal installation

omega8cc’s picture

tstoeckler’s picture

Yup, Thanks :)

omega8cc’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Status: Needs work » Needs review

Working support for D8 is now committed in dev-drupal-8 branch: http://drupalcode.org/project/provision.git/shortlog/refs/heads/dev-drup...

It requires recent php-cli (I tested it with 5.3.10) plus heavily patched Drush 4, since it doesn't support Drupal 8 and we can't switch to Drush 5 yet.

You can find my working fork of Drush 4 head with required patches here: https://github.com/omega8cc/drush_4x

This site (see screenshots below) has been provisioned using everything above, so it works!

https://skitch.com/omega8cc/8cq9y/fullscreen-254
https://skitch.com/omega8cc/8cq9m/fullscreen-255
https://skitch.com/omega8cc/8cq9q/fullscreen-256
https://skitch.com/omega8cc/8cq92/fullscreen-257

Enjoy!

realityloop’s picture

Status: Needs review » Needs work

I've copied the three files from the Drupal 8 commit into provision-6.x-2.x installed as per the Drush 5 directions at: http://realityloop.com/blog/2012/07/03/nginx-mariadb-php-aegir-mac-os-x-...

I get the following when trying to create a Drupal 8 site:

Task starts processing
Backend invoke: /usr/local/bin/php /usr/local/Cellar/drush/5.4/libexec/drush.php --php=/usr/local/bin/php --backend=2 --root= --uri=d8x.ld provision-save '@d8x.ld' 2>&1
/usr/local/bin/php /usr/local/Cellar/drush/5.4/libexec/drush.php --php=/usr/local/bin/php --backend=2 --root= --uri=d8x.ld provision-save '@d8x.ld' 2>&1
Bootstrap to phase 0.
Bootstrap to phase 0.
Found command: provision-save (commandfile=provision)
Loaded alias @server_master from file /Users/brian/.drush/server_master.alias.drushrc.php
Loading mysql driver for the db service
Declaration of Provision_Service_null::__call() should be compatible with that of Provision_Service::__call() null.php:27
Declaration of Provision_Service_null::sync() should be compatible with that of Provision_Service::sync() null.php:27
Loading nginx driver for the http service
Loaded alias @platform_Drupal8x from file /Users/brian/.drush/platform_Drupal8x.alias.drushrc.php
Loaded alias @d8x.ld from file /Users/brian/.drush/d8x.ld.alias.drushrc.php
Template loaded: /Users/brian/.drush/provision/Provision/Config/Drushrc/provision_drushrc_alias.tpl.php
Changed permissions of /Users/brian/.drush/d8x.ld.alias.drushrc.php to 640
Generated config Drush configuration file
Changed permissions of /Users/brian/.drush/d8x.ld.alias.drushrc.php to 440
Command dispatch complete
Peak memory usage was 13.99 MB
Loaded alias @d8x.ld from file /Users/brian/.drush/d8x.ld.alias.drushrc.php
Backend invoke: /usr/local/bin/php /usr/local/Cellar/drush/5.4/libexec/drush.php --php=/usr/local/bin/php --backend=2 @d8x.ld provision-install 2>&1
/usr/local/bin/php /usr/local/Cellar/drush/5.4/libexec/drush.php --php=/usr/local/bin/php --backend=2 @d8x.ld provision-install 2>&1
Bootstrap to phase 0.
Bootstrap to phase 1.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Undefined index: HTTP_HOST bootstrap.inc:444
Initialized Drupal 8.0-dev root directory at /var/aegir/platforms/drupal-8.x
Found command: provision-install (commandfile=provision)
Loaded alias @server_master from file /Users/brian/.drush/server_master.alias.drushrc.php
Loading mysql driver for the db service
Declaration of Provision_Service_null::__call() should be compatible with that of Provision_Service::__call() null.php:27
Declaration of Provision_Service_null::sync() should be compatible with that of Provision_Service::sync() null.php:27
Loading nginx driver for the http service
Loaded alias @platform_Drupal8x from file /Users/brian/.drush/platform_Drupal8x.alias.drushrc.php
Including /Users/brian/.drush/provision/db/install.provision.inc
Including /Users/brian/.drush/provision/dns/install.provision.inc
Including /Users/brian/.drush/provision/example/install.provision.inc
Including /Users/brian/.drush/provision/http/install.provision.inc
Including /Users/brian/.drush/provision/platform/install.provision.inc
Granting privileges to d8xld@localhost on d8xld
Created d8xld database
Created sites/d8x.ld
Changed permissions of sites/d8x.ld to 755
Created sites/d8x.ld/themes
Changed permissions of sites/d8x.ld/themes to 2775
Created sites/d8x.ld/modules
Changed permissions of sites/d8x.ld/modules to 2775
Created sites/d8x.ld/libraries
Changed permissions of sites/d8x.ld/libraries to 2775
Created sites/d8x.ld/files
Changed permissions of sites/d8x.ld/files to 2770
Created sites/d8x.ld/files/tmp
Changed permissions of sites/d8x.ld/files/tmp to 2770
Created sites/d8x.ld/files/images
Changed permissions of sites/d8x.ld/files/images to 2770
Created sites/d8x.ld/files/pictures
Changed permissions of sites/d8x.ld/files/pictures to 2770
Created sites/d8x.ld/files/css
Changed permissions of sites/d8x.ld/files/css to 2770
Created sites/d8x.ld/files/js
Changed permissions of sites/d8x.ld/files/js to 2770
Created sites/d8x.ld/files/ctools
Changed permissions of sites/d8x.ld/files/ctools to 2770
Created sites/d8x.ld/files/imagecache
Changed permissions of sites/d8x.ld/files/imagecache to 2770
Created sites/d8x.ld/files/locations
Changed permissions of sites/d8x.ld/files/locations to 2770
Created sites/d8x.ld/private
Changed permissions of sites/d8x.ld/private to 2770
Created sites/d8x.ld/private/files
Changed permissions of sites/d8x.ld/private/files to 2770
Created sites/d8x.ld/private/temp
Changed permissions of sites/d8x.ld/private/temp to 2770
Changed group ownership of sites/d8x.ld/files to www
Changed group ownership of sites/d8x.ld/files/tmp to www
Changed group ownership of sites/d8x.ld/files/images to www
Changed group ownership of sites/d8x.ld/files/pictures to www
Changed group ownership of sites/d8x.ld/files/css to www
Changed group ownership of sites/d8x.ld/files/js to www
Changed group ownership of sites/d8x.ld/files/ctools to www
Changed group ownership of sites/d8x.ld/files/imagecache to www
Changed group ownership of sites/d8x.ld/files/locations to www
Changed group ownership of sites/d8x.ld/private to www
Changed group ownership of sites/d8x.ld/private/files to www
Changed group ownership of sites/d8x.ld/private/temp to www
has no site config file
Template loaded: /Users/brian/.drush/provision/http/Provision/Config/Nginx/vhost.tpl.php
Generated config virtual host configuration file
Template loaded: /Users/brian/.drush/provision/Provision/Config/Drupal/provision_drupal_settings.tpl.php
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/drupal-8.x/sites/d8x.ld/settings.php to 440
Change group ownership of /var/aegir/platforms/drupal-8.x/sites/d8x.ld/settings.php to www
Template loaded: /Users/brian/.drush/provision/Provision/Config/Drushrc/provision_drushrc_site.tpl.php
Generated config Site Drush configuration file
Changed permissions of /var/aegir/platforms/drupal-8.x/sites/d8x.ld/drushrc.php to 440
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site d8x.ld at sites/d8x.ld
Cache HIT cid: 5.4-commandfiles-2-e7bfe9abdd7d1b45df004801c23cdab7
Loading drushrc "/Users/brian/Sites/drupal-8.x/sites/d8x.ld/drushrc.php" into "site" scope.
Backend invoke: /usr/local/bin/php /usr/local/Cellar/drush/5.4/libexec/drush.php --php=/usr/local/bin/php --backend=2 --yes @d8x.ld provision-install-backend --client_email='brian@realityloop.com' 2>&1
/usr/local/bin/php /usr/local/Cellar/drush/5.4/libexec/drush.php --php=/usr/local/bin/php --backend=2 --yes @d8x.ld provision-install-backend --client_email='brian@realityloop.com' 2>&1
Bootstrap to phase 0.
Bootstrap to phase 2.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Undefined index: HTTP_HOST bootstrap.inc:444
Initialized Drupal 8.0-dev root directory at /var/aegir/platforms/drupal-8.x
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site d8x.ld at sites/d8x.ld
Cache HIT cid: 5.4-commandfiles-2-e7bfe9abdd7d1b45df004801c23cdab7
Found command: provision-install-backend (commandfile=provision)
Loaded alias @server_master from file /Users/brian/.drush/server_master.alias.drushrc.php
Loading mysql driver for the db service
Declaration of Provision_Service_null::__call() should be compatible with that of Provision_Service::__call() null.php:27
Declaration of Provision_Service_null::sync() should be compatible with that of Provision_Service::sync() null.php:27
Loading nginx driver for the http service
Loaded alias @platform_Drupal8x from file /Users/brian/.drush/platform_Drupal8x.alias.drushrc.php
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Cache HIT cid: 5.4-commandfiles-3-ff795e0864da9d3c245f6727a8655b23
Undefined index: login_link install.provision.inc:60
Template loaded: /Users/brian/.drush/provision/Provision/Config/Drupal/Alias/provision_drupal_sites.tpl.php
Generated config Drupal sites.php file
Changed permissions of /var/aegir/platforms/drupal-8.x/sites/sites.php to 644
Changes made in drush_http_provision_install have been rolled back.
has no site config file
Changes made in drush_example_provision_install have been rolled back.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/css directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/ctools directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/imagecache directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/images directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/js directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/locations directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/pictures directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files/tmp directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/files directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/libraries directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/modules directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/private/files directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/private/temp directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/private directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld/themes directory successful.
Deleting /var/aegir/platforms/drupal-8.x/sites/d8x.ld directory successful.
Changes made in drush_provision_drupal_pre_provision_install have been rolled back.
Dropping database d8xld
Revoking privileges of d8xld@localhost from d8xld
Changes made in drush_db_pre_provision_install have been rolled back.
Command dispatch complete
Peak memory usage was 17.88 MB
Command dispatch complete
Peak memory usage was 30.13 MB
Steven Jones’s picture

Priority: Normal » Major

This should get into 2.x

omega8cc’s picture

Another related patch - I didn't commit it to the dev-drupal-8 branch yet, which should be synced with 2.x anyway.

ergonlogic’s picture

Note that Drush 5 just dropped support for Drupal 8. So, we'll probably have to move to (as-yet unreleased) Drush 6.x to fully support Drupal 8.

omega8cc’s picture

Side note: even if Drush folks decided to drop D8 support in Drush 5, it still works in our Drush 4.6 + Aegir 2.x based Octopus fork - however recently D8 managed to break it again, so our latest working D8 platform is from September 15. At the same time Octopus still supports Drupal 5 - hence the use of Drush 4.6 in our Aegir 2.x fork.

helmo’s picture

Title: Support Drupal 8 sites » Support the hosting of Drupal 8 sites
Version: 6.x-2.x-dev » 7.x-3.x-dev

"official" Drupal 8 support is probably not going to make it in 6.x-2.x.
I'm upping the version label for this and changing the title to make it clear this is about hosting Drupal 8 sites, not a D8 version of hostmaster.

davidrobinson_pw’s picture

Has anyone had a more recent look at getting D8 into drupal.

The patches above are a good starting point but there are a lot more changes in Drupal 8 that need to be accommodated and Drupal 8 is still a bit of a moving goal post.
We did a quick bit of testing with the patches and the latest drush master to see what does work.

  • Can create and verify a platform
  • but packages are not found for platform
  • Site creation fails but running enable afterwards works
  • however verifying it breaks the site due to settings.php being rewritten
  • similarly importing a drupal 8 site originally created using drush si breaks the site

With a bit of digging the following drupal 8 differences need handling.

  • Info files are now in yaml format and have the .info.yml extension
  • modules, profiles and themes now have folders in drupal root. sites/all/X is still supported as well
  • system table doesn't
  • a lot of config is in sites/example.com/files/config_random/. The path for this has to be in settings.php
  • There's also a hash salt that goes into settings.php
  • Db connection params in settings.php now include a namespace for the driver e.g. Drupal\\Core\\Database\\Driver\\mysql
  • I don't know if the clone and migrate workflows will need to do any thing special for the new configuration management. see docs
  • I'd also expect to hit permissions issues with some of the new config and other files etc

Some things can probably be resolved by getting the right code into provision/platform/drupal/X_8.inc but other things may need refactoring. Especially where an assumption that would have been valid for Drupal 5-7 no longer holds.

clemens.tolboom’s picture

I planned to work on this issue but unfortunately this is hard as there are no recent patches in this issue :(

But he ... #2097363: Add site spins forever is my first step.

@helmo is helping me with this so hope to make some progress.

@davidrobinson_pw do you have a patch(set) through issues on d.o available?

helmo’s picture

I've merged in all the changes from 6.x-2.x into the dev-drupal-8 branch.

And also done some cherry-picking from the omega8cc sandbox. There is is a lot though so there could be more :(

clemens.tolboom’s picture

Issue summary: View changes

Inserted template + comments from @davidrobinson_rw

clemens.tolboom’s picture

@helmo tnx

Platform verify works and gets its packages.

For site add we need #2008106: Prepare for REQUIRED sites/sites.php which then fails at

Drush command terminated abnormally due to an unrecoverable error. Error: Call to undefined function drush_core_site_install_db_spec() in /data/aegir/src/provision/platform/drupal/install_8.inc, line 88

which is probable fixable :)

clemens.tolboom’s picture

Status: Needs work » Needs review
FileSize
1.05 KB

Hmmm .... sites.php does not contain anything ... so I'm not sure #2008106: Prepare for REQUIRED sites/sites.php is needed anymore.

I managed to add a site but not install. Doing a drush @site site-install made the site alive.

Reset password fails with drupal_session_destroy_uid()

core/includes/session.inc:function drupal_session_destroy_uid($uid) {
helmo’s picture

Status: Needs review » Needs work
+++ b/platform/drupal/install_8.inc
@@ -84,6 +84,9 @@ function install_main() {
+  else if (function_exists('_drush_sql_get_db_spec')) {
+    $db_spec = _drush_sql_get_db_spec();

This feels like quessing... based on DRUSH_VERSION we should know what to call.

if (DRUSH_VERSION >= 7) {
}
elseif (DRUSH_VERSION >= 6) {
}
elseif (DRUSH_VERSION >= 5) {

} else {
 // Drush 4???
}

PS: your currently on Drush 7 (master branch)

helmo’s picture

I've just committed a bunch of work from Clemens on the dev-drupal-8 branch ... this patch.
Not completely done... but we're getting there.

clemens.tolboom’s picture

I've fixed a lot issues on the http://drupalcode.org/project/provision.git/shortlog/refs/heads/dev-drup... branch helped by helmo.

Thanks @omega8cc for the patches

Thanks @helmo for the immediate @ office support :)

Installing now works except for

Calling hook drush_provision_drupal_post_provision_install
WD DrupalKernel: Container cannot be written to disk
Drush command terminated abnormally due to an unrecoverable error. Error: Call to a member function isAuthenticated() on a non-object in /data/aegir/platforms/drupal-8.x/core/modules/history/lib/Drupal/history/Plugin/views/field/HistoryUserTimestamp.php, line 35

This needs way more work + testing + tests.

clemens.tolboom’s picture

Issue summary: View changes

Make list from remaining tasks.

clemens.tolboom’s picture

The installation fails due to

Calling hook drush_provision_drupal_post_provision_install

- calls our new platform/drupal/clear_8.inc
- calls drupal_flush_all_caches

which notified : WD DrupalKernel: Container cannot be written to disk. Drush solved this by #1801082-5: drupal_flush_all_caches() assumes a web request - "The service definition "router.builder" does not exist. "

Drush command terminated abnormally due to an unrecoverable error. Error: Call to a member function isAuthenticated() on a non-object in /data/aegir/platforms/drupal-8.x/core/modules/history/lib/Drupal/history/Plugin/views/field/HistoryUserTimestamp.php, line 35

is a real pain ... as it seems views are executed through RouterBuilder->rebuild().

Can we fix this by loading a users into global $user?

clemens.tolboom’s picture

clemens.tolboom’s picture

The Core #2097327: Unecessary cache clear/router rebuild in views_menu() seems to fix this ... chasing head just by 1 day :p

helmo’s picture

@clemens.tolboom mentioned another issue to me:

during a site-install:
Use of undefined constant VERSION - assumed 'VERSION' provision_drupal.drush.inc:532

This seems to be the change notice: https://drupal.org/node/2082661

This patch generalizes it.. committing to dev-drupal-8 branch.

anarcat’s picture

what's the status here? is this complete / ready for testing? should we aim to merge this in the 2.0 release (see also #2023113: [meta] 2.0 release).

anarcat’s picture

Issue summary: View changes

Updated issue summary.

helmo’s picture

This is not ready for #2023113: [meta] 2.0 release .. merging it later would be nice, but there is an element of 'chansing HEAD' involved ;)
So I expect that we merge this into 7.x-3.x and possibly keep this branch as a backport for those who need it.

Summary updated.

Speaking of issues... I saw these in the watchdog log when calling update.php from the browser... WSOD

Exception: Failed to modify <em class="placeholder">sites/drupal8-1.dev.example.com/settings.php</em>. Verify the file permissions. in drupal_rewrite_settings() (line 312 of /var/aegir/platforms/drupal-8.x/core/includes/install.inc).

Warning: file_put_contents(/var/aegir/platforms/drupal-8.x/sites/drupal8-1.dev.example.com/settings.php): failed to open stream: Permission denied in drupal_rewrite_settings() (line 311 of /var/aegir/platforms/drupal-8.x/core/includes/install.inc).

It seems drupal wants write access to the settings.php ... needs investigation.

helmo’s picture

Issue summary: View changes

task update

clemens.tolboom’s picture

The current branch works for 6.x-2.x but I agree we should target 7.x-3.x in the end. For now @helmo and @clemens.tolboom try to make it work for 6.x-2.x as @clemens.tolboom need a Drupal 8 installation :p

clemens.tolboom’s picture

I'm not sure whether I managed to enter the D8 site only through Aegir per #29. I guess now I did a drush uli

I filed a new issue to make it easier to follow and/or fix issues.

#2104785: provision_drupal_system_map is using the old *.info construct.
#2104797: Load user-1 before drupal_flush_all_caches
#2104805: provision_drupal.drush.inc contains version specific code.

clemens.tolboom’s picture

Issue summary: View changes

Make the dev branch more visible.

ergonlogic’s picture

I've updated the sub-issues listed in #37 to target 7.x-3.x.

ergonlogic’s picture

Issue summary: View changes

Added more related items

phoang’s picture

There's one big issue is Drupal 8 require Drush 7. If we can get drush 7 works on Aegir 2 then I think we can host/create Drupal 8 platform on Aegir 2.

helmo’s picture

@phoang: Drush 7 "works" together with Aegir 2.x I use it on my dev Aegir. It is a moving target though.

The code here is still NOT complete and needs more work and testing.

I rebased and merged the dev-drupal-8 branch into 7.x-3.x. (After merging recent 6.x-2.x changes into provision 7.x-3.x)

This because I see Drupal 8 support as an essential requirement for Aegir 3.x. This should also make it safer to work on refactoring the code without merge conflicts.

clemens.tolboom’s picture

@phoang please provide more info on

then I think we can host Drupal 8 on Aegir 2

We had a few attempts installing D8 but never had a proper install. Always needed manual work. My last attempt was a '/me faces palms'

So I'm very curious about others experiences and steps taken.

I myself hope to give it another try during the upcoming sprint weekend
- https://groups.drupal.org/node/332998
- http://cheppers.com/blog/global-sprint-weekend-january-25-and-26-2014
- mine: http://drupal.nl/evenement/groningen-global-sprint-zaterdag-25-januari-2014

phoang’s picture

@helmo: Let's me try to install the Aegir 7.x-3.x branch to see if it works with a Drupal 8 platform.

@clemens.tolboom: I meant that as of the current Aegir 2.0 version is not support for Drush 7 and Drupal 8 platform. I had the some issues when trying to create a Drupal platform on Aegir 2.0

JakeWilund’s picture

I apologize if this is the wrong place to ask this question, but has current development mostly shifted to the 7.x-3.x branch at this point? I haven't upgraded to version 2.0 as I was more interested in waiting to run the d7 version. I know devs hate this question, and I'm not looking for anything specific, but where does the current 7.x branch stand and what's anyone's best guess as to when we might see a relatively stable build?

ergonlogic’s picture

#43 is a little off-topic here, as there are other issues addressing the port to D7 and the state of various components. That said, yes development has moved to the 7.x-3.x branch. There isn't likely to be a direct 1.x to 3.x upgrade path, and since 1.x is essentially deprecated now that 2.0 is out, I suggest upgrading. A lack of support for semantic versioning on d.o will delay a stable release, but we hope to get an alpha release out in the next few weeks.

helmo’s picture

Issue summary: View changes

@JakeWilund: See #1261030: [meta] Roadmap: Aegir 3.x (D7 port) for more details about 7.x-3.x

ergonlogic’s picture

With a bit of tweaking to install_8.inc and the settings template, we're able to install D8 sites in the 7.x-3.x branch again. We still get an error when we try to retrieve the list of packages from the site though, since we're querying the 'system' table, that seems to no longer be there.

ergonlogic’s picture

D8 sites will now install properly, though core throws an error. I've refactored the package management functions somewhat, though they need more work.

  • Commit 5804019 on 7.x-3.x, dev-helmo-3.x authored by clemens.tolboom, committed by helmo:
    Issue #1194602 by tstoeckler, clemens.tolboom: Working on the hosting of...
  • Commit e62e53c on 7.x-3.x, dev-helmo-3.x by helmo:
    Issue #1194602 by helmo, clemens.tolboom: Generalize version check.
    
  • Commit ecede8f on 7.x-3.x, dev-helmo-3.x authored by Steven Jones, committed by helmo:
    Issue #1194602 by tstoeckler: Added Support Drupal 8 sites.
    
clemens.tolboom’s picture

Issue summary: View changes

  • helmo committed 5804019 on authored by clemens.tolboom
    Issue #1194602 by tstoeckler, clemens.tolboom: Working on the hosting of...
  • helmo committed e62e53c on
    Issue #1194602 by helmo, clemens.tolboom: Generalize version check.
    
  • helmo committed ecede8f on authored by Steven Jones
    Issue #1194602 by tstoeckler: Added Support Drupal 8 sites.
    
realityloop’s picture

Status: Needs work » Fixed
Issue tags: +Amsterdam2014

I think we can safely close this because of #2306055: Platform verify fails for Drupal 8 under Aegir 3.x

Jon Pugh’s picture

Woohoo! Way to go, team.

helmo’s picture

Title: Support the hosting of Drupal 8 sites » [meta] Support the hosting of Drupal 8 sites
Issue summary: View changes
Status: Fixed » Needs work

@realityloop: that might be a bit too quick. We still have a few remaining tasks in the issue summary.

realityloop’s picture

@helmo: ah, sorry, is there a list anywhere of what still needs to be done?

helmo’s picture

Not really a formal list, but the best place to start is the 'Remaining tasks' section in the summary of this issue. We can create child issues when there is work to be done, or something to discuss.

  • helmo committed 5804019 on 2358795-provision-save-on-verify authored by clemens.tolboom
    Issue #1194602 by tstoeckler, clemens.tolboom: Working on the hosting of...
  • helmo committed e62e53c on 2358795-provision-save-on-verify
    Issue #1194602 by helmo, clemens.tolboom: Generalize version check.
    
  • helmo committed ecede8f on 2358795-provision-save-on-verify authored by Steven Jones
    Issue #1194602 by tstoeckler: Added Support Drupal 8 sites.
    
omega8cc’s picture

Issue summary: View changes
omega8cc’s picture

Issue summary: View changes

  • helmo committed 5804019 on 7.x-4.x authored by clemens.tolboom
    Issue #1194602 by tstoeckler, clemens.tolboom: Working on the hosting of...
  • helmo committed e62e53c on 7.x-4.x
    Issue #1194602 by helmo, clemens.tolboom: Generalize version check.
    
  • helmo committed ecede8f on 7.x-4.x authored by Steven Jones
    Issue #1194602 by tstoeckler: Added Support Drupal 8 sites.
    
gboudrias’s picture

I don't know if this warrants another issue, but the Drush version 6.6.0 breaks Drupal 8 support, as documented in #2539946: drush defaulting to version 5.10.0 or 6.6.0 not dev-master (v.8)

Drush 6.6.0 does not support Drupal 8. See http://drupal.org/project/drush for more information

omega8cc’s picture

The problem is that Drush removed Drupal 8 support even in Drush 7, so we would need to depend on Drush 8 to be able to test/support Drupal 8 again. This comes with yet another problem, because Drush 8 (head) dropped support for PHP 5.3, so users should upgrade to PHP 5.5 or even 5.6, first. Which, of course, may affect some Drupal 6 contrib.

ergonlogic’s picture

Issue tags: -Amsterdam2014

We should revisit this, seeing as how Drupal 8 should be release at DC Barcelona. I've confirmed #2570389: Support Drush 7.x and #2570539: Support Drush 8.x both work, and we have tests on http://ci.aegirproject.org for both now. I'm going to leave the Drush8 test as-is, but copy it to a new "Drupal 8" test, so we can start to see where our Drupal 8 support really stands.

ergonlogic’s picture

I added a stand-alone test for our Drupal8 support: http://ci.aegirproject.org/job/P_Aegir_Puppet_Module_functional_test_Aeg.... I'm only running our Drupal 8 tests here, since our Drupal 6/7 functionality is sufficiently covered by other tests. For now, this is installing Drush's "master" branch, until such time as a "8.x" one is created.

This test is currently failing, as expected. Here's an excerpt from the log, of the first error:

...
Platforms path /var/aegir/platforms is writable.                       [success]
Could not find the Profile minimal for Platfrom ID 132                   [error]
WD node: PDOException: SQLSTATE[23000]: Integrity constraint             [error]
violation: 1048 Column 'profile' cannot be null: UPDATE
{hosting_site} SET 
...

This appears to be related to the first couple outstanding items in the issue summary. That is, package management appears to be broken. So, when the site is imported into the front-end, it can't map to a profile.

The first warning happens a bit earlier:

...
Changed group ownership of                                             [success]
<code>sites/drupal8-minimal.aegir.example.com/private/config/staging<\/code>
to www-data
Congratulations, you installed Drupal!                                  [status]
Generated config in write(): Drupal sites.php file                     [success]
(/var/aegir/platforms/drupal8/sites/sites.php)
Changed permissions of /var/aegir/platforms/drupal8/sites/sites.php    [success]
to 644
Creating default object from empty value packages_8.inc:61             [warning]
Changed permissions of                                                 [success]
/var/aegir/platforms/drupal8/sites/drupal8-minimal.aegir.example.com/drushrc.php
to 640
Generated config in write(): Site Drush configuration file             [success]
(/var/aegir/platforms/drupal8/sites/drupal8-minimal.aegir.example.com/drushrc.php)
Changed permissions of                                                 [success]
/var/aegir/platforms/drupal8/sites/drupal8-minimal.aegir.example.com/drushrc.php
to 440
...

Which appears to confirm that the issue is in packages_8.inc. However, I suspect that the issue originates in the platform verify, as we may not be pulling packages in there either. However, there's no indication of that in the logs here.

omega8cc’s picture

Just to share our surprise: For some reason, latest Drupal 8.0.0-beta15 (vanilla, no patches!) just works again with BOA-2.4.5, which still comes with Drush 7.0-rc2. This means that current BOA stable supports Drupal 6, 7 and 8, out of the box, with the same Drush version used. Pretty good D8 reloading!

BOA is now a bit weird beast, though, because we are running Hostmaster 6.x on top of Provision 7.x (with only minor tweaks), and we have avoided going beyond Drush 7.0-rc2, so we could still use it to test Drupal 8 support, which appeared broken over several betas, required custom patches etc.

Suddenly, Drupal 8.0.0-beta15 (vanilla) works again with no changes on our side.

Not sure if this may help here, but running Drush 7.0-rc2 allows to support Drupal 6, 7 and 8 (current beta15) -- of course PHP 5.5 is a must, but our own website runs on Pressflow 6 and PHP 5.6 for many months, with zero issues, so PHP version is no longer an issue (at least for latest Pressflow with some extra patches), unless someone runs some very ancient contrib.

omega8cc’s picture

Issue summary: View changes
omega8cc’s picture

FileSize
72 KB

This is how it works with Drush 7.0-rc2 on Provision 3.x with Hostmaster 2.x (and PHP 5.5.29)

D8 Packages

omega8cc’s picture

Issue summary: View changes

"Release" & "Package type" is displayed properly on the site's packages list, while on the platform's packages list "Package type" looks fine, while "Release" column shows just "VERSION" word instead of, say, "8.0.0-beta15".

ergonlogic’s picture

The error that was causing our tests to fail was that the 'minimal' profile wasn't being found during platform verify. Subsequent tests install using that profile, and would thus fail. The issue was that we were searching for 'minimal.profile' which no longer exists. In b8ef181be5c7, I fixed this by searching for 'example.info.yml' instead. Tests are still failing, but later in the process.

ergonlogic’s picture

This causes some odd behaviour, as we later include this file, to look for hook_profile_details(). I've reverted that commit, pending further investigation.

ChrisZZ’s picture

I just managed to install drupal 8 RC1 platform on aegir after updating DRUSH to drush-8 with

composer global require drush/drush:dev-master

But now I struggle with initiating the site, it always stops.

This the first error
Drupal\Core\Installer\Exception\InstallerException Object ( [title:protected] => Error [message:protected] => Database name field is required. Database username field is required. [string:Exception:private] =>

In this is the second error
exception 'Drupal\Core\Config\StorageException' with message 'Write operation is not allowed.' in /var/aegir/platforms/drupal-8.0.0-rc1/core/lib/Drupal/Core/Config/InstallStorage.php:110 Stack trace:

omega8cc’s picture

You need to use Provision 3.x head to have all recent D8 related patches, required to fix problems introduced in Drupal 8 rc1. Then it will work: https://twitter.com/omega8cc/status/652433635358978048

ergonlogic’s picture

Interestingly, I was able to install, backup, restore, clone and migrate a Drupal 8.0.0-rc1 site without any issues, simply upgrading to Drush master. I used the Standard profile, since we don't detect the Minimal profile (due to it not having a file called 'minimal.profile').

Of the "Remaining tasks" listed in the summary, (2) appears to mostly work, with the exception of the aforementioned profile detection issue. (3) on the other hand isn't something I ever thought we supported for prior versions. I didn't test it.

That all said, I think we're pretty close to being able to close this issue, and simply open issues to track the remaining rough edges. We will have to tackle how to support Drush 8 is a reasonable fashion (see: #2585275: Maintain Drush Debian packages). Also, I believe our tests need some re-work (see: #2581797: Fix up tests in preparation for D8)

ergonlogic’s picture

Status: Needs work » Fixed

Simply changing our D8 tests to use Standard profile, allowed out D8 tests to pass: http://ci.aegirproject.org/job/P_Aegir_Puppet_Module_functional_test_Aeg...

We can be reasonably confident about supporting Drupal 8 now. So I'm going to close this issue. Thank you all!

clemens.tolboom’s picture

Awesome :)

gboudrias’s picture

Issue tags: +Aegir 3.2

Woohoo!

Status: Fixed » Closed (fixed)

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

m.stenta’s picture

@ChrisZZ: I am experiencing the same issue you reported in #70 (exception 'Drupal\Core\Config\StorageException' with message 'Write operation is not allowed.').

I created a new issue for it here: #2702963: D8 install fails with "Write operation is not allowed."

Did you ever figure out what was causing that? Please post to that issue if you have any insight.