merged master

This commit is contained in:
bmeehan
2023-05-29 16:02:02 +10:00
58 changed files with 786 additions and 250 deletions

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
# - name: ubuntu_lts
# image: ubuntu:bionic
provisioner:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
# - name: ubuntu_lts
# image: ubuntu:bionic
provisioner:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
# - name: ubuntu_lts
# image: ubuntu:bionic
provisioner:

View File

@@ -0,0 +1,25 @@
---
- name: Install AWS support packages
ansible.builtin.dnf:
name:
- amazon-efs-utils
- amazon-ssm-agent
- awscli
- git
- ec2-utils
# https://github.com/amazonlinux/amazon-linux-2023/issues/164
- name: Ensure group "aoc" exists
ansible.builtin.group:
name: aoc
state: present
when: atl_aws_enable_cloudwatch is defined and atl_aws_enable_cloudwatch | bool
- name: Install CloudWatch Agent
ansible.builtin.dnf:
name:
- amazon-cloudwatch-agent
when: atl_aws_enable_cloudwatch is defined and atl_aws_enable_cloudwatch | bool
notify:
- Enable CloudWatch Agent

View File

@@ -5,8 +5,9 @@
tags:
- notest
- name: Install distro-specific prerequisites
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}.yml"
- name: Install Amazon-Linux-specific prerequisites
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
when: ansible_distribution | lower == 'amazon'
- name: Use EC2 instance ID for cluster node ID
ansible.builtin.set_fact:

View File

@@ -8,6 +8,12 @@ platforms:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -8,6 +8,12 @@ platforms:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -78,7 +78,7 @@ def test_confluence_config_file(host):
assert f.contains('<property name="confluence.cluster.aws.host.header">ec2.amazonaws.com</property>')
assert f.contains('<property name="hibernate.connection.url">jdbc:postgresql://postgres-db.ap-southeast-2.rds.amazonaws.com:5432/confluence</property>')
assert f.contains('<property name="hibernate.connection.password">molecule_password</property>')
assert f.contains('<property name="hibernate.c3p0.preferredTestQuery">select 1;</property>')
assert (f.contains('<property name="hibernate.c3p0.preferredTestQuery">select 1;</property>') or f.contains('<property name="hibernate.hikari.registerMbeans">true</property>'))
assert f.contains('<property name="confluence.webapp.context.path">/foo</property>')
assert f.contains('<property name="confluence.cluster.aws.tag.key">my-cluster-tag</property>')

View File

@@ -7,6 +7,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -0,0 +1,15 @@
---
- name: Install Google Noto fonts for language coverage
ansible.builtin.dnf:
name:
- "google-noto-*"
- name: Link the language fonts into the JDK
# Not idiomatic, but cleaner than messing with nested lookups...
ansible.builtin.shell:
cmd: "ln -sf /usr/share/fonts/google-noto*/* {{ item }}/"
creates: "{{ item }}/NotoSansJavanese-Regular.ttf"
warn: false
with_items: "{{ atl_fonts_fallback_dirs }}"
changed_when: false # For Molecule idempotence check

View File

@@ -129,5 +129,10 @@
mode: 0755
with_items: "{{ atl_fonts_fallback_dirs }}"
- name: Install & configure distro language fonts
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}_fonts.yml"
- name: Install & configure Amazon-Linux-specific language fonts
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}_fonts.yml"
when: ansible_distribution | lower == 'amazon'
- name: Install & configure Ubuntu/Debian-specific language fonts
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}_fonts.yml"
when: ansible_distribution | lower != 'amazon'

View File

@@ -18,6 +18,9 @@
<property name="hibernate.connection.url">{{ atl_jdbc_url }}</property>
<property name="hibernate.connection.username">{{ atl_jdbc_user }}</property>
<property name="hibernate.connection.password">{{ atl_jdbc_password | replace("&", "&amp;") }}</property>
{# Confluence versions 7.13 and newer #}
{% if (atl_product_version.split(".")[0] | int() == 7 and atl_product_version.split(".")[1] | int() <= 13) or atl_product_version.split(".")[0] | int() < 7 %}
<property name="hibernate.c3p0.min_size">{{ atl_db_poolminsize }}</property>
<property name="hibernate.c3p0.max_size">{{ atl_db_poolmaxsize }}</property>
<property name="hibernate.c3p0.timeout">{{ atl_db_timeout }}</property>
@@ -26,6 +29,12 @@
<property name="hibernate.c3p0.validate">{{ atl_db_validate }}</property>
<property name="hibernate.c3p0.acquire_increment">{{ atl_db_acquireincrement }}</property>
<property name="hibernate.c3p0.preferredTestQuery">{{ atl_db_preferredtestquery }}</property>
{% else %}
<property name="hibernate.hikari.idleTimeout">{{ atl_db_timeout }}</property>
<property name="hibernate.hikari.maximumPoolSize">{{ atl_db_poolmaxsize }}</property>
<property name="hibernate.hikari.minimumIdle">{{ atl_db_poolminsize }}</property>
<property name="hibernate.hikari.registerMbeans">true</property>
{% endif %}
<property name="shared-home">{{ atl_product_home_shared }}</property>
<property name="confluence.cluster">true</property>

View File

@@ -8,6 +8,12 @@ platforms:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -8,6 +8,12 @@ platforms:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -8,6 +8,12 @@ platforms:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -8,6 +8,12 @@ platforms:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -8,6 +8,12 @@ platforms:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -1,6 +1,6 @@
---
- name: Install Amazon-Linux-specific support packages
- name: Install Amazon-Linux-2-specific support packages
ansible.builtin.yum:
name:
- dejavu-sans-fonts

View File

@@ -0,0 +1,16 @@
---
- name: Install Amazon-Linux-2023-specific support packages
ansible.builtin.dnf:
name:
- dejavu-sans-fonts
- file
- git
- libxml2
- shadow-utils
- name: Uninstall curl-minimal (conflicts with curl)
ansible.builtin.dnf:
name: curl-minimal
state: absent
autoremove: no

View File

@@ -2,8 +2,13 @@
# Note: Try and limit these to packages that are distro-specific, and
# place commonly-named ones below.
- name: Install distro-specific prerequisites
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}.yml"
- name: Install Amazon-Linux-specific prerequisites
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
when: ansible_distribution | lower == 'amazon'
- name: Install Ubuntu/Debian-specific prerequisites
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}.yml"
when: ansible_distribution | lower != 'amazon'
- name: Install common support packages
ansible.builtin.package:

View File

@@ -1,6 +1,6 @@
---
- name: Install Amazon-Linux-specific NFS packages
- name: Install Amazon-Linux-2-specific NFS packages
ansible.builtin.yum:
name:
- nfs-utils

View File

@@ -0,0 +1,14 @@
---
- name: Install Amazon-Linux-2023-specific NFS packages
ansible.builtin.dnf:
name:
- nfs-utils
- name: Create nfs.service symlink to nfs-server.service
ansible.builtin.file:
src: /usr/lib/systemd/system/nfs-server.service
dest: /usr/lib/systemd/system/nfs.service
owner: root
group: root
state: link

View File

@@ -1,8 +1,12 @@
---
- name: Install distro-specific NFS packages
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}.yml"
- name: Install Amazon-Linux-specific NFS packages
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
when: ansible_distribution | lower == 'amazon'
- name: Install Ubuntu/Debian-specific NFS packages
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}.yml"
when: ansible_distribution | lower != 'amazon'
- name: Create mountpoint
ansible.builtin.file:

View File

@@ -4,6 +4,8 @@ driver:
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
- name: ubuntu_lts
image: ubuntu:bionic
provisioner:

View File

@@ -4,6 +4,8 @@ driver:
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
- name: ubuntu_lts
image: ubuntu:bionic
provisioner:

View File

@@ -1,6 +1,6 @@
---
- name: Add Adoptium repo and install Eclipse Temurin JDK if necessary on Amazon Linux
- name: Add Adoptium repo and install Eclipse Temurin JDK if necessary on Amazon Linux 2
block:
- name: Add Adoptium yum repository
@@ -31,7 +31,7 @@
tags:
- runtime_pkg
- name: Install other base packages on Amazon Linux
- name: Install other base packages on Amazon Linux 2
ansible.builtin.yum:
name:
- dejavu-fonts-common # Required by the installer

View File

@@ -0,0 +1,37 @@
---
- name: Add Adoptium repo and install Eclipse Temurin JDK if necessary on Amazon Linux 2023
block:
# There is no amazonlinux/2023 package available from the Adoptium repo; AL2023 docs point to upstream compatiblity
# with Fedora 34, 35, and 36, so we use the latest of those for the Temurin package for now
- name: Add Adoptium yum repository
ansible.builtin.yum_repository:
name: Adoptium
file: adoptium
description: Adoptium Repo
baseurl: "https://packages.adoptium.net/artifactory/rpm/fedora/36/{{ ansible_architecture }}"
gpgkey: https://packages.adoptium.net/artifactory/api/gpg/key/public
gpgcheck: yes
state: present
- name: Install Eclipse Temurin JDK
ansible.builtin.yum:
name: "temurin-{{ java_major_version }}-jdk"
state: present
- name: Ensure common JDK symlink exists
community.general.alternatives:
link: "/usr/lib/jvm/java"
name: "java_sdk"
path: "/usr/lib/jvm/temurin-{{ java_major_version }}-jdk"
priority: 99
when: atl_use_system_jdk | bool
tags:
- runtime_pkg
- name: Install other base packages on Amazon Linux 2023
ansible.builtin.dnf:
name:
- dejavu-fonts-all # Required by the installer

View File

@@ -1,4 +1,9 @@
---
- name: Perform distro-specific tasks
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}.yml"
- name: Perform Amazon-Linux-specific tasks
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
when: ansible_distribution | lower == 'amazon'
- name: Perform Ubuntu/Debian-specific tasks
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}.yml"
when: ansible_distribution | lower != 'amazon'

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -6,6 +6,10 @@ platforms:
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -8,6 +8,12 @@ platforms:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -8,6 +8,12 @@ platforms:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -8,6 +8,12 @@ platforms:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: ubuntu_lts
image: ubuntu:bionic
groups:

View File

@@ -8,6 +8,12 @@ platforms:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: ubuntu_lts
image: ubuntu:bionic
groups: