Skip to content

Commit cdd90dd

Browse files
authored
Merge pull request #14 from linux-kdevops/cel/fixes
Fix a number of issues with kdevops' use of Google Cloud and other providers
2 parents 6e9c9df + 74b77e2 commit cdd90dd

15 files changed

Lines changed: 478 additions & 7 deletions

File tree

kconfigs/Kconfig.ansible_cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ config ANSIBLE_CFG_FORKS_SET_BY_CLI
1010
bool
1111
default $(shell, scripts/check-cli-set-var.sh ANSIBLE_CFG_FORKS)
1212

13+
config ANSIBLE_CFG_TASK_DEBUGGER_SET_BY_CLI
14+
bool
15+
default $(shell, scripts/check-cli-set-var.sh ANSIBLE_CFG_TASK_DEBUGGER)
16+
1317
menu "Ansible Callback Plugin Configuration"
1418
choice
1519
prompt "Ansible Callback Plugin"
@@ -207,6 +211,19 @@ config ANSIBLE_CFG_FORKS
207211

208212
endif # !ANSIBLE_CFG_FORKS_CUSTOM
209213

214+
config ANSIBLE_CFG_TASK_DEBUGGER
215+
bool "Enable the Ansible task debugger on failed tasks"
216+
output yaml
217+
default n
218+
help
219+
When this setting is enabled, a task failure invokes the
220+
Ansible debugger. Generally this is useful only when
221+
running kdevops from the command line.
222+
223+
For more information, see:
224+
225+
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_debugger.html#id10
226+
210227
if DISTRO_OPENSUSE
211228

212229
config ANSIBLE_CFG_RECONNECTION_RETRIES

playbooks/roles/ansible_cfg/templates/ansible.cfg.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ show_per_host_start = {{ ansible_cfg_callback_plugin_show_per_host_start }}
1010
show_task_path_on_failure = {{ ansible_cfg_callback_plugin_show_task_path_on_failure }}
1111
interpreter_python = {{ ansible_cfg_interpreter_python_string }}
1212
forks = {{ ansible_cfg_forks }}
13+
enable_task_debugger = {{ ansible_cfg_task_debugger }}
1314
{% if ansible_facts['distribution'] == 'openSUSE' %}
1415
[connection]
1516
retries = {{ ansible_cfg_reconnection_retries }}

playbooks/roles/codereadyrepo/tasks/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@
3939
- kdevops_enable_terraform
4040
- kdevops_terraform_provider == "azure"
4141

42+
- name: Select the Google Cloud RHEL CodeReady Builder repo
43+
ansible.builtin.set_fact:
44+
codeready_repo: "rhui-codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rhui-rpms"
45+
when:
46+
- ansible_distribution == 'RedHat'
47+
- kdevops_enable_terraform
48+
- kdevops_terraform_provider == "gce"
49+
4250
- name: The distribution/provisioner combo isn't recognized
4351
ansible.builtin.fail:
4452
msg: The selection heuristic failed to find a CodeReady Builder repo.

playbooks/roles/devconfig/tasks/install-deps/redhat/main.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,24 @@
3232
- devconfig_custom_yum_repofile
3333
- custom_repofile.stat.exists
3434

35+
- name: Discover the fastest package update mirrors
36+
become: true
37+
become_method: ansible.builtin.sudo
38+
ansible.builtin.lineinfile:
39+
insertafter: "[main]"
40+
line: "fastestmirror=true"
41+
path: "/etc/dnf/dnf.conf"
42+
state: present
43+
44+
- name: Increase the maximum number of concurrent package downloads
45+
become: true
46+
become_method: ansible.builtin.sudo
47+
ansible.builtin.lineinfile:
48+
insertafter: "[main]"
49+
line: "max_parallel_downloads=10"
50+
path: "/etc/dnf/dnf.conf"
51+
state: present
52+
3553
- name: Refresh cache and upgrade all present packages
3654
become: yes
3755
become_method: sudo

terraform/aws/kconfigs/Kconfig.compute

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ config TERRAFORM_AWS_DISTRO_DEBIAN
9999
config TERRAFORM_AWS_DISTRO_FEDORA
100100
bool "Fedora Core"
101101

102+
config TERRAFORM_AWS_DISTRO_OL
103+
bool "Oracle Linux"
104+
102105
config TERRAFORM_AWS_DISTRO_RHEL
103106
bool "Red Hat Enterprise Linux"
104107

@@ -113,6 +116,7 @@ endchoice
113116
source "terraform/aws/kconfigs/distros/Kconfig.amazon"
114117
source "terraform/aws/kconfigs/distros/Kconfig.debian"
115118
source "terraform/aws/kconfigs/distros/Kconfig.fedora"
119+
source "terraform/aws/kconfigs/distros/Kconfig.oracle"
116120
source "terraform/aws/kconfigs/distros/Kconfig.rhel"
117121
source "terraform/aws/kconfigs/distros/Kconfig.sles"
118122
source "terraform/aws/kconfigs/distros/Kconfig.custom"
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
if TERRAFORM_AWS_DISTRO_OL
2+
3+
config TERRAFORM_AWS_AMI_OWNER
4+
string
5+
output yaml
6+
default "amazon"
7+
8+
if TARGET_ARCH_X86_64
9+
10+
choice
11+
prompt "Oracle Linux release"
12+
default TERRAFORM_AWS_OL9_X86_64
13+
14+
config TERRAFORM_AWS_OL8_X86_64
15+
bool "Oracle Linux 8 (x86)"
16+
17+
config TERRAFORM_AWS_OL9_X86_64
18+
bool "Oracle Linux 9 (x86)"
19+
20+
endchoice
21+
22+
config TERRAFORM_AWS_NS
23+
string
24+
output yaml
25+
default "Oracle-Linux-8.*x86_64-*" if TERRAFORM_AWS_OL8_X86_64
26+
default "Oracle-Linux-9.*x86_64-*" if TERRAFORM_AWS_OL9_X86_64
27+
28+
endif # TARGET_ARCH_X86_64
29+
30+
if TARGET_ARCH_ARM64
31+
32+
choice
33+
prompt "Oracle Linux release"
34+
default TERRAFORM_AWS_OL9_ARM64
35+
36+
config TERRAFORM_AWS_OL9_ARM64
37+
bool "Oracle Linux 9 (arm64)"
38+
39+
endchoice
40+
41+
config TERRAFORM_AWS_NS
42+
string
43+
output yaml
44+
default "Oracle-Linux-9.*arm64-*" if TERRAFORM_AWS_OL9_ARM64
45+
46+
endif # TARGET_ARCH_ARM64
47+
48+
endif # TERRAFORM_AWS_DISTRO_OL

terraform/aws/kconfigs/distros/Kconfig.rhel

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,23 @@ choice
1111
prompt "Red Hat Enterprise Linux release"
1212
default TERRAFORM_AWS_RHEL9_X86_64
1313

14+
config TERRAFORM_AWS_RHEL8_X86_64
15+
bool "Red Hat Enterprise Linux 8 (x86)"
16+
1417
config TERRAFORM_AWS_RHEL9_X86_64
1518
bool "Red Hat Enterprise Linux 9 (x86)"
1619

20+
config TERRAFORM_AWS_RHEL10_X86_64
21+
bool "Red Hat Enterprise Linux 10 (x86)"
22+
1723
endchoice
1824

1925
config TERRAFORM_AWS_NS
2026
string
2127
output yaml
28+
default "RHEL-8.*x86_64-*" if TERRAFORM_AWS_RHEL8_X86_64
2229
default "RHEL-9.*x86_64-*" if TERRAFORM_AWS_RHEL9_X86_64
30+
default "RHEL-10.*x86_64-*" if TERRAFORM_AWS_RHEL10_X86_64
2331

2432
endif # TARGET_ARCH_X86_64
2533

@@ -30,14 +38,18 @@ choice
3038
default TERRAFORM_AWS_RHEL9_ARM64
3139

3240
config TERRAFORM_AWS_RHEL9_ARM64
33-
bool "RHEL9 ARM 64"
41+
bool "Red Hat Enterprise Linux 9 (arm64)"
42+
43+
config TERRAFORM_AWS_RHEL10_ARM64
44+
bool "Red Hat Enterprise Linux 10 (arm64)"
3445

3546
endchoice
3647

3748
config TERRAFORM_AWS_NS
3849
string
3950
output yaml
4051
default "RHEL-9.*arm64-*" if TERRAFORM_AWS_RHEL9_ARM64
52+
default "RHEL-10.*arm64-*" if TERRAFORM_AWS_RHEL10_ARM64
4153

4254
endif # TARGET_ARCH_ARM64
4355

terraform/gce/kconfigs/Kconfig.compute

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,58 @@ config TERRAFORM_GCE_MACHINE_FAMILY_N1_STANDARD
1111
Balanced performance and cost-effectiveness. Intel
1212
Haswell CPUs.
1313

14+
config TERRAFORM_GCE_MACHINE_FAMILY_N2_STANDARD
15+
bool "N2 Standard family"
16+
depends on TARGET_ARCH_X86_64
17+
help
18+
General purpose computing on Intel Cascade Lake CPUs.
19+
1420
config TERRAFORM_GCE_MACHINE_FAMILY_N2_HIGHCPU
1521
bool "N2 High CPU family"
1622
depends on TARGET_ARCH_X86_64
1723
help
1824
General purpose computing on Intel Cascade Lake CPUs.
1925

26+
config TERRAFORM_GCE_MACHINE_FAMILY_N2D_STANDARD
27+
bool "N2D Standard family"
28+
depends on TARGET_ARCH_X86_64
29+
help
30+
General purpose computing on AMD Milan CPUs.
31+
2032
config TERRAFORM_GCE_MACHINE_FAMILY_N2D_HIGHCPU
2133
bool "N2D High CPU family"
2234
depends on TARGET_ARCH_X86_64
2335
help
2436
General purpose computing on AMD Milan CPUs.
2537

38+
config TERRAFORM_GCE_MACHINE_FAMILY_N4_STANDARD
39+
bool "N4 Standard family"
40+
depends on TARGET_ARCH_X86_64
41+
help
42+
General purpose computing on Intel Emerald Rapids CPUs.
43+
2644
config TERRAFORM_GCE_MACHINE_FAMILY_N4_HIGHCPU
2745
bool "N4 High CPU family"
2846
depends on TARGET_ARCH_X86_64
2947
help
3048
General purpose computing on Intel Emerald Rapids CPUs.
3149

50+
config TERRAFORM_GCE_MACHINE_FAMILY_C4_STANDARD
51+
bool "C4 Standard family"
52+
depends on TARGET_ARCH_X86_64
53+
help
54+
Consistently high performance on Intel Emerald Rapids CPUs.
55+
3256
endchoice
3357

3458
source "terraform/gce/kconfigs/machines/Kconfig.n1-standard"
59+
source "terraform/gce/kconfigs/machines/Kconfig.n2-standard"
3560
source "terraform/gce/kconfigs/machines/Kconfig.n2-highcpu"
61+
source "terraform/gce/kconfigs/machines/Kconfig.n2d-standard"
3662
source "terraform/gce/kconfigs/machines/Kconfig.n2d-highcpu"
63+
source "terraform/gce/kconfigs/machines/Kconfig.n4-standard"
3764
source "terraform/gce/kconfigs/machines/Kconfig.n4-highcpu"
65+
source "terraform/gce/kconfigs/machines/Kconfig.c4-standard"
3866

3967
choice
4068
prompt "OS Distributor"
@@ -52,6 +80,9 @@ config TERRAFORM_GCE_DISTRO_DEBIAN
5280
config TERRAFORM_GCE_DISTRO_FEDORA
5381
bool "Fedora"
5482

83+
config TERRAFORM_GCE_DISTRO_OL
84+
bool "Oracle Linux"
85+
5586
config TERRAFORM_GCE_DISTRO_OPENSUSE
5687
bool "OpenSUSE"
5788

@@ -69,6 +100,7 @@ endchoice
69100
source "terraform/gce/kconfigs/images/Kconfig.centos"
70101
source "terraform/gce/kconfigs/images/Kconfig.debian"
71102
source "terraform/gce/kconfigs/images/Kconfig.fedora"
103+
source "terraform/gce/kconfigs/images/Kconfig.oracle"
72104
source "terraform/gce/kconfigs/images/Kconfig.opensuse"
73105
source "terraform/gce/kconfigs/images/Kconfig.rhel"
74106
source "terraform/gce/kconfigs/images/Kconfig.rocky"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
if TERRAFORM_GCE_DISTRO_OL
2+
3+
config TERRAFORM_GCE_IMAGE_PROJECT
4+
string
5+
output yaml
6+
default "oracle-linux-cloud"
7+
8+
config TERRAFORM_GCE_IMAGE_SIZE
9+
int
10+
output yaml
11+
default 20
12+
13+
if TARGET_ARCH_X86_64
14+
15+
choice
16+
prompt "OS image to use"
17+
18+
config TERRAFORM_GCE_IMAGE_OL_8_X86_64
19+
bool "Oracle Linux 8 (x86)"
20+
21+
config TERRAFORM_GCE_IMAGE_OL_9_X86_64
22+
bool "Oracle Linux 9 (x86)"
23+
24+
endchoice
25+
26+
config TERRAFORM_GCE_IMAGE_FAMILY
27+
string
28+
output yaml
29+
default "oracle-linux-8" if TERRAFORM_GCE_IMAGE_OL_8_X86_64
30+
default "oracle-linux-9" if TERRAFORM_GCE_IMAGE_OL_9_X86_64
31+
32+
endif # TARGET_ARCH_X86_64
33+
34+
endif # TERRAFORM_GCE_DISTRO_OL
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
if TERRAFORM_GCE_MACHINE_FAMILY_C4_STANDARD
2+
3+
choice
4+
prompt "GCE Machine Type"
5+
default TERRAFORM_GCE_MACHINE_C4_STANDARD_4
6+
help
7+
This option sets the GCE machine type. For other machine
8+
types, refer to this page:
9+
10+
https://cloud.google.com/compute/docs/machine-types
11+
12+
config TERRAFORM_GCE_MACHINE_C4_STANDARD_2
13+
bool "c4-standard-2"
14+
help
15+
2 vCPU (1 core) and 7GB of memory.
16+
17+
config TERRAFORM_GCE_MACHINE_C4_STANDARD_4
18+
bool "c4-standard-4"
19+
help
20+
4 vCPU (2 core) and 15GB of memory.
21+
22+
config TERRAFORM_GCE_MACHINE_C4_STANDARD_8
23+
bool "c4-standard-8"
24+
help
25+
8 vCPU (4 cores) and 30GB of memory.
26+
27+
config TERRAFORM_GCE_MACHINE_C4_STANDARD_16
28+
bool "c4-standard-16"
29+
help
30+
16 vCPU (8 cores) and 60GB of memory.
31+
32+
config TERRAFORM_GCE_MACHINE_C4_STANDARD_24
33+
bool "c4-standard-24"
34+
help
35+
24 vCPU (12 cores) and 90GB of memory.
36+
37+
endchoice
38+
39+
config TERRAFORM_GCE_MACHINE_TYPE
40+
string
41+
output yaml
42+
default "c4-standard-2" if TERRAFORM_GCE_MACHINE_C4_STANDARD_2
43+
default "c4-standard-4" if TERRAFORM_GCE_MACHINE_C4_STANDARD_4
44+
default "c4-standard-8" if TERRAFORM_GCE_MACHINE_C4_STANDARD_8
45+
default "c4-standard-16" if TERRAFORM_GCE_MACHINE_C4_STANDARD_16
46+
default "c4-standard-24" if TERRAFORM_GCE_MACHINE_C4_STANDARD_24
47+
48+
config TERRAFORM_GCE_IMAGE_TYPE
49+
string
50+
output yaml
51+
default "hyperdisk-balanced"
52+
53+
endif # TERRAFORM_GCE_MACHINE_FAMILY_C4_STANDARD

0 commit comments

Comments
 (0)