Skip to content

Commit

Permalink
bring role configs to inventory (#124)
Browse files Browse the repository at this point in the history
* bring role configs to inventory

* update base_url configs

* Update post-install.yml

* Update requirements.yml

* use hostvars for ip

* Update requirements.yml
  • Loading branch information
Natkeeran authored and dannylamb committed Jul 30, 2019
1 parent 5b8b2f3 commit d2fe4dd
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ More information about inventories can be found in the [ansible documentation](h
1. Change the `drupal_trusted_host` configuration in `inventory/production/group_vars/webserver/drupal.yml` to reflect your IP or domain name
1. To run drupal on port 80, change the following variables:
* apache_listen_port to 80 in `inventory/production/group_vars/webserver/apache.yml`
* crayfish_milliner_drupal_base_url `inventory/production/group_vars/crayfish.yml`
* crayfish_milliner_gemini_base_url `inventory/production/group_vars/crayfish.yml`
* crayfish_drupal_base_url `inventory/production/group_vars/crayfish.yml`
* crayfish_gemini_base_url `inventory/production/group_vars/crayfish.yml`
* 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`
Expand Down
5 changes: 3 additions & 2 deletions inventory/vagrant/group_vars/crayfish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
crayfish_version_tag: dev
crayfish_db: "{{ claw_db }}"

crayfish_milliner_drupal_base_url: http://localhost:8000
crayfish_milliner_gemini_base_url: http://localhost:8000/gemini
crayfish_fedora_base_url: "http://{{ hostvars[groups['tomcat'][0]].ansible_host }}:8080/fcrepo/rest"
crayfish_drupal_base_url: "http://{{ hostvars[groups['webserver'][0]].ansible_host }}:{{ apache_listen_port }}"
crayfish_gemini_base_url: "http://{{ hostvars[groups['webserver'][0]].ansible_host }}:{{ apache_listen_port }}/gemini"
7 changes: 7 additions & 0 deletions inventory/vagrant/group_vars/karaf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@
alpaca_from_source: yes
alpaca_version: dev
alpaca_clone_directory: /opt/alpaca

triplestore_namespace: islandora
alpaca_triplestore_base_url: "http://{{ hostvars[groups['tomcat'][0]].ansible_host }}:8080/bigdata"
alpaca_milliner_base_url: "http://{{ hostvars[groups['webserver'][0]].ansible_host }}:{{ apache_listen_port }}/milliner"
alpaca_gemini_base_url: "http://{{ hostvars[groups['webserver'][0]].ansible_host }}:{{ apache_listen_port }}/gemini"
alpaca_houdini_base_url: "http://{{ hostvars[groups['webserver'][0]].ansible_host }}:{{ apache_listen_port }}/houdini"
alpaca_homarus_base_url: "http://{{ hostvars[groups['webserver'][0]].ansible_host }}:{{ apache_listen_port }}/homarus"
2 changes: 1 addition & 1 deletion inventory/vagrant/group_vars/tomcat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ cantaloupe_cache_source: FilesystemCache
cantaloupe_cache_derivative: FilesystemCache
cantaloupe_create_FilesystemCache_dir: yes
cantaloupe_resolver_static: HttpResolver
cantaloupe_HttpResolver_BasicLookupStrategy_url_prefix: http://localhost:8000/
cantaloupe_HttpResolver_BasicLookupStrategy_url_prefix: "http://{{ hostvars[groups['webserver'][0]].ansible_host }}:{{ apache_listen_port }}"
2 changes: 1 addition & 1 deletion inventory/vagrant/group_vars/webserver/drupal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ drupal_trusted_hosts:
drupal_trusted_hosts_file: "{{ drupal_core_path }}/sites/default/settings.php"
drupal_public_filesystem: "{{ drupal_core_path }}/sites/default/files"
drupal_external_libraries_directory: "{{ drupal_core_path }}/libraries"
fedora_base_url: "http://localhost:8080/fcrepo/rest/"
fedora_base_url: "http://{{ hostvars[groups['tomcat'][0]].ansible_host }}:8080/fcrepo/rest"
drupal_jsonld_remove_format: true
drupal_gemini_pseudo_bundles:
- islandora_object:node
Expand Down
2 changes: 1 addition & 1 deletion inventory/vagrant/group_vars/webserver/general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

webserver_app: yes
openseadragon_iiiv_set_var: yes
openseadragon_iiiv_server: http://localhost:8080/cantaloupe/iiif/2
openseadragon_iiiv_server: "http://{{ hostvars[groups['tomcat'][0]].ansible_host }}:8080/cantaloupe/iiif/2"
2 changes: 1 addition & 1 deletion inventory/vagrant/hosts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by Vagrant

default ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_private_key_file='.vagrant/machines/default/virtualbox/private_key'
default ansible_host=127.0.0.1 ansible_port=2222 ansible_ssh_private_key_file='.vagrant/machines/default/virtualbox/private_key'

[karaf]
default
Expand Down
2 changes: 1 addition & 1 deletion post-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
command: "{{ drush_path }} --root {{ drupal_core_path }} -y cset --input-format=yaml jsonld.settings remove_jsonld_format {{ drupal_jsonld_remove_format }}"

- name: Set Gemini URL
command: "{{ drush_path }} --root {{ drupal_core_path }} -y cset --input-format=yaml islandora.settings gemini_url {{ crayfish_milliner_gemini_base_url }}"
command: "{{ drush_path }} --root {{ drupal_core_path }} -y cset --input-format=yaml islandora.settings gemini_url {{ crayfish_gemini_base_url }}"

- name: Set pseudo field bundles
command: "{{ drush_path }} --root {{ drupal_core_path }} -y cset --input-format=yaml islandora.settings gemini_pseudo_bundles.{{ item.0 }} {{ item.1 }}"
Expand Down
6 changes: 3 additions & 3 deletions requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@

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

#- 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: 1.0.0
version: 1.0.1

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

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

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

0 comments on commit d2fe4dd

Please sign in to comment.