Skip to content

Commit 6dbc654

Browse files
committed
Update AWS sumaform deployment for 5.1 Payg
1 parent c7ff13a commit 6dbc654

File tree

16 files changed

+72
-40
lines changed

16 files changed

+72
-40
lines changed

backend_modules/aws/base/ami.tf

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ data "aws_ami" "suma-proxy-50-x86_64-byos" {
221221

222222
data "aws_ami" "smlm-server-51-x86_64-ltd-paygo" {
223223
most_recent = true
224-
name_regex = "^suse-mlm-server-5-1-ltd-v[0-9].*$"
224+
name_regex = "^suse-manager-server-5-1-v[0-9].*(ltd).*$"
225225
owners = ["679593333241"]
226226

227227
filter {
@@ -241,14 +241,14 @@ data "aws_ami" "smlm-server-51-x86_64-ltd-paygo" {
241241

242242
filter {
243243
name = "product-code"
244-
values = ["8ysfelcfs2dkok3fba4s5uqo4"]
244+
values = ["c48fapw1f0e4tvjukevqlbmf4"]
245245
}
246246
}
247247

248248

249249
data "aws_ami" "smlm-server-51-arm64-ltd-paygo" {
250250
most_recent = true
251-
name_regex = "^suse-mlm-server-5-1-ltd-v[0-9].*$"
251+
name_regex = "^suse-manager-server-5-1-v[0-9].*(ltd).*$"
252252
owners = ["679593333241"]
253253

254254
filter {
@@ -268,14 +268,14 @@ data "aws_ami" "smlm-server-51-arm64-ltd-paygo" {
268268

269269
filter {
270270
name = "product-code"
271-
values = ["eheergy88522f5m8bqg7cp261"]
271+
values = ["umnofojstehgl6jnp9nspg7g"]
272272
}
273273
}
274274

275275
data "aws_ami" "smlm-proxy-51-arm64-byos" {
276276
most_recent = true
277-
name_regex = "^suse-mlm-proxy-5-1-byos-v"
278-
owners = ["810320120389"]
277+
name_regex = "^suse-manager-proxy-5-1-byos-v"
278+
owners = ["679593333241"]
279279

280280
filter {
281281
name = "architecture"
@@ -291,12 +291,18 @@ data "aws_ami" "smlm-proxy-51-arm64-byos" {
291291
name = "root-device-type"
292292
values = ["ebs"]
293293
}
294+
295+
296+
filter {
297+
name = "product-code"
298+
values = ["713zi40zqboecsjmlxkf31iin"]
299+
}
294300
}
295301

296302
data "aws_ami" "smlm-proxy-51-x86_64-byos" {
297303
most_recent = true
298-
name_regex = "^suse-mlm-proxy-5-1-byos-v"
299-
owners = ["810320120389"]
304+
name_regex = "^suse-manager-proxy-5-1-byos-v"
305+
owners = ["679593333241"]
300306

301307
filter {
302308
name = "architecture"
@@ -312,6 +318,11 @@ data "aws_ami" "smlm-proxy-51-x86_64-byos" {
312318
name = "root-device-type"
313319
values = ["ebs"]
314320
}
321+
322+
filter {
323+
name = "product-code"
324+
values = ["q26lvbne2lnivd97mlx43j4u"]
325+
}
315326
}
316327

317328

backend_modules/aws/host/combustion

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,18 @@ nm_config 2 eth1 manual
3939
# Set linux as password for root
4040
echo 'root:$6$3aQC9rrDLHiTf1yR$NoKe9tko0kFIpu0rQ2y/OzOOtbVvs0Amr2bx0T4cGf6aq8PG74EmVy8lSDJdbLVVFpOSzwELWyReRCiPHa7DG0' | chpasswd -e
4141

42-
# 5.1 --> SL micro 6.1
43-
%{ if product_version == "5.1-paygo" }
42+
%{ if sshd_config_root_d }
4443
echo "PermitRootLogin yes" > /etc/ssh/sshd_config.d/root.conf
4544
echo "ChallengeResponseAuthentication yes" >> /etc/ssh/sshd_config.d/root.conf
4645
%{ else }
47-
# 5.0 --> SLE Micro 5.5
4846
echo "PermitRootLogin yes" > /etc/ssh/sshd_config
4947
echo "ChallengeResponseAuthentication yes" >> /etc/ssh/sshd_config
5048
echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
5149
%{ endif }
5250

5351
# Add a public ssh key and enable sshd
5452
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGEPA8UvZ/6tTiL+MKGUAsHJuPlDpueeDmbuJ+0giOCY root@controller" > /root/.ssh/authorized_keys
53+
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFY000UPEvRSkiNiOXExo6JGB/lJA+tGPqBsl9k5/hzb" >> /root/.ssh/authorized_keys
5554

5655
systemctl enable sshd.service
5756
systemctl restart sshd.service

backend_modules/aws/host/main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,19 @@ locals {
5454
]
5555
// manually provided AMIs for to-be-released images all start with 'ami-'
5656
combustion = contains(local.combustion_images, var.image) || substr(var.image, 0, 3) == "ami"
57+
sshd_config_root_d = can(regex("51", var.image))
5758

5859
user_data = templatefile("${path.module}/user_data.yaml", {
5960
image = var.image
60-
public_instance = local.provider_settings["public_instance"]
61+
public_instance = tostring(local.provider_settings["public_instance"])
6162
mirror_url = var.base_configuration["mirror"]
6263
install_salt_bundle = var.install_salt_bundle
6364
})
6465

6566
combustion_file = templatefile("${path.module}/combustion", {
6667
product_version = local.product_version
6768
install_salt_bundle = var.install_salt_bundle
69+
sshd_config_root_d = local.sshd_config_root_d
6870
})
6971
}
7072

@@ -237,7 +239,7 @@ resource "null_resource" "host_salt_configuration" {
237239
authorized_keys = var.ssh_key_path
238240
gpg_keys = var.gpg_keys
239241
ipv6 = var.ipv6
240-
})
242+
})
241243
}
242244

243245
connection {
@@ -294,6 +296,7 @@ resource "null_resource" "host_salt_configuration" {
294296

295297
provisioner "remote-exec" {
296298
inline = [
299+
"echo 'Attempting to run wait_for_salt.sh' 2>&1",
297300
"sudo bash /tmp/salt/wait_for_salt.sh",
298301
]
299302
}

modules/mirror/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module "mirror" {
77
use_os_released_updates = var.use_os_released_updates
88
install_salt_bundle = var.install_salt_bundle
99
additional_repos = var.additional_repos
10-
additional_repos_only = var.additional_repos_only
10+
additional_repos_only = var.additional_repos_only
1111
additional_packages = var.additional_packages
1212
swap_file_size = var.swap_file_size
1313
ssh_key_path = var.ssh_key_path

modules/server/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module "server" {
4444
additional_disk_size = var.repository_disk_size
4545
second_additional_disk_size = var.database_disk_size
4646
volume_provider_settings = var.volume_provider_settings
47-
product_version = var.product_version
47+
product_version = local.product_version
4848
provision = var.provision
4949

5050
grains = {

modules/server_containerized/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ module "server_containerized" {
4343
additional_disk_size = var.repository_disk_size
4444
second_additional_disk_size = var.database_disk_size
4545
volume_provider_settings = var.volume_provider_settings
46+
product_version = local.product_version
4647

4748
grains = {
4849
container_runtime = var.runtime

salt/default/minimal.sls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ include:
66
- default.firewall
77
{% if 'build_image' not in grains.get('product_version', '') and 'paygo' not in grains.get('product_version', '') %}
88
- repos
9+
- scc
10+
- default.avahi
911
{% else %}
1012
- repos.testsuite
1113
{% endif %}
12-
- default.avahi
1314
- default.time
1415

1516
minimal_package_update:

salt/minion/init.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include:
2-
- scc.minion
32
{% if 'paygo' not in grains.get('product_version') | default('', true) %}
3+
- scc.minion
44
- repos
55
{% endif %}
66
- minion.testsuite

salt/mirror/configuration.sls

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ tar:
1717
minima:
1818
archive.extracted:
1919
- name: /usr/local/bin/utils/
20-
- source: https://github.com/uyuni-project/minima/releases/download/v0.11/minima-linux-amd64.tar.gz
21-
- source_hash: https://github.com/uyuni-project/minima/releases/download/v0.11/minima-linux-amd64.tar.gz.sha512
20+
- source: https://github.com/uyuni-project/minima/releases/download/v0.25/minima_0.25_linux_amd64.tar.gz
21+
- source_hash: 06c2939868bd02b0328d380e04d7e10c194f0e5eec7ddb12c546ba2513942448a169d103147cc31c7faec4bb89ccba139f28692a2bf69f6b650be92de2f229ce
2222
- archive_format: tar
2323
- enforce_toplevel: false
2424
- keep: True
@@ -35,8 +35,8 @@ apt-mirror:
3535
jdupes:
3636
archive.extracted:
3737
- name: /usr/local/bin/utils/
38-
- source: https://codeberg.org/jbruchon/jdupes/releases/download/v1.27.3/jdupes-1.27.3-linux-x86_64.pkg.tar.xz
39-
- source_hash: d59159e3ceb263dbff465a7f2115ab9730c90a651b2aba62f95da957ec26891a0f5e83380f5e7629adf9d4b5ab8e64a54698b6f8c023eb0c5f8cf048ada29b07
38+
- source: https://codeberg.org/jbruchon/jdupes/releases/download/v1.31.1/jdupes-1.31.1-linux-x86_64.pkg.tar.xz
39+
- source_hash: 38bdd7d6269d9acb0fad93168a691fb1718651a7de34f1bbd5384b65a23a3d45290adae9e56340dfb0b9d32d2bf261861da75ac44bf4fece64acbfbb18d00c0c
4040
- archive_format: tar
4141
- enforce_toplevel: false
4242
- options: --strip-components=3 --wildcards */jdupes

salt/mirror/etc/minimum_repositories_testsuite.yaml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,25 @@ http:
1313
- url: http://dist.nue.suse.com/ibs/SUSE/Updates/Ubuntu/24.04-CLIENT-TOOLS/x86_64/update/
1414
archs: [amd64]
1515

16-
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/Ubuntu2004-Uyuni-Client-Tools/xUbuntu_20.04/
16+
- url: http://downloadcontent.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/Ubuntu2004-Uyuni-Client-Tools/xUbuntu_20.04/
1717
archs: [amd64]
1818

19-
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/Ubuntu2204-Uyuni-Client-Tools/xUbuntu_22.04/
19+
- url: http://downloadcontent.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/Ubuntu2204-Uyuni-Client-Tools/xUbuntu_22.04/
2020
archs: [amd64]
2121

22-
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/Ubuntu2404-Uyuni-Client-Tools/xUbuntu_24.04/
22+
- url: http://downloadcontent.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/Ubuntu2404-Uyuni-Client-Tools/xUbuntu_24.04/
2323
archs: [amd64]
2424

25-
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Test-Packages:/Pool/deb/
25+
- url: http://downloadcontent.opensuse.org/repositories/systemsmanagement:/Uyuni:/Test-Packages:/Pool/deb/
2626
archs: [amd64]
2727

28-
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Test-Packages:/Pool/rpm/
28+
- url: http://downloadcontent.opensuse.org/repositories/systemsmanagement:/Uyuni:/Test-Packages:/Pool/rpm/
2929
archs: [x86_64]
3030

31-
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Test-Packages:/Updates/deb
31+
- url: http://downloadcontent.opensuse.org/repositories/systemsmanagement:/Uyuni:/Test-Packages:/Updates/deb
3232
archs: [amd64]
3333

34-
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Test-Packages:/Updates/rpm
34+
- url: http://downloadcontent.opensuse.org/repositories/systemsmanagement:/Uyuni:/Test-Packages:/Updates/rpm
3535
archs: [x86_64]
3636

3737
- url: http://dist.nue.suse.com/ibs/SUSE/Updates/SLE-Manager-Tools/12/x86_64/update/
@@ -46,7 +46,7 @@ http:
4646
- url: http://dist.nue.suse.com/ibs/SUSE/Products/SLE-Manager-Tools/15/x86_64/product/
4747
archs: [x86_64]
4848

49-
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/SLE15-Uyuni-Client-Tools/SLE_15/
49+
- url: http://downloadcontent.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/SLE15-Uyuni-Client-Tools/SLE_15/
5050
archs: [x86_64]
5151

5252
- url: http://dist.nue.suse.com/ibs/SUSE/Updates/RES/7-CLIENT-TOOLS/x86_64/update/
@@ -58,23 +58,29 @@ http:
5858
- url: http://dist.nue.suse.com/ibs/SUSE/Products/RES/8-CLIENT-TOOLS/x86_64/product/
5959
archs: [ x86_64 ]
6060

61-
- url: http://dist.nue.suse.com/ibs/SUSE/Products/SLE-Manager-Tools/15-BETA/x86_64/product/
61+
- url: http://dist.nue.suse.com/ibs/SUSE/Updates/SLE-Manager-Tools/15/x86_64/update/
6262
archs: [x86_64]
6363

64-
- url: http://dist.nue.suse.com/ibs/SUSE/Products/SLE-Manager-Tools/15-BETA/x86_64/update/
64+
- url: http://downloadcontent.opensuse.org/repositories/systemsmanagement:/sumaform:/tools/SLE_15_SP3/
6565
archs: [x86_64]
6666

67-
- url: http://dist.nue.suse.com/ibs/SUSE/Updates/SLE-Manager-Tools/15/x86_64/update/
67+
- url: http://downloadcontent.opensuse.org/repositories/systemsmanagement:/Uyuni:/Master:/openSUSE_Leap_15-Uyuni-Client-Tools/openSUSE_Leap_15.0/
6868
archs: [x86_64]
6969

70-
- url: http://download.opensuse.org/repositories/systemsmanagement:/sumaform:/tools/SLE_15_SP3/
70+
- url: http://dist.nue.suse.com/ibs/SUSE/Products/EL/9-CLIENT-TOOLS/x86_64/product/
7171
archs: [x86_64]
7272

73-
- url: http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Master:/openSUSE_Leap_15-Uyuni-Client-Tools/openSUSE_Leap_15.0/
73+
- url: http://dist.nue.suse.com/ibs/SUSE/Updates/EL/9-CLIENT-TOOLS/x86_64/update/
7474
archs: [x86_64]
7575

76-
- url: http://dist.nue.suse.com/ibs/SUSE/Products/EL/9-CLIENT-TOOLS/x86_64/product/
76+
- url: http://dist.nue.suse.com/ibs/SUSE/Products/MultiLinuxManagerTools/SLE-15/x86_64/product/
7777
archs: [x86_64]
7878

79-
- url: http://dist.nue.suse.com/ibs/SUSE/Updates/EL/9-CLIENT-TOOLS/x86_64/update/
79+
- url: http://dist.nue.suse.com/ibs/SUSE/Updates/MultiLinuxManagerTools/SLE-15/x86_64/update
80+
archs: [ x86_64 ]
81+
82+
- url: http://dist.nue.suse.com/ibs/SUSE/Products/MultiLinuxManagerTools/SLE-12/x86_64/product/
8083
archs: [x86_64]
84+
85+
- url: http://dist.nue.suse.com/ibs/SUSE/Updates/MultiLinuxManagerTools/SLE-12/x86_64/update/
86+
archs: [ x86_64 ]

0 commit comments

Comments
 (0)