From b4f4c81bbbb5dba8f092d583159a05689474c21b Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Mon, 22 Jul 2024 17:22:02 +0200 Subject: [PATCH 1/3] Avoid configuring repository with search enterprise for community edition --- inventory_ha.yml | 3 +++ inventory_local.yml | 5 +++-- inventory_ssh.yml | 6 ++++-- roles/repository/templates/alfresco-global.properties.j2 | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/inventory_ha.yml b/inventory_ha.yml index 714e6e1dc..2527bd58a 100644 --- a/inventory_ha.yml +++ b/inventory_ha.yml @@ -1,4 +1,5 @@ --- +# Inventory file for a high-availability deployment - only Enterprise edition # Run with ansible-playbook playbooks/acs.yml -i inventory_ha.yml all: vars: @@ -31,6 +32,7 @@ all: # Solr search engine (alternative to Enterprise Search) search: hosts: + # fts.infra.local: # Enterprise Search (default search engine) search_enterprise: @@ -43,6 +45,7 @@ all: # Keycloak SSO support (optional) identity: hosts: + # keycloak.infra.local: nginx: hosts: diff --git a/inventory_local.yml b/inventory_local.yml index 1581fee41..4ddf7bb13 100644 --- a/inventory_local.yml +++ b/inventory_local.yml @@ -16,11 +16,12 @@ all: children: repository: - # Solr search engine (alternative to Enterprise Search) + # Solr search engine (alternative to Enterprise Search - only option for Community) search: children: + # repository: - # Enterprise Search (default search engine) + # Enterprise Search (default search engine - not available for Community) search_enterprise: children: repository: diff --git a/inventory_ssh.yml b/inventory_ssh.yml index 7ee400157..1d3d5d032 100644 --- a/inventory_ssh.yml +++ b/inventory_ssh.yml @@ -27,11 +27,13 @@ all: activemq_1: ansible_host: targetIP - # Solr search engine (alternative to Enterprise Search) + # Solr search engine (alternative to Enterprise Search - only option for Community) search: hosts: + # search_1: + # ansible_host: targetIP - # Enterprise Search (default search engine) + # Enterprise Search (default search engine - not available for Community) search_enterprise: hosts: search_1: diff --git a/roles/repository/templates/alfresco-global.properties.j2 b/roles/repository/templates/alfresco-global.properties.j2 index a44037de5..303cb633e 100644 --- a/roles/repository/templates/alfresco-global.properties.j2 +++ b/roles/repository/templates/alfresco-global.properties.j2 @@ -7,7 +7,7 @@ index.subsystem.name=solr6 solr.secureComms={% if acs.version is version('7.2.0', '>=') %}secret{% else %}none{% endif +%} solr.port={{ ports_cfg.search.http }} solr.host={{ solr_host }} -{% elif groups['search_enterprise'] | default([]) | length >= 1 %} +{% elif groups['search_enterprise'] | default([]) | length >= 1 and acs.edition == "Enterprise" %} index.subsystem.name=elasticsearch elasticsearch.createIndexIfNotExists=true elasticsearch.indexName=alfresco From 6e08e7e3782b10024e189ef54ca77588cf3f0484 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Tue, 23 Jul 2024 09:30:43 +0200 Subject: [PATCH 2/3] add explicit check for community edition --- playbooks/prerun-checks.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/playbooks/prerun-checks.yml b/playbooks/prerun-checks.yml index 78803f361..d0da425de 100644 --- a/playbooks/prerun-checks.yml +++ b/playbooks/prerun-checks.yml @@ -33,6 +33,17 @@ fail_msg: mTLS enabled but not yet supported for search_enterprise when: ats_mtls_required and ats_mtls_capable + - name: Assert that search-enterprise group is empty when edition is community + ansible.builtin.assert: + that: + - groups.search_enterprise | default([]) | length == 0 + fail_msg: >- + Your inventory includes one or more hosts in the search-enterprise group, + which is not a supported configuration for the community edition. + Please remove the hosts from the search-enterprise group and ensure that + the search group contains at least one host. + when: acs.edition == 'Community' + - name: Repository pre-requisites hosts: repository gather_facts: false From 22f5e451d2c4c45c78c4d8000fae09ec1550f7b4 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo <71768+gionn@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:40:21 +0200 Subject: [PATCH 3/3] rephrase comments in inventories [skip ci] --- inventory_local.yml | 4 ++-- inventory_ssh.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inventory_local.yml b/inventory_local.yml index 4ddf7bb13..e23e4cb28 100644 --- a/inventory_local.yml +++ b/inventory_local.yml @@ -16,12 +16,12 @@ all: children: repository: - # Solr search engine (alternative to Enterprise Search - only option for Community) + # Solr search engine (an alternative to Enterprise Search, and the only available option for the Community edition) search: children: # repository: - # Enterprise Search (default search engine - not available for Community) + # Enterprise Search (default search engine - not available in Community edition) search_enterprise: children: repository: diff --git a/inventory_ssh.yml b/inventory_ssh.yml index 1d3d5d032..6e5c754a1 100644 --- a/inventory_ssh.yml +++ b/inventory_ssh.yml @@ -27,13 +27,13 @@ all: activemq_1: ansible_host: targetIP - # Solr search engine (alternative to Enterprise Search - only option for Community) + # Solr search engine (an alternative to Enterprise Search, and the only available option for the Community edition) search: hosts: # search_1: # ansible_host: targetIP - # Enterprise Search (default search engine - not available for Community) + # Enterprise Search (default search engine - not available in Community edition) search_enterprise: hosts: search_1: