Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test debian 12 #3119

Merged
merged 14 commits into from
Oct 3, 2024
10 changes: 10 additions & 0 deletions utils/_context/_scenarios/auto_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
OracleLinux88amd64,
OracleLinux88arm64,
OracleLinux79amd64,
Debian12amd64,
Debian12arm64,
AlmaLinux8amd64,
AlmaLinux8arm64,
AlmaLinux9amd64,
Expand Down Expand Up @@ -69,6 +71,8 @@ def __init__(
include_oraclelinux_8_8_amd64=False,
include_oraclelinux_8_8_arm64=False,
include_oraclelinux_7_9_amd64=False,
include_debian_12_amd64=False,
include_debian_12_arm64=False,
include_almalinux_8_amd64=False,
include_almalinux_8_arm64=False,
include_almalinux_9_amd64=False,
Expand Down Expand Up @@ -136,6 +140,10 @@ def __init__(
self.required_vms.append(OracleLinux88arm64())
if include_oraclelinux_7_9_amd64:
self.required_vms.append(OracleLinux79amd64())
if include_debian_12_amd64:
self.required_vms.append(Debian12amd64())
if include_debian_12_arm64:
self.required_vms.append(Debian12arm64())
if include_almalinux_8_amd64:
self.required_vms.append(AlmaLinux8amd64())
if include_almalinux_8_arm64:
Expand Down Expand Up @@ -312,6 +320,8 @@ def __init__(
include_oraclelinux_8_8_amd64=True,
include_oraclelinux_8_8_arm64=True,
include_oraclelinux_7_9_amd64=True,
include_debian_12_amd64=True,
include_debian_12_arm64=True,
include_almalinux_8_amd64=True,
include_almalinux_8_arm64=True,
include_almalinux_9_amd64=True,
Expand Down
33 changes: 32 additions & 1 deletion utils/_context/virtual_machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import hashlib

from utils.tools import logger
from utils._context.library_version import Version
from utils import context
from utils.onboarding.debug_vm import extract_logs_to_file

Expand Down Expand Up @@ -444,6 +443,38 @@ def __init__(self, **kwargs) -> None:
)


class Debian12amd64(_VirtualMachine):
def __init__(self, **kwargs) -> None:
super().__init__(
"Debian_12_amd64",
aws_config=_AWSConfig(ami_id="ami-064519b8c76274859", ami_instance_type="t2.medium", user="admin"),
vagrant_config=None,
krunvm_config=None,
os_type="linux",
os_distro="deb",
os_branch="debian",
os_cpu="amd64",
default_vm=False,
**kwargs,
)


class Debian12arm64(_VirtualMachine):
def __init__(self, **kwargs) -> None:
super().__init__(
"Debian_12_arm64",
aws_config=_AWSConfig(ami_id="ami-031399937db27e013", ami_instance_type="t4g.small", user="admin"),
vagrant_config=None,
krunvm_config=None,
os_type="linux",
os_distro="deb",
os_branch="debian",
os_cpu="arm64",
default_vm=False,
**kwargs,
)


# 8.10.20240820
# https://wiki.almalinux.org/cloud/AWS.html#community-amis
class AlmaLinux8amd64(_VirtualMachine):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
sudo apt-get update
sudo apt-get -y install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
curl -fsSL https://download.docker.com/linux/$(grep -E '^ID=' /etc/os-release | cut -c4-)/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/"$(grep -E '^ID=' /etc/os-release | cut -c4-)" \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
Expand All @@ -24,9 +24,9 @@
os_distro: rpm
os_branch: centos_7_amd64 # CentOS override
remote-command: |
curl -fsSL https://get.docker.com -o install-docker.sh
curl -fsSL https://get.docker.com -o install-docker.sh
chmod 755 install-docker.sh
sed -i 's/yum config-manager/yum-config-manager/g' install-docker.sh
sed -i 's/yum config-manager/yum-config-manager/g' install-docker.sh
sudo sh install-docker.sh
sudo systemctl start docker
sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/bin/docker-compose && sudo chmod +x /usr/bin/docker-compose && sudo docker-compose --version
Expand Down Expand Up @@ -77,4 +77,4 @@
sudo yum -y install docker
sudo systemctl start docker.service
sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/bin/docker-compose && sudo chmod +x /usr/bin/docker-compose && sudo docker-compose --version

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lang_variant:
name: dotnet
cache: true
version: 6
install:
install:
- os_type: linux
os_distro: deb
remote-command: |
Expand All @@ -16,13 +16,13 @@ weblog:
name: test-app-dotnet
#ubuntu 22 arm excluded due to "dotnet-runtime-6.0 : Depends: liblttng-ust1 (>= 2.13.0) but it is not installable".
#amazon_linux2_dotnet6 excluded due to https://datadoghq.atlassian.net/browse/AIT-10335
excluded_os_branches: [ubuntu22_amd64, ubuntu22_arm64, ubuntu18_amd64, amazon_linux2, amazon_linux2_dotnet6, centos_7_amd64, ubuntu24, ubuntu20, ubuntu21, ubuntu23]
excluded_os_branches: [ubuntu22_amd64, ubuntu22_arm64, ubuntu18_amd64, amazon_linux2, amazon_linux2_dotnet6, centos_7_amd64, ubuntu24, ubuntu20, ubuntu21, ubuntu23, debian]
excluded_os_names: [OracleLinux_7_9_amd64]
install:
install:
- os_type: linux
copy_files:
- name: copy-dotnet-app
local_path: lib-injection/build/docker/dotnet/dd-lib-dotnet-init-test-app
local_path: lib-injection/build/docker/dotnet/dd-lib-dotnet-init-test-app

- name: copy-service
local_path: utils/build/virtual_machine/weblogs/common/test-app.service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ lang_variant:
name: OpenJDK11
cache: true
install:
- os_type: linux
os_distro: deb
os_branch: debian
remote-command: |
echo 'deb http://deb.debian.org/debian unstable main non-free contrib' | sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt -y install openjdk-11-jdk

- os_type: linux
os_distro: deb
remote-command: sudo apt-get -y update && sudo apt-get -y install openjdk-11-jdk-headless
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@ lang_variant:
#We compile with jdk 11, but we run the app with java 21
cache: true
install:
- os_type: linux
os_distro: deb
os_branch: debian
remote-command: |
echo 'deb http://deb.debian.org/debian unstable main non-free contrib' | sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt -y install openjdk-11-jdk

- os_type: linux
os_distro: deb
remote-command: sudo apt-get -y update && sudo apt-get -y install openjdk-11-jdk-headless


- os_type: linux
os_distro: rpm
remote-command: sudo amazon-linux-extras install java-openjdk11 || sudo dnf -y install java-11-amazon-corretto-devel || sudo yum -y install java-11-openjdk-devel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ lang_variant:
name: OpenJDK11
cache: true
install:
- os_type: linux
os_distro: deb
os_branch: debian
remote-command: |
echo 'deb http://deb.debian.org/debian unstable main non-free contrib' | sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt -y install openjdk-11-jdk

- os_type: linux
os_distro: deb
remote-command: sudo apt-get -y update && sudo apt-get -y install openjdk-11-jdk-headless
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ lang_variant:
name: OpenJDK11
cache: true
install:
- os_type: linux
os_distro: deb
os_branch: debian
remote-command: |
echo 'deb http://deb.debian.org/debian unstable main non-free contrib' | sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt -y install openjdk-11-jdk

- os_type: linux
os_distro: deb
remote-command: sudo apt-get -y update && sudo apt-get -y install openjdk-11-jdk-headless
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lang_variant:
install:
- os_type: linux
os_distro: deb
remote-command: sudo apt-get -y update && sudo apt-get -y install openjdk-11-jdk-headless
remote-command: sudo apt-get -y update && (sudo apt-get -y install openjdk-11-jdk-headless || sudo apt-get -y install openjdk-17-jre-headless)

- os_type: linux
os_distro: rpm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ lang_variant:
#We compile with jdk 11, but we run the app with java 15
cache: true
install:
- os_type: linux
os_distro: deb
os_branch: debian
remote-command: |
echo 'deb http://deb.debian.org/debian unstable main non-free contrib' | sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt -y install openjdk-11-jdk

- os_type: linux
os_distro: deb
remote-command: sudo apt-get -y update && sudo apt-get -y install openjdk-11-jdk-headless
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ lang_variant:
name: OpenJDK11
cache: true
install:
- os_type: linux
os_distro: deb
os_branch: debian
remote-command: |
echo 'deb http://deb.debian.org/debian unstable main non-free contrib' | sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt -y install openjdk-11-jdk

- os_type: linux
os_distro: deb
remote-command: sudo apt-get -y update && sudo apt-get -y install openjdk-11-jdk-headless
Expand All @@ -25,7 +33,7 @@ weblog:
- name: copy-docker-file
local_path: utils/build/virtual_machine/weblogs/java/test-app-java-container/Dockerfile.jdk11
remote_path: Dockerfile.template

- name: copy-docker-compose-file
local_path: utils/build/virtual_machine/weblogs/java/test-app-java-container/docker-compose.yml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ lang_variant:
name: OpenJDK11
cache: true
install:
- os_type: linux
os_distro: deb
os_branch: debian
remote-command: |
echo 'deb http://deb.debian.org/debian unstable main non-free contrib' | sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt -y install openjdk-11-jdk

- os_type: linux
os_distro: deb
remote-command: sudo apt-get -y update && sudo apt-get -y install openjdk-11-jdk-headless
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ "$DISTRO" = "deb" ]; then
#Install pyenv
packages_install="make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev git curl llvm libncursesw5-dev xz-utils tk-dev tzdata libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev"
# shellcheck disable=SC2086
sudo apt-get install -y $packages_install || ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends "$packages_install"
sudo apt-get install -y $packages_install || ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $packages_install
export PYENV_ROOT="/home/datadog/.pyenv"
sudo curl https://pyenv.run | bash
export PATH="$PYENV_ROOT/bin:$PATH"
Expand All @@ -23,4 +23,4 @@ if [ "$DISTRO" = "deb" ]; then
fi


export PATH="/home/datadog/.pyenv/bin:$PATH" && eval "$(pyenv init -)" && pyenv install "$PY_VERSION" && pyenv global "$PY_VERSION"
export PATH="/home/datadog/.pyenv/bin:$PATH" && eval "$(pyenv init -)" && pyenv install "$PY_VERSION" && pyenv global "$PY_VERSION"
Loading