-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Docker impl #127
base: master
Are you sure you want to change the base?
Initial Docker impl #127
Conversation
@bseeger ^^ You seein' this? Looks like a viable way to re-use our ansible provisioners and not have to write a dockerfile for every role we've already developed. |
@birkland : Woot! I'm so excited to see your thinking here! Dockerizing I8 is scheduled to be part of the next Islandora webinar on Aug 13th. Would you be interested in joining a planning meeting with @dannylamb, @bseeger + others? (I will reach out to you via email.) Also, we have reached the halfway mark in our crowdfunding goal to refactor ISLE for use with I8. ISLE's committers would love to talk I8 with you. (ISLE has solved issues of data persistence using bind mounts and docker volumes.) |
@birkland Yep, totally works. I have a CENTOS container running Islandora 8 using our Ansible provisioner! |
Removed my comments, looks like my issue is related to Islandora/documentation#1245 |
I tried running this for a new project, but I always end up with a composer error
I've tried the following, but still the same error
|
Last output
http://localhost:8000/core/install.php is accessible but complains about
|
@attiks I can try to reproduce this in a little while. This PR is against master, which hasn't changed in a while. It's unclear to me what sources of instability can affect a playbook's ability to make a repeatable build. In any case, I can see if this can be reproduced on my end. I also have a branch against |
I've made some progress Changes
Changed roles/external/Islandora-Devops.drupal-openseadragon/defaults/main.yml so it uses
Fails now on
http://localhost:8000/ displays the drupal site |
That's a problem with the build we're experiencing on TL;DR we have patch features. I'm testing it now. |
A mbit of pregress diff --git a/inventory/vagrant/group_vars/webserver/drupal.yml b/inventory/vagrant/group_vars/webserver/drupal.yml
index 80018b3..ce74178 100644
--- a/inventory/vagrant/group_vars/webserver/drupal.yml
+++ b/inventory/vagrant/group_vars/webserver/drupal.yml
@@ -7,6 +7,7 @@ drupal_composer_dependencies:
- "zaporylie/composer-drupal-optimizations:^1.0"
- "drupal/console:~1.0"
- "drupal/devel:^2.0"
+ - "drupal/features:^3.8"
- "drupal/rdfui:^1.0-beta1"
- "drupal/restui:^1.16"
- "drupal/search_api_solr:^2.0"
@@ -14,9 +15,12 @@ drupal_composer_dependencies:
- "drupal/content_browser:^1.0@alpha"
- "drupal/matomo:^1.7"
- "drupal/pdf:1.x-dev"
+ - "islandora/openseadragon:dev-8.x-1.x"
+ - "islandora/islandora:dev-8.x-1.x
+ - "islandora/islandora_defaults:dev-8.x-1.x"
+ - "islandora/controlled_access_terms:dev-8.x-1.x"
- "islandora/carapace:1.0.0"
- - "islandora/islandora_defaults:1.0.0"
-drupal_composer_project_package: "islandora/drupal-project:8.6.10"
+drupal_composer_project_package: "islandora/drupal-project:8.8.1"
drupal_composer_project_options: "--prefer-dist --stability dev --no-interaction"
drupal_core_path: "{{ drupal_composer_install_dir }}/web"
drupal_db_user: drupal8
@@ -28,6 +32,7 @@ drupal_site_name: "Islandora 8"
drupal_install_profile: standard
drupal_account_name: admin
drupal_enable_modules:
+ - features
- rdf
- responsive_image
- syslog
@@ -43,8 +48,9 @@ drupal_enable_modules:
- content_browser
- matomo
- pdf
- - islandora_core_feature
- controlled_access_terms_defaults
+ - controlled_access_terms
+ - islandora_core_feature
drupal_trusted_hosts:
- ^localhost$
drupal_trusted_hosts_file: "{{ drupal_core_path }}/sites/default/settings.php" Output
|
More progress, but a bit of cheating Diffdiff --git a/docker/ansible/Dockerfile b/docker/ansible/Dockerfile
index 1ab5c73..281a536 100644
--- a/docker/ansible/Dockerfile
+++ b/docker/ansible/Dockerfile
@@ -6,7 +6,9 @@ ENV ISLANDORA_DISTRO="centos/7" \
WORKDIR /root/playbook
RUN yum -y install epel-release && \
- yum -y install git ansible openssh-clients
+ yum -y install git openssh-clients && \
+ yum -y install python-pip python-dev && \
+ pip install ansible==2.7.10
COPY entrypoint.sh /bin/
diff --git a/inventory/docker/group_vars/webserver/drupal.yml b/inventory/docker/group_vars/webserver/drupal.yml
index 80018b3..4500410 100644
--- a/inventory/docker/group_vars/webserver/drupal.yml
+++ b/inventory/docker/group_vars/webserver/drupal.yml
@@ -7,6 +7,7 @@ drupal_composer_dependencies:
- "zaporylie/composer-drupal-optimizations:^1.0"
- "drupal/console:~1.0"
- "drupal/devel:^2.0"
+ - "drupal/features:^3.8"
- "drupal/rdfui:^1.0-beta1"
- "drupal/restui:^1.16"
- "drupal/search_api_solr:^2.0"
@@ -14,9 +15,12 @@ drupal_composer_dependencies:
- "drupal/content_browser:^1.0@alpha"
- "drupal/matomo:^1.7"
- "drupal/pdf:1.x-dev"
+ - "islandora/openseadragon:dev-8.x-1.x"
+ - "islandora/islandora:dev-8.x-1.x"
+ - "islandora/islandora_defaults:dev-8.x-1.x"
+ - "islandora/controlled_access_terms:dev-8.x-1.x"
- "islandora/carapace:1.0.0"
- - "islandora/islandora_defaults:1.0.0"
-drupal_composer_project_package: "islandora/drupal-project:8.6.10"
+drupal_composer_project_package: "islandora/drupal-project:dev-no-auto-scaffold"
drupal_composer_project_options: "--prefer-dist --stability dev --no-interaction"
drupal_core_path: "{{ drupal_composer_install_dir }}/web"
drupal_db_user: drupal8
@@ -28,6 +32,7 @@ drupal_site_name: "Islandora 8"
drupal_install_profile: standard
drupal_account_name: admin
drupal_enable_modules:
+ - features
- rdf
- responsive_image
- syslog
@@ -43,8 +48,9 @@ drupal_enable_modules:
- content_browser
- matomo
- pdf
- - islandora_core_feature
- controlled_access_terms_defaults
+ - controlled_access_terms
+ - islandora_core_feature
drupal_trusted_hosts:
- ^localhost$
drupal_trusted_hosts_file: "{{ drupal_core_path }}/sites/default/settings.php"
diff --git a/inventory/vagrant/group_vars/webserver/drupal.yml b/inventory/vagrant/group_vars/webserver/drupal.yml
index 80018b3..ce74178 100644
--- a/inventory/vagrant/group_vars/webserver/drupal.yml
+++ b/inventory/vagrant/group_vars/webserver/drupal.yml
@@ -7,6 +7,7 @@ drupal_composer_dependencies:
- "zaporylie/composer-drupal-optimizations:^1.0"
- "drupal/console:~1.0"
- "drupal/devel:^2.0"
+ - "drupal/features:^3.8"
- "drupal/rdfui:^1.0-beta1"
- "drupal/restui:^1.16"
- "drupal/search_api_solr:^2.0"
@@ -14,9 +15,12 @@ drupal_composer_dependencies:
- "drupal/content_browser:^1.0@alpha"
- "drupal/matomo:^1.7"
- "drupal/pdf:1.x-dev"
+ - "islandora/openseadragon:dev-8.x-1.x"
+ - "islandora/islandora:dev-8.x-1.x
+ - "islandora/islandora_defaults:dev-8.x-1.x"
+ - "islandora/controlled_access_terms:dev-8.x-1.x"
- "islandora/carapace:1.0.0"
- - "islandora/islandora_defaults:1.0.0"
-drupal_composer_project_package: "islandora/drupal-project:8.6.10"
+drupal_composer_project_package: "islandora/drupal-project:8.8.1"
drupal_composer_project_options: "--prefer-dist --stability dev --no-interaction"
drupal_core_path: "{{ drupal_composer_install_dir }}/web"
drupal_db_user: drupal8
@@ -28,6 +32,7 @@ drupal_site_name: "Islandora 8"
drupal_install_profile: standard
drupal_account_name: admin
drupal_enable_modules:
+ - features
- rdf
- responsive_image
- syslog
@@ -43,8 +48,9 @@ drupal_enable_modules:
- content_browser
- matomo
- pdf
- - islandora_core_feature
- controlled_access_terms_defaults
+ - controlled_access_terms
+ - islandora_core_feature
drupal_trusted_hosts:
- ^localhost$
drupal_trusted_hosts_file: "{{ drupal_core_path }}/sites/default/settings.php"
diff --git a/roles/internal/webserver-app/tasks/drupal.yml b/roles/internal/webserver-app/tasks/drupal.yml
index 608b035..067412f 100644
--- a/roles/internal/webserver-app/tasks/drupal.yml
+++ b/roles/internal/webserver-app/tasks/drupal.yml
@@ -60,7 +60,7 @@
group: "{{ webserver_app_user }}"
- name: Import features
- command: "{{ drush_path }} --root {{ drupal_core_path }} -y fim islandora_core_feature,controlled_access_terms_defaults"
+ command: "{{ drush_path }} --root {{ drupal_core_path }} -y fim islandora_core_feature"
# masonry library is required by content_browser and not installed by composer due to issue 2971165.
- name: Create drupal library directory.
@@ -82,17 +82,6 @@
args:
creates: "{{ drupal_external_libraries_directory }}/masonry"
-# Set Matomo Settings
-- name: Set Matomo site id.
- command: "{{ drush_path }} --root {{ drupal_core_path }} -y config-set matomo.settings site_id 1"
- register: set_search_api_config
- changed_when: "'Do you want to update site_id' in set_search_api_config.stdout"
-
-- name: Set Matmo sever url.
- command: "{{ drush_path }} --root {{ drupal_core_path }} -y config-set matomo.settings url_http http://localhost:8000/matomo/"
- register: set_search_api_config
- changed_when: "'Do you want to update site_id' in set_search_api_config.stdout"
-
# pdf.js library
- name: ensure pdf.js directory exists
file:
diff --git a/roles/internal/webserver-app/tasks/solr.yml b/roles/internal/webserver-app/tasks/solr.yml
index cae8a22..66fb78a 100644
--- a/roles/internal/webserver-app/tasks/solr.yml
+++ b/roles/internal/webserver-app/tasks/solr.yml
@@ -1,9 +1,9 @@
---
-- name: Set default solr server to point to CLAW core
- command: "{{ drush_path }} --root {{ drupal_core_path }} -y config-set search_api.server.default_solr_server backend_config.connector_config.core CLAW"
- register: set_search_api_config
- changed_when: "'Do you want to update' in set_search_api_config.stdout"
+#- name: Set default solr server to point to CLAW core
+# command: "{{ drush_path }} --root {{ drupal_core_path }} -y config-set search_api.server.default_solr_server backend_config.connector_config.core CLAW"
+# register: set_search_api_config
+# changed_when: "'Do you want to update' in set_search_api_config.stdout"
- name: Get solr config files to copy
command: "find {{ webserver_document_root }}/drupal/web/modules/contrib/search_api_solr/solr-conf/7.x -type f"
diff --git a/webserver.yml b/webserver.yml
index f799879..6288785 100644
--- a/webserver.yml
+++ b/webserver.yml
@@ -5,6 +5,7 @@
vars:
php_version: "7.2"
+ php_memory_limit: "2G"
roles:
- name: geerlingguy.repo-remi Changes in untracked filesroles/external/Islandora-Devops.drupal-openseadragon/defaults/main.yml roles/external/Islandora-Devops.blazegraph/tasks/download.yml Output
|
I've destroyed the container and restarted from scratch, but Drush 10 is being installed by https://github.com/Islandora/drupal-project/blob/8.x-1.x/composer.json#L26 but this breaks features, https://www.drupal.org/project/features/issues/3091278 Notes at https://gist.github.com/attiks/96b4e0802130b6876f1cfee466f6f3d7 |
Drush 10 problem fixed by specifying Drush 9 in composer, https://gist.github.com/attiks/96b4e0802130b6876f1cfee466f6f3d7#file-diff-patch-L24 Will also be fixed once islandora-deprecated/drupal-project#35 is merged Still fails on Maven repositories, tried adding settings but it seems they don't work or aren't copied to the right account, https://gist.github.com/attiks/96b4e0802130b6876f1cfee466f6f3d7#file-roles__external__islandora-devops-alpaca__templates__maven-xml-j2 |
@attiks Thanks, I can add drush 9 to the other PR to sort that out. If your roles don't seem to be taking hold, you have to clear out the |
I started from scratch using minimal changes diff --git a/docker/ansible/Dockerfile b/docker/ansible/Dockerfile
index 1ab5c73..281a536 100644
--- a/docker/ansible/Dockerfile
+++ b/docker/ansible/Dockerfile
@@ -6,7 +6,9 @@ ENV ISLANDORA_DISTRO="centos/7" \
WORKDIR /root/playbook
RUN yum -y install epel-release && \
- yum -y install git ansible openssh-clients
+ yum -y install git openssh-clients && \
+ yum -y install python-pip python-dev && \
+ pip install ansible==2.7.10
COPY entrypoint.sh /bin/
diff --git a/webserver.yml b/webserver.yml
index f799879..6288785 100644
--- a/webserver.yml
+++ b/webserver.yml
@@ -5,6 +5,7 @@
vars:
php_version: "7.2"
+ php_memory_limit: "2G"
roles:
- name: geerlingguy.repo-remi and it fails on
|
Draft PR to demonstrate Islandora 8 in Docker
Creates and runs two Docker containers:
ansible
container that, upon startup, runs ansible to install Islandora 8 to thevm
containervm
container that plays the role of an empty Centos 7 box upon which Islandora 8 is installed via theansible
container.Motivation
To Test
docker-compose
(usually comes with the Docker distribution, e.g on Mac and Windows)claw-playbook/
) dodocker-compose build
docker-compose up -d
ansible
container viadocker logs -f ansible
. That's the ansible output!localhost:8000
, and poke around!Tips and tricks
docker exec -it vm /bin/bash
docker-compose stop
will stop all containers, but keep state. You can later on do adocker-compose up vm
just to start the Islandora "vm" container.docker-compose down
.docker-compose stop
preserves state.See if this works for you @dannylamb, or anybody else interested. Have fun!