mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-16 09:53:06 -06:00
first pass at basic AL2022 support
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
set -e
|
||||
|
||||
source /etc/os-release
|
||||
if [[ $ID = "amzn" ]]; then
|
||||
if [[ $ID = "amzn" ]] && [[ $VERSION = "2" ]]; then
|
||||
amazon-linux-extras enable python3.8
|
||||
yum clean metadata
|
||||
yum install -y \
|
||||
@@ -11,6 +11,11 @@ if [[ $ID = "amzn" ]]; then
|
||||
python38 \
|
||||
python38-pip \
|
||||
python38-devel
|
||||
elif [[ $ID = "amzn" ]] && [[ $VERSION = "2022" ]]; then
|
||||
dnf install -y \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-devel
|
||||
else
|
||||
# FIXME: Currently assumes Debian-based
|
||||
apt-get update && \
|
||||
|
||||
18
roles/aws_common/tasks/amazon-2022.yml
Normal file
18
roles/aws_common/tasks/amazon-2022.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
|
||||
- name: Install AWS support packages
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- amazon-efs-utils
|
||||
- amazon-ssm-agent
|
||||
- awscli
|
||||
- git
|
||||
- ec2-utils
|
||||
|
||||
- name: Install CloudWatch Agent
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- "{{ aws_cloudwatch_agent_rpm }}"
|
||||
when: atl_aws_enable_cloudwatch is defined and atl_aws_enable_cloudwatch | bool
|
||||
notify:
|
||||
- Enable CloudWatch Agent
|
||||
@@ -6,7 +6,7 @@
|
||||
- notest
|
||||
|
||||
- name: Install distro-specific prerequisites
|
||||
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}.yml"
|
||||
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
|
||||
|
||||
- name: Use EC2 instance ID for cluster node ID
|
||||
ansible.builtin.set_fact:
|
||||
|
||||
15
roles/confluence_config/tasks/amazon-2022_fonts.yml
Normal file
15
roles/confluence_config/tasks/amazon-2022_fonts.yml
Normal 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
|
||||
@@ -130,4 +130,4 @@
|
||||
with_items: "{{ atl_fonts_fallback_dirs }}"
|
||||
|
||||
- name: Install & configure distro language fonts
|
||||
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}_fonts.yml"
|
||||
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}_fonts.yml"
|
||||
|
||||
@@ -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
|
||||
10
roles/linux_common/tasks/amazon-2022.yml
Normal file
10
roles/linux_common/tasks/amazon-2022.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
|
||||
- name: Install Amazon-Linux-2022-specific support packages
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- dejavu-sans-fonts
|
||||
- file
|
||||
- git-{{ git_version }}
|
||||
- libxml2
|
||||
- shadow-utils
|
||||
@@ -3,7 +3,7 @@
|
||||
# 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"
|
||||
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
|
||||
|
||||
- name: Install common support packages
|
||||
ansible.builtin.package:
|
||||
|
||||
@@ -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
|
||||
6
roles/nfs_server/tasks/amazon-2022.yml
Normal file
6
roles/nfs_server/tasks/amazon-2022.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
|
||||
- name: Install Amazon-Linux-2022-specific NFS packages
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- nfs-utils
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Install distro-specific NFS packages
|
||||
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}.yml"
|
||||
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
|
||||
|
||||
|
||||
- name: Create mountpoint
|
||||
|
||||
@@ -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
|
||||
35
roles/product_common/tasks/amazon-2022.yml
Normal file
35
roles/product_common/tasks/amazon-2022.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
|
||||
- name: Add Adoptium repo and install Eclipse Temurin JDK if necessary on Amazon Linux 2022
|
||||
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 }}"
|
||||
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 2022
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- dejavu-fonts-common # Required by the installer
|
||||
@@ -1,4 +1,4 @@
|
||||
---
|
||||
|
||||
- name: Perform distro-specific tasks
|
||||
ansible.builtin.include_tasks: "{{ ansible_distribution|lower }}.yml"
|
||||
ansible.builtin.include_tasks: "{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml"
|
||||
|
||||
Reference in New Issue
Block a user