You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Improve remote instructions.
* Add new variable to remote playbook intructions.
* Leave the cantaloupe_HttpResolver_BasicLookupStrategy_url_prefix='' to allow cantaloupe.
* Instructions for Playbook in Two Pieces.
* Update Ubuntu version mentioned to 22.04.
* Make more consistent.
* Mention how to recreate VM.
* Remove accidental files.
Reports of the playbook's demise have been exaggerated. It is still in use and being maintained. Local VMs (VirtualBox) cannot be run on M1 series Apple silicon at this time, but you can use the remote deployment option to deploy Islandora on low-cost virtual hosting.
3
+
The Islandora Playbook ([Islandora-Devops/islandora-playbook](https://github.com/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](https://www.vagrantup.com/) project to create a local development environment, or as an [Ansible](https://www.ansible.com/community) 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.
5
4
6
-
The Islandora Playbook ([Islandora-Devops/islandora-playbook](https://github.com/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](https://www.vagrantup.com/) project to create a local development environment, or as an [Ansible](https://www.ansible.com/community) 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.
5
+
## Basic Usage (Vagrant):
7
6
8
-
## Basic Usage (local, Islandora Starter Site):
9
-
10
-
Install requirements, then:
7
+
Install requirements (below), then:
11
8
```bash
12
9
$ git clone -b dev https://github.com/Islandora-Devops/islandora-playbook
13
10
$ cd islandora-playbook
14
-
$ vagrant up
15
11
```
16
-
## Basic Usage (local, Install Profile Demo):
17
-
18
-
Install requirements, then:
12
+
First, create the islandora base box:
13
+
```bash
14
+
$ ISLANDORA_BUILD_BASE=true vagrant up
15
+
$ vagrant package --output islandora_base
16
+
$ vagrant destroy
17
+
```
18
+
Second, build a VM using the islandora base box:
19
19
```bash
20
-
$ git clone -b dev https://github.com/Islandora-Devops/islandora-playbook
21
-
$ cd islandora-playbook
22
-
$ export ISLANDORA_INSTALL_PROFILE=demo
23
20
$ vagrant up
24
21
```
25
22
26
-
## Requirements
23
+
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 `vagrant up`.
24
+
25
+
## Requirements (Vagrant)
27
26
28
27
To create a local VM, download and install the following.
29
28
@@ -34,7 +33,7 @@ To create a local VM, download and install the following.
34
33
5.[Ansible](https://www.ansible.com/community) (Tested on version 2.11+, versions back to 2.9 should work.)
35
34
36
35
37
-
####Installing Git and Ansible on MacOS
36
+
### Installing Git and Ansible on MacOS
38
37
39
38
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](https://brew.sh/) (see below).
40
39
@@ -49,7 +48,9 @@ $ brew install ansible
49
48
50
49
## Installing a local development environment
51
50
52
-
Clone the `islandora-playbook` and use `vagrant up` to automatically provision a local environment. This method uses Vagrant, VirtualBox, and Ansible. Before provisioning a local environment, you should likely double check that no [required ports](#port-clashes-for-local-environments) are currently in use.
51
+
You will use `vagrant up` twice, first to create an Islandora base box, and then again to provision that base box into a full Islanodra. This method uses Vagrant, VirtualBox, and Ansible.
52
+
53
+
!!! warn Make sure that no [required ports](#port-clashes-for-local-environments) are currently in use.
53
54
54
55
### Clone the playbook
55
56
@@ -58,33 +59,60 @@ $ git clone -b dev https://github.com/Islandora-Devops/islandora-playbook
58
59
$ cd islandora-playbook
59
60
```
60
61
61
-
### Spin up with Vagrant
62
+
### Create the Base Box
62
63
63
-
Before using `vagrant up`:
64
+
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.
64
65
66
+
Notes:
65
67
- If building a CentOS box, you also need to install the vbguest additions with `vagrant plugin install vagrant-vbguest`.
66
-
- If this is not your first time spinning up Islandora from this directory, and you want to get the latest code, you may want to clear cached ansible roles in roles/external `rm -rf roles/external`
68
+
- 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`
69
+
70
+
First, create the islandora base box by overriding the Vagrant variable `ISLANDORA_BUILD_BASE` (which defaults to `false` in the `Vagrantfile`):
71
+
```bash
72
+
$ ISLANDORA_BUILD_BASE=true vagrant up
73
+
```
67
74
68
-
Then, to spin up the machine:
75
+
Once it is complete (without errors), store it as a Vagrant base box. It will appear as `islandora_base` in the current directory.
76
+
```bash
77
+
$ vagrant package --output islandora_base
78
+
```
79
+
80
+
Then, get rid of the existing VM since we've saved what we need:
81
+
```bash
82
+
$ vagrant destroy
83
+
default: Are you sure you want to destroy the 'default' VM? [y/N] y
84
+
==> default: Forcing shutdown of VM...
85
+
==> default: Destroying VM and associated drives...
86
+
87
+
```
69
88
89
+
Then, to provision Islandora on top of the new base box:
70
90
```bash
71
91
vagrant up
72
92
```
73
93
94
+
Access your site at `http://localhost:8000`.
95
+
74
96
## Deploying to a remote environment
75
97
76
-
A remote environment can be provisioned by providing SSH credentials to `islandora-playbook`and using the `ansible-galaxy` installer instead of Vagrant. Some preparation of configuration entries in the `inventory` also need to be changed to be aware of the particulars of your remote environment; this includes:
98
+
The `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:
77
99
100
+
- Configuring the SSH parameters so Ansible can log in
78
101
- Changing usernames and passwords to something more sensible than the default
79
-
- Changing IP addresses to use the remote machine's actual IP
102
+
- Changing IP addresses to use the remote machine's IP
80
103
- Changing Apache to serve at port 80 (as opposed to 8000, which we use for development purposes)
81
104
82
-
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 `example`.
105
+
Before beginning, you may want to:
106
+
107
+
- 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](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_privilege_escalation.html)
108
+
- Ensure all ports except the Drupal port and ports used by Ansible are behind a firewall.
109
+
110
+
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 `production`.
You'll need the SSH particulars for logging into your server in the `inventory/vagrant/hosts` file . This example is set up to login as `root` using
164
+
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
200
165
an SSH key. You'll need to get the details for logging into your remote server from your hosting provider (AWS, Digital Ocean, etc...)
201
166
or your systems administrator if you're running the server in-house. See
[//]: # (How to avoid getting asked for a sudo password? Use -K in the command below? Configuring passwordless sudo seemed to not work. no idea how vagrant does it.)
0 commit comments