Skip to content

Commit

Permalink
Readme update for remote install (#40)
Browse files Browse the repository at this point in the history
* Adding remote install instructions to README

* Typo

* typo

* Forgot playbook.yml

* Re-incorporating @jonathangreen's changes

* Update README.md
  • Loading branch information
dannylamb authored and Natkeeran committed Jan 31, 2018
1 parent 3a45b39 commit 5049c3e
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 10 deletions.
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export ISLANDORA_VAGRANT_MEMORY=4096

### Using CENTOS

_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.

```bash
Expand All @@ -40,9 +42,38 @@ If you are not using `vagrant up` to bring up a box, and are running `ansible-pl

## Use

1. clone the repo
### Vagrant

If you're looking for a development environment, using our Vagrant deployment is easiest:

1. Clone the repo
2. `vagrant up`

### All-in-one provisioning with Ansible

If you want to provision an all-in-one remote Ubuntu environment, like a production server:

1. SSH into your remote server and add an [user with password-less sudo privileges](https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart), and make sure you can log in as that user. Its easiest if you use SSH keys for login, so that you an log in to the server without a password. Another option if you are no comfortable with password-less sudo is to set the `ansible_become_pass` variable in your inventory as outlined [here](http://docs.ansible.com/ansible/latest/become.html).
1. Clone the repository onto your local machine.
1. Create an inventory for your new environment ('production' in this example): `cp -r inventory/vagrant inventory/production`.
1. Edit `inventory/production/hosts` to point to your new environment by changing 'default' line to:
```
default ansible_ssh_host=my_ip_or_domain_name
```
Optionally if you need to specify a username, password or port to connect to the server you can specify those in the inventory file as well:
```
default ansible_ssh_host=my_ip_or_domain_name ansible_ssh_user=my_user ansible_ssh_pass=my_super_secret_password ansible_ssh_port=my_port
```
More information about inventories can be found in the [ansible documentation](http://docs.ansible.com/ansible/latest/intro_inventory.html).
1. Update the inventory variables as you see fit to customize your Islandora installation.
1. You should modify `group_vars\all\passwords.yml` to use more secure passwords. These passwords can be encrypted using [Ansible Vault](https://docs.ansible.com/ansible/latest/vault.html) if you wish to keep your inventory secure.
1. Change the `drupal_trusted_host` configuration in `inventory/production/group_vars/webserver/drupal.yml` to reflect your IP or domain name
1. Change the Apache's port to 80 in `inventory/production/group_vars/webserver/apache.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 with `$ ansible-playbook -i inventory/production`
- 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 -e "islandora_distro=ubuntu/xenial64"`

## Connect

You can connect to the machine via the browser at [http://localhost:8000](http://localhost:8000).
Expand Down Expand Up @@ -94,3 +125,4 @@ The default VM login details are:
## Maintainers

* [Jonathan Green](https://github.com/jonathangreen)

2 changes: 1 addition & 1 deletion bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
changed_when:
- output.stdout != ""
- output.stdout != "\r\n"
when: islandora_distro == "ubuntu/xenial64"
when: islandora_distro|default('') == "ubuntu/xenial64"

# Manually gather facts once python is installed
- name: gather facts
Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions inventory/vagrant/group_vars/all/passwords.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---

# Drupal
drupal_db_password: islandora
drupal_account_pass: islandora

# MySQL/Postgres
islandora_db_root_password: islandora

# Tomcat
islandora_tomcat_password: islandora

# Syn
islandora_syn_token: islandora

# Cantaloupe
cantaloupe_admin_password: islandora
4 changes: 2 additions & 2 deletions inventory/vagrant/group_vars/database.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
mysql_root_username: root
mysql_root_password: islandora
mysql_root_password: "{{ islandora_db_root_password }}"

postgresql_users:
- name: root
password: islandora
password: "{{ islandora_db_root_password }}"
db: "{{ drupal_db_name }}"

postgresql_databases:
Expand Down
5 changes: 2 additions & 3 deletions inventory/vagrant/group_vars/tomcat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

tomcat8_users:
- username: islandora
password: islandora
password: "{{ islandora_tomcat_password }}"
roles:
- manager-gui

Expand Down Expand Up @@ -36,14 +36,13 @@ fcrepo_syn_tokens:
- user: admin
roles:
- admin
token: islandora
token: "{{ islandora_syn_token }}"

cantaloupe_deploy_war: yes
cantaloupe_deploy_war_path: "{{ tomcat8_home }}/webapps"
cantaloupe_user: tomcat8
cantaloupe_group: tomcat8
cantaloupe_admin_enabled: "true"
cantaloupe_admin_password: islandora
cantaloupe_OpenJpegProcessor_path_to_binaries: /usr/local/bin
cantaloupe_log_application_ConsoleAppender_enabled: "false"
cantaloupe_log_application_FileAppender_enabled: "true"
Expand Down
4 changes: 1 addition & 3 deletions inventory/vagrant/group_vars/webserver/drupal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

drupal_build_composer_project: true
drupal_composer_install_dir: /var/www/html/drupal
drupal_core_owner: "{{ ansible_user }}"
drupal_core_owner: "{{ ansible_user_id }}"
drupal_composer_dependencies:
- "drupal/console:~1.0"
- "drupal/devel:^1.0@beta"
Expand All @@ -18,15 +18,13 @@ drupal_composer_project_package: "drupal-composer/drupal-project:8.x-dev"
drupal_composer_project_options: "--prefer-dist --stability dev --no-interaction"
drupal_core_path: "{{ drupal_composer_install_dir }}/web"
drupal_db_user: drupal8
drupal_db_password: islandora
drupal_db_name: drupal8
drupal_db_backend: "{{ claw_db }}"
drupal_db_host: "127.0.0.1"
drupal_domain: "claw.dev"
drupal_site_name: "Islandora-CLAW"
drupal_install_profile: standard
drupal_account_name: admin
drupal_account_pass: islandora
drupal_enable_modules:
- rdf
- responsive_image
Expand Down

0 comments on commit 5049c3e

Please sign in to comment.