Skip to content

Commit

Permalink
Modernized and updated the "Manual installation" section (#1879)
Browse files Browse the repository at this point in the history
* Modernized and updated the "Manual installation" section

- PHP 7.2 to PHP 7.4
- Explained bash "whoami" a bit better
- PostgreSQL 10 to 11
- Explained the postgresql.conf change a bit better
- UTF8 PostgreSQL databases
- Composer 1 to Composer 2
- Drush 9 to Drush 10
- Drupal 8 to Drupal 9
- Change ownership of /var/www directory for Composer
- Clone original drupal-project git repo instead of Islandora outdated one
- run project:9.x-dev instead of 8.x-dev
- Explained Apache conf a bit better
- Tomcat 8 to Tomcat 9
- Cantaloupe 4 to Cantaloupe 5
- OpenJDK 8 to OpenJDK 11
- Install Cantaloupe as a service and standalone jar (no longer in Tomcat as a .war)
- Fedora 5 to Fedora 6
- Updated Tomcat setenv script
- Explained the Fedora errors when Syn valve is installed
- Solr 8.3 to Solr 8.9
- Search API solr 3.0 to 4.2
- Explained Solr a bit more
- Crayfish 1.1 to 2.0
- Removed Gemini (obsolete)
- Added Karaf users.properties config
- Equalize Karaf apt version with features version
- Made it easier to copy Drupal config change

* fix karaf feature versions; restore feature install

Co-authored-by: Seth Shaw <seth.shaw@unlv.edu>
  • Loading branch information
jmvezic and seth-shaw-unlv authored Sep 23, 2021
1 parent b3d1624 commit 5e42a0e
Show file tree
Hide file tree
Showing 8 changed files with 223 additions and 192 deletions.
42 changes: 17 additions & 25 deletions docs/installation/manual/configuring_drupal.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,23 @@ The below configuration will establish `localhost` as a trusted host pattern, bu
> 790 | );
**After**:
> 789 | 'driver' => 'pgsql',
> 790 | );
> 791 | $settings['trusted_host_patterns'] = [
> 792 | 'localhost',
> 793 | ];
> 794 | $settings['flysystem'] = [
> 795 | 'fedora' => [
> 796 | 'driver' => 'fedora',
> 797 | 'config' => [
> 798 | 'root' => 'http://localhost:8080/fcrepo/rest/',
> 799 | ],
> 800 | ],
> 801 | ];
```
'driver' => 'pgsql',
);
$settings['trusted_host_patterns'] = [
'localhost',
];
$settings['flysystem'] = [
'fedora' => [
'driver' => 'fedora',
'config' => [
'root' => 'http://localhost:8080/fcrepo/rest/',
],
],
];
```

Once this is done, refresh the cache to take hold of the new settings.

Expand Down
26 changes: 15 additions & 11 deletions docs/installation/manual/installing_composer_drush_and_drupal.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

- [Composer](https://getcomposer.org/) at its current latest version, the package manager that will allow us to install PHP applications
- The Islandora fork of the composer installer from [drupal-composer/drupal-project](https://github.com/Islandora/drupal-project), which will install, among other things:
- [Drush 9](https://www.drush.org/) at its latest version, the command-line PHP application for running tasks in Drupal
- [Drupal 8](https://www.drupal.org/) at its latest version, the content management system Islandora uses for content modelling and front-end display
- [Drush 10](https://www.drush.org/) at its latest version, the command-line PHP application for running tasks in Drupal
- [Drupal 9](https://www.drupal.org/) at its latest version, the content management system Islandora uses for content modelling and front-end display

## Composer 1.x
## Composer 2.x

### Download and install Composer

Expand All @@ -20,9 +20,9 @@ php composer-install.php
sudo mv composer.phar /usr/local/bin/composer
```

## Drush 9 and Drupal 8
## Drush 10 and Drupal 9

### Clone `drupal-project` and run `composer install`
### Clone `drupal-project` and install it via Composer

Before we can fully install Drupal, we’re going to need to clone `drupal-project` and provision it using Composer. We’re going to install it into the `/opt` directory:

Expand All @@ -32,12 +32,14 @@ Before we can fully install Drupal, we’re going to need to clone `drupal-proje
sudo mkdir /opt/drupal
sudo chown www-data:www-data /opt/drupal
sudo chmod 775 /opt/drupal
# Change the ownership of default Apache directory so Composer can access it
sudo chown -R www-data:www-data /var/www/
# Clone drupal-project and build it in our newly-created folder.
git clone https://github.com/Islandora/drupal-project.git
git clone https://github.com/drupal-composer/drupal-project.git
cd drupal-project
# Expect this to take a little while, as this is grabbing the entire
# requirements set for Drupal.
sudo -u www-data composer create-project drupal-composer/drupal-project:8.x-dev /opt/drupal --no-interaction
sudo -u www-data composer create-project drupal-composer/drupal-project:9.x-dev /opt/drupal --no-interaction
```

### Make Drush accessible in `$PATH`
Expand All @@ -60,6 +62,8 @@ Before we can proceed with the actual site installation, we’re going to need t
Listen 80
```

Remove everything but the "Listen 80" line. You can leave the comments in if you want.

`/etc/apache2/sites-enabled/000-default.conf | root:root/777`
```xml
<VirtualHost *:80>
Expand All @@ -76,7 +80,7 @@ Listen 80
</VirtualHost>
```
- `SERVER_NAME`: `localhost`
- For a development environment hosted on your own machine or a VM, `localhost` should suffice. Realistically, this should be the domain the server will be accessed at.
- For a development environment hosted on your own machine or a VM, `localhost` should suffice. Realistically, this should be the domain or IP address the server will be accessed at.

Restart the Apache 2 service to apply these changes:

Expand All @@ -93,13 +97,13 @@ PostgreSQL roles are directly tied to users. We’re going to ensure a user is i
# access.
sudo -u postgres psql
# Then, run these commands within psql itself:
create database DRUPAL_DB;
create database DRUPAL_DB encoding 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' TEMPLATE template0;
create user DRUPAL_DB_USER with encrypted password 'DRUPAL_DB_PASSWORD';
grant all privileges on database DRUPAL_DB to DRUPAL_DB_USER;
# Then, quit psql.
\q
```
- `DRUPAL_DB`: `drupal8`
- `DRUPAL_DB`: `drupal9`
- This will be used as the core database that Drupal is installed into
- `DRUPAL_DB_USER`: `drupal`
- Specifically, this is the user that will connect to the PostgreSQL database being created, not the user that will be logging into Drupal
Expand All @@ -118,7 +122,7 @@ drush -y site-install standard --db-url="pgsql://DRUPAL_DB_USER:DRUPAL_DB_PASSWO
```
This uses the same parameters from the above step, as well as:

- `SITE_NAME`: Islandora 8
- `SITE_NAME`: Islandora 2.0
- This is arbitrary, and is simply used to title the site on the home page
- `DRUPAL_LOGIN`: `islandora`
- The Drupal administrative username to use
Expand Down
75 changes: 8 additions & 67 deletions docs/installation/manual/installing_crayfish.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Installing Crayfish

## In this section, we will install:
- [Islandora/Crayfish](https://github.com/islandora/crayfish), the suite of microservices that power the backend of Islandora 8
- [Islandora/Crayfish](https://github.com/islandora/crayfish), the suite of microservices that power the backend of Islandora 2.0
- Indvidual microservices underneath Crayfish

## Crayfish 1.1
## Crayfish 2.0

### Installing Prerequisites

Expand All @@ -21,21 +21,7 @@ sudo apt-get update
sudo apt-get -y install imagemagick tesseract-ocr ffmpeg poppler-utils
```

### Preparing a Gemini Database

This database will be set up (and function) mostly the same as the other databases we’ve previously installed.

```bash
sudo -u postgres psql
create database CRAYFISH_DB;
create user CRAYFISH_DB_USER with encrypted password 'CRAYFISH_DB_PASSWORD';
grant all privileges on database CRAYFISH_DB to CRAYFISH_DB_USER;
\q
```
- `CRAYFISH_DB`: `gemini`
- `CRAYFISH_DB_USER`: `gemini`
- `CRAYFISH_DB_PASSWORD`: `gemini`
- As always, this should be a secure password of some kind, and not this default.
**NOTICE:** If you get the `sudo: apt-add-repository: command not found`, run `sudo apt-get install software-properties-common` in order to make the command available.

### Cloning and Installing Crayfish

Expand All @@ -45,7 +31,6 @@ We’re going to clone Crayfish to `/opt`, and individually run `composer instal
cd /opt
sudo git clone https://github.com/Islandora/Crayfish.git crayfish
sudo chown -R www-data:www-data crayfish
sudo -u www-data composer install -d crayfish/Gemini
sudo -u www-data composer install -d crayfish/Homarus
sudo -u www-data composer install -d crayfish/Houdini
sudo -u www-data composer install -d crayfish/Hypercube
Expand All @@ -66,31 +51,9 @@ sudo chown www-data:www-data /var/log/islandora

Each Crayfish component requires one or more `.yaml` file(s) to ensure everything is wired up correctly.

!!! notice
The following configuration files represent somewhat sensible defaults; you should take consideration of the logging levels in use, as this can vary in desirability from installation to installation. Also note that in all cases, `http` URLs are being used, as this guide does not deal with setting up https support. In a production installation, this should not be the case. These files also assume a connection to a PostgreSQL database; use a `pdo_mysql` driver and the appropriate `3306` port if using MySQL.

**NOTICE**

#### Gemini

`/opt/crayfish/Gemini/cfg/config.yaml | www-data:www-data/644`
```yaml
---
debug: false
fedora_base_url: http://localhost:8080/fcrepo/rest
db.options:
driver: pdo_pgsql
host: 127.0.0.1
port: 5432
dbname: CRAYFISH_DB
user: CRAYFISH_DB_USER
password: CRAYFISH_DB_PASSWORD
log:
level: NOTICE
file: /var/log/islandora/gemini.log
syn:
enable: true
config: /opt/fcrepo/config/syn-settings.xml
```
The following configuration files represent somewhat sensible defaults; you should take consideration of the logging levels in use, as this can vary in desirability from installation to installation. Also note that in all cases, `http` URLs are being used, as this guide does not deal with setting up https support. In a production installation, this should not be the case. These files also assume a connection to a PostgreSQL database; use a `pdo_mysql` driver and the appropriate `3306` port if using MySQL.

#### Homarus (Audio/Video derivatives)

Expand Down Expand Up @@ -180,7 +143,6 @@ services:
```yaml
crayfish_commons:
fedora_base_uri: 'http://localhost:8080/fcrepo/rest'
gemini_base_uri: 'http://localhost:9000/gemini'
syn_config: '/opt/fcrepo/config/syn-settings.xml'
```

Expand Down Expand Up @@ -282,7 +244,6 @@ syn:
---
fedora_base_url: http://localhost:8080/fcrepo/rest
drupal_base_url: http://localhost
gemini_base_url: http://localhost/gemini
modified_date_predicate: http://schema.org/dateModified
strip_format_jsonld: true
debug: false
Expand All @@ -308,7 +269,6 @@ syn:
---
fedora_resource:
base_url: http://localhost:8080/fcrepo/rest
gemini_base_url: http://localhost/gemini
drupal_base_url: http://localhost
debug: false
log:
Expand All @@ -329,34 +289,15 @@ namespaces:
vcard: "http://www.w3.org/2006/vcard/ns#"
```

### Installing the Gemini Database

Our Gemini database is unusable until it's installed.

```bash
cd /opt/crayfish/Gemini
php bin/console --no-interaction migrations:migrate
```

### Creating Apache Configurations for Crayfish Components

Finally, we need appropriate Apache configurations for Crayfish; these will allow other services to connect to Crayfish components via their HTTP endpoints.

Each endpoint we need to be able to connect to will get its own `.conf` file, which we will then enable.

!!! notice
These configurations would potentially have collisions with Drupal routes, if any are created in Drupal with the same name. If this is a concern, it would likely be better to reserve a subdomain or another port specifically for Crayfish. For the purposes of this installation guide, these endpoints will suffice.
**NOTICE**

`/etc/apache2/conf-available/Gemini.conf | root:root/644`
```
Alias "/gemini" "/opt/crayfish/Gemini/src"
<Directory "/opt/crayfish/Gemini/src">
FallbackResource /gemini/index.php
Require all granted
DirectoryIndex index.php
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
</Directory>
```
These configurations would potentially have collisions with Drupal routes, if any are created in Drupal with the same name. If this is a concern, it would likely be better to reserve a subdomain or another port specifically for Crayfish. For the purposes of this installation guide, these endpoints will suffice.

`/etc/apache2/conf-available/Homarus.conf | root:root/644`
```
Expand Down Expand Up @@ -418,7 +359,7 @@ Alias "/recast" "/opt/crayfish/Recast/src"
Enabling each of these configurations involves creating a symlink to them in the `conf-enabled` directory; the standardized method of doing this in Apache is with `a2enconf`.
```bash
sudo a2enconf Gemini Homarus Houdini Hypercube Milliner Recast
sudo a2enconf Homarus Houdini Hypercube Milliner Recast
```

### Restarting the Apache Service
Expand Down
Loading

0 comments on commit 5e42a0e

Please sign in to comment.