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

Move it all in-house #201

Merged
merged 2 commits into from
Oct 7, 2021
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
roles/external
.DS_Store
.project
.github
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $virtualBoxDescription = ENV.fetch("ISLANDORA_VAGRANT_VIRTUALBOXDESCRIPTION", "I
# Available boxes are 'islandora/8' and 'ubuntu/focal64'
# Use 'ubuntu/focal64' to build a dev environment from scratch.
# Use 'islandora/8' if you just want to download a ready to run VM.
$vagrantBox = ENV.fetch("ISLANDORA_DISTRO", "islandora/8")
$vagrantBox = ENV.fetch("ISLANDORA_DISTRO", "ubuntu/focal64")

# vagrant is the main user
$vagrantUser = "vagrant"
Expand Down
2 changes: 1 addition & 1 deletion inventory/vagrant/group_vars/solr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#solr_version: "6.6.0"
#solr_version: "7.7.3"

solr_cores:
- ISLANDORA
Expand Down
27 changes: 17 additions & 10 deletions inventory/vagrant/group_vars/tomcat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ tomcat9_users:
roles:
- manager-gui

# For Fedora 5
# Use "file-simple", for test instance
# For production use either "jdbc-mysql" or "jdbc-postgresql"
#fcrepo_persistence: file-simple
fcrepo_persistence: jdbc-mysql

# For Fedora 6, use either "mysql" or "postgresql"
fcrepo_db_type: mysql

# Used for mysql or postgres object persistence.
fcrepo_db_name: fcrepo
Expand All @@ -26,18 +30,19 @@ tomcat9_java_opts:
- -XX:MaxNewSize=256m
- -XX:PermSize=256m
- -XX:MaxPermSize=256m
- -Dfcrepo.home={{ fcrepo_home_dir }}
- -Dfcrepo.modeshape.configuration=file://{{ fcrepo_home_dir }}/configs/repository.json
- -Dfcrepo.activemq.configuration=file://{{ fcrepo_config_dir }}/activemq.xml
- -Dfcrepo.spring.configuration=file://{{ fcrepo_home_dir }}/configs/fcrepo-config.xml
- -Dfcrepo.external.content.allowed={{ fcrepo_allowed_external_content_file }}
- -Dcom.bigdata.rdf.sail.webapp.ConfigParams.propertyFile={{ blazegraph_home_dir }}/conf/RWStore.properties
- -Dcantaloupe.config={{ cantaloupe_symlink }}/cantaloupe.properties
- -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
- -Dfcrepo.config.file={{ fcrepo_config_file }}
# Fedora 5 options
# - -Dfcrepo.modeshape.configuration=file://{{ fcrepo_home_dir }}/configs/repository.json
# - -Dfcrepo.activemq.configuration=file://{{ fcrepo_config_dir }}/activemq.xml
# - -Dfcrepo.spring.configuration=file://{{ fcrepo_home_dir }}/configs/fcrepo-config.xml
# - -Dfcrepo.external.content.allowed={{ fcrepo_allowed_external_content_file }}

tomcat9_config_dir: "/etc/tomcat9"

fcrepo_syn_tomcat_home: "{{ tomcat9_home }}"
#fcrepo_syn_default_public_key_path: "/etc/tomcat9/public.key"
fcrepo_syn_default_public_key_path: "{{ fcrepo_syn_tomcat_home }}/conf/public.key"
fcrepo_syn_tomcat_config_dir: "{{ tomcat9_config_dir }}"

fcrepo_syn_sites:
- algorithm: RS256
Expand All @@ -53,7 +58,9 @@ fcrepo_syn_tokens:
- fedoraAdmin
token: "{{ islandora_syn_token }}"

fcrepo_version: "5.1.0"
fcrepo_version: "6.0.0"
fcrepo_home_dir: "/opt/fcrepo"
fcrepo_data_dir: "{{ fcrepo_home_dir }}/data"
fcrepo_auth_header_name: "X-Islandora"
fcrepo_syn_auth_header: "X-Islandora"

Expand Down
61 changes: 1 addition & 60 deletions requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
version: 1.4.3

- src: geerlingguy.solr
version: 4.2.1
version: 5.2.0

- src: geerlingguy.java
version: 1.10.0
Expand All @@ -40,62 +40,3 @@
- src: geerlingguy.drush
version: 3.1.1

- src: https://github.com/Islandora-Devops/ansible-role-activemq
name: Islandora-Devops.activemq
version: main

- src: https://github.com/Islandora-Devops/ansible-role-alpaca
name: Islandora-Devops.alpaca
version: main

#- src: https://github.com/Islandora-Devops/ansible-role-apix
# name: Islandora-Devops.apix
# version: 0.0.1

- src: https://github.com/Islandora-Devops/ansible-role-blazegraph
name: Islandora-Devops.blazegraph
version: main

- src: https://github.com/Islandora-Devops/ansible-role-cantaloupe
name: Islandora-Devops.cantaloupe
version: main

- src: https://github.com/Islandora-Devops/ansible-role-crayfish
name: Islandora-Devops.crayfish
version: main

- src: https://github.com/Islandora-Devops/ansible-role-drupal-openseadragon
name: Islandora-Devops.drupal-openseadragon
version: main

- src: https://github.com/Islandora-Devops/ansible-role-fcrepo
name: Islandora-Devops.fcrepo
version: main

- src: https://github.com/Islandora-Devops/ansible-role-fcrepo-syn
name: Islandora-Devops.fcrepo-syn
version: main

- src: https://github.com/Islandora-Devops/ansible-role-tomcat8
name: Islandora-Devops.tomcat8
version: main

- src: https://github.com/Islandora-Devops/ansible-role-fits
name: Islandora-Devops.fits
version: main

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

- src: https://github.com/Islandora-Devops/ansible-role-karaf
name: Islandora-Devops.karaf
version: main

- src: https://github.com/Islandora-Devops/ansible-role-keymaster
name: Islandora-Devops.keymaster
version: main

- src: https://github.com/Islandora-Devops/ansible-role-matomo
name: Islandora-Devops.matomo
version: main
44 changes: 44 additions & 0 deletions roles/internal/Islandora-Devops.activemq/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Ansible Role: ActiveMQ

An Ansible role that installs [ActiveMQ](http://activemq.apache.org/) on:

* Centos/RHEL 7.x
* Ubuntu Xenial

## Role Variables

Available variables are listed below, along with default values:

What version to install:
```
activemq_version: 5.14.5
```

Where to install to:
```
activemq_install_root: /opt
```

User\group to install as:
```
activemq_user: ubuntu
```

Whether to create user if not present:
```
activemq_create_user: yes
```

## Dependencies

* None

## Example Playbook

- hosts: webservers
roles:
- { role: Islandora-Devops.activemq }

## License

MIT
6 changes: 6 additions & 0 deletions roles/internal/Islandora-Devops.activemq/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---

activemq_version: 5.14.5
activemq_install_root: /opt
activemq_user: activemq
activemq_create_user: yes
33 changes: 33 additions & 0 deletions roles/internal/Islandora-Devops.activemq/tasks/install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---

- name: Download and unarchive
unarchive:
remote_src: yes
src: http://archive.apache.org/dist/activemq/{{ activemq_version }}/apache-activemq-{{ activemq_version }}-bin.tar.gz
dest: "{{ activemq_install_root }}"
owner: "{{ activemq_user }}"
creates: "{{ activemq_install_root }}/activemq"

- name: Move activemq
command: mv "{{ activemq_install_root }}/apache-activemq-{{ activemq_version }}" "{{ activemq_install_root }}/activemq"
args:
creates: "{{ activemq_install_root }}/activemq"

# Transitional removal of old-style init.d symlink
# This task can be removed in the future.
- name: Remove init.d symlink
file:
path: /etc/init.d/activemq
state: absent

- name: Create systemd unit
template:
src: activemq.service.j2
dest: /etc/systemd/system/activemq.service

- name: Reload systemd
systemd:
daemon-reload: yes
enabled: yes
state: started
name: activemq
12 changes: 12 additions & 0 deletions roles/internal/Islandora-Devops.activemq/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---

- include: user.yml
tags:
- activemq
- activemq-user

- include: install.yml
tags:
- activemq
- activemq-install

8 changes: 8 additions & 0 deletions roles/internal/Islandora-Devops.activemq/tasks/user.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---

- name: Create ActiveMQ system user
user:
name: "{{ activemq_user }}"
system: yes
state: present
when: activemq_create_user
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=Apache ActiveMQ
After=network-online.target

[Service]
Type=forking
PIDFile={{activemq_install_root}}/activemq/data/activemq.pid
WorkingDirectory={{activemq_install_root}}/activemq/bin
ExecStart={{activemq_install_root}}/activemq/bin/activemq start
ExecStop={{activemq_install_root}}/activemq/bin/activemq stop
Restart=on-abort
User={{activemq_user}}

[Install]
WantedBy=multi-user.target
87 changes: 87 additions & 0 deletions roles/internal/Islandora-Devops.alpaca/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Ansible Role: Alpaca

An Ansible role that installs [Alpaca](https://github.com/Islandora-CLAW/Alpaca) in a Tomcat 8 servlet container on:

* Centos/RHEL 7.x
* Ubuntu Xenial

## Role Variables

Available variables are listed below, along with default values:

Install from source or from maven:
```
alpaca_from_source: no
```

Which version to install:
```
alpaca_version: main
```

Where to clone Alpaca to:
```
alpaca_clone_directory: /opt/alpaca
```

Karaf repo:
```
alpaca_karaf_repos:
- mvn:ca.islandora.alpaca/islandora-karaf/LATEST/xml/features
```

Which features to install:
```
alpaca_features:
- islandora-http-client
- islandora-connector-broadcast
- islandora-indexing-triplestore
- islandora-indexing-fcrepo
```

Where Karaf is:
```
alpaca_karaf_dir: /opt/karaf
```

Where the Karaf configuration files are:
```
alpaca_karaf_etc_dir: "{{ alpaca_karaf_dir }}/etc"
```

Karaf user:
```
alpaca_karaf_user: karaf
```

Local path for maven repository:
```
alpaca_local_mvn_path: /opt/maven/repo
```

Configuration settings:
```
alpaca_settings:
- pid: ca.islandora.alpaca.connector.broadcast
settings:
input.stream: activemq:queue:islandora-connector-broadcast
- pid: ca.islandora.alpaca.indexing.triplestore
settings:
error.maxRedeliveries: 10
input.stream: activemq:queue:islandora-indexing-triplestore
triplestore.baseUrl: http://localhost:8080/bigdata/namespace/kb/sparql
```

## Dependencies

* Apache Karaf

## Example Playbook

- hosts: webservers
roles:
- { role: islandora.alpaca }

## License

MIT
Loading