Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 18.04 #125

Merged
merged 5 commits into from
Aug 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ export ISLANDORA_VAGRANT_MEMORY=4096

_CENTOS support is WIP and not to be considered stable_

Ubuntu 16.04 is the default linux distribution used by claw-playbook. If you want to use CENTOS 7 instead, set the `ISLANDORA_DISTRO` environment variable to `centos/7`. The easiest way to do this is to export the environment variable into your shell before running Vagrant commands. Otherwise you will have to provide the variable for every Vagrant command you issue.
Ubuntu 18.04 is the default linux distribution used by claw-playbook. If you want to use CENTOS 7 instead, set the `ISLANDORA_DISTRO` environment variable to `centos/7`. The easiest way to do this is to export the environment variable into your shell before running Vagrant commands. Otherwise you will have to provide the variable for every Vagrant command you issue.

```bash
ISLANDORA_DISTRO="centos/7" vagrant up
ISLANDORA_DISTRO="centos/7" vagrant ssh
```

If you are not using `vagrant up` to bring up a box, and are running `ansible-playbook` against it manually, you will need to set `ansible_ssh_user` to `vagrant` for your hosts. It's easiest to add this value to `inventory/vagrant/group_vars/all.yml` to set the value for all hosts. This is not neccessary if using Vagrant, as the ssh user is passed to ansible via the Vagrantfile.
If you are not using `vagrant up` to bring up a box, and are running `ansible-playbook` against it manually, you will need to set `ansible_ssh_user` to `vagrant` for your hosts. It's easiest to add this value to `inventory/vagrant/group_vars/all.yml` to set the value for all hosts. This is not neccessary if using Vagrant, as the ssh user is passed to ansible via the Vagrantfile.

## Use

Expand Down Expand Up @@ -77,9 +77,7 @@ More information about inventories can be found in the [ansible documentation](h
* milliner.baseUrl `inventory/production/group_vars/karaf.yml`
1. Any other variable changes you wish.
1. Install the roles using `ansible-galaxy`: `$ ansible-galaxy install -r requirements.yml`
1. Provision the server:
- If the host you are provisioning is a Ubuntu 16.04 machine, you may wish to have the playbook install Python for you. This is a requirement to run the playbook. You can do this by passing an additional variable on the command line like this. `$ ansible-playbook -i inventory/production playbook.yml -e "islandora_distro=ubuntu/xenial64"`
- If the host you are provisioning is a Centos/7 machine, you may wish to have the playbook install Python for you. This is a requirement to run the playbook. You can do this by passing an additional variable on the command line like this. `$ ansible-playbook -i inventory/production playbook.yml -e "islandora_distro=centos/7"`
1. Provision the server: `$ ansible-playbook -i inventory/production playbook.yml`

## Connect

Expand Down Expand Up @@ -149,7 +147,7 @@ You can access the IIIF interface at: http://localhost:8080/cantaloupe/iiif/2/
### JWT

CLAW uses JWT for authentication across the stack. Crayfish microservices, Fedora, and Drupal all use them.
Crayfish and Fedora have been set up to use a master token of `islandora` to make testing easier. To use it, just set
Crayfish and Fedora have been set up to use a master token of `islandora` to make testing easier. To use it, just set
the following header in HTTP requests:

* `Authorization: Bearer islandora`
Expand Down
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ $hostname = ENV.fetch("ISLANDORA_VAGRANT_HOSTNAME", "claw")
$virtualBoxDescription = ENV.fetch("ISLANDORA_VAGRANT_VIRTUALBOXDESCRIPTION", "IslandoraCLAW")

# Available boxes are 'ubuntu/xenial64' and 'centos/7'
$vagrantBox = ENV.fetch("ISLANDORA_DISTRO", "ubuntu/xenial64")
$vagrantBox = ENV.fetch("ISLANDORA_DISTRO", "ubuntu/bionic64")

# On Ubuntu, user is ubuntu, on all others, user is vagrant
$vagrantUser = if $vagrantBox == "ubuntu/xenial64" then "ubuntu" else "vagrant" end
$vagrantUser = if $vagrantBox == "ubuntu/bionic64" then "ubuntu" else "vagrant" end

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider "virtualbox" do |v|
Expand Down
10 changes: 0 additions & 10 deletions bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@
gather_facts: false

tasks:
# python isn't installed by default on ubuntu 16.04 so we need
# to do that with the raw command before
- name: install python
raw: test -e /usr/bin/python || (apt-get update; apt-get install -y python;)
register: output
changed_when:
- output.stdout != ""
- output.stdout != "\r\n"
when: islandora_distro|default('') == "ubuntu/xenial64"

# Manually gather facts once python is installed
- name: gather facts
setup:
Expand Down
1 change: 1 addition & 0 deletions inventory/vagrant/group_vars/all/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ islandora_extra_ubuntu_packages:
- unzip
- build-essential
- vim
- python3-mysqldb

islandora_extra_centos_packages:
- wget
Expand Down
16 changes: 8 additions & 8 deletions playbook.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---

- include: bootstrap.yml
- import_playbook: bootstrap.yml
tags:
- bootstrap
- include: database.yml
- include: solr.yml
- include: webserver.yml
- include: tomcat.yml
- include: crayfish.yml
- include: karaf.yml
- include: post-install.yml
- import_playbook: database.yml
- import_playbook: solr.yml
- import_playbook: webserver.yml
- import_playbook: tomcat.yml
- import_playbook: crayfish.yml
- import_playbook: karaf.yml
- import_playbook: post-install.yml
2 changes: 1 addition & 1 deletion requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

- src: https://github.com/Islandora-Devops/ansible-role-grok
name: Islandora-Devops.grok
version: 1.0.0
version: 2.0.0

- src: https://github.com/Islandora-Devops/ansible-role-karaf
name: Islandora-Devops.karaf
Expand Down