-
Notifications
You must be signed in to change notification settings - Fork 71
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
Improve ~remote~ _playbook_ instructions. #2191
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b014297
Improve remote instructions.
rosiel c725df7
Add new variable to remote playbook intructions.
rosiel 6690ac0
Leave the cantaloupe_HttpResolver_BasicLookupStrategy_url_prefix='' t…
rosiel 06962a1
Instructions for Playbook in Two Pieces.
rosiel 1111cbb
Update Ubuntu version mentioned to 22.04.
rosiel 061eae0
Make more consistent.
rosiel 906a7ce
Mention how to recreate VM.
rosiel c847386
Remove accidental files.
rosiel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,18 +73,18 @@ vagrant up | |
|
||
## Deploying to a remote environment | ||
|
||
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: | ||
A remote environment can be provisioned by providing SSH credentials to `islandora-playbook` and using the `ansible-playbook` installer instead of Vagrant. Some preparation of configuration entries in the `inventory` need to be changed to be aware of the particulars of your remote environment; this will include: | ||
|
||
- Changing usernames and passwords to something more sensible than the default | ||
- Changing IP addresses to use the remote machine's actual IP | ||
- 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) | ||
|
||
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`. | ||
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`. | ||
|
||
```bash | ||
$ git clone https://github.com/Islandora-Devops/islandora-playbook | ||
$ cd islandora-playbook | ||
$ cp -r inventory/vagrant inventory/example | ||
$ cp -r inventory/vagrant inventory/production | ||
``` | ||
|
||
Then you can update the following entries in the following files using your own information. If an entry does not exist in a file, | ||
|
@@ -96,78 +96,29 @@ your own values. | |
#### group_vars/all/passwords.yml | ||
|
||
```yml | ||
# Drupal | ||
drupal_db_password: changeme | ||
drupal_account_pass: changeme | ||
islandora_db_root_password: changeme | ||
islandora_tomcat_password: changeme | ||
islandora_syn_token: changeme | ||
cantaloupe_admin_password: changeme | ||
``` | ||
|
||
#### group_vars/crayfish.yml | ||
# MySQL/Postgres | ||
islandora_db_root_password: changeme | ||
|
||
```yml | ||
crayfish_gemini_fedora_base_url: http://example.org:8080/fcrepo/rest | ||
crayfish_houdini_fedora_base_url: http://example.org:8080/fcrepo/rest | ||
crayfish_hypercube_fedora_base_url: http://example.org:8080/fcrepo/rest | ||
crayfish_milliner_fedora_base_url: http://example.org:8080/fcrepo/rest | ||
crayfish_milliner_drupal_base_url: http://example.org | ||
crayfish_milliner_gemini_base_url: http://example.org/gemini | ||
crayfish_homarus_fedora_base_url: http://example.org:8080/fcrepo/rest | ||
crayfish_recast_fedora_base_url: http://example.org:8080/fcrepo/rest | ||
crayfish_recast_drupal_base_url: http://example.org | ||
crayfish_recast_gemini_base_url: http://example.org/gemini | ||
``` | ||
# Tomcat | ||
islandora_tomcat_password: changeme | ||
|
||
#### group_vars/karaf.yml | ||
# Syn | ||
islandora_syn_token: islandora | ||
|
||
For Alpaca, only the `token.value` and various URLs are of particular importance, but the entire configuration chunk is provided here for convenience. | ||
# Cantaloupe | ||
cantaloupe_admin_password: changeme | ||
|
||
```yml | ||
alpaca_settings: | ||
- pid: ca.islandora.alpaca.http.client | ||
settings: | ||
token.value: changeme | ||
- pid: org.fcrepo.camel.indexing.triplestore | ||
settings: | ||
input.stream: activemq:topic:fedora | ||
triplestore.reindex.stream: activemq:queue:triplestore.reindex | ||
triplestore.baseUrl: http://example.org:8080/bigdata/namespace/islandora/sparql | ||
- pid: ca.islandora.alpaca.indexing.triplestore | ||
settings: | ||
error.maxRedeliveries: 10 | ||
index.stream: activemq:queue:islandora-indexing-triplestore-index | ||
delete.stream: activemq:queue:islandora-indexing-triplestore-delete | ||
triplestore.baseUrl: http://example.org:8080/bigdata/namespace/islandora/sparql | ||
- pid: ca.islandora.alpaca.indexing.fcrepo | ||
settings: | ||
error.maxRedeliveries: 5 | ||
node.stream: activemq:queue:islandora-indexing-fcrepo-content | ||
node.delete.stream: activemq:queue:islandora-indexing-fcrepo-delete | ||
media.stream: activemq:queue:islandora-indexing-fcrepo-media | ||
file.stream: activemq:queue:islandora-indexing-fcrepo-file | ||
file.delete.stream: activemq:queue:islandora-indexing-fcrepo-file-delete | ||
milliner.baseUrl: http://example.org/milliner/ | ||
gemini.baseUrl: http://example.org/gemini/ | ||
|
||
alpaca_blueprint_settings: | ||
- pid: ca.islandora.alpaca.connector.houdini | ||
in_stream: activemq:queue:islandora-connector-houdini | ||
derivative_service_url: http://example.org/houdini/convert | ||
error_max_redeliveries: 5 | ||
camel_context_id: IslandoraConnectorHoudini | ||
- pid: ca.islandora.alpaca.connector.homarus | ||
in_stream: activemq:queue:islandora-connector-homarus | ||
derivative_service_url: http://example.org/homarus/convert | ||
error_max_redeliveries: 5 | ||
camel_context_id: IslandoraConnectorHomarus | ||
# Fedora | ||
fcrepo_db_password: changeme | ||
``` | ||
|
||
#### group_vars/tomcat.yml | ||
|
||
```yml | ||
fcrepo_allowed_external_content: | ||
- http://example.org/ | ||
cantaloupe_HttpResolver_BasicLookupStrategy_url_prefix: http://example.org/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was breaking cantaloupe, hat-tip to @whikloj for helping find the solution. |
||
``` | ||
|
||
|
@@ -178,54 +129,48 @@ This is where we specify that the webserver is listening on the default port 80, | |
apache_listen_port: 80 | ||
``` | ||
|
||
#### group_vars/webserver/drupal.yml | ||
|
||
```yml | ||
drupal_trusted_hosts: | ||
- ^localhost$ | ||
- example.org | ||
fedora_base_url: "http://example.org:8080/fcrepo/rest/" | ||
``` | ||
|
||
#### group_vars/webserver/general.yml | ||
|
||
You will have to add the matomo line. | ||
|
||
```yml | ||
openseadragon_iiiv_server: http://example.org:8080/cantaloupe/iiif/2 | ||
matomo_site_url: http://example.org | ||
``` | ||
|
||
#### hosts | ||
|
||
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 | ||
an SSH key. You'll need to get the details for logging into your remote server from your hosting provider (AWS, Digital Ocean, etc...) | ||
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 | ||
[this page](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#connecting-to-hosts-behavioral-inventory-parameters) | ||
for more details about what you can put into a | ||
host file | ||
[//]: # (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.) | ||
|
||
``` | ||
default ansible_host=example.org ansible_port=22 ansible_user=root ansible_ssh_private_key_file='/home/username/.ssh/id_rsa' | ||
default ansible_host=example.org ansible_port=22 ansible_user=ansible ansible_ssh_private_key_file='/home/username/.ssh/id_rsa' | ||
``` | ||
|
||
### Running the remote installer | ||
|
||
First, you'll want to get the ansible roles that are needed for the version of Islandora you are trying to install. This can be done | ||
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 | ||
|
||
```bash | ||
$ ansible-galaxy install -r requirements.yml | ||
``` | ||
|
||
Then, depending on the operating system installed on the remote environment, you can use the following command for Ubuntu 16.04 | ||
Then, depending on the operating system installed on the remote environment, you can use the following command for Ubuntu 20.04 | ||
|
||
```bash | ||
$ ansible-playbook -i inventory/production playbook.yml -e "islandora_distro=ubuntu/xenial64" | ||
$ ansible-playbook -i inventory/production playbook.yml -e "islandora_distro=ubuntu/focal64" -e "islandora_profile=starter_dev" | ||
``` | ||
|
||
or for CentOS 7 | ||
|
||
```bash | ||
$ ansible-playbook -i inventory/production playbook.yml -e "islandora_distro=centos/7" | ||
$ ansible-playbook -i inventory/production playbook.yml -e "islandora_distro=centos/7" -e "islandora_profile=starter_dev" | ||
``` | ||
|
||
## Troubleshooting | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't worry the rest of the passwords are there on the right... just bumped down in the diff.