From 85a2dd529ba0cf0de659e212e09006131493d27a Mon Sep 17 00:00:00 2001 From: Don Richards Date: Thu, 10 Mar 2022 10:10:17 -0500 Subject: [PATCH 01/13] fix URLs --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5fb188835..f4069ca2e 100644 --- a/README.md +++ b/README.md @@ -82,11 +82,11 @@ the things you can do. If you want to poke around, here's all the services that | Service | Url | | :---------- | :--------------------------------------------------------------------------------------------- | | Drupal | [https://islandora.traefik.me](https://islandora.traefik.me) | -| Traefik | [https://islandora.traefik.me:8080](https://islandora.traefik.me:8080) | -| Fedora | [https://islandora.traefik.me:8081/fcrepo/rest](https://islandora.traefik.me:8081/fcrepo/rest) | -| Blazegraph | [https://islandora.traefik.me:8082/bigdata](https://islandora.traefik.me:8082/bigdata) | -| Activemq | [https://islandora.traefik.me:8161](https://islandora.traefik.me:8161) | -| Solr | [https://islandora.traefik.me:8983](https://islandora.traefik.me:8983) | +| Traefik | [http://islandora.traefik.me:8080](http://islandora.traefik.me:8080) | +| Fedora | [http://islandora.traefik.me:8081/fcrepo/rest](http://islandora.traefik.me:8081/fcrepo/rest) | +| Blazegraph | [http://islandora.traefik.me:8082/bigdata](http://islandora.traefik.me:8082/bigdata) | +| Activemq | [http://islandora.traefik.me:8161](http://islandora.traefik.me:8161) | +| Solr | [http://islandora.traefik.me:8983](http://islandora.traefik.me:8983) | | Cantaloupe | [https://islandora.traefik.me/cantaloupe](https://islandora.traefik.me/cantaloupe) | | Matomo | [https://islandora.traefik.me/matomo/](https://islandora.traefik.me/matomo/) | | Code Server | [https://islandora.traefik.me:8443/](https://islandora.traefik.me:8443/) | From 57cab1723946dc35cb96cf9c308304ed8c5c7fa1 Mon Sep 17 00:00:00 2001 From: Don Richards Date: Thu, 10 Mar 2022 10:10:53 -0500 Subject: [PATCH 02/13] Fix white space characters --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f4069ca2e..b5831aaf5 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ ## Introduction [Docker Compose] project for creating and managing an Islandora 8 instance -using [Docker] containers from [Docker Hub](https://hub.docker.com/u/islandora) +using [Docker] containers from [Docker Hub](https://hub.docker.com/u/islandora) that were created by [isle-buildkit](https://github.com/Islandora-Devops/isle-buildkit). In a nutshell, `isle-dc` generates a docker-compose.yml file for you based on configuration @@ -40,7 +40,7 @@ as database import/export and reindexing. - Desktop / laptop / VM (*Docker must have sufficient resources to run GNU Make*) - Docker-CE 19.x+ -- Docker-compose version 1.25.x+ +- Docker-compose version 1.25.x+ - Git 2.0+ - GNU Make 4.0+ - At least 8GB of RAM (ideally 16GB) @@ -97,7 +97,7 @@ When you're done with your demo environment, shut it down by running docker-compose down ``` -This will keep your data around until the next time you start your instance. If you want to completely destroy the repository and +This will keep your data around until the next time you start your instance. If you want to completely destroy the repository and all ingested data, use ``` @@ -186,7 +186,7 @@ make down # Bring isle-dc back up from where it left off make up -# If make hasn't been run this will run make demo +# If make hasn't been run this will run make demo ``` From 0ea7e663fbd02e005f2314bce924d85327e33344 Mon Sep 17 00:00:00 2001 From: Don Richards Date: Thu, 10 Mar 2022 10:13:51 -0500 Subject: [PATCH 03/13] fix link to secret DRUPAL_DEFAULT_ACCOUNT_PASSWORD --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b5831aaf5..a630ffd5f 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ funny url fool you, it's a dummy domain that resolves to `127.0.0.1`. If you do not have [secrets enabled](#secrets), you can log into Drupal as `admin` using the default password: `password`. Otherwise you can find the password in the file -[./secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD](./secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD). +[./secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD](/secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD). Enjoy your Islandora instance! Check out the [Islandora documentation](https://islandora.github.io/documentation) to see all the things you can do. If you want to poke around, here's all the services that are available to visit: From 32586571a58709e4279ab9133084e87dd940350f Mon Sep 17 00:00:00 2001 From: Don Richards Date: Thu, 10 Mar 2022 10:14:15 -0500 Subject: [PATCH 04/13] Add kitchen sink function to makefile --- Makefile | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Makefile b/Makefile index 2ec67a33f..18f1798bf 100644 --- a/Makefile +++ b/Makefile @@ -401,6 +401,44 @@ local-install-profile: generate-secrets initial_content: curl -u admin:$(shell cat secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD) -H "Content-Type: application/json" -d "@demo-data/homepage.json" https://${DOMAIN}/node?_format=json curl -u admin:$(shell cat secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD) -H "Content-Type: application/json" -d "@demo-data/browse-collections.json" https://${DOMAIN}/node?_format=json +.PHONY: kitchen_sink +.SILENT: kitchen_sink +## Turn on/expose all endpoints for demo/testing; CANTALOUPE, MATOMO, DRUPAL, MYSQL, POSTGRES, TRAEFIK DASHBOARD, FEDORA, BLAZEGRAPH, ACTIVEMQ, SOLR, CODE SERVER. NOT FOR PRODUCTION!!! +kitchen_sink: + echo 'Exposing everything including the kitchen sink...' +ifeq ($(shell test -e docker-compose.yml && echo -n yes),yes) + $(MAKE) down + sed --in-place='' 's/EXPOSE_CANTALOUPE=false/EXPOSE_CANTALOUPE=true/g' .env + sed --in-place='' 's/EXPOSE_MATOMO=false/EXPOSE_MATOMO=true/g' .env + sed --in-place='' 's/EXPOSE_DRUPAL=false/EXPOSE_DRUPAL=true/g' .env + sed --in-place='' 's/EXPOSE_MYSQL=false/EXPOSE_MYSQL=true/g' .env + sed --in-place='' 's/EXPOSE_POSTGRES=false/EXPOSE_POSTGRES=true/g' .env + sed --in-place='' 's/EXPOSE_TRAEFIK_DASHBOARD=false/EXPOSE_TRAEFIK_DASHBOARD=true/g' .env + sed --in-place='' 's/EXPOSE_FEDORA=false/EXPOSE_FEDORA=true/g' .env + sed --in-place='' 's/EXPOSE_BLAZEGRAPH=false/EXPOSE_BLAZEGRAPH=true/g' .env + sed --in-place='' 's/EXPOSE_ACTIVEMQ=false/EXPOSE_ACTIVEMQ=true/g' .env + sed --in-place='' 's/EXPOSE_SOLR=false/EXPOSE_SOLR=true/g' .env + sed --in-place='' 's/EXPOSE_CODE_SERVER=false/EXPOSE_CODE_SERVER=true/g' .env + sed --in-place='' 's/INCLUDE_CODE_SERVER_SERVICE=false/INCLUDE_CODE_SERVER_SERVICE=true/g' .env + $(MAKE) docker-compose.yml + $(MAKE) build + $(MAKE) up + echo "Complete" + echo "You can now access the following endpoints:" + echo "Drupal: https://$(DOMAIN)" + echo "Traefik: http://$(DOMAIN):8080/dashboard/#/" + echo "Fedora: http://$(DOMAIN):8081/fcrepo/rest" + echo "Blazegraph: http://$(DOMAIN):8082/bigdata/#splash" + echo "Activemq: http://$(DOMAIN):8161" + echo "Solr: http://$(DOMAIN):8983/solr/#/" + echo "Cantaloupe: https://$(DOMAIN)/cantaloupe" + echo "Matomo: https://$(DOMAIN)/matomo/" + echo "Code Server (Code Editor in Browser): https://$(DOMAIN):8443/" +else + echo "" + echo "Problem: Run this after you've run one of the make commands to build isle-dc (up, demo, local, etc.). Exiting..." +endif + # Destroys everything beware! .PHONY: clean From 735b088fb1f366953cac637396cdcb378f2629d1 Mon Sep 17 00:00:00 2001 From: Don Richards Date: Thu, 10 Mar 2022 10:14:29 -0500 Subject: [PATCH 05/13] Add kitchen sink docs --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index a630ffd5f..cdce3faf3 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,12 @@ the things you can do. If you want to poke around, here's all the services that | Matomo | [https://islandora.traefik.me/matomo/](https://islandora.traefik.me/matomo/) | | Code Server | [https://islandora.traefik.me:8443/](https://islandora.traefik.me:8443/) | +Expose all of the endpoints at once (for testing and demo purposes and NOT production) by running +```bash +make kitchen_sink +``` +This will automatically stop the containers, modify the `.env` file, import the changes and restart the containers with the new configurations. See [#custom-environment](#custom-environment) for more information on building with custom environment settings. + When you're done with your demo environment, shut it down by running ```bash @@ -159,9 +165,15 @@ the guide above to create the codebase folder from the `islandora/demo` image. And then run it by changing `ENVIRONMENT` to be `custom` and regenerating the `docker-compose.yml` file and building the image. +To pull in changes to the .env file run the following. ```bash make docker-compose.yml make build + +# then either +docker-compose up -d +# OR +make up ``` At this point you could run it using `docker-compose`: From 7642ed4317f4183137176be4362560bbbdaa218b Mon Sep 17 00:00:00 2001 From: Don Richards Date: Wed, 30 Mar 2022 11:01:01 -0400 Subject: [PATCH 06/13] Fix "environment" typos --- Makefile | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 18f1798bf..b8bb803ff 100644 --- a/Makefile +++ b/Makefile @@ -321,28 +321,28 @@ download-default-certs: .SILENT: demo ## Make a demo site. demo: generate-secrets - $(MAKE) download-default-certs ENVIROMENT=demo - $(MAKE) -B docker-compose.yml ENVIROMENT=demo - $(MAKE) pull ENVIROMENT=demo - mkdir -p "$(CURDIR)/codebase" + $(MAKE) download-default-certs ENVIRONMENT=demo + $(MAKE) -B docker-compose.yml ENVIRONMENT=demo + $(MAKE) pull ENVIRONMENT=demo + mkdir -p $(CURDIR)/codebase docker-compose up -d - $(MAKE) update-settings-php ENVIROMENT=demo - $(MAKE) drupal-public-files-import SRC="$(CURDIR)/demo-data/public-files.tgz" ENVIROMENT=demo - $(MAKE) drupal-database ENVIROMENT=demo - $(MAKE) drupal-database-import SRC="$(CURDIR)/demo-data/drupal.sql" ENVIROMENT=demo - $(MAKE) hydrate ENVIROMENT=demo + $(MAKE) update-settings-php ENVIRONMENT=demo + $(MAKE) drupal-public-files-import SRC=$(CURDIR)/demo-data/public-files.tgz ENVIRONMENT=demo + $(MAKE) drupal-database ENVIRONMENT=demo + $(MAKE) drupal-database-import SRC=$(CURDIR)/demo-data/drupal.sql ENVIRONMENT=demo + $(MAKE) hydrate ENVIRONMENT=demo docker-compose exec -T drupal with-contenv bash -lc 'drush --root /var/www/drupal/web -l $${DRUPAL_DEFAULT_SITE_URL} upwd admin $${DRUPAL_DEFAULT_ACCOUNT_PASSWORD}' - $(MAKE) fcrepo-import SRC="$(CURDIR)/demo-data/fcrepo-export.tgz" ENVIROMENT=demo - $(MAKE) reindex-fcrepo-metadata ENVIROMENT=demo - $(MAKE) reindex-solr ENVIROMENT=demo - $(MAKE) reindex-triplestore ENVIROMENT=demo + $(MAKE) fcrepo-import SRC=$(CURDIR)/demo-data/fcrepo-export.tgz ENVIRONMENT=demo + $(MAKE) reindex-fcrepo-metadata ENVIRONMENT=demo + $(MAKE) reindex-solr ENVIRONMENT=demo + $(MAKE) reindex-triplestore ENVIRONMENT=demo .PHONY: local .SILENT: local ## Make a local site with codebase directory bind mounted. local: QUOTED_CURDIR = "$(CURDIR)" local: generate-secrets - $(MAKE) download-default-certs ENVIROMENT=local + $(MAKE) download-default-certs ENVIRONMENT=local $(MAKE) -B docker-compose.yml ENVIRONMENT=local $(MAKE) pull ENVIRONMENT=local mkdir -p "$(CURDIR)/codebase" @@ -387,15 +387,10 @@ local-install-profile: generate-secrets $(MAKE) set-files-owner SRC=$(CURDIR)/codebase ENVIROMENT=local docker-compose up -d --remove-orphans docker-compose exec -T drupal with-contenv bash -lc 'composer install; chown -R nginx:nginx .' - $(MAKE) remove_standard_profile_references_from_config ENVIROMENT=local + $(MAKE) remove_standard_profile_references_from_config ENVIRONMENT=local $(MAKE) install ENVIRONMENT=local $(MAKE) hydrate ENVIRONMENT=local - # The - at the beginning is not a typo, it will allow this process to failing the make command. - -docker-compose exec -T drupal with-contenv bash -lc 'mkdir -p /var/www/drupal/config/sync && chmod -R 775 /var/www/drupal/config/sync' - docker-compose exec -T drupal with-contenv bash -lc 'chown -R `id -u`:101 /var/www/drupal' - docker-compose exec -T drupal with-contenv bash -lc 'drush migrate:rollback islandora_defaults_tags,islandora_tags' - $(MAKE) initial_content - $(MAKE) login + $(MAKE) set-files-owner SRC=$(CURDIR)/codebase ENVIRONMENT=local .PHONY: initial_content initial_content: From 9eedbcf934e8bee8830661f2a13fd4201ff267da Mon Sep 17 00:00:00 2001 From: Don Richards Date: Wed, 30 Mar 2022 11:31:53 -0400 Subject: [PATCH 07/13] add mechanism to change "environment" variable to match command Probably needs a better solution --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index b8bb803ff..001dd16d5 100644 --- a/Makefile +++ b/Makefile @@ -336,6 +336,7 @@ demo: generate-secrets $(MAKE) reindex-fcrepo-metadata ENVIRONMENT=demo $(MAKE) reindex-solr ENVIRONMENT=demo $(MAKE) reindex-triplestore ENVIRONMENT=demo + sed --in-place='' 's/ENVIRONMENT=local/ENVIRONMENT=demo/g' .env .PHONY: local .SILENT: local @@ -391,6 +392,7 @@ local-install-profile: generate-secrets $(MAKE) install ENVIRONMENT=local $(MAKE) hydrate ENVIRONMENT=local $(MAKE) set-files-owner SRC=$(CURDIR)/codebase ENVIRONMENT=local + sed --in-place='' 's/ENVIRONMENT=demo/ENVIRONMENT=local/g' .env .PHONY: initial_content initial_content: From 8fab5dea3688734345ab3b3668560a666b715926 Mon Sep 17 00:00:00 2001 From: Don Richards Date: Wed, 30 Mar 2022 11:34:01 -0400 Subject: [PATCH 08/13] Remove code server and correct environment vars --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 001dd16d5..6ae1a6569 100644 --- a/Makefile +++ b/Makefile @@ -400,7 +400,7 @@ initial_content: curl -u admin:$(shell cat secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD) -H "Content-Type: application/json" -d "@demo-data/browse-collections.json" https://${DOMAIN}/node?_format=json .PHONY: kitchen_sink .SILENT: kitchen_sink -## Turn on/expose all endpoints for demo/testing; CANTALOUPE, MATOMO, DRUPAL, MYSQL, POSTGRES, TRAEFIK DASHBOARD, FEDORA, BLAZEGRAPH, ACTIVEMQ, SOLR, CODE SERVER. NOT FOR PRODUCTION!!! +## Turn on/expose all endpoints for demo/testing; CANTALOUPE, MATOMO, DRUPAL, MYSQL, POSTGRES, TRAEFIK DASHBOARD, FEDORA, BLAZEGRAPH, ACTIVEMQ, SOLR, except CODE SERVER. NOT FOR PRODUCTION!!! kitchen_sink: echo 'Exposing everything including the kitchen sink...' ifeq ($(shell test -e docker-compose.yml && echo -n yes),yes) @@ -415,11 +415,11 @@ ifeq ($(shell test -e docker-compose.yml && echo -n yes),yes) sed --in-place='' 's/EXPOSE_BLAZEGRAPH=false/EXPOSE_BLAZEGRAPH=true/g' .env sed --in-place='' 's/EXPOSE_ACTIVEMQ=false/EXPOSE_ACTIVEMQ=true/g' .env sed --in-place='' 's/EXPOSE_SOLR=false/EXPOSE_SOLR=true/g' .env - sed --in-place='' 's/EXPOSE_CODE_SERVER=false/EXPOSE_CODE_SERVER=true/g' .env - sed --in-place='' 's/INCLUDE_CODE_SERVER_SERVICE=false/INCLUDE_CODE_SERVER_SERVICE=true/g' .env - $(MAKE) docker-compose.yml $(MAKE) build + $(MAKE) pull ENVIRONMENT=$(ENVIRONMENT) $(MAKE) up + $(MAKE) hydrate ENVIRONMENT=$(ENVIRONMENT) + $(MAKE) reindex-solr ENVIRONMENT=$(ENVIRONMENT) echo "Complete" echo "You can now access the following endpoints:" echo "Drupal: https://$(DOMAIN)" @@ -430,7 +430,6 @@ ifeq ($(shell test -e docker-compose.yml && echo -n yes),yes) echo "Solr: http://$(DOMAIN):8983/solr/#/" echo "Cantaloupe: https://$(DOMAIN)/cantaloupe" echo "Matomo: https://$(DOMAIN)/matomo/" - echo "Code Server (Code Editor in Browser): https://$(DOMAIN):8443/" else echo "" echo "Problem: Run this after you've run one of the make commands to build isle-dc (up, demo, local, etc.). Exiting..." From 80ec580ff0427236612121c04bd3385477604a2b Mon Sep 17 00:00:00 2001 From: Don Richards Date: Thu, 10 Mar 2022 10:14:15 -0500 Subject: [PATCH 09/13] Add kitchen sink function to makefile --- Makefile | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Makefile b/Makefile index 6ae1a6569..1c4d8aa38 100644 --- a/Makefile +++ b/Makefile @@ -437,6 +437,44 @@ endif # Destroys everything beware! +.PHONY: kitchen_sink +.SILENT: kitchen_sink +## Turn on/expose all endpoints for demo/testing; CANTALOUPE, MATOMO, DRUPAL, MYSQL, POSTGRES, TRAEFIK DASHBOARD, FEDORA, BLAZEGRAPH, ACTIVEMQ, SOLR, CODE SERVER. NOT FOR PRODUCTION!!! +kitchen_sink: + echo 'Exposing everything including the kitchen sink...' +ifeq ($(shell test -e docker-compose.yml && echo -n yes),yes) + $(MAKE) down + sed --in-place='' 's/EXPOSE_CANTALOUPE=false/EXPOSE_CANTALOUPE=true/g' .env + sed --in-place='' 's/EXPOSE_MATOMO=false/EXPOSE_MATOMO=true/g' .env + sed --in-place='' 's/EXPOSE_DRUPAL=false/EXPOSE_DRUPAL=true/g' .env + sed --in-place='' 's/EXPOSE_MYSQL=false/EXPOSE_MYSQL=true/g' .env + sed --in-place='' 's/EXPOSE_POSTGRES=false/EXPOSE_POSTGRES=true/g' .env + sed --in-place='' 's/EXPOSE_TRAEFIK_DASHBOARD=false/EXPOSE_TRAEFIK_DASHBOARD=true/g' .env + sed --in-place='' 's/EXPOSE_FEDORA=false/EXPOSE_FEDORA=true/g' .env + sed --in-place='' 's/EXPOSE_BLAZEGRAPH=false/EXPOSE_BLAZEGRAPH=true/g' .env + sed --in-place='' 's/EXPOSE_ACTIVEMQ=false/EXPOSE_ACTIVEMQ=true/g' .env + sed --in-place='' 's/EXPOSE_SOLR=false/EXPOSE_SOLR=true/g' .env + sed --in-place='' 's/EXPOSE_CODE_SERVER=false/EXPOSE_CODE_SERVER=true/g' .env + sed --in-place='' 's/INCLUDE_CODE_SERVER_SERVICE=false/INCLUDE_CODE_SERVER_SERVICE=true/g' .env + $(MAKE) docker-compose.yml + $(MAKE) build + $(MAKE) up + echo "Complete" + echo "You can now access the following endpoints:" + echo "Drupal: https://$(DOMAIN)" + echo "Traefik: http://$(DOMAIN):8080/dashboard/#/" + echo "Fedora: http://$(DOMAIN):8081/fcrepo/rest" + echo "Blazegraph: http://$(DOMAIN):8082/bigdata/#splash" + echo "Activemq: http://$(DOMAIN):8161" + echo "Solr: http://$(DOMAIN):8983/solr/#/" + echo "Cantaloupe: https://$(DOMAIN)/cantaloupe" + echo "Matomo: https://$(DOMAIN)/matomo/" + echo "Code Server (Code Editor in Browser): https://$(DOMAIN):8443/" +else + echo "" + echo "Problem: Run this after you've run one of the make commands to build isle-dc (up, demo, local, etc.). Exiting..." +endif + .PHONY: clean .SILENT: clean ## Destroys everything beware! From a72cd6b009e7ea1b5c4e2b2154c308b762220b50 Mon Sep 17 00:00:00 2001 From: Don Richards Date: Wed, 30 Mar 2022 11:34:01 -0400 Subject: [PATCH 10/13] Remove code server and correct environment vars --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 1c4d8aa38..6c8d29a7c 100644 --- a/Makefile +++ b/Makefile @@ -439,7 +439,7 @@ endif # Destroys everything beware! .PHONY: kitchen_sink .SILENT: kitchen_sink -## Turn on/expose all endpoints for demo/testing; CANTALOUPE, MATOMO, DRUPAL, MYSQL, POSTGRES, TRAEFIK DASHBOARD, FEDORA, BLAZEGRAPH, ACTIVEMQ, SOLR, CODE SERVER. NOT FOR PRODUCTION!!! +## Turn on/expose all endpoints for demo/testing; CANTALOUPE, MATOMO, DRUPAL, MYSQL, POSTGRES, TRAEFIK DASHBOARD, FEDORA, BLAZEGRAPH, ACTIVEMQ, SOLR, except CODE SERVER. NOT FOR PRODUCTION!!! kitchen_sink: echo 'Exposing everything including the kitchen sink...' ifeq ($(shell test -e docker-compose.yml && echo -n yes),yes) @@ -454,11 +454,11 @@ ifeq ($(shell test -e docker-compose.yml && echo -n yes),yes) sed --in-place='' 's/EXPOSE_BLAZEGRAPH=false/EXPOSE_BLAZEGRAPH=true/g' .env sed --in-place='' 's/EXPOSE_ACTIVEMQ=false/EXPOSE_ACTIVEMQ=true/g' .env sed --in-place='' 's/EXPOSE_SOLR=false/EXPOSE_SOLR=true/g' .env - sed --in-place='' 's/EXPOSE_CODE_SERVER=false/EXPOSE_CODE_SERVER=true/g' .env - sed --in-place='' 's/INCLUDE_CODE_SERVER_SERVICE=false/INCLUDE_CODE_SERVER_SERVICE=true/g' .env - $(MAKE) docker-compose.yml $(MAKE) build + $(MAKE) pull ENVIRONMENT=$(ENVIRONMENT) $(MAKE) up + $(MAKE) hydrate ENVIRONMENT=$(ENVIRONMENT) + $(MAKE) reindex-solr ENVIRONMENT=$(ENVIRONMENT) echo "Complete" echo "You can now access the following endpoints:" echo "Drupal: https://$(DOMAIN)" @@ -469,7 +469,6 @@ ifeq ($(shell test -e docker-compose.yml && echo -n yes),yes) echo "Solr: http://$(DOMAIN):8983/solr/#/" echo "Cantaloupe: https://$(DOMAIN)/cantaloupe" echo "Matomo: https://$(DOMAIN)/matomo/" - echo "Code Server (Code Editor in Browser): https://$(DOMAIN):8443/" else echo "" echo "Problem: Run this after you've run one of the make commands to build isle-dc (up, demo, local, etc.). Exiting..." From fc3789e5a939daa1a55f80330a3d70b04615ec7c Mon Sep 17 00:00:00 2001 From: Don Richards Date: Thu, 7 Apr 2022 13:47:08 -0400 Subject: [PATCH 11/13] Correct SED issues with OSX and linux --- Makefile | 95 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 56 insertions(+), 39 deletions(-) diff --git a/Makefile b/Makefile index 6c8d29a7c..3c281ed3b 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,22 @@ ENV_FILE=$(shell \ fi; \ echo .env) +UNAME := $(shell uname -s) +SED := $(shell which sed) + +ifeq ($(UNAME), Linux) + SED := echo "$(SED) -i " +endif +ifeq ($(UNAME),Windows_NT) + @echo "Windows is not officially supported. Please use Linux or MacOS." +endif +ifeq ($(UNAME),Cygwin) + @echo "Windows is not officially supported. Please use Linux or MacOS." +endif +ifeq ($(UNAME), Darwin) + SED := echo "$(SED) -i.bak" +endif + # Checks to see if the path includes a space character. Intended to be a temporary fix. ifneq (1,$(words $(CURDIR))) $(error Containing path cannot contain space characters: '$(CURDIR)') @@ -336,7 +352,7 @@ demo: generate-secrets $(MAKE) reindex-fcrepo-metadata ENVIRONMENT=demo $(MAKE) reindex-solr ENVIRONMENT=demo $(MAKE) reindex-triplestore ENVIRONMENT=demo - sed --in-place='' 's/ENVIRONMENT=local/ENVIRONMENT=demo/g' .env + $(shell $(SED) 's/ENVIRONMENT=local/ENVIRONMENT=demo/g' .env) .PHONY: local .SILENT: local @@ -357,6 +373,44 @@ local: generate-secrets $(MAKE) hydrate ENVIRONMENT=local $(MAKE) set-files-owner SRC="$(CURDIR)/codebase" ENVIROMENT=local +.PHONY: kitchen_sink +.SILENT: kitchen_sink +## Turn on/expose all endpoints for demo/testing; CANTALOUPE, MATOMO, DRUPAL, MYSQL, POSTGRES, TRAEFIK DASHBOARD, FEDORA, BLAZEGRAPH, ACTIVEMQ, SOLR, except CODE SERVER. NOT FOR PRODUCTION!!! +kitchen_sink: + echo 'Exposing everything including the kitchen sink...' +ifeq ($(shell test -e docker-compose.yml && echo -n yes),yes) + $(MAKE) down + $(shell $(SED) 's/EXPOSE_CANTALOUPE=false/EXPOSE_CANTALOUPE=true/g' .env) + $(shell $(SED) 's/EXPOSE_MATOMO=false/EXPOSE_MATOMO=true/g' .env) + $(shell $(SED) 's/EXPOSE_DRUPAL=false/EXPOSE_DRUPAL=true/g' .env) + $(shell $(SED) 's/EXPOSE_MYSQL=false/EXPOSE_MYSQL=true/g' .env) + $(shell $(SED) 's/EXPOSE_POSTGRES=false/EXPOSE_POSTGRES=true/g' .env) + $(shell $(SED) 's/EXPOSE_TRAEFIK_DASHBOARD=false/EXPOSE_TRAEFIK_DASHBOARD=true/g' .env) + $(shell $(SED) 's/EXPOSE_FEDORA=false/EXPOSE_FEDORA=true/g' .env) + $(shell $(SED) 's/EXPOSE_BLAZEGRAPH=false/EXPOSE_BLAZEGRAPH=true/g' .env) + $(shell $(SED) 's/EXPOSE_ACTIVEMQ=false/EXPOSE_ACTIVEMQ=true/g' .env) + $(shell $(SED) 's/EXPOSE_SOLR=false/EXPOSE_SOLR=true/g' .env) + $(MAKE) down + $(MAKE) -B docker-compose.yml + $(MAKE) pull ENVIRONMENT=$(ENVIRONMENT) + $(MAKE) up + $(MAKE) hydrate ENVIRONMENT=$(ENVIRONMENT) + $(MAKE) reindex-solr ENVIRONMENT=$(ENVIRONMENT) + echo "Complete" + echo "You can now access the following endpoints:" + echo "Drupal: https://$(DOMAIN)" + echo "Traefik: http://$(DOMAIN):8080/dashboard/#/" + echo "Fedora: http://$(DOMAIN):8081/fcrepo/rest" + echo "Blazegraph: http://$(DOMAIN):8082/bigdata/#splash" + echo "Activemq: http://$(DOMAIN):8161" + echo "Solr: http://$(DOMAIN):8983/solr/#/" + echo "Cantaloupe: https://$(DOMAIN)/cantaloupe" + echo "Matomo: https://$(DOMAIN)/matomo/" +else + echo "" + echo "Problem: Run this after you've run one of the make commands to build isle-dc (up, demo, local, etc.). Exiting..." +endif + .PHONY: demo-install-profile .SILENT: demo-instal-profile demo-install-profile: generate-secrets @@ -388,7 +442,7 @@ local-install-profile: generate-secrets $(MAKE) set-files-owner SRC=$(CURDIR)/codebase ENVIROMENT=local docker-compose up -d --remove-orphans docker-compose exec -T drupal with-contenv bash -lc 'composer install; chown -R nginx:nginx .' - $(MAKE) remove_standard_profile_references_from_config ENVIRONMENT=local + $(MAKE) remove_standard_profile_references_from_config ENVIROMENT=local $(MAKE) install ENVIRONMENT=local $(MAKE) hydrate ENVIRONMENT=local $(MAKE) set-files-owner SRC=$(CURDIR)/codebase ENVIRONMENT=local @@ -437,43 +491,6 @@ endif # Destroys everything beware! -.PHONY: kitchen_sink -.SILENT: kitchen_sink -## Turn on/expose all endpoints for demo/testing; CANTALOUPE, MATOMO, DRUPAL, MYSQL, POSTGRES, TRAEFIK DASHBOARD, FEDORA, BLAZEGRAPH, ACTIVEMQ, SOLR, except CODE SERVER. NOT FOR PRODUCTION!!! -kitchen_sink: - echo 'Exposing everything including the kitchen sink...' -ifeq ($(shell test -e docker-compose.yml && echo -n yes),yes) - $(MAKE) down - sed --in-place='' 's/EXPOSE_CANTALOUPE=false/EXPOSE_CANTALOUPE=true/g' .env - sed --in-place='' 's/EXPOSE_MATOMO=false/EXPOSE_MATOMO=true/g' .env - sed --in-place='' 's/EXPOSE_DRUPAL=false/EXPOSE_DRUPAL=true/g' .env - sed --in-place='' 's/EXPOSE_MYSQL=false/EXPOSE_MYSQL=true/g' .env - sed --in-place='' 's/EXPOSE_POSTGRES=false/EXPOSE_POSTGRES=true/g' .env - sed --in-place='' 's/EXPOSE_TRAEFIK_DASHBOARD=false/EXPOSE_TRAEFIK_DASHBOARD=true/g' .env - sed --in-place='' 's/EXPOSE_FEDORA=false/EXPOSE_FEDORA=true/g' .env - sed --in-place='' 's/EXPOSE_BLAZEGRAPH=false/EXPOSE_BLAZEGRAPH=true/g' .env - sed --in-place='' 's/EXPOSE_ACTIVEMQ=false/EXPOSE_ACTIVEMQ=true/g' .env - sed --in-place='' 's/EXPOSE_SOLR=false/EXPOSE_SOLR=true/g' .env - $(MAKE) build - $(MAKE) pull ENVIRONMENT=$(ENVIRONMENT) - $(MAKE) up - $(MAKE) hydrate ENVIRONMENT=$(ENVIRONMENT) - $(MAKE) reindex-solr ENVIRONMENT=$(ENVIRONMENT) - echo "Complete" - echo "You can now access the following endpoints:" - echo "Drupal: https://$(DOMAIN)" - echo "Traefik: http://$(DOMAIN):8080/dashboard/#/" - echo "Fedora: http://$(DOMAIN):8081/fcrepo/rest" - echo "Blazegraph: http://$(DOMAIN):8082/bigdata/#splash" - echo "Activemq: http://$(DOMAIN):8161" - echo "Solr: http://$(DOMAIN):8983/solr/#/" - echo "Cantaloupe: https://$(DOMAIN)/cantaloupe" - echo "Matomo: https://$(DOMAIN)/matomo/" -else - echo "" - echo "Problem: Run this after you've run one of the make commands to build isle-dc (up, demo, local, etc.). Exiting..." -endif - .PHONY: clean .SILENT: clean ## Destroys everything beware! From 4aa3b964bdde20ceb0ab86a1a4a548f93f7a6311 Mon Sep 17 00:00:00 2001 From: Don Richards Date: Tue, 12 Apr 2022 12:28:57 -0400 Subject: [PATCH 12/13] Shift location --- Makefile | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/Makefile b/Makefile index 3c281ed3b..a82fbf5d9 100644 --- a/Makefile +++ b/Makefile @@ -452,43 +452,6 @@ local-install-profile: generate-secrets initial_content: curl -u admin:$(shell cat secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD) -H "Content-Type: application/json" -d "@demo-data/homepage.json" https://${DOMAIN}/node?_format=json curl -u admin:$(shell cat secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD) -H "Content-Type: application/json" -d "@demo-data/browse-collections.json" https://${DOMAIN}/node?_format=json -.PHONY: kitchen_sink -.SILENT: kitchen_sink -## Turn on/expose all endpoints for demo/testing; CANTALOUPE, MATOMO, DRUPAL, MYSQL, POSTGRES, TRAEFIK DASHBOARD, FEDORA, BLAZEGRAPH, ACTIVEMQ, SOLR, except CODE SERVER. NOT FOR PRODUCTION!!! -kitchen_sink: - echo 'Exposing everything including the kitchen sink...' -ifeq ($(shell test -e docker-compose.yml && echo -n yes),yes) - $(MAKE) down - sed --in-place='' 's/EXPOSE_CANTALOUPE=false/EXPOSE_CANTALOUPE=true/g' .env - sed --in-place='' 's/EXPOSE_MATOMO=false/EXPOSE_MATOMO=true/g' .env - sed --in-place='' 's/EXPOSE_DRUPAL=false/EXPOSE_DRUPAL=true/g' .env - sed --in-place='' 's/EXPOSE_MYSQL=false/EXPOSE_MYSQL=true/g' .env - sed --in-place='' 's/EXPOSE_POSTGRES=false/EXPOSE_POSTGRES=true/g' .env - sed --in-place='' 's/EXPOSE_TRAEFIK_DASHBOARD=false/EXPOSE_TRAEFIK_DASHBOARD=true/g' .env - sed --in-place='' 's/EXPOSE_FEDORA=false/EXPOSE_FEDORA=true/g' .env - sed --in-place='' 's/EXPOSE_BLAZEGRAPH=false/EXPOSE_BLAZEGRAPH=true/g' .env - sed --in-place='' 's/EXPOSE_ACTIVEMQ=false/EXPOSE_ACTIVEMQ=true/g' .env - sed --in-place='' 's/EXPOSE_SOLR=false/EXPOSE_SOLR=true/g' .env - $(MAKE) build - $(MAKE) pull ENVIRONMENT=$(ENVIRONMENT) - $(MAKE) up - $(MAKE) hydrate ENVIRONMENT=$(ENVIRONMENT) - $(MAKE) reindex-solr ENVIRONMENT=$(ENVIRONMENT) - echo "Complete" - echo "You can now access the following endpoints:" - echo "Drupal: https://$(DOMAIN)" - echo "Traefik: http://$(DOMAIN):8080/dashboard/#/" - echo "Fedora: http://$(DOMAIN):8081/fcrepo/rest" - echo "Blazegraph: http://$(DOMAIN):8082/bigdata/#splash" - echo "Activemq: http://$(DOMAIN):8161" - echo "Solr: http://$(DOMAIN):8983/solr/#/" - echo "Cantaloupe: https://$(DOMAIN)/cantaloupe" - echo "Matomo: https://$(DOMAIN)/matomo/" -else - echo "" - echo "Problem: Run this after you've run one of the make commands to build isle-dc (up, demo, local, etc.). Exiting..." -endif - # Destroys everything beware! .PHONY: clean From 10af5816350625083165eff5cf29bd195374c216 Mon Sep 17 00:00:00 2001 From: Don Richards Date: Wed, 13 Apr 2022 14:25:46 -0400 Subject: [PATCH 13/13] Switch to bash for shell --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a82fbf5d9..26db10d5e 100644 --- a/Makefile +++ b/Makefile @@ -378,7 +378,7 @@ local: generate-secrets ## Turn on/expose all endpoints for demo/testing; CANTALOUPE, MATOMO, DRUPAL, MYSQL, POSTGRES, TRAEFIK DASHBOARD, FEDORA, BLAZEGRAPH, ACTIVEMQ, SOLR, except CODE SERVER. NOT FOR PRODUCTION!!! kitchen_sink: echo 'Exposing everything including the kitchen sink...' -ifeq ($(shell test -e docker-compose.yml && echo -n yes),yes) +ifeq ($(shell /usr/bin/env bash -c "test -e docker-compose.yml && echo -n yes"),yes) $(MAKE) down $(shell $(SED) 's/EXPOSE_CANTALOUPE=false/EXPOSE_CANTALOUPE=true/g' .env) $(shell $(SED) 's/EXPOSE_MATOMO=false/EXPOSE_MATOMO=true/g' .env)