The Islandora Playbook (Islandora-Devops/islandora-playbook) is a tool for installing the Islandora stack on a single virtual machine. It can be used both as a Vagrant project to create a local development environment, or as an Ansible playbook to provision a local or remote server. It can set up a Drupal based either on Islandora Starter Site, or on the Install Profile Demo.
Basic Usage (Vagrant):¶
Install requirements (below), then:
When used this way, you can trash your working site and get a fresh Islandora relatively quickly, with
vagrant destroy (you will be asked to confirm, as this will delete all your changes and your content), and then
Full instructions below.
To create a local VM, download and install the following.
- Virtual Box
- Vagrant (version 2.0 or higher required)
- Ansible (Tested on version 2.11+, versions back to 2.9 should work.)
Installing Git and Ansible on MacOS¶
OpenSSL is already pre-installed on MacOS. Git can be installed using XCode's command line tools (see below). Python and Pip can either be installed via the downloaded installer direct from the site or via Homebrew (not shown below). Ansible is best installed using Homebrew (see below).
Installing a local development environment (Vagrant)¶
You will use
vagrant up twice, first to create an Islandora base box, and then again to provision that base box into a full Islandora. This method uses Vagrant, VirtualBox, and Ansible.
Make sure that no required ports are currently in use.
Clone the playbook¶
Create the Base Box¶
The Playbook will create a "base box" that includes core software (PHP, Apache, etc). Since these do not need to be updated too often, this can be packaged as a Vagrant base box that will be used to quickly provision the Islandora part.
- If building a CentOS box, you also need to install the vbguest additions with
vagrant plugin install vagrant-vbguest.
- If this is not your first time spinning up the Islandora Playbook from this directory, you may want to clear cached ansible roles in roles/external"
rm -rf roles/external
First, create the islandora base box by overriding the Vagrant variable
ISLANDORA_BUILD_BASE (which defaults to
false in the
Once it is complete (without errors), store it as a Vagrant base box. It will appear as
islandora_base in the current directory.
Then, get rid of the existing VM since we've saved what we need:
Provision the Islandora code¶
Then, to install Islandora (including Drupal and its configuration, Crayfish, Alpaca, etc) on top of the new base box:
Access your site at
Rebuilding your Islandora development box¶
You can quickly create a new "out of the box" Islandora VM by just re-doing the last step (provisioning Islandora) while using your existing base box. In doing this, you will destroy your existing VM, and all of its configuration and data. This will not upgrade PHP, apache, or other back-end services (see below, "Refreshing your base box.")
Refreshing your base box.¶
If you want to use the Playbook to rebuild the base box (e.g. if this playbook now includes updated versions of PHP or Apache), then you will need to take some extra steps to ensure that Vagrant sees your new base box.
This is because once you use the base box once, it is stored in the vagrant box list under your home directory. While subsequent builds of
ISLANDORA_BUILD_BASE=true vagrant up will build a new box and you can package it, but that file does not update the cached box and consequently you still get the old base box when you try build a VM. See
vagrant box documentation for more useful commands for managing base boxes.
Deploying to a remote environment¶
ansible-playbook command using
playbook.yml can provision a remote environment. First, you will need to create a new folder in
inventory/ with the details of your remote deployment. This includes:
- Configuring the SSH parameters so Ansible can log in
- Changing usernames and passwords to something more sensible than the default
- Changing IP addresses to use the remote machine's IP
- Changing Apache to serve at port 80 (as opposed to 8000, which we use for development purposes)
Before beginning, you may want to:
- Create a non-root user on the remote machine. Ansible will need to "escalate" (i.e.
sudo) as this user. See Ansible Docs on Understanding privilege escalation: become
- Ensure all ports except the Drupal port and ports used by Ansible are behind a firewall.
We're going to build up this new remote environment configuration from the default provided Vagrant configuration. To start, take the inventory for the
vagrant development environment and make a copy of it. Be sure to give it an appropriate name. Here we're using
Then you can update the following entries in the following files using your own information. If an entry does not exist in a file, just add it. Ansible will then use the value you provide instead of relying on its defaults.
changeme to represent passwords and assume the server will be available at
example.org, but you'll want to provide
your own values.
This is where we specify that the webserver is listening on the default port 80, instead of the development machine port 8000.
You will have to add the matomo line.
You'll need to put particulars for logging into your server in the
inventory/production/hosts file . This example is set up to login as the
ansible user (to avoid trying to run Composer as
root) and uses
an SSH key. You'll need to get the details for logging into your remote server from your hosting provider (AWS, Digital Ocean, etc...)
or your systems administrator if you're running the server in-house. See
for more details about what you can put into a
Running the remote installer¶
First, you'll want to install the ansible roles that are needed for the version of Islandora you are trying to install. This can be done with
Then, if you are on Ubuntu 22.04, run the following commands:
$ ansible-playbook -i inventory/production playbook.yml -e "islandora_distro=ubuntu/jammy64" -e "islandora_profile=starter" -e "islandora_build_base_box=true" $ ansible-playbook -i inventory/production playbook.yml -e "islandora_distro=ubuntu/jammy64" -e "islandora_profile=starter" -e "islandora_build_base_box=false"
Out of date playbooks¶
Ansible caches the code used to provision the environment, so if you've already installed once you may not be getting the latest version
of things even if you've
git pull'd the latest playbook. The code is stored in
roles/external, so if you want to clear it out you can
remove these before attempting to provision an environment
Port clashes for local environments¶
When provisioning using a local environment, you should be aware of any ports that are already in use by your computer that are also going to be used by Vagrant, as these may clash and cause problems during and after provisioning. These include:
- 8000 (Apache)
- 8080 (Tomcat)
- 3306 (MySQL)
- 5432 (PostgreSQL)
- 8983 (Solr)
- 8161 (ActiveMQ)
- 8081 (API-X)
If there are port clashes for any of these, you will need to either find and replace them in the configuration .yml files under
inventory/vagrant/group_vars, or provide new values for the different playbooks that support changing the ports (for example,
supports adding a
port property which is currently simply unused). You will also need to replace the port forwarding values in
Additionally, Ansible attempts to use port 2200 for SSH. If this port is already in use, your local environment cannot be provisioned. To
change this, set a new value for
If you run into any issues installing the environment, do not hesitate to email the mailing list to
ask for help. If you think you've stumbled across a bug in the installer, please create an issue in the
Islandora issue queue and give it an