Skip to content

Instantly share code, notes, and snippets.

View McFateM's full-sized avatar

Mark McFate McFateM

View GitHub Profile
@McFateM
McFateM / utilities.inc
Created August 24, 2017 14:09
Lines 6-11 added to IMI Utilities.inc to partially satisfy https://github.com/mnylc/islandora_multi_importer/issues/15
if (strlen($flat)==0) {
$maxRow = $rowindex;
// @TODO check if this is not being overriden at line 64
break;
}
// MAM...if a row begins with a hashtag, it's a comment...skip it
// This partially addresses https://github.com/mnylc/islandora_multi_importer/issues/15
if ($flat[0] != '#') {
$table[$rowindex] = $row[0];
$maxRow = $rowindex;
@McFateM
McFateM / utilities.inc
Created August 24, 2017 14:15
Custom logic for islandora_multi_importer_remote_file_get in lines 4-16
// If the file is not from a .zip...
function islandora_multi_importer_remote_file_get($url) {
$parsed_url = parse_url($url);
/* MAM 2-August-2017 New logic, assumes the file is somewhere in the public://imi_files path */
$basename = drupal_basename($parsed_url['path']);
$pattern = "/$basename/";
$options['key'] = 'filename';
$file = file_scan_directory( "public://", $pattern, $options );
$url = $file[$basename]->uri;
return drupal_realpath($url);
@McFateM
McFateM / gist:2f38ab6fa9159c1d4c7cb1199f674bf0
Last active February 20, 2018 19:37
ISLE docker-compose.yml - 1.2.4.1 - Set your MySQL (mariadb) root password
Description:
------------
This line, inside the mysql:environment: section, defines the MySQL root password for the Drupal database that your Islandora instance will use.
Instructions:
-------------
Append a password of your choosing to the end of the line, like so:
- MYSQL_ROOT_PASSWORD=myPasswordChoiceHere
Remember your password, duh.
@McFateM
McFateM / gist:0033663f7deed79e445756e5ad9b6527
Last active February 20, 2018 19:42
ISLE docker-compose.yml - 1.1 - Define the 'myadmin' service
Description:
PHPMyAdmin is a MySQL administration GUI. It's helpful for me!
Configuration:
None required. This section of the docker-compose.yml requires no modifications.
Use:
Connect to this container at http://<host IP>:8081.
You will be prompted for credentials. The SQL host is "mysql" and user is "root" with password as set in the mysql:environment (See 1.2.4.1 - https://gist.github.com/McFateM/2f38ab6fa9159c1d4c7cb1199f674bf0) section.
Description:
------------
This line defines a Docker 'volume' that can be used to import an existing Islandora's Drupal database. Once a database has been imported the volume will persist and need not be imported again. Once your data is imported it is placed into the 'db_data' volume. See 1.2.7.2, https://gist.github.com/McFateM/089b18a1b2e5c1432751d481fd1b6112, for 'db_data' details.
Instructions:
-------------
Make sure the line in docker-compose.yml is initially NOT a comment.
Export your existing Islandora Drupal database. I did this using Drush from a terminal opened on my production Islandora server, like so:
cd /var/www/drupal7/sites/default
drush sql-dump > drupal.sql
@McFateM
McFateM / gist:089b18a1b2e5c1432751d481fd1b6112
Last active February 20, 2018 19:44
ISLE docker-compose.yml - 1.2.7.2 - Define volume where Drupal database persists
Description:
------------
This line defines a Docker 'volume' where an impoted Drupal database will persist.
Once a database has been imported the 'db_data' volume will persist and need not be imported again. You are NOT required to repopulate your DBs if you 'stop' or 'rm' the container. See 1.2.7.1, https://gist.github.com/McFateM/ffe775ef2fdeeccbf044767187adbd5e, for information describing the import process.
Instructions:
-------------
No further configuration reqiured.
Use:
@McFateM
McFateM / gist:6fac3fb427cdccfa7022ae01b422c5cc
Last active February 20, 2018 19:44
ISLE docker-compose.yml - 1.3.8.1 - Define a volume for mounted/existing Fedora data
Description:
------------
This line defines a Docker 'volume' where existing Fedora data can be mounted.
Instructions:
-------------
@TODO...lots more detail needed here.
Replace
- /mnt/barnard/islandora/fedora/data:/usr/local/fedora/data
with
@McFateM
McFateM / gist:38de0d38fe4c51232e5ae677ae661f08
Last active February 20, 2018 19:45
ISLE docker-compose.yml - 1.3.8.2 - Edit your fedora.fcfg file
Description:
------------
This line defines a Docker 'volume' mapped to your Fedora fedora.fcfg config file. The fedora.fcfg file controls @TODO blah blah blah.
Instructions:
-------------
Modify the packaged file by searching for and updating:
<param name="dbPassword" value="REPLACE_WITH_YOUR_FEDORA_PASSWORD">
<comment>The database password.</comment>
@McFateM
McFateM / 01_1_testsite_guide.md
Created March 9, 2018 15:55
Summary: Test site launch process

Summary: Test site launch process

  • If using Vagrant or a VM, the steps below assume you are still shelled in (connected by SSH) into the ISLE Host VM via a terminal on a local laptop.

  • If using Docker for Mac, continue to use the open terminal and navigate (cd) to the ISLE project directory.

The steps below are for all users (Vagrant, VM, non Vagrant and Docker for Mac users alike.)

The install times stated below for each container are highly dependent on the enduser's available Internet bandwidth and could take more or less time accordingly.

@McFateM
McFateM / 01_1_testsite_guide.md
Created March 9, 2018 15:57
Troubleshooting

Troubleshooting

Port Conflicts

If you encounter errors like this: Error starting userland proxy: Bind for 0.0.0.0:xxxx failed: port is already allocated, then ISLE may have encountered a conflict with the xxxx port identifed in the error message.

In OSX this can frequently be traced back to a local Apache or Nginx web server. You may need to remove or disable these local web servers before you can successfully install ISLE.

  • The Apache server that ships with most OSX machines can be disabled from a terminal using these commands: