ITPLT-3650 drop support for Amazon Linux 2

This commit is contained in:
Lee Goolsbee
2024-04-26 13:42:17 -05:00
parent ecb262a15f
commit 677f2a85ca
46 changed files with 44 additions and 300 deletions

View File

@@ -1,9 +1,7 @@
## Prerequisites
You should have the following software installed:
* Python; 3.8 or newer
* You may also need the Python development packages depending on how its installed
* Note that the runtime still requires Python 2 for certain tasks on Amazon Linux 2, but is not necessary for local development
* Python; 3.10 or newer (you may also need the Python development packages depending on how its installed)
* Python Virtualenv
* Docker
* Cloudtoken
@@ -19,24 +17,22 @@ All other requirements will be installed under Virtualenv.
### Step 1.2: Install development environment dependencies
To ensure compatibility we specify a specific Ansible version; currently
ansible-core 2.13.x. We do this with [Pipenv](https://docs.pipenv.org/) to lock
ansible-core 2.16.x. We do this with [Pipenv](https://docs.pipenv.org/) to lock
the dependency tree. There are 2 main ways to do this; either directly if
packaged, or via pip...
# Ubuntu 22.04+, Debian 11+
sudo apt-get install python3-dev python3-pip
# Ubuntu 22.04+, Debian 12+
sudo apt-get install python3-dev python3-pip pipenv
# Amazon Linux 2
sudo amazon-linux-extras enable python3.8
sudo yum install python38 python38-pip python38-devel python-lxml
# Amazon Linux 2023
sudo dnf install python3.11 python3.11-pip python3.11-devel
pip3.11 install pipenv
# Mac via Homebrew
brew install libpq openssl@3 python@X.x # (where "X.x") is 3.8 or newer
brew install libpq openssl@3 python@X.x # (where "X.x") is 3.1 or newer
export PATH="/opt/homebrew/opt/libpq/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
# Finally
pip3 install pipenv
### Step 1.3: Enter the development environment
@@ -62,7 +58,7 @@ when collections are installed via `ansible-galaxy`:
[Molecule](https://molecule.readthedocs.io/en/stable/) is a testing framework for
Ansible. We use this to test the functionality of individual and groups of roles,
and to ensure cross-platform compatibility (currently Amazon Linux 2 and Ubuntu LTS).
and to ensure cross-platform compatibility (currently Amazon Linux 2023 and Ubuntu LTS).
Were going to check that the role that downloads the products works for both
Jira Core and Confluence, on boths supported Linux distributions. So run the

View File

@@ -61,6 +61,20 @@ them in the `Custom command-line parameters for Ansible` field:
-e atl_product_download_url=http://s3.amazon.com/atlassian/jira-9.0.0-PRE-TEST.tar.gz -e atl_use_system_jdk=true -e atl_download_format=tarball
## Supported operating systems and environments
The roles in this repository currently target:
* Ansible-core 2.16
* Python >= 3.10 (as required by ansible-core 2.16)
* Amazon Linux 2023 and Debian 12+ (including derivatives, i.e., Ubuntu 22.04+) where the system-installable Python meets the above requirement
To use a previous version of this repository and the roles/playbooks within, your application nodes must clone/checkout
a previous commit that supports the desired OS and/or Ansible version. For instance, to continue using Ansible 2.13 on
Amazon Linux 2, use branch "ansible-core-2.13" and/or commit ID `e5af2cf649f72bb5c9d50d0057ddae4a5c99b6f9`. If using one
of the previously-provided AWS CloudFormation templates, you must set set the **Deployment Automation Branch** parameter
to "ansible-core-2.13" and/or manually set the stack's "pinned-ansible-sha" SSM Parameter to the referenced commit ID.
### Other customizable parameters
For more deployment customization options, consult the following files for parameters you can

View File

@@ -2,38 +2,31 @@
set -e
PIP_BIN="pip3"
PIPENV_PYTHON="3"
source /etc/os-release
if [[ $ID = "amzn" ]] && [[ $VERSION = "2" ]]; then
amazon-linux-extras enable python3.8
yum clean metadata
yum install -y \
python2-pip \
python38 \
python38-pip \
python38-devel
echo "Amazon Linux 2 is no longer supported; see README.md for supported operating systems/environments."
exit 1
elif [[ $ID = "amzn" ]] && [[ $VERSION = "2023" ]]; then
dnf install -y \
python3.11 \
python3.11-pip \
python3.11-devel
PIP_BIN="pip3.11"
echo "Installing pipenv..."
pip3.11 install pipenv
PIPENV_PYTHON="3.11"
else
# FIXME: Currently assumes Debian-based
apt-get update && \
apt-get install -y \
python3-dev \
python3-pip
python3-pip \
pipenv
fi
export PATH=/usr/local/bin:$PATH
export PIP_DEFAULT_TIMEOUT=60
echo "Installing pipenv..."
$PIP_BIN install pipenv
echo "Installing ansible and dependencies..."
PIPENV_NOSPIN=1 PIPENV_HIDE_EMOJIS=1 pipenv --python $PIPENV_PYTHON sync 2>&1 | iconv -c -f utf-8 -t ascii

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -1,22 +1,5 @@
---
- name: Install AWS support packages
ansible.builtin.yum:
name:
- amazon-efs-utils
- amazon-ssm-agent
- awscli
- git
- ec2-utils
vars:
ansible_python_interpreter: /usr/bin/python2
- name: Install CloudWatch Agent
ansible.builtin.yum:
name:
- "{{ aws_cloudwatch_agent_rpm }}"
when: atl_aws_enable_cloudwatch is defined and atl_aws_enable_cloudwatch | bool
notify:
- Enable CloudWatch Agent
vars:
ansible_python_interpreter: /usr/bin/python2
- name: Amazon Linux 2 no longer supported
fail:
msg: "Amazon Linux 2 is no longer supported; see README.md for supported operating systems/environments."

View File

@@ -2,12 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,12 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -3,10 +3,6 @@ driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -1,17 +1,5 @@
---
- name: Install Google Noto fonts for language coverage
ansible.builtin.yum:
name:
- "google-noto-*"
vars:
ansible_python_interpreter: /usr/bin/python2
- 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
- name: Amazon Linux 2 no longer supported
fail:
msg: "Amazon Linux 2 is no longer supported; see README.md for supported operating systems/environments."

View File

@@ -2,12 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,12 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,12 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,12 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,12 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -1,22 +1,5 @@
---
- name: Install Amazon-Linux-2-specific support packages
ansible.builtin.yum:
name:
- dejavu-sans-fonts
- file
- git-{{ git_version }}
- libxml2
- shadow-utils
vars:
ansible_python_interpreter: /usr/bin/python2
- name: Limit the SSH ciphers
ansible.builtin.lineinfile:
path: "/etc/ssh/sshd_config"
# Drop insecure ciphers, currently 3des-cbc only. You can get the
# full list with `sshd -T | grep -i ciphers`
regexp: '^[Cc]iphers'
line: "Ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,cast128-cbc"
insertbefore: "BOF"
ignore_errors: yes # No sshd == no problem
- name: Amazon Linux 2 no longer supported
fail:
msg: "Amazon Linux 2 is no longer supported; see README.md for supported operating systems/environments."

View File

@@ -1,8 +1,5 @@
---
- name: Install Amazon-Linux-2-specific NFS packages
ansible.builtin.yum:
name:
- nfs-utils
vars:
ansible_python_interpreter: /usr/bin/python2
- name: Amazon Linux 2 no longer supported
fail:
msg: "Amazon Linux 2 is no longer supported; see README.md for supported operating systems/environments."

View File

@@ -2,8 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
- name: ubuntu_lts

View File

@@ -2,8 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
- name: ubuntu_lts

View File

@@ -1,45 +1,5 @@
---
- name: Add Adoptium repo and install Eclipse Temurin JDK if necessary on Amazon Linux 2
block:
- name: Add Adoptium yum repository
ansible.builtin.yum_repository:
name: Adoptium
file: adoptium
description: Adoptium Repo
baseurl:
- "https://packages.adoptium.net/artifactory/rpm/amazonlinux/{{ ansible_distribution_version }}/{{ ansible_architecture }}"
- "{{ atl_adoptium_alternate_url is defined | ternary(atl_adoptium_alternate_url, '') }}"
gpgkey:
- https://packages.adoptium.net/artifactory/api/gpg/key/public
- "{{ atl_adoptium_gpgkey_alternate_url is defined | ternary(atl_adoptium_gpgkey_alternate_url, '') }}"
gpgcheck: yes
state: present
tags:
- molecule-idempotence-notest
- name: Install Eclipse Temurin JDK
ansible.builtin.yum:
name: "temurin-{{ java_major_version }}-jdk"
state: present
vars:
ansible_python_interpreter: /usr/bin/python2
- 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 2
ansible.builtin.yum:
name:
- dejavu-fonts-common # Required by the installer
vars:
ansible_python_interpreter: /usr/bin/python2
- name: Amazon Linux 2 no longer supported
fail:
msg: "Amazon Linux 2 is no longer supported; see README.md for supported operating systems/environments."

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,10 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,12 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,12 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,12 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups:

View File

@@ -2,12 +2,6 @@
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
ulimits:
- nofile:262144:262144
- name: amazon_linux2023
image: amazonlinux:2023
groups: