Skip to content
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
dc2b182
wip
pmacius Feb 24, 2025
01af63a
wip2
pmacius Feb 24, 2025
13e32c5
wip
pmacius Feb 24, 2025
36d25d3
acs_components fix and add enabled switch
pmacius Feb 25, 2025
f9b2149
fix var names
pmacius Feb 25, 2025
08d77a5
fix vars
pmacius Feb 25, 2025
487236e
another fix
pmacius Feb 25, 2025
50f5153
fix nexus envs and checking on async task which was checking for skip…
pmacius Feb 25, 2025
53610b1
epostiory of course
pmacius Feb 25, 2025
baba226
components using defaults
pmacius Feb 25, 2025
c6d27a3
components without repo as its only chekcing for version anyway
pmacius Feb 25, 2025
4a3fd79
remove debug; simpler set_fact doesnt work
pmacius Feb 25, 2025
8abafbe
leftover
pmacius Feb 25, 2025
c7fef2c
:)
pmacius Feb 25, 2025
9710dad
omit when no version provided
pmacius Feb 25, 2025
51e8dab
review
pmacius Feb 26, 2025
a18a652
fix conditions and acs_components
pmacius Feb 26, 2025
5213bdc
fix pre upgrade
pmacius Feb 26, 2025
9933873
just move to vars
pmacius Feb 26, 2025
f6e2ed5
remove _alfresco_
pmacius Feb 26, 2025
c1d8266
get rid of separate vars for community/enterprise
pmacius Feb 26, 2025
b5b45f4
remove default(omit); still have to think what to do with sync on com…
pmacius Feb 26, 2025
b27b254
use task instead of calculating everting inside the var
pmacius Feb 26, 2025
51db821
yeeet
pmacius Feb 26, 2025
1cbcb56
fix
pmacius Feb 26, 2025
8e61ce9
remove repostiory for amps inside pre run upgrade - we are only compa…
pmacius Feb 26, 2025
0d190a6
sync amp must be installed on converge sync role; not sure if hardocd…
pmacius Feb 26, 2025
48c8e40
remove not needed enabled statements
pmacius Feb 26, 2025
79e68f0
move communit amp var into version specific files
pmacius Feb 26, 2025
8e1b427
use acs.edition for now instead of adding another var
pmacius Feb 26, 2025
b3b10c6
Apply suggestions from code review [skip ci]
pmacius Feb 27, 2025
211dbe5
Update playbooks/acs.yml [skip ci]
pmacius Feb 28, 2025
d606086
comment
pmacius Feb 28, 2025
8d27623
review
pmacius Feb 28, 2025
45db794
fix syncservice condition
pmacius Feb 28, 2025
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
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"filename": "playbooks/acs.yml",
"hashed_secret": "0ca8f28152882e5edb182fc3f7d4ae10a5b10dc5",
"is_verified": false,
"line_number": 519
"line_number": 581
}
],
"roles/activemq/molecule/default/tests/test_activemq.py": [
Expand Down Expand Up @@ -198,5 +198,5 @@
}
]
},
"generated_at": "2025-02-24T11:56:45Z"
"generated_at": "2025-02-26T15:54:11Z"
}
13 changes: 0 additions & 13 deletions 7.3.N-extra-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,5 @@ acs:
edition: Enterprise
repository: "{{ nexus_repository.enterprise_releases }}"
version: 7.3.2.3
amps:
aos_module:
repository: "{{ nexus_repository.releases }}/aos-module/alfresco-aos-module"
version: 1.5.0
device_sync:
repository: "{{ nexus_repository.enterprise_releases }}/services/sync/alfresco-device-sync-repo"
version: 3.11.3
googledrive_repo:
repository: "{{ nexus_repository.enterprise_releases }}/integrations/alfresco-googledrive-repo-enterprise"
version: 3.4.2
googledrive_share:
repository: "{{ nexus_repository.releases }}/integrations/alfresco-googledrive-share"
version: 3.4.2
dependencies_version:
postgres_major_version: 14
16 changes: 0 additions & 16 deletions 7.4.N-extra-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,5 @@ acs:
edition: Enterprise
repository: "{{ nexus_repository.enterprise_releases }}"
version: 7.4.2.4
amps:
aos_module:
repository: "{{ nexus_repository.releases }}/aos-module/alfresco-aos-module"
version: 1.6.3
device_sync:
repository: >-
{{ nexus_repository.enterprise_releases }}/services/sync/alfresco-device-sync-repo
version: 3.11.3
googledrive_repo:
repository: >-
{{ nexus_repository.enterprise_releases }}/integrations/alfresco-googledrive-repo-enterprise
version: 3.4.2
googledrive_share:
repository: >-
{{ nexus_repository.releases }}/integrations/alfresco-googledrive-share
version: 3.4.2
dependencies_version:
postgres_major_version: 14
29 changes: 5 additions & 24 deletions community-extra-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,8 @@ acs:
repository: "{{ nexus_repository.releases }}"
version: 23.4.1
edition: Community
transform:
artifact_name: alfresco-transform-core-aio
repository: "{{ nexus_repository.releases }}"
version: 5.1.6
amps:
aos_module:
repository: "{{ nexus_repository.releases }}/aos-module/alfresco-aos-module"
version: 3.2.0
googledrive_repo:
repository: "{{ nexus_repository.releases }}/integrations/alfresco-googledrive-repo-community"
version: 4.1.0
googledrive_share:
repository: "{{ nexus_repository.releases }}/integrations/alfresco-googledrive-share"
version: 4.1.0
amp_downloads:
- url: "{{ amps.aos_module.repository }}/{{ amps.aos_module.version }}/alfresco-aos-module-{{ amps.aos_module.version }}.amp"
sha1_checksum_url: "{{ amps.aos_module.repository }}/{{ amps.aos_module.version }}/alfresco-aos-module-{{ amps.aos_module.version }}.amp.sha1"
dest: "{{ content_folder }}/amps_repo/alfresco-aos-module.amp"
- url: "{{ amps.googledrive_repo.repository }}/{{ amps.googledrive_repo.version }}/alfresco-googledrive-repo-community-{{ amps.googledrive_repo.version }}.amp"
sha1_checksum_url: "{{ amps.googledrive_repo.repository }}/{{ amps.googledrive_repo.version }}/alfresco-googledrive-repo-community-{{ amps.googledrive_repo.version }}.amp.sha1"
dest: "{{ content_folder }}/amps_repo/alfresco-googledrive-repo-enterprise.amp"
- url: "{{ amps.googledrive_share.repository }}/{{ amps.googledrive_share.version }}/alfresco-googledrive-share-{{ amps.googledrive_share.version }}.amp"
sha1_checksum_url: "{{ amps.googledrive_share.repository }}/{{ amps.googledrive_share.version }}/alfresco-googledrive-share-{{ amps.googledrive_share.version }}.amp.sha1"
dest: "{{ content_folder }}/amps_share/alfresco-googledrive-share.amp"

acs_play_repository_amp_community_enabled: true
acs_play_repository_amp_googledrive_repo_version: 4.1.0
acs_play_repository_amp_googledrive_repo_artifact_name: alfresco-googledrive-repo-community
acs_play_repository_amp_googledrive_repo_repository: "{{ nexus_repository.releases }}/integrations"
38 changes: 0 additions & 38 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,49 +27,11 @@ acs:
edition: Enterprise
repository: "{{ nexus_repository.enterprise_releases }}"
version: 23.4.1
amps:
aos_module:
repository: "{{ nexus_repository.releases }}/aos-module/alfresco-aos-module"
version: 3.2.0
device_sync:
repository: >-
{{ nexus_repository.enterprise_releases }}/services/sync/alfresco-device-sync-repo
version: 5.1.0
googledrive_repo:
repository: >-
{{ nexus_repository.enterprise_releases }}/integrations/alfresco-googledrive-repo-enterprise
version: 4.1.0
googledrive_share:
repository: >-
{{ nexus_repository.releases }}/integrations/alfresco-googledrive-share
version: 4.1.0
downloads:
acs_zip_url: >-
{{ acs.repository }}/{{ acs.artifact_name }}/{{ acs.version }}/{{ acs.artifact_name }}-{{ acs.version }}.zip
acs_zip_sha1_checksum_url: >-
{{ acs.repository }}/{{ acs.artifact_name }}/{{ acs.version }}/{{ acs.artifact_name }}-{{ acs.version }}.zip.sha1
amp_downloads:
- url: >-
{{ amps.googledrive_repo.repository }}/{{ amps.googledrive_repo.version }}/alfresco-googledrive-repo-enterprise-{{ amps.googledrive_repo.version }}.amp
sha1_checksum_url: >-
{{ amps.googledrive_repo.repository }}/{{ amps.googledrive_repo.version }}/alfresco-googledrive-repo-enterprise-{{ amps.googledrive_repo.version }}.amp.sha1
dest: >-
{{ content_folder }}/amps_repo/alfresco-googledrive-repo-enterprise.amp
- url: >-
{{ amps.googledrive_share.repository }}/{{ amps.googledrive_share.version }}/alfresco-googledrive-share-{{ amps.googledrive_share.version }}.amp
sha1_checksum_url: >-
{{ amps.googledrive_share.repository }}/{{ amps.googledrive_share.version }}/alfresco-googledrive-share-{{ amps.googledrive_share.version }}.amp.sha1
dest: "{{ content_folder }}/amps_share/alfresco-googledrive-share.amp"
- url: >-
{{ amps.device_sync.repository }}/{{ amps.device_sync.version }}/alfresco-device-sync-repo-{{ amps.device_sync.version }}.amp
sha1_checksum_url: >-
{{ amps.device_sync.repository }}/{{ amps.device_sync.version }}/alfresco-device-sync-repo-{{ amps.device_sync.version }}.amp.sha1
dest: "{{ content_folder }}/amps_repo/alfresco-device-sync-repo.amp"
- url: >-
{{ amps.aos_module.repository }}/{{ amps.aos_module.version }}/alfresco-aos-module-{{ amps.aos_module.version }}.amp
sha1_checksum_url: >-
{{ amps.aos_module.repository }}/{{ amps.aos_module.version }}/alfresco-aos-module-{{ amps.aos_module.version }}.amp.sha1
dest: "{{ content_folder }}/amps_repo/alfresco-aos-module.amp"
# A default keystore is stored in /var/opt/alfresco/content-services/keystore,
# to replace this with a custom keystore place the keystore file in the "configuration_files/keystores" folder
# and change this flag to true. See the deployment guide for more details.
Expand Down
66 changes: 64 additions & 2 deletions playbooks/acs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,33 @@
when:
- ats_mtls_required
- ats_mtls_capable
- name: Create a list of amps
ansible.builtin.set_fact:
acs_play_repository_amp_downloads:
- url: "{{ acs_play_repository_amp_googledrive_repo_archive_url }}"
checksum: "sha1:{{ acs_play_repository_amp_googledrive_repo_archive_url }}.sha1"
dest: "{{ content_folder }}/amps_repo/{{ acs_play_repository_amp_googledrive_repo_artifact_name }}.amp"
url_username: "{{ nexus_user }}"
url_password: "{{ nexus_password }}"
enabled: true
- url: "{{ acs_play_repository_amp_googledrive_share_archive_url }}"
checksum: "sha1:{{ acs_play_repository_amp_googledrive_share_archive_url }}.sha1"
dest: "{{ content_folder }}/amps_share/{{ acs_play_repository_amp_googledrive_share_artifact_name }}.amp"
url_username: "{{ nexus_user }}"
url_password: "{{ nexus_password }}"
enabled: true
- url: "{{ acs_play_repository_amp_device_sync_archive_url }}"
checksum: "sha1:{{ acs_play_repository_amp_device_sync_archive_url }}.sha1"
dest: "{{ content_folder }}/amps_repo/{{ acs_play_repository_amp_device_sync_artifact_name }}.amp"
url_username: "{{ nexus_user }}"
url_password: "{{ nexus_password }}"
enabled: "{{ not acs_play_repository_amp_community_enabled }}"
- url: "{{ acs_play_repository_amp_aos_module_archive_url }}"
checksum: "sha1:{{ acs_play_repository_amp_aos_module_archive_url }}.sha1"
dest: "{{ content_folder }}/amps_repo/{{ acs_play_repository_amp_aos_module_artifact_name }}.amp"
url_username: "{{ nexus_user }}"
url_password: "{{ nexus_password }}"
enabled: true
tasks:
- name: Repository Role import
ansible.builtin.import_role:
Expand All @@ -291,17 +318,52 @@
raw_properties: "{{ properties_snippets }}"
repository_identity_url: "{{ identity_url | default('') }}"
tomcat_version: "{{ acs_play_tomcat_version }}"
repository_nexus_username: "{{ nexus_user }}"
repository_nexus_password: "{{ nexus_password }}"
repository_jdbc_driver_version: "{{ acs_play_repository_jdbc_driver_version }}"
repository_jdbc_driver_url: "{{ acs_play_repository_jdbc_driver_url }}"
repository_jdbc_driver_checksum: "{{ acs_play_repository_jdbc_driver_checksum }}"
repository_api_explorer_enabled: "{{ acs_play_repository_api_explorer_enabled }}"
repository_api_explorer_version: "{{ acs_play_repository_api_explorer_version }}"
repository_api_explorer_archive_url: "{{ acs_play_repository_api_explorer_archive_url }}"
repository_api_explorer_archive_checksum_url: "{{ acs_play_repository_api_explorer_archive_checksum_url }}"
repository_api_explorer_nexus_username: "{{ nexus_user }}"
repository_api_explorer_nexus_password: "{{ nexus_password }}"
repository_amp_downloads: "{{ acs_play_repository_amp_downloads }}"
repository_extra_war_downloads: "{{ acs_play_repository_extra_war_downloads }}"
repository_extra_amp_downloads: "{{ acs_play_repository_extra_amp_downloads }}"
post_tasks:
- name: Initialize amps
ansible.builtin.set_fact:
amps: {}

- name: Add common amps
ansible.builtin.set_fact:
amps: >-
{{ amps | combine({
'aos_module': {
'repository': acs_play_repository_amp_aos_module_repository,
'version': acs_play_repository_amp_aos_module_version
},
'googledrive_repo': {
'repository': acs_play_repository_amp_googledrive_repo_repository,
'version': acs_play_repository_amp_googledrive_repo_version
},
'googledrive_share': {
'repository': acs_play_repository_amp_googledrive_share_repository,
'version': acs_play_repository_amp_googledrive_share_version
}
}) }}
- name: Add device sync amp
ansible.builtin.set_fact:
amps: >-
{{ amps | combine({
'device_sync': {
'repository': acs_play_repository_amp_device_sync_repository,
'version': acs_play_repository_amp_device_sync_version
}
}) }}
when: not acs_play_repository_amp_community_enabled

- name: Update installation status file with ACS
become: true
vars:
Expand Down
26 changes: 26 additions & 0 deletions playbooks/group_vars/repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,29 @@ acs_play_repository_extra_war_downloads: []
# dest: "{{ content_folder }}/web-server/webapps/your-war.war"
# url_username: your_username_to_repo
# url_password: your_password_to_repo

acs_play_repository_amp_community_enabled: false

acs_play_repository_amp_googledrive_repo_artifact_name: alfresco-googledrive-repo-enterprise
acs_play_repository_amp_googledrive_repo_repository: "{{ nexus_repository.enterprise_releases }}/integrations"
acs_play_repository_amp_googledrive_repo_archive_url: "{{ acs_play_repository_amp_googledrive_repo_repository }}/{{ acs_play_repository_amp_googledrive_repo_artifact_name }}/{{ acs_play_repository_amp_googledrive_repo_version }}/{{ acs_play_repository_amp_googledrive_repo_artifact_name }}-{{ acs_play_repository_amp_googledrive_repo_version }}.amp"

acs_play_repository_amp_googledrive_share_artifact_name: alfresco-googledrive-share
acs_play_repository_amp_googledrive_share_repository: "{{ nexus_repository.releases }}/integrations"
acs_play_repository_amp_googledrive_share_archive_url: "{{ acs_play_repository_amp_googledrive_share_repository }}/{{ acs_play_repository_amp_googledrive_share_artifact_name }}/{{ acs_play_repository_amp_googledrive_share_version }}/{{ acs_play_repository_amp_googledrive_share_artifact_name }}-{{ acs_play_repository_amp_googledrive_share_version }}.amp"

acs_play_repository_amp_device_sync_artifact_name: alfresco-device-sync-repo
acs_play_repository_amp_device_sync_repository: "{{ nexus_repository.enterprise_releases }}/services/sync"
acs_play_repository_amp_device_sync_archive_url: "{{ acs_play_repository_amp_device_sync_repository }}/{{ acs_play_repository_amp_device_sync_artifact_name }}/{{ acs_play_repository_amp_device_sync_version }}/{{ acs_play_repository_amp_device_sync_artifact_name }}-{{ acs_play_repository_amp_device_sync_version }}.amp"

acs_play_repository_amp_aos_module_artifact_name: alfresco-aos-module
acs_play_repository_amp_aos_module_repository: "{{ nexus_repository.releases }}/aos-module"
acs_play_repository_amp_aos_module_archive_url: "{{ acs_play_repository_amp_aos_module_repository }}/{{ acs_play_repository_amp_aos_module_artifact_name }}/{{ acs_play_repository_amp_aos_module_version }}/{{ acs_play_repository_amp_aos_module_artifact_name }}-{{ acs_play_repository_amp_aos_module_version }}.amp"

# additional list of amp downloads
acs_play_repository_extra_amp_downloads: []
# - url: "https://your.repo.com/path/to/your/artifacts/your-amp.amp"
# checksum: "sha1:https://your.repo.com/path/to/your/artifacts/your-amp.amp.sha1"
# dest: "{{ content_folder }}/<amps_repo|amps_share>/your-amp.amp"
# url_username: your_username_to_repo
# url_password: your_password_to_repo
33 changes: 33 additions & 0 deletions playbooks/prerun-upgrade-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,39 @@
acs.version is version(installed_components.acs.version, 'lt') or
acs_play_repository_api_explorer_version != installed_components.api_explorer.version

- name: Initialize amps
ansible.builtin.set_fact:
amps: {}

- name: Add common amps
ansible.builtin.set_fact:
amps: >-
{{ amps | combine({
'aos_module': {
'repository': acs_play_repository_amp_aos_module_repository,
'version': acs_play_repository_amp_aos_module_version
},
'googledrive_repo': {
'repository': acs_play_repository_amp_googledrive_repo_repository,
'version': acs_play_repository_amp_googledrive_repo_version
},
'googledrive_share': {
'repository': acs_play_repository_amp_googledrive_share_repository,
'version': acs_play_repository_amp_googledrive_share_version
}
}) }}

- name: Add device sync amp
ansible.builtin.set_fact:
amps: >-
{{ amps | combine({
'device_sync': {
'repository': acs_play_repository_amp_device_sync_repository,
'version': acs_play_repository_amp_device_sync_version
}
}) }}
when: not acs_play_repository_amp_community_enabled

- name: Fail on unsupported AMPS upgrades
ansible.builtin.fail:
when: |
Expand Down
13 changes: 11 additions & 2 deletions roles/repository/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ acs_environment:
JAVA_TOOL_OPTIONS:
- $JAVA_TOOL_OPTIONS

repository_nexus_username: null
repository_nexus_password: null

# war downloads
repository_api_explorer_enabled: true
repository_api_explorer_artifact_name: api-explorer
Expand All @@ -20,8 +23,8 @@ repository_api_explorer_repository: https://artifacts.alfresco.com/nexus/content
repository_api_explorer_version: 23.4.0
repository_api_explorer_archive_url: "{{ repository_api_explorer_repository }}/{{ repository_api_explorer_artifact_name }}/{{ repository_api_explorer_version }}/{{ repository_api_explorer_artifact_name }}-{{ repository_api_explorer_version }}.war"
repository_api_explorer_archive_checksum_url: "sha1:{{ repository_api_explorer_archive_url }}.sha1"
repository_api_explorer_nexus_username: null
repository_api_explorer_nexus_password: null
repository_api_explorer_nexus_username: "{{ repository_nexus_username }}"
repository_api_explorer_nexus_password: "{{ repository_nexus_password }}"

repository_extra_war_downloads: []

Expand Down Expand Up @@ -107,3 +110,9 @@ repository_jdbc_driver_base_url: https://repo.maven.apache.org/maven2/org/postgr
repository_jdbc_driver_url: >-
{{ '{0}/{1}/postgresql-{1}.jar'.format(repository_jdbc_driver_base_url, repository_jdbc_driver_version) }}
repository_jdbc_driver_checksum: "sha1:{{ repository_jdbc_driver_url }}.sha1"

# Default repository amps to install
repository_amp_downloads: []

# additional list of amp downloads
repository_extra_amp_downloads: []
21 changes: 21 additions & 0 deletions roles/repository/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,24 @@ argument_specs:
default: true
description: |
Whether to deploy the API Explorer or not
repository_nexus_username:
type: str
required: false
description: |
Default username to when downloading artifacts from nexus
repository_nexus_password:
type: str
required: false
no_log: true
description: |
Default password to when downloading artifacts from nexus
repository_amp_downloads:
type: list
required: false
description: |
A list containing the URL and checksum of AMP files to download
repository_extra_amp_downloads:
type: list
required: false
description: |
A list containing the URL and checksum of additional AMP files to download
4 changes: 2 additions & 2 deletions roles/repository/molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
repository_properties: "{{ global_properties }}"
raw_properties:
- ../../configuration_files/alfresco-global.properties
repository_api_explorer_nexus_username: "{{ lookup('env', 'NEXUS_USERNAME') }}"
repository_api_explorer_nexus_password: "{{ lookup('env', 'NEXUS_USERNAME') }}"
repository_nexus_username: "{{ lookup('env', 'NEXUS_USERNAME') }}"
repository_nexus_password: "{{ lookup('env', 'NEXUS_PASSWORD') }}"
10 changes: 6 additions & 4 deletions roles/repository/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,19 @@

- name: Download AMPS
become: true
loop: "{{ amp_downloads }}"
loop: "{{ repository_amp_downloads + repository_extra_amp_downloads }}"
ansible.builtin.get_url:
url: "{{ item.url }}"
checksum: sha1:{{ lookup('url', item.sha1_checksum_url, username=nexus_user, password=nexus_password) }}
checksum: "{{ item.checksum }}"
dest: "{{ item.dest }}"
owner: "{{ username }}"
group: "{{ group_name }}"
mode: 'u=rw,g=r,o=r'
url_username: "{{ nexus_user }}"
url_password: "{{ nexus_password }}"
url_username: "{{ item.url_username }}"
url_password: "{{ item.url_password }}"
register: amp_download_result
async: 900
when: item.enabled | default(True) # when adding additional amp no need to specify enabled
poll: 0
tags:
- molecule-idempotence-notest
Expand Down Expand Up @@ -428,6 +429,7 @@
delay: 1
retries: 300
loop: "{{ amp_download_result.results }}"
when: item.item.enabled | default(True)
tags:
- molecule-idempotence-notest

Expand Down
Loading
Loading