From 8f7ea72a0137e538ee0340e3d0b836eee3a54ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Sch=C3=B6ldstr=C3=B6m?= Date: Sat, 14 May 2016 08:09:03 -0500 Subject: [PATCH] Issue #616: Update docs [ci skip] --- docs/extras/mariadb.md | 2 +- docs/extras/scripts.md | 10 +++++++--- docs/extras/varnish.md | 4 ++-- docs/other/bigpipe.md | 2 +- example.config.yml | 2 +- mkdocs.yml | 2 +- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/extras/mariadb.md b/docs/extras/mariadb.md index 4989bf833..44ab0a268 100644 --- a/docs/extras/mariadb.md +++ b/docs/extras/mariadb.md @@ -9,7 +9,7 @@ mysql_packages: - python-mysqldb ``` -This set of packages works out of the box with the default Ubuntu 14.04 installation that comes with Drupal VM. +This set of packages works out of the box with Ubuntu 14.04 as well as the default Ubuntu 16.04 installation that comes with Drupal VM. Alternatively, if you want to use RedHat 7 or CentOS 7 instead of Ubuntu, you can set the following variables to install and configure MariaDB instead of MySQL: diff --git a/docs/extras/scripts.md b/docs/extras/scripts.md index 2ae9b6f29..cb45c1a13 100644 --- a/docs/extras/scripts.md +++ b/docs/extras/scripts.md @@ -1,14 +1,18 @@ -Drupal VM allows you to run extra shell scripts at the end of the provisioning process, in case you need to do extra setup, further configure the VM, or install extra software outside the purview of Drupal VM. +Drupal VM allows you to run extra shell scripts in the beginning and at the end of the provisioning process, in case you need to do extra setup, further configure the VM, or install extra software outside the purview of Drupal VM. To use an extra script, configure the path to the script (relative to `provisioning/playbook.yml`) in `config.yml`: ```yaml +pre_provision_scripts: + - "../scripts/pre-provision.sh" post_provision_scripts: - "../scripts/post-provision.sh" ``` -The above example results in a `post-provision.sh` script running after the main Drupal VM setup is complete. Post provision scripts run after the first `vagrant up`, and then any time you run Vagrant provisioning (e.g. `vagrant provision` or `vagrant up --provision`). +The above example results in a `pre-provision.sh` script running before the provisioning starts and a `post-provision.sh` script running after the main Drupal VM setup is complete. Pre and post provision scripts run after the first `vagrant up`, and then any time you run Vagrant provisioning (e.g. `vagrant provision` or `vagrant up --provision`). + +_Note: The pre provision scripts run before any other packages are installed. If you want to use commands such as `git`, you need to install the packages yourself._ You can define as many scripts as you would like, and any arguments after the path will be passed to the shell script itself (e.g. `"- "../scripts/setup-paths.sh --option"`). -Place your post-provision scripts inside a `scripts` directory in the root of your Drupal VM project directory; this directory is gitignored, so you can continue to update Drupal VM without overwriting your scripts. +Place your pre and post provision scripts inside a `scripts` directory in the root of your Drupal VM project directory; this directory is gitignored, so you can continue to update Drupal VM without overwriting your scripts. diff --git a/docs/extras/varnish.md b/docs/extras/varnish.md index 95e1be858..a1b416c71 100644 --- a/docs/extras/varnish.md +++ b/docs/extras/varnish.md @@ -25,8 +25,8 @@ In order for Varnish to actually do anything helpful (instead of just pass throu You will also need to make a few small changes to your site's `settings.php` configuration to make Drupal work correctly behind a reverse proxy like Varnish: ```php -$conf['reverse_proxy'] = TRUE; -$conf['reverse_proxy_addresses'] = array('127.0.0.1'); +$settings['reverse_proxy'] = TRUE; +$settings['reverse_proxy_addresses'] = array('127.0.0.1'); ``` If you don't set these values, Drupal will think all requests are coming from `127.0.0.1`. There are other settings you can change to make Drupal not store copies of cached pages in the Database (since Varnish is caching everything, this is redundant), but those other settings are not covered here. \ No newline at end of file diff --git a/docs/other/bigpipe.md b/docs/other/bigpipe.md index 82315dfd5..08af8704e 100644 --- a/docs/other/bigpipe.md +++ b/docs/other/bigpipe.md @@ -31,7 +31,7 @@ This will disable the `mod_deflate` module for any requests inside that director If you want to switch Apache to use `mod_php` instead of proxying requests through PHP-FPM, you can make the following changes in `config.yml`: - 1. Add `libapache2-mod-php5` to `extra_packages` in `config.yml`. + 1. Add `libapache2-mod-php7.0` to `extra_packages` in `config.yml`. 2. Delete the `extra_parameters` under any Drupal site in the list of `apache_vhosts` (so there is no `ProxyPassMatch` rule). You can also disable PHP-FPM and remove the two `proxy` entries from `apache_mods_enabled` if you don't want to use PHP-FPM with Apache at all, but that's optional; it won't break anything to run Apache with `mod_php` and `mod_proxy_fastcgi` at the same time. diff --git a/example.config.yml b/example.config.yml index 066c006cc..7d4dcb602 100644 --- a/example.config.yml +++ b/example.config.yml @@ -215,7 +215,7 @@ php_max_input_vars: "4000" # Drupal VM defaults to using PHP-FPM with either Apache or Nginx. If you wish # to instead use Apache + mod_php with an Ubuntu base box, make sure you add -# libapache2-mod-php5 to `extra_packages` elsewhere in this config file. +# libapache2-mod-php7.0 to `extra_packages` elsewhere in this config file. php_enable_php_fpm: true php_fpm_listen: "127.0.0.1:9000" diff --git a/mkdocs.yml b/mkdocs.yml index 4ec6a3334..0bea536fb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -29,7 +29,7 @@ pages: - 'Debug Code with XDebug': 'extras/xdebug.md' - 'Catch Emails with MailHog': 'extras/mailhog.md' - 'Test with Behat and Selenium': 'extras/behat.md' - - 'Add Post-Provision Scripts': 'extras/scripts.md' + - 'Add Pre- and Post-Provision Scripts': 'extras/scripts.md' - Other Information: - 'Using Different Base OSes': 'other/base-os.md' - 'Using Different Webservers': 'other/webservers.md'