Skip to content
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

OPSEXP-2747 Avoid configuring repository with search enterprise for community #908

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions inventory_ha.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -31,6 +32,7 @@ all:
# Solr search engine (alternative to Enterprise Search)
search:
hosts:
# fts.infra.local:

# Enterprise Search (default search engine)
search_enterprise:
Expand All @@ -43,6 +45,7 @@ all:
# Keycloak SSO support (optional)
identity:
hosts:
# keycloak.infra.local:

nginx:
hosts:
Expand Down
5 changes: 3 additions & 2 deletions inventory_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ all:
children:
repository:

# Solr search engine (alternative to Enterprise Search)
# 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)
# Enterprise Search (default search engine - not available in Community edition)
search_enterprise:
children:
repository:
Expand Down
6 changes: 4 additions & 2 deletions inventory_ssh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ all:
activemq_1:
ansible_host: targetIP

# Solr search engine (alternative to Enterprise Search)
# 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)
# Enterprise Search (default search engine - not available in Community edition)
search_enterprise:
hosts:
search_1:
Expand Down
11 changes: 11 additions & 0 deletions playbooks/prerun-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion roles/repository/templates/alfresco-global.properties.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down