Skip to content

Commit

Permalink
Merge pull request #75 from Islandora-Collaboration-Group/new-dev
Browse files Browse the repository at this point in the history
New dev
  • Loading branch information
g7morris committed Dec 11, 2017
2 parents 79000b2 + 07ae1e1 commit 17f02a8
Show file tree
Hide file tree
Showing 11 changed files with 422 additions and 182 deletions.
2 changes: 1 addition & 1 deletion customize/apache/site/macosx_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
* for you.
*/
#$base_url = 'http://127.0.0.1'; // NO trailing slash!
$base_url = 'http://web'; // NO trailing slash!
$base_url = 'http://apache'; // NO trailing slash!

/**
* PHP settings:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ services:
- ./customize/fedora/drupalfilter/filter-drupal.xml:/usr/local/fedora/server/config/filter-drupal.xml
- ./customize/fedora/adore-djatoka/index.html:/usr/local/tomcat/webapps/adore-djatoka/index.html
- ./customize/fedora/adore-djatoka/log4j.properties:/usr/local/tomcat/webapps/adore-djatoka/WEB-INF/classes/log4j.properties
- ./customize/fedora/apache/site.conf:/etc/apache2/sites-available/site.conf
- ./customize/fedora/apache/site.conf:/etc/apache2/sites-available/site.conf
- ./customize/fedora/gsearch/index.properties:/usr/local/tomcat/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/index.properties
- ./data/fedora/data:/usr/local/fedora/data
- ./data/fedora/log/fedora:/usr/local/fedora/server/logs
Expand Down
156 changes: 23 additions & 133 deletions docs/1_system_process_overview/1_4_testing/alpha_build_guide_linux.md
Original file line number Diff line number Diff line change
@@ -1,141 +1,27 @@
### Alpha Build Pre-Requisites
### Alpha Manual Build
Please note this an alternative method of building the Docker images and the slower of the two processes.

* This current alpha has been build and tested on Digital Ocean droplets running **Linux Ubuntu 16.04 LTS** & **CentOS 7**
Please refer to the Alpha Quickstart [Guide](alpha_quickstart.md) for the **faster** version.

* This document has three sections: (use A or B first and then move onto C)
* A. Host Server setup for **Ubuntu 16.04 LTS**
* B. Host Server setup for **CentOS 7**
* C. Build process (*same instructions for Ubuntu 16.04 or CentOS 7*)
### Alpha Manual Build Pre-Requisites

---
* The Host Server has already been setup and is running. If one has not setup the Host server please follow one of the following links below and then return to this document please.

#### A. Host Server setup for **Ubuntu 16.04 LTS**

* This alpha build uses `islandora-docker.com` as the test domain along with the Docker Compose service names e.g. `mysql, fedora, apache` etc.
* To ensure this domain resolves properly, one will need to edit the servers and/or their own local `/etc/hosts` file.
* Open up a terminal and enter: `sudo vi /etc/hosts`
* Add one or more of the following: (**Examples ONLY**)
* Ubuntu Host Server (or VM)
> 127.0.0.1 localhost islandora-docker.com fedora apache fedora.islandora-docker.com apache.islandora-docker.com
* Enduser local laptop
> 192.156.123.26 islandora-docker.com fedora apache fedora.islandora-docker.com apache.islandora-docker.com
#### Install / run on Ubuntu 16.04 LTS server
* Virtualbox Virtual Machine (VM)
* a Vagrant image (recommend using [bento/ubuntu-16.04](https://app.vagrantup.com/bento/boxes/ubuntu-16.04))
* Cloud based server e.g. Digital Ocean or Amazon Web Services
* Post-installation, add the appropriate ssh keys to the root user's `.ssh/authorized_keys` file.

#### Docker setup for Ubuntu 16.04 LTS

* Open a terminal, ssh to the Ubuntu server as root and install the following:
* If you are not root, `sudo -s`
* `apt-get update`
* `apt-get install openssl git htop ntp`

#### Install Docker on Ubuntu 16.04 LTS
* `curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -`
* `add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"`
* `apt-get update`
* `apt-get install -y docker-ce`
* Check if running `systemctl status docker`
* You may need to PRESS Shift-Z twice to exit out.

#### Create islandora user (as root)
* `adduser islandora` (with password isle2017)
* `echo "islandora ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/islandora`
* Create Docker group `groupadd docker`
* Add islandora user to docker group `usermod -aG docker islandora`
* Exit out of the session as the root user.
* `exit`
* `su islandora`

#### Install Docker-Compose (version 1.17.1 as of 11/16/2017) as islandora-user on Ubuntu 16.04 LTS
* `cd /home/islandora`
* ``sudo curl -L https://github.com/docker/compose/releases/download/1.17.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose``
* `sudo chmod +x /usr/local/bin/docker-compose`


#### Clone ISLE repository
* Please note in some Linux Distributions, one might need to create the `/opt` directory (optional)
* One can `ls -lha /` to see if an `/opt` directory exists
* If missing, `sudo mkdir /opt`
* If not missing, proceed to next step.
* `cd opt`
* `sudo git clone https://github.com/Islandora-Collaboration-Group/ISLE.git`
* This process will take 1 - 3 minutes depending on internet bandwidth
* `sudo chown -Rv islandora:islandora ISLE`
* `cd /opt/ISLE`
* Host Server setup for [**CentOS 7**](host_server_setup_centos.md)

---
* Host Server setup for [**Ubuntu 16.04 LTS**](host_server_setup_ubuntu.md)

#### B. Host Server setup for **CentOS 7**

* This alpha build uses `islandora-docker.com` as the test domain along with the Docker Compose service names e.g. `mysql, fedora, apache` etc.
* To ensure this domain resolves properly, one will need to edit the servers and/or their own local `/etc/hosts` file.
* Open up a terminal and enter: `sudo vi /etc/hosts`
* Add one or more of the following: (**Examples ONLY**)
* CentOS 7 Host Server (or VM)
> 127.0.0.1 localhost islandora-docker.com fedora apache fedora.islandora-docker.com apache.islandora-docker.com
* Enduser local laptop
> 192.156.123.26 islandora-docker.com fedora apache fedora.islandora-docker.com apache.islandora-docker.com
#### Install / run on CentOS 7 server
* Virtualbox Virtual Machine (VM)
* a Vagrant image (recommend using [bento/centos-7.2](https://app.vagrantup.com/bento/boxes/centos-7.2))
* Cloud based server e.g. Digital Ocean or Amazon Web Services
* Post-installation, add the appropriate ssh keys to the root user's `.ssh/authorized_keys` file.

#### Docker setup for CentOS 7

* Open a terminal, ssh to the CentOS server as root and install the following:
* `yum install openssl git htop ntp wget`

#### Install Docker on CentOS 7 (as root user)

* `wget -qO- https://get.docker.com/ | sh`

#### Create islandora user (as root)
* `adduser islandora` (with password isle2017)
* `echo "islandora ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/islandora`
* Create Docker group `groupadd docker`
* Add islandora user to docker group `usermod -aG docker islandora`
* Add islandora user to wheel grop `sudo usermod -aG wheel islandora`
* Exit out of the ssh session from the host server as the root user and shell back in as `islandora`
* Enable the Docker service to start on host server boot
* `sudo systemctl enable docker.service`
* Start the Docker service
* `sudo systemctl start docker.service`


#### Install Docker-Compose (version 1.17.1 as of 11/16/2017) as islandora-user on CentOS 7
* Open a terminal and ssh back into the CentOS Host Server/VM as the `islandora` user and perform the following:
* Add the RHEL/CENTOS epel-release package repository
* `sudo yum install epel-release`
* Install Python Pip (package manager for Python Scripting Language)
* `sudo yum install -y python-pip`
* Upgrade Python to latest version
* `sudo yum upgrade python*`
* Upgrade Python Pip
* `sudo pip install --upgrade pip`
* Install Docker compose
* `sudo pip install docker-compose`


#### Clone ISLE repository
* Please note in some Linux Distributions, one might need to create the `/opt` directory (optional)
* One can `ls -lha /` to see if an `/opt` directory exists
* If missing, `sudo mkdir /opt`
* If not missing, proceed to next step.
* `cd opt`
* `sudo git clone https://github.com/Islandora-Collaboration-Group/ISLE.git`
* This process will take 1 - 3 minutes depending on internet bandwidth
* `sudo chown -Rv islandora:islandora ISLE`
* `cd /opt/ISLE`
* Host Server setup for [**Mac OS**](host_server_setup_macos.md)

---
* By default the `Docker-Compose.yml` file is configured for Linux Host Servers.

### C. Build process (same for Ubuntu 16.04 or CentOS 7)
* If one is using a **Mac OS** Host server, then edit the `docker-compose.yml` file to ensure the following lines look like this:
```
# - ./customize/apache/site/linux_settings.php:/var/www/html/sites/default/settings.php
- ./customize/apache/site/macosx_settings.php:/var/www/html/sites/default/settings.php
```

### Manual Build process (same for Ubuntu 16.04 or CentOS 7)

**Please note:** *The first container (MySQL, isle-mysql, mysql) has to be built and running PRIOR to all others (including fedora & apache) due to a race condition (fedora starts prior to mysql being ready to accept connections). This improper state will be fixed at a later point in the project.*

Expand All @@ -161,8 +47,12 @@
* `docker-compose build apache`

* Edit the `docker-compose.yml` file to ensure the following lines look like this:
> - ./customize/apache/site/linux_settings.php:/var/www/html/sites/default/settings.php
# - ./customize/apache/site/macosx_settings.php:/var/www/html/sites/default/settings.php

```
- ./customize/apache/site/linux_settings.php:/var/www/html/sites/default/settings.php
# - ./customize/apache/site/macosx_settings.php:/var/www/html/sites/default/settings.php
```


* `docker-compose up -d apache`
* **Please note:** *This container on occasion has failed to start initially for as of yet unlogged and unknown reasons.*
Expand All @@ -180,7 +70,7 @@

* Once finished `cntrl-D` or type `exit` to get out of the apache container & QC the resulting setup

**Please note:** The cronjob setting in the `install_site.sh` script is commented out as this will need to be flowed into the Docker build process prior. Issue with default Docker root user vs using islandora user. Drupal cron can run properly.
**Please note:** The cronjob setting in the `install_site.sh` script is commented out as this will need to be flowed into the Docker build process prior. Issue with default Docker root user vs using islandora user. Drupal cron can run properly manually.

#### Total build process takes 1.5 -2.5 hours (depending on system and internet speeds)

Expand Down
44 changes: 24 additions & 20 deletions docs/1_system_process_overview/1_4_testing/alpha_build_guide_mac.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
### Alpha Build Pre-Requisites
### Alpha Manual Build - MacOS
Please note this an alternative method of building the Docker images and the slower of the two processes.

* This current alpha has been build and tested on **Docker For Mac** only. (11/2017)
* Please install the [latest version](https://download.docker.com/mac/stable/Docker.dmg) from the [Docker store](https://store.docker.com/editions/community/docker-ce-desktop-mac)
Please refer to the Alpha Quickstart [Guide](alpha_quickstart.md) for the **faster** version.

* Git will need to be installed prior as well.
* Open a terminal and enter: `git --version`
* This will trigger the `Install Command Line Developer Tools` prompt, click on the blue `Install` button for the license agreement; then click the white `Agree` button.
* The package will take 1-2 minutes to download. Click the `Done` button once finished.
### Alpha Manual Build Pre-Requisites

* This alpha build uses `islandora-docker.com` as the test domain along with the Docker Compose service names e.g. `mysql, fedora, apache` etc.
* To ensure this domain resolves properly, one will need to edit their local `/etc/hosts` file.
* Open up a terminal and enter: `sudo vi /etc/hosts`
* Add the following:
>127.0.0.1 localhost islandora-docker.com fedora apache fedora.islandora-docker.com apache.islandora-docker.com
* The Host Server has already been setup and is running. If one has not setup the Host server please follow one of the following links below and then return to this document please.

* Clone the ISLE repository
* Open a terminal and enter: `git clone https://github.com/Islandora-Collaboration-Group/ISLE`
* `cd /yourpathto/ISLE`
* This process will take 3 - 5 minutes depending on internet bandwidth
* Host Server setup for [**CentOS 7**](host_server_setup_centos.md)

* Host Server setup for [**Ubuntu 16.04 LTS**](host_server_setup_ubuntu.md)

* Host Server setup for [**Mac OS**](host_server_setup_macos.md)

* By default the `Docker-Compose.yml` file is configured for Linux Host Servers.

* If one is using a **Mac OS** Host server, then edit the `docker-compose.yml` file to ensure the following lines look like this:
```
# - ./customize/apache/site/linux_settings.php:/var/www/html/sites/default/settings.php
- ./customize/apache/site/macosx_settings.php:/var/www/html/sites/default/settings.php
```

---

### Build process
### Alpha Manual Build MacOS

**Please note:** *The first container (MySQL, isle-mysql, mysql) has to be built and running PRIOR to all others (including fedora & apache) due to a race condition (fedora starts prior to mysql being ready to accept connections). This improper state will be fixed at a later point in the project.*

Expand All @@ -47,8 +49,10 @@
* `docker-compose build apache`

* Edit the `docker-compose.yml` file to ensure the following lines look like this:
> # - ./customize/apache/site/linux_settings.php:/var/www/html/sites/default/settings.php
- ./customize/apache/site/macosx_settings.php:/var/www/html/sites/default/settings.php
```
# - ./customize/apache/site/linux_settings.php:/var/www/html/sites/default/settings.php
- ./customize/apache/site/macosx_settings.php:/var/www/html/sites/default/settings.php
```

* `docker-compose up -d apache`
* **Please note:** *This container on occasion has failed to start initially for as of yet unlogged and unknown reasons.*
Expand All @@ -66,7 +70,7 @@

* Once finished `cntrl-D` or type `exit` to get out of the apache container & QC the resulting setup

**Please note:** The cronjob setting in the `install_site.sh` script is commented out as this will need to be flowed into the Docker build process prior. Issue with default Docker root user vs using islandora user. Drupal cron can run properly.
**Please note:** The cronjob setting in the `install_site.sh` script is commented out as this will need to be flowed into the Docker build process prior. Issue with default Docker root user vs using islandora user. Drupal cron can run properly manually.


#### Total build process takes 2.5 - 4 hours (depending on system and internet speeds)
Expand Down
Loading

0 comments on commit 17f02a8

Please sign in to comment.