From 364faee32c75d88e61cf3e006c3c2e9c6b3fcde8 Mon Sep 17 00:00:00 2001 From: dannylamb Date: Wed, 20 Jun 2018 18:08:54 -0300 Subject: [PATCH] install for content-modeing-overhaul branches of everything (#66) * install for content-modeing-overhaul branches of everything * works, but drupal is accessed through localhost:8000/drupal/web :( * Just leave it hardcoded since it runs on webserver anyway. I'm such a fool * Bumping internal roles --- Vagrantfile | 2 +- inventory/vagrant/group_vars/database.yml | 2 +- .../vagrant/group_vars/webserver/drupal.yml | 13 +++--- playbook.yml | 1 + post-install.yml | 10 +++++ requirements.yml | 4 +- ...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 | 21 +++------- 12 files changed, 26 insertions(+), 176 deletions(-) create mode 100644 post-install.yml 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 500625a2..8034fa9a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,7 +7,7 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.require_version ">= 2.0.1", "<= 2.0.5" $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/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/drupal.yml b/inventory/vagrant/group_vars/webserver/drupal.yml index 08fcb37e..fa266b31 100644 --- a/inventory/vagrant/group_vars/webserver/drupal.yml +++ b/inventory/vagrant/group_vars/webserver/drupal.yml @@ -8,13 +8,12 @@ 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/search_api_solr:^2.0" - "drupal/facets:1.x-dev" - "islandora/carapace: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.4" +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 +33,12 @@ drupal_enable_modules: - rest - simpletest - restui - - media_entity - - media_entity_image - devel - - search_api - - islandora_image - search_api_solr - search_api_solr_defaults - facets + - 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..4f47b35c --- /dev/null +++ b/post-install.yml @@ -0,0 +1,10 @@ +--- + +- hosts: webserver + become: yes + + tasks: + - name: Run migrations + command: "{{ drush_path }} -y -l localhost:{{ apache_listen_port }} mim --group=islandora" + args: + chdir: "{{ drupal_core_path }}" 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 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..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: 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: 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: 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 }}" +