Skip to content

Commit 3ae0728

Browse files
Support Ubuntu 24
1 parent 08142af commit 3ae0728

File tree

9 files changed

+28
-23
lines changed

9 files changed

+28
-23
lines changed

ansible-control-host-docker/Dockerfile

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1
2-
FROM ubuntu:22.04
2+
FROM ubuntu:24.04
33
ENV DEBIAN_FRONTEND noninteractive
44

55
# install all necessary software packages and dependencies
@@ -13,18 +13,15 @@ RUN apt-get update && apt-get install -y software-properties-common \
1313
gnupg
1414

1515
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 && \
16-
apt-add-repository "deb http://ppa.launchpad.net/ansible/ansible/ubuntu jammy main" && \
16+
apt-add-repository "deb http://ppa.launchpad.net/ansible/ansible/ubuntu noble main" && \
1717
apt-get update && apt-get upgrade --yes && \
1818
apt-get install --yes python3-pip && \
19-
apt-get install python3-jmespath && \
19+
apt-get install --yes python3-jmespath && \
20+
apt-get install --yes ansible && \
21+
apt-get install --yes python3-cryptography && \
2022
apt-get autoremove && apt-get autoclean
2123

22-
RUN sudo python3 -m pip install ansible
23-
RUN sudo python3 -m pip install cryptography
24-
25-
# create ubuntu user
26-
RUN useradd -ms /bin/bash ubuntu
27-
RUN usermod -aG sudo ubuntu
24+
# switch to ubuntu user
2825
USER ubuntu
2926
WORKDIR /home/ubuntu/
3027

@@ -52,4 +49,3 @@ RUN mkdir target_tls_files
5249
RUN mkdir zdm_proxy_tls_files
5350

5451
ENTRYPOINT ["/bin/bash"]
55-

ansible/tasks/install_docker_ansible_module.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,18 @@
1111
state: absent
1212
vars:
1313
ansible_python_interpreter: python3
14+
when: ansible_distribution_major_version != "24"
1415

15-
- name: Install Docker Module for Python
16+
- name: Install Docker Module for Python Pip
1617
pip:
1718
name: docker
1819
version: 2.7.0
1920
vars:
2021
ansible_python_interpreter: python3
22+
when: ansible_distribution_major_version != "24"
23+
24+
- name: Install Docker Module for Python Apt
25+
apt:
26+
name: python3-docker
27+
state: present
28+
when: ansible_distribution_major_version == "24"

orchestration-scripts/run_terraform_zdm.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ zdm_vpc_cidr_prefix="172.18"
5454
#custom_name_suffix=
5555

5656
# OPTIONAL: zdm_linux_distro to be used for both proxy and monitoring instances.
57-
# Defaults to jammy (Ubuntu 22.04), valid options are focal, jammy, centos7, centos8, centos9, rocky8, rocky9, rhel7, rhel8.
57+
# Defaults to noble (Ubuntu 24.04), valid options are focal, jammy, noble, centos7, centos8, centos9, rocky8, rocky9, rhel7, rhel8.
5858
#zdm_linux_distro=
5959

6060
# OPTIONAL: AWS instance type to be used for each ZDM proxy. Defaults to c5.xlarge, almost always fine.

orchestration-scripts/run_terraform_zdm_no_peering.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ zdm_vpc_cidr_prefix="172.18"
4242
#custom_name_suffix=
4343

4444
# OPTIONAL: zdm_linux_distro to be used for both proxy and monitoring instances.
45-
# Defaults to jammy (Ubuntu 22.04), valid options are focal, jammy, centos7, centos8, centos9, rocky8, rocky9, rhel7, rhel8.
45+
# Defaults to noble (Ubuntu 24.04), valid options are focal, jammy, noble, centos7, centos8, centos9, rocky8, rocky9, rhel7, rhel8.
4646
#zdm_linux_distro=
4747

4848
# OPTIONAL: AWS instance type to be used for each ZDM proxy. Defaults to c5.xlarge, almost always fine.

orchestration-scripts/setup_ansible_control_host.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ printf "# proxy instances \nHost %s.*\n IdentityFile %s/%s\n" "${zdm_proxy_priv
5050
if ! command -v ansible &> /dev/null; then
5151
echo "Installing Ansible"
5252
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
53-
sudo apt-add-repository "deb http://ppa.launchpad.net/ansible/ansible/ubuntu jammy main"
53+
sudo apt-add-repository "deb http://ppa.launchpad.net/ansible/ansible/ubuntu noble main"
5454
sudo apt update --yes
5555
sudo apt upgrade --yes
5656
sudo apt install --yes software-properties-common

terraform/aws/no-peering-deployment-root-aws/variables.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ variable "owner" {
4646
}
4747

4848
variable "zdm_linux_distro" {
49-
default = "jammy"
49+
default = "noble"
5050

5151
validation {
52-
condition = can(regex("focal|jammy|centos7|centos8|centos9|rocky8|rocky9|rhel7|rhel8", var.zdm_linux_distro))
53-
error_message = "Invalid Linux distro, allowed_values = [focal jammy centos7 centos8 centos9 rocky8 rocky9 rhel7 rhel8]."
52+
condition = can(regex("focal|jammy|noble|centos7|centos8|centos9|rocky8|rocky9|rhel7|rhel8", var.zdm_linux_distro))
53+
error_message = "Invalid Linux distro, allowed_values = [focal jammy noble centos7 centos8 centos9 rocky8 rocky9 rhel7 rhel8]."
5454
}
5555
}

terraform/aws/self-contained-deployment-root-aws/variables.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ variable "owner" {
6363
}
6464

6565
variable "zdm_linux_distro" {
66-
default = "jammy"
66+
default = "noble"
6767

6868
validation {
69-
condition = can(regex("focal|jammy|centos7|centos8|centos9|rocky8|rocky9|rhel7|rhel8", var.zdm_linux_distro))
70-
error_message = "Invalid Linux distro, allowed_values = [focal jammy centos7 centos8 centos9 rocky8 rocky9 rhel7 rhel8]."
69+
condition = can(regex("focal|jammy|noble|centos7|centos8|centos9|rocky8|rocky9|rhel7|rhel8", var.zdm_linux_distro))
70+
error_message = "Invalid Linux distro, allowed_values = [focal jammy noble centos7 centos8 centos9 rocky8 rocky9 rhel7 rhel8]."
7171
}
7272
}

terraform/aws/submodules-aws/instances-aws/main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ locals {
2929
allowed_linux_distros = {
3030
focal = { owner = "amazon", name_pattern = "ubuntu/images/*/ubuntu-*-20.04-*", linux_user = "ubuntu" }
3131
jammy = { owner = "amazon", name_pattern = "ubuntu/images/*/ubuntu-*-22.04-*", linux_user = "ubuntu" }
32+
noble = { owner = "amazon", name_pattern = "ubuntu/images/*/ubuntu-*-24.04-*", linux_user = "ubuntu" }
3233
centos7 = { owner = "125523088429", name_pattern = "CentOS Linux 7*", linux_user = "centos" }
3334
centos8 = { owner = "125523088429", name_pattern = "CentOS Stream 8*", linux_user = "centos" }
3435
centos9 = { owner = "125523088429", name_pattern = "CentOS Stream 9*", linux_user = "ec2-user" }

terraform/aws/submodules-aws/instances-aws/variables.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ variable "custom_name_suffix" {}
3333
variable "owner" {}
3434

3535
variable "zdm_linux_distro" {
36-
default = "jammy"
36+
default = "noble"
3737

3838
validation {
39-
condition = can(regex("focal|jammy|centos7|centos8|centos9|rocky8|rocky9|rhel7|rhel8", var.zdm_linux_distro))
40-
error_message = "Invalid Linux distro, allowed_values = [focal jammy centos7 centos8 centos9 rocky8 rocky9 rhel7 rhel8]."
39+
condition = can(regex("focal|jammy|noble|centos7|centos8|centos9|rocky8|rocky9|rhel7|rhel8", var.zdm_linux_distro))
40+
error_message = "Invalid Linux distro, allowed_values = [focal jammy noble centos7 centos8 centos9 rocky8 rocky9 rhel7 rhel8]."
4141
}
4242
}

0 commit comments

Comments
 (0)