From 9a752179155978d8a0681be527ea03c415913876 Mon Sep 17 00:00:00 2001 From: Daniel Lamb Date: Wed, 2 May 2018 12:04:28 -0300 Subject: [PATCH 1/4] install for content-modeing-overhaul branches of everything --- Vagrantfile | 2 +- .../vagrant/group_vars/webserver/drupal.yml | 18 +++++---- ...k.views_block__membership_view_block_1.yml | 36 ----------------- .../webserver-app/files/filehash.settings.yml | 5 --- .../files/rest.resource.entity.file.yml | 28 ------------- .../files/rest.resource.entity.media.yml | 40 ------------------- .../files/rest.resource.entity.node.yml | 40 ------------------- roles/internal/webserver-app/tasks/drupal.yml | 26 ++++++------ 8 files changed, 25 insertions(+), 170 deletions(-) delete mode 100644 roles/internal/webserver-app/files/block.block.views_block__membership_view_block_1.yml delete mode 100644 roles/internal/webserver-app/files/filehash.settings.yml delete mode 100644 roles/internal/webserver-app/files/rest.resource.entity.file.yml delete mode 100644 roles/internal/webserver-app/files/rest.resource.entity.media.yml delete mode 100644 roles/internal/webserver-app/files/rest.resource.entity.node.yml diff --git a/Vagrantfile b/Vagrantfile index 718068b0..555ab1a8 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,7 +7,7 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.require_version ">= 1.8.5", "<= 2.0.1" $cpus = ENV.fetch("ISLANDORA_VAGRANT_CPUS", "1") -$memory = ENV.fetch("ISLANDORA_VAGRANT_MEMORY", "3072") +$memory = ENV.fetch("ISLANDORA_VAGRANT_MEMORY", "4096") $hostname = ENV.fetch("ISLANDORA_VAGRANT_HOSTNAME", "claw") $virtualBoxDescription = ENV.fetch("ISLANDORA_VAGRANT_VIRTUALBOXDESCRIPTION", "IslandoraCLAW") diff --git a/inventory/vagrant/group_vars/webserver/drupal.yml b/inventory/vagrant/group_vars/webserver/drupal.yml index 08fcb37e..63d7de10 100644 --- a/inventory/vagrant/group_vars/webserver/drupal.yml +++ b/inventory/vagrant/group_vars/webserver/drupal.yml @@ -8,13 +8,15 @@ drupal_composer_dependencies: - "drupal/devel:^1.0@beta" - "drupal/rdfui:1.x-dev" - "drupal/restui:^1.13" - - "drupal/media_entity:^1.6" - - "drupal/media_entity_image:^1.2" - "drupal/search_api_solr:1.0.0" - "drupal/facets:1.x-dev" - "islandora/carapace:dev-8.x-1.x" - - "islandora/islandora_image:dev-8.x-1.x" -drupal_composer_project_package: "islandora/drupal-project:8.4" + - "drupal/jwt:1.0.0-alpha6" +# Comment this back in once code gets merged and is available on packagist +# - "islandora/islandora:dev-8.x-1.x" +# - "islandora/openseadragon:dev-8.x-1.x" +# - "islandora/islandora_image:dev-8.x-1.x" +drupal_composer_project_package: "islandora/drupal-project:8.5" drupal_composer_project_options: "--prefer-dist --stability dev --no-interaction" drupal_core_path: "{{ drupal_composer_install_dir }}/web" drupal_db_user: drupal8 @@ -34,14 +36,16 @@ drupal_enable_modules: - rest - simpletest - restui - - media_entity - - media_entity_image - devel - search_api - - islandora_image - search_api_solr - search_api_solr_defaults - facets + - jwt +# Comment this back in once code gets merged and is available on packagist +# - islandora_feature +# - islandora_openseadragon +# - islandora_image_feature drupal_trusted_hosts: - ^localhost$ drupal_trusted_hosts_file: "{{ drupal_core_path }}/sites/default/settings.php" diff --git a/roles/internal/webserver-app/files/block.block.views_block__membership_view_block_1.yml b/roles/internal/webserver-app/files/block.block.views_block__membership_view_block_1.yml deleted file mode 100644 index 70c8f485..00000000 --- a/roles/internal/webserver-app/files/block.block.views_block__membership_view_block_1.yml +++ /dev/null @@ -1,36 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - views.view.membership_view - module: - - node - - views - theme: - - carapace - enforced: - module: - - islandora_collection -id: views_block__membership_view_block_1 -theme: carapace -region: content -weight: 0 -provider: null -plugin: 'views_block:membership_view-block_1' -settings: - id: 'views_block:membership_view-block_1' - label: '' - provider: views - label_display: visible - views_label: '' - items_per_page: none - context_mapping: - field_memberof_target_id: '@node.node_route_context:node' -visibility: - node_type: - id: node_type - bundles: - islandora_collection: islandora_collection - negate: false - context_mapping: - node: '@node.node_route_context:node' \ No newline at end of file diff --git a/roles/internal/webserver-app/files/filehash.settings.yml b/roles/internal/webserver-app/files/filehash.settings.yml deleted file mode 100644 index 107d63d6..00000000 --- a/roles/internal/webserver-app/files/filehash.settings.yml +++ /dev/null @@ -1,5 +0,0 @@ -algos: - sha1: sha1 - md5: '0' - sha256: '0' -dedupe: true diff --git a/roles/internal/webserver-app/files/rest.resource.entity.file.yml b/roles/internal/webserver-app/files/rest.resource.entity.file.yml deleted file mode 100644 index 6a136c3c..00000000 --- a/roles/internal/webserver-app/files/rest.resource.entity.file.yml +++ /dev/null @@ -1,28 +0,0 @@ -langcode: en -status: true -dependencies: - module: - - basic_auth - - file - - jsonld - - jwt - - serialization - - user -id: entity.file -plugin_id: 'entity:file' -granularity: method -configuration: - GET: - supported_formats: - - jsonld - - json - supported_auth: - - basic_auth - - jwt_auth - - cookie - DELETE: - supported_formats: - - json - supported_auth: - - basic_auth - - jwt_auth diff --git a/roles/internal/webserver-app/files/rest.resource.entity.media.yml b/roles/internal/webserver-app/files/rest.resource.entity.media.yml deleted file mode 100644 index 3ed0286e..00000000 --- a/roles/internal/webserver-app/files/rest.resource.entity.media.yml +++ /dev/null @@ -1,40 +0,0 @@ -langcode: en -status: true -dependencies: - module: - - basic_auth - - jsonld - - jwt - - media_entity - - serialization - - user -id: entity.media -plugin_id: 'entity:media' -granularity: method -configuration: - GET: - supported_formats: - - jsonld - - json - supported_auth: - - basic_auth - - jwt_auth - - cookie - POST: - supported_formats: - - json - supported_auth: - - basic_auth - - jwt_auth - DELETE: - supported_formats: - - json - supported_auth: - - basic_auth - - jwt_auth - PATCH: - supported_formats: - - json - supported_auth: - - basic_auth - - jwt_auth diff --git a/roles/internal/webserver-app/files/rest.resource.entity.node.yml b/roles/internal/webserver-app/files/rest.resource.entity.node.yml deleted file mode 100644 index e7d4c7cc..00000000 --- a/roles/internal/webserver-app/files/rest.resource.entity.node.yml +++ /dev/null @@ -1,40 +0,0 @@ -langcode: en -status: true -dependencies: - module: - - basic_auth - - jsonld - - jwt - - node - - serialization - - user -id: entity.node -plugin_id: 'entity:node' -granularity: method -configuration: - GET: - supported_formats: - - jsonld - - json - supported_auth: - - basic_auth - - jwt_auth - - cookie - POST: - supported_formats: - - json - supported_auth: - - basic_auth - - jwt_auth - DELETE: - supported_formats: - - json - supported_auth: - - basic_auth - - jwt_auth - PATCH: - supported_formats: - - json - supported_auth: - - basic_auth - - jwt_auth diff --git a/roles/internal/webserver-app/tasks/drupal.yml b/roles/internal/webserver-app/tasks/drupal.yml index f19cfa4b..31a9b830 100644 --- a/roles/internal/webserver-app/tasks/drupal.yml +++ b/roles/internal/webserver-app/tasks/drupal.yml @@ -61,20 +61,20 @@ owner: "{{ webserver_app_user }}" group: "{{ webserver_app_user }}" -- name: Copy drupal config - copy: - src: "." - dest: "{{ webserver_app_drupal_config_path }}/" - mode: "0644" - owner: "{{ webserver_app_user }}" - group: "{{ webserver_app_user }}" - register: drupal_config +#- name: Import features +# command: "{{ drush_path }} -y fim --bundle=islandora islandora_feature,islandora_openseadragon,islandora_image_feature" +# args: + # chdir: "{{ drupal_core_path }}" -- name: Install config - command: "{{ drush_path }} config-import -y --partial --source={{ webserver_app_drupal_config_path }}" - args: - chdir: "{{ drupal_core_path }}" - when: drupal_config.changed is defined and drupal_config.changed +#- name: Run tag migrations +# command: "{{ drush_path }} -y mim --group=islandora" +# args: + # chdir: "{{ drupal_core_path }}" + +#- name: Index tags +# command: "{{ drush_path }} -y php:eval 'array_walk(\\Drupal::service('entity_type.manager')->getStorage('taxonomy_term')->loadMultiple(), function($term) { $term->save(); });'" +# args: + # chdir: "{{ drupal_core_path }}" - name: Set default solr server to point to CLAW core command: "{{ drush_path }} -y config-set search_api.server.default_solr_server backend_config.connector_config.core CLAW" From ed8f7fdb2b20b1a7c9e16f634fe8fe424cb18828 Mon Sep 17 00:00:00 2001 From: Daniel Lamb Date: Thu, 14 Jun 2018 16:31:17 -0300 Subject: [PATCH 2/4] works, but drupal is accessed through localhost:8000/drupal/web :( --- inventory/vagrant/group_vars/database.yml | 2 +- .../vagrant/group_vars/webserver/apache.yml | 1 + .../vagrant/group_vars/webserver/drupal.yml | 17 +++++---------- playbook.yml | 1 + post-install.yml | 10 +++++++++ roles/internal/webserver-app/tasks/drupal.yml | 21 ++++++------------- 6 files changed, 24 insertions(+), 28 deletions(-) create mode 100644 post-install.yml diff --git a/inventory/vagrant/group_vars/database.yml b/inventory/vagrant/group_vars/database.yml index f12c849f..a8e80c74 100644 --- a/inventory/vagrant/group_vars/database.yml +++ b/inventory/vagrant/group_vars/database.yml @@ -2,7 +2,7 @@ mysql_root_username: root mysql_root_password: "{{ islandora_db_root_password }}" postgresql_users: - - name: root + - name: "{{ drupal_db_user }}" password: "{{ islandora_db_root_password }}" db: "{{ drupal_db_name }}" diff --git a/inventory/vagrant/group_vars/webserver/apache.yml b/inventory/vagrant/group_vars/webserver/apache.yml index 57773676..8ffe5a05 100644 --- a/inventory/vagrant/group_vars/webserver/apache.yml +++ b/inventory/vagrant/group_vars/webserver/apache.yml @@ -1,5 +1,6 @@ --- +apache_listen_ip: localhost apache_listen_port: 8000 apache_create_vhosts: true apache_vhosts_filename: "islandora.conf" diff --git a/inventory/vagrant/group_vars/webserver/drupal.yml b/inventory/vagrant/group_vars/webserver/drupal.yml index 63d7de10..fa266b31 100644 --- a/inventory/vagrant/group_vars/webserver/drupal.yml +++ b/inventory/vagrant/group_vars/webserver/drupal.yml @@ -8,14 +8,11 @@ drupal_composer_dependencies: - "drupal/devel:^1.0@beta" - "drupal/rdfui:1.x-dev" - "drupal/restui:^1.13" - - "drupal/search_api_solr:1.0.0" + - "drupal/search_api_solr:^2.0" - "drupal/facets:1.x-dev" - "islandora/carapace:dev-8.x-1.x" - - "drupal/jwt:1.0.0-alpha6" -# Comment this back in once code gets merged and is available on packagist -# - "islandora/islandora:dev-8.x-1.x" -# - "islandora/openseadragon:dev-8.x-1.x" -# - "islandora/islandora_image:dev-8.x-1.x" + - "islandora/openseadragon:dev-8.x-1.x" + - "islandora/islandora_image:dev-8.x-1.x" drupal_composer_project_package: "islandora/drupal-project:8.5" drupal_composer_project_options: "--prefer-dist --stability dev --no-interaction" drupal_core_path: "{{ drupal_composer_install_dir }}/web" @@ -37,15 +34,11 @@ drupal_enable_modules: - simpletest - restui - devel - - search_api - search_api_solr - search_api_solr_defaults - facets - - jwt -# Comment this back in once code gets merged and is available on packagist -# - islandora_feature -# - islandora_openseadragon -# - islandora_image_feature + - islandora_core_feature + - islandora_demo_feature drupal_trusted_hosts: - ^localhost$ drupal_trusted_hosts_file: "{{ drupal_core_path }}/sites/default/settings.php" diff --git a/playbook.yml b/playbook.yml index 9fbea775..0ea977a7 100644 --- a/playbook.yml +++ b/playbook.yml @@ -9,3 +9,4 @@ - include: tomcat.yml - include: crayfish.yml - include: karaf.yml +- include: post-install.yml diff --git a/post-install.yml b/post-install.yml new file mode 100644 index 00000000..820ddcae --- /dev/null +++ b/post-install.yml @@ -0,0 +1,10 @@ +--- + +- hosts: webserver + become: yes + + tasks: + - name: Run migrations + command: "{{ drush_path }} -y -l {{ apache_listen_ip }}:{{ apache_listen_port }} mim --group=islandora" + args: + chdir: "{{ drupal_core_path }}" diff --git a/roles/internal/webserver-app/tasks/drupal.yml b/roles/internal/webserver-app/tasks/drupal.yml index 31a9b830..49f32340 100644 --- a/roles/internal/webserver-app/tasks/drupal.yml +++ b/roles/internal/webserver-app/tasks/drupal.yml @@ -61,21 +61,6 @@ owner: "{{ webserver_app_user }}" group: "{{ webserver_app_user }}" -#- name: Import features -# command: "{{ drush_path }} -y fim --bundle=islandora islandora_feature,islandora_openseadragon,islandora_image_feature" -# args: - # chdir: "{{ drupal_core_path }}" - -#- name: Run tag migrations -# command: "{{ drush_path }} -y mim --group=islandora" -# args: - # chdir: "{{ drupal_core_path }}" - -#- name: Index tags -# command: "{{ drush_path }} -y php:eval 'array_walk(\\Drupal::service('entity_type.manager')->getStorage('taxonomy_term')->loadMultiple(), function($term) { $term->save(); });'" -# args: - # chdir: "{{ drupal_core_path }}" - - name: Set default solr server to point to CLAW core command: "{{ drush_path }} -y config-set search_api.server.default_solr_server backend_config.connector_config.core CLAW" args: @@ -98,3 +83,9 @@ with_items: - "{{ files_to_copy.stdout_lines }}" notify: restart solr + +- name: Import features + command: "{{ drush_path }} -y fim --bundle=islandora islandora_core_feature,islandora_demo_feature" + args: + chdir: "{{ drupal_core_path }}" + From 6fcc4c3dd12e66ccbebff01788076234ee6a2354 Mon Sep 17 00:00:00 2001 From: Daniel Lamb Date: Wed, 20 Jun 2018 15:06:14 -0300 Subject: [PATCH 3/4] Just leave it hardcoded since it runs on webserver anyway. I'm such a fool --- inventory/vagrant/group_vars/webserver/apache.yml | 1 - post-install.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/inventory/vagrant/group_vars/webserver/apache.yml b/inventory/vagrant/group_vars/webserver/apache.yml index 8ffe5a05..57773676 100644 --- a/inventory/vagrant/group_vars/webserver/apache.yml +++ b/inventory/vagrant/group_vars/webserver/apache.yml @@ -1,6 +1,5 @@ --- -apache_listen_ip: localhost apache_listen_port: 8000 apache_create_vhosts: true apache_vhosts_filename: "islandora.conf" diff --git a/post-install.yml b/post-install.yml index 820ddcae..4f47b35c 100644 --- a/post-install.yml +++ b/post-install.yml @@ -5,6 +5,6 @@ tasks: - name: Run migrations - command: "{{ drush_path }} -y -l {{ apache_listen_ip }}:{{ apache_listen_port }} mim --group=islandora" + command: "{{ drush_path }} -y -l localhost:{{ apache_listen_port }} mim --group=islandora" args: chdir: "{{ drupal_core_path }}" From fe0b52aed367656c94d8a7a03369e6e94fc95570 Mon Sep 17 00:00:00 2001 From: Daniel Lamb Date: Wed, 20 Jun 2018 15:44:43 -0300 Subject: [PATCH 4/4] Bumping internal roles --- requirements.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.yml b/requirements.yml index 45922fb4..ed85f0c0 100644 --- a/requirements.yml +++ b/requirements.yml @@ -43,7 +43,7 @@ - src: https://github.com/Islandora-Devops/ansible-role-alpaca name: Islandora-Devops.alpaca - version: 0.0.1 + version: 0.0.2 - src: https://github.com/Islandora-Devops/ansible-role-apix name: Islandora-Devops.apix @@ -59,7 +59,7 @@ - src: https://github.com/Islandora-Devops/ansible-role-crayfish name: Islandora-Devops.crayfish - version: 0.0.1 + version: 0.0.2 - src: https://github.com/Islandora-Devops/ansible-role-drupal-openseadragon name: Islandora-Devops.drupal-openseadragon