Skip to content

Commit 1cfd539

Browse files
NR-140770 ci: use custom sles AMIs (#1704)
1 parent 9ddf7b1 commit 1cfd539

File tree

8 files changed

+102
-42
lines changed

8 files changed

+102
-42
lines changed

test/automated/ansible/group_vars/localhost/main.yml

Lines changed: 57 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -128,80 +128,95 @@ instances:
128128
############################
129129
# sles amd64
130130
############################
131-
# Disabled until EOLed repo sources are fixed
132-
# - ami: "ami-0b39df28334229e26"
133-
# type: "t3a.small"
134-
# name: "amd64:sles-12.2"
135-
# username: "ec2-user"
136-
# platform: "linux"
137-
# python_interpreter: "/usr/bin/python"
138-
# launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
139-
# - ami: "ami-0479b39f2d07530fb"
140-
# type: "t3a.small"
141-
# name: "amd64:sles-12.3"
142-
# username: "ec2-user"
143-
# platform: "linux"
144-
# python_interpreter: "/usr/bin/python"
145-
# launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
146-
# - ami: "ami-0c79914d840ad4560"
147-
# type: "t3a.small"
148-
# name: "amd64:sles-12.4"
149-
# username: "ec2-user"
150-
# platform: "linux"
151-
# python_interpreter: "/usr/bin/python"
152-
# launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
153-
- ami: "ami-05f6084a6b524a8f0"
131+
- ami: "ami-05fcf0a794c3b5994" # based on suse-sles-12-sp3-byos-v20220201-hvm-ssd-x86_64
132+
type: "t3a.small"
133+
name: "amd64:sles-12.3"
134+
username: "ec2-user"
135+
platform: "linux"
136+
python_interpreter: "/usr/bin/python"
137+
launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
138+
- ami: "ami-0ff9876855bed84bd" # based on suse-sles-12-sp4-byos-v20220519-hvm-ssd-x86_64
139+
type: "t3a.small"
140+
name: "amd64:sles-12.4"
141+
username: "ec2-user"
142+
platform: "linux"
143+
python_interpreter: "/usr/bin/python"
144+
launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
145+
- ami: "ami-0199192e7fdbb9b62" # based on suse-sles-12-sp5-v20230206-hvm-ssd-x86_64
154146
type: "t3a.small"
155147
name: "amd64:sles-12.5"
156148
username: "ec2-user"
157149
platform: "linux"
158150
python_interpreter: "/usr/bin/python"
159151
launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
160-
# - ami: "ami-0b14d12cfa5e9dcc5"
161-
# type: "t3a.small"
162-
# name: "amd64:sles-15.2"
163-
# username: "ec2-user"
164-
# platform: "linux"
165-
# python_interpreter: "/usr/bin/python3"
166-
# launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
167-
- ami: "ami-055742ec92937ec3e"
152+
- ami: "ami-08441b51466d3bb43" # based on suse-sles-15-sp1-byos-v20220128-hvm-ssd-x86_64
153+
type: "t3a.small"
154+
name: "amd64:sles-15.1"
155+
username: "ec2-user"
156+
platform: "linux"
157+
python_interpreter: "/usr/bin/python3"
158+
launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
159+
- ami: "ami-0e44499c443e91acd" # based on suse-sles-15-sp2-byos-v20220128-hvm-ssd-x86_64
160+
type: "t3a.small"
161+
name: "amd64:sles-15.2"
162+
username: "ec2-user"
163+
platform: "linux"
164+
python_interpreter: "/usr/bin/python3"
165+
launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
166+
- ami: "ami-0446c700e1dc61753" # based on suse-sles-15-sp3-v20210622-hvm-ssd-x86_64
168167
type: "t3a.small"
169168
name: "amd64:sles-15.3"
170169
username: "ec2-user"
171170
platform: "linux"
172171
python_interpreter: "/usr/bin/python3"
173172
launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
174-
- ami: "ami-0ca19ecee2be612fc"
173+
- ami: "ami-0bde5989b70490b94" # based on suse-sles-15-sp4-v20220915-hvm-ssd-x86_64
175174
type: "t3a.small"
176175
name: "amd64:sles-15.4"
177176
username: "ec2-user"
178177
platform: "linux"
179178
python_interpreter: "/usr/bin/python3"
180179
launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
180+
# Infra Agent not supported yet
181+
# - ami: "ami-0e03a27c1453107db" # based on suse-sles-15-sp5-v20230620-hvm-ssd-x86_64
182+
# type: "t3a.small"
183+
# name: "amd64:sles-15.5"
184+
# username: "ec2-user"
185+
# platform: "linux"
186+
# python_interpreter: "/usr/bin/python3"
187+
# launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
181188
############################
182189
# sles arm64
183190
############################
184-
# - ami: "ami-0ccf2efb4e042d474"
185-
# type: "t4g.small"
186-
# name: "arm64:sles-15.2"
187-
# username: "ec2-user"
188-
# platform: "linux"
189-
# python_interpreter: "/usr/bin/python3"
190-
# launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
191-
- ami: "ami-075a486be6269029f"
191+
- ami: "ami-087e5fdeac18a84ae" # based on suse-sles-15-sp1-byos-v20220128-hvm-ssd-arm64
192192
type: "t4g.small"
193-
name: "arm64:sles-15.3"
193+
name: "arm64:sles-15.1"
194194
username: "ec2-user"
195195
platform: "linux"
196196
python_interpreter: "/usr/bin/python3"
197197
launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
198-
- ami: "ami-0885abe5302e6fee0"
198+
- ami: "ami-0194f07e3eedf8118"
199+
type: "t4g.small"
200+
name: "arm64:sles-15.3" # based on suse-sles-15-sp3-v20211219-hvm-ssd-arm64
201+
username: "ec2-user"
202+
platform: "linux"
203+
python_interpreter: "/usr/bin/python3"
204+
launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
205+
- ami: "ami-0c55a43a5be3c61bc" # based on suse-sles-15-sp4-v20220915-hvm-ssd-arm64
199206
type: "t4g.small"
200207
name: "arm64:sles-15.4"
201208
username: "ec2-user"
202209
platform: "linux"
203210
python_interpreter: "/usr/bin/python3"
204211
launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
212+
# Infra Agent not supported yet
213+
# - ami: "ami-046216af2ce255621" # based on suse-sles-15-sp5-v20230620-hvm-ssd-arm64
214+
# type: "t4g.small"
215+
# name: "arm64:sles-15.5"
216+
# username: "ec2-user"
217+
# platform: "linux"
218+
# python_interpreter: "/usr/bin/python3"
219+
# launch_template: "LaunchTemplateId=lt-0b00afb3f5110a0e6,Version=3"
205220
############################
206221
# redhat amd64
207222
############################

test/automated/ansible/install-requirements.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
include_role:
1010
name: remove-eol-sources
1111

12+
- name: Configure OpenSUSE repositories when needed
13+
include_role:
14+
name: opensuse-repositories
15+
1216
- name: re-install rpm
1317
include_role:
1418
name: reinstall-rpm

test/automated/ansible/roles/install-libcap/vars/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
instances_requiring_libcap_progs:
2+
- "amd64:sles-12.3"
23
- "amd64:sles-12.4"
34
- "amd64:sles-12.5"
45
- "amd64:sles-15.1"
@@ -8,6 +9,8 @@ instances_requiring_libcap_progs:
89
- "arm64:sles-15.3"
910
- "amd64:sles-15.4"
1011
- "arm64:sles-15.4"
12+
- "amd64:sles-15.5"
13+
- "arm64:sles-15.5"
1114
instances_requiring_libcap2:
1215
- "amd64:debian-stretch"
1316
- "arm64:debian-stretch"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
- name: get Suse version from hostname
3+
set_fact:
4+
suse_version: "{{ inventory_hostname | regex_replace('[^:]+:[^:]+:sles-', '') }}"
5+
6+
- name: configure OpenSUSE repositories for distributions BYOS (Bring Your Own Subscription)
7+
template:
8+
src: OpenSUSE-repositories.repo.j2
9+
dest: /etc/zypp/repos.d/OpenSUSE-repositories.repo
10+
11+
- name: 'refresh zypper cache'
12+
command: zypper --gpg-auto-import-keys refresh OpenSUSE-{{ suse_version }}-OSS
13+
...
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
3+
- include_tasks: configure_opensuse_repository.yml
4+
when: inventory_hostname is search(item.key)
5+
loop: "{{ instances_requiring_opensuse_repos | dict2items }}"
6+
vars:
7+
suse_repo_base_url: "{{ item.value }}"
8+
9+
...
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[OpenSUSE-{{ suse_version }}-OSS]
2+
name=OpenSUSE-{{ suse_version }}-OSS
3+
enabled=1
4+
baseurl={{ suse_repo_base_url }}
5+
type=yast
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
instances_requiring_opensuse_repos:
2+
"sles-12.3": http://download.opensuse.org/distribution/12.3/repo/oss/
3+
"sles-12.4": http://download.opensuse.org/distribution/12.3/repo/oss/
4+
"sles-15.1": http://download.opensuse.org/distribution/leap/15.1/repo/oss/
5+
"sles-15.2": http://download.opensuse.org/distribution/leap/15.2/repo/oss/
6+

test/test.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ TESTS_TO_RUN_REGEXP ?= ".*"
3333
test/automated/harvest:
3434
AGENT_RUN_DIR=$(CURDIR) ANSIBLE_FORKS=$(ANSIBLE_FORKS) ANSIBLE_INVENTORY=$(ANSIBLE_INVENTORY) $(CURDIR)/test/harvest/ansible/harvest.sh
3535

36+
.PHONY: test/automated/install-requirements
37+
test/automated/install-requirements:
38+
@ANSIBLE_DISPLAY_SKIPPED_HOSTS=NO ANSIBLE_DISPLAY_OK_HOSTS=NO ansible-playbook -f $(ANSIBLE_FORKS) -i $(ANSIBLE_INVENTORY) --limit=$(LIMIT) $(CURDIR)/test/automated/ansible/install-requirements.yml
39+
40+
3641
.PHONY: test/automated/packaging
3742
test/automated/packaging:
3843
ifndef NR_LICENSE_KEY

0 commit comments

Comments
 (0)