Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Fixes #2050: Default to Drupal 9.
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy committed Jul 6, 2020
1 parent 1ae7c38 commit 279934a
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM geerlingguy/docker-debian9-ansible:latest
FROM geerlingguy/docker-debian10-ansible:latest
LABEL maintainer="Jeff Geerling"

# Copy provisioning directory, variable overrides, and scripts into container.
Expand All @@ -8,7 +8,7 @@ COPY ./provisioning/docker/bin/* /usr/local/bin

# Provision Drupal VM inside Docker.
RUN ansible-playbook /etc/ansible/drupal-vm/provisioning/playbook.yml \
-e "ansible_python_interpreter=/usr/bin/python" \
-e "ansible_python_interpreter=/usr/bin/python3" \
# Enable FPM. See https://github.com/geerlingguy/drupal-vm/issues/1366.
&& systemctl enable php7.2-fpm.service

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Drupal VM installs the following on an Ubuntu 18.04 (by default) linux VM:
- Apache (or Nginx)
- PHP (configurable version)
- MySQL (or MariaDB, or PostgreSQL)
- Drupal 7 or 8
- Drupal 7, 8, or 9
- Optional:
- Drupal Console
- Drush
Expand Down Expand Up @@ -52,17 +52,17 @@ There are a couple places where you can customize the VM for your needs:
- `config.yml`: Override any of the default VM configuration from `default.config.yml`; customize almost any aspect of any software installed in the VM (more about [configuring Drupal VM](http://docs.drupalvm.com/en/latest/getting-started/configure-drupalvm/).
- `drupal.composer.json` or `drupal.make.yml`: Contains configuration for the Drupal core version, modules, and patches that will be downloaded on Drupal's initial installation (you can build using Composer, Drush make, or your own codebase).

If you want to switch from Drupal 8 (default) to Drupal 7 on the initial install, do the following:
If you want to use Drupal 7 on the initial install, do the following:

1. Switch to using a [Drush Make file](http://docs.drupalvm.com/en/latest/deployment/drush-make/).
1. Update the Drupal `version` and `core` inside your `drupal.make.yml` file.
2. Set `drupal_major_version: 7` inside `config.yml`.

## Quick Start Guide

This Quick Start Guide will help you quickly build a Drupal 8 site on the Drupal VM using Composer with `drupal-project`. You can also use Drupal VM with [Composer](http://docs.drupalvm.com/en/latest/deployment/composer/), a [Drush Make file](http://docs.drupalvm.com/en/latest/deployment/drush-make/), with a [Local Drupal codebase](http://docs.drupalvm.com/en/latest/deployment/local-codebase/), or even a [Drupal multisite installation](http://docs.drupalvm.com/en/latest/deployment/multisite/).
This Quick Start Guide will help you quickly build a Drupal 9 site on the Drupal VM creating a new Composer project. You can also use Drupal VM with [Composer](http://docs.drupalvm.com/en/latest/deployment/composer/), a [Drush Make file](http://docs.drupalvm.com/en/latest/deployment/drush-make/), with a [Local Drupal codebase](http://docs.drupalvm.com/en/latest/deployment/local-codebase/), or even a [Drupal multisite installation](http://docs.drupalvm.com/en/latest/deployment/multisite/).

If you want to install a Drupal 8 site locally with minimal fuss, just:
If you want to install a Drupal site locally with minimal fuss, just:

1. Install [Vagrant](https://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads).
2. Download or clone this project to your workstation.
Expand All @@ -81,7 +81,7 @@ Notes:
- **For faster provisioning** (macOS/Linux only): *[Install Ansible](http://docs.ansible.com/intro_installation.html) on your host machine, so Drupal VM can run the provisioning steps locally instead of inside the VM.*
- **For stability**: Because every version of VirtualBox introduces changes to networking, for the best stability, you should install Vagrant's `vbguest` plugin: `vagrant plugin install vagrant-vbguest`.
- **NFS on Linux**: *If NFS is not already installed on your host, you will need to install it to use the default NFS synced folder configuration. See guides for [Debian/Ubuntu](https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-14-04), [Arch](https://wiki.archlinux.org/index.php/NFS#Installation), and [RHEL/CentOS](https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-centos-6).*
- **Versions**: *Make sure you're running the latest releases of Vagrant, VirtualBox, and Ansible—as of early 2019, Drupal VM recommends: Vagrant 2.2.x, VirtualBox 6.0.x, and Ansible 2.7.x*
- **Versions**: *Make sure you're running the latest releases of Vagrant, VirtualBox, and Ansible—as of 2020, Drupal VM recommends: Vagrant 2.2.x, VirtualBox 6.1.x, and Ansible 2.9.x*

### 2 - Build the Virtual Machine

Expand Down Expand Up @@ -141,7 +141,7 @@ Drupal VM follows semantic versioning, which means your configuration should con
2. Do a diff of your `config.yml` with the updated `default.config.yml` (e.g. `curl https://raw.githubusercontent.com/geerlingguy/drupal-vm/master/default.config.yml | git diff --no-index config.yml -`).
3. Run `vagrant provision` to provision the VM, incorporating all the latest changes.

For major version upgrades (e.g. 3.x.x to 4.x.x), it may be simpler to destroy the VM (`vagrant destroy`) then build a fresh new VM (`vagrant up`) using the new version of Drupal VM.
For major version upgrades (e.g. 4.x.x to 5.x.x), it may be simpler to destroy the VM (`vagrant destroy`) then build a fresh new VM (`vagrant up`) using the new version of Drupal VM.

## System Requirements

Expand Down
4 changes: 2 additions & 2 deletions default.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ drupal_composer_dependencies:
# Set this to 'true' and 'drupal_build_makefile', 'drupal_build_composer' to 'false'
# if you are using Composer's create-project as a site deployment strategy.
drupal_build_composer_project: true
drupal_composer_project_package: "drupal-composer/drupal-project:8.x-dev"
drupal_composer_project_package: "drupal/recommended-project:^9@dev"
drupal_composer_project_options: "--prefer-dist --stability dev --no-interaction"

# Set this to 'false' if you don't need to install drupal (using the drupal_*
Expand All @@ -93,7 +93,7 @@ drupal_db_name: drupal
drupal_db_host: localhost

# Settings for installing a Drupal site if 'drupal_install_site:' is 'true'.
drupal_major_version: 8
drupal_major_version: 9
drupal_domain: "{{ vagrant_hostname }}"
drupal_site_name: "Drupal"
drupal_install_profile: standard
Expand Down
2 changes: 1 addition & 1 deletion docs/configurations/base-os.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ Most everything should work out of the box with Debian 10. If you are installing

## Debian 9 Stretch

Everything should work out of the box with Debian 10.
Everything should work out of the box with Debian 9.
4 changes: 2 additions & 2 deletions docs/deployment/composer-package.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Out of the box Drupal VM is configured to use `composer create-project` to build a Drupal 8 codebase.
Out of the box Drupal VM is configured to use `composer create-project` to build a Drupal codebase.

This is set up with the following variables in `config.yml`:

Expand All @@ -10,7 +10,7 @@ This is set up with the following variables in `config.yml`:
With [acquia/lightning-project](https://github.com/acquia/lightning-project) as an example your `config.yml` settings would be:

```yaml
drupal_composer_project_package: "acquia/lightning-project:^8.1.0"
drupal_composer_project_package: "acquia/lightning-project:^8.8.1"
drupal_composer_project_options: "--prefer-dist --stability rc --no-interaction"
drupal_core_path: "{{ drupal_composer_install_dir }}/docroot"
```
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/drush-make.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If you want to build a Drupal site using a [Drush make file](http://www.drush.or
```yaml
drush_launcher_install: no
drush_install_from_source: yes
drush_source_install_version: "8.1.15"
drush_source_install_version: "8.9.1"
```
Have a look at the defaults in `default.config.yml` and tweak the settings as you'd like in your `config.yml`, then run `vagrant up` as in the Quick Start Guide. Within a few minutes, you should have your site running and available at the `drupal_domain` configured in `config.yml`, falling back to the default `http://drupalvm.test` set in `default.config.yml`.
Expand Down
2 changes: 1 addition & 1 deletion docs/extras/varnish.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

To enable Varnish, make sure `varnish` is in the list of your `installed_extras` in `config.yml`, and run `vagrant provision`.

There are a few varnish configuration variables further down in `default.config.yml` that you may wish to configure. You can use your own `.vcl` file template (instead of the generic Drupal 7-focused generic one) by editing the `varnish_default_vcl_template_path`, and you can use a different port for Varnish by changing `varnish_listen_port`.
There are a few varnish configuration variables further down in `default.config.yml` that you may wish to configure. You can use your own `.vcl` file template (instead of the default generic Drupal-focused one) by editing the `varnish_default_vcl_template_path`, and you can use a different port for Varnish by changing `varnish_listen_port`.

If you'd like to use Varnish on port 80, and switch Apache to a different backend port, you can do so pretty easily; just make sure you have the following values set in your `config.yml` file, and run `vagrant provision` to have Ansible make the necessary changes:

Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/configure-drupalvm.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Drupal VM's default configurations which you should not edit directly.
The main configuration file of a project. Commonly this is a copy of `default.config.yml` with the values tweaked to your own project. For an easier upgrade path you would only set the values you are actually overriding.

```yaml
vagrant_box: geerlingguy/centos7
vagrant_hostname: my-custom-site.dev
vagrant_box: geerlingguy/centos8
vagrant_hostname: my-custom-site.test
vagrant_machine_name: my_custom_site

php_version: "7.2"
Expand Down
4 changes: 2 additions & 2 deletions docs/other/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ You can also add other subdomains if you're using other built-in services, e.g.
If you just want a quick, easy Drupal site for testing, you can run an instance of Drupal VM and install Drupal inside using the provided script.

1. Run an instance of Drupal VM: `docker run -d -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 80:80 -p 443:443 --name=drupalvm --privileged geerlingguy/drupal-vm`
2. Install Drupal on this instance: `docker exec drupalvm install-drupal` (you can choose a version using `install-drupal [version]`, using versions like `8.x-dev` or `7.x-dev`).
2. Install Drupal on this instance: `docker exec drupalvm install-drupal` (you can choose a version using `install-drupal [version]`, using versions like `9.x-dev` or `8.x-dev`).

You should be able to access the Drupal site at `http://localhost`. If you need to share a host directory into the VM, you can do so by adding another `-v` parameter, like `-v /path/on/host:/path/in/container.

Expand Down Expand Up @@ -122,7 +122,7 @@ After you've configured your Drupal VM settings in `config.yml` and other config

This will bake a Docker images using Drupal VM's default settings for distro, IP address, hostname, etc. You can override these options (all are listed in the `provisioning/docker/bake.sh` file) by prepending them to the `composer` command:

DRUPALVM_IP_ADDRESS='192.168.89.89' DISTRO='debian9' composer docker-bake
DRUPALVM_IP_ADDRESS='192.168.89.89' DISTRO='debian10' composer docker-bake

This process can take some time (it should take a similar amount of time as it takes to build Drupal VM normally, using Vagrant and VirtualBox), and at the end, you should see a message like:

Expand Down
2 changes: 1 addition & 1 deletion docs/other/drupal-6.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
If you'd like to use the included configuration and Drush make file to install a Drupal 6 site using an older version of Drush (< 7.x), you may need to make some changes, namely:

1. Drush < 7.x does not support .yml makefiles; if using Drush 5.x or 6.x, you will need to create the make file in the INI-style format.
2. In your customized `config.yml` file, you will need to use the `default` installation profile instead of `standard` (for the `drupal_install_profile` variable).
2. In your customized `config.yml` file, you will need to use the `default` installation profile instead of `standard` (for the `drupal_install_profile` variable).
2 changes: 1 addition & 1 deletion provisioning/templates/nginx-vhost.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ server {
{% endblock %}

{% block location_drupal_legacy -%}
{% if drupal_major_version == 8 -%}
{% if drupal_major_version >= 8 -%}
# Redirect common PHP files to their new locations.
location ~ ^((?!.*(?:core)).*)/(install.php|rebuild.php) {
return 301 $scheme://$host$1/core/$2$is_args$args;
Expand Down

0 comments on commit 279934a

Please sign in to comment.