Skip to content

Commit 54ad5a1

Browse files
committed
Use workflow images in aio ci
This change begins using stackhpc-built images in AIO CI jobs. The disk size of the AIO runners is minimised, and an LVM configuration is now included in the AIO environment. Minor improvements to the build process and AIO configuration are included to allow the CI tests to pass.
1 parent 3636be3 commit 54ad5a1

File tree

8 files changed

+158
-21
lines changed

8 files changed

+158
-21
lines changed

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ on:
2727
description: Neutron ML2 plugin
2828
type: string
2929
required: true
30-
vm_image:
31-
description: Image for the all-in-one VM
30+
vm_image_override:
31+
description: Full name of an image to use instead of the default
3232
type: string
33-
default: bb8c0a34-533f-42fb-a49b-3461e677f3f6
33+
default: ""
3434
vm_interface:
3535
description: Default network interface name
3636
type: string
37-
default: eth0
37+
default: ens3
3838
vm_flavor:
3939
description: Flavor for the all-in-one VM
4040
type: string
@@ -76,6 +76,21 @@ jobs:
7676
with:
7777
submodules: true
7878

79+
- name: Output image tag
80+
id: image_tag
81+
run: |
82+
echo ::set-output name=image_tag::$(grep stackhpc_${{ inputs.os_distribution }}_${{ inputs.os_release }}_overcloud_host_image_version etc/kayobe/environments/ci-aio/stackhpc-ci.yml | awk '{print $2}')
83+
84+
# Use the image override if set, otherwise use overcloud-os_distribution-os_release-tag
85+
- name: Output image name
86+
id: image_name
87+
run: |
88+
if [ -z "${{ inputs.vm_image_override }}" ]; then
89+
echo ::set-output name=image_name::overcloud-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ steps.image_tag.outputs.image_tag }}
90+
else
91+
echo ::set-output name=image_name::${{ inputs.vm_image_override }}
92+
fi
93+
7994
- name: Install terraform
8095
uses: hashicorp/setup-terraform@v2
8196

@@ -110,7 +125,7 @@ jobs:
110125
env:
111126
SSH_USERNAME: "${{ inputs.ssh_username }}"
112127
VM_NAME: "skc-ci-aio-${{ inputs.neutron_plugin }}-${{ github.run_id }}"
113-
VM_IMAGE: ${{ inputs.vm_image }}
128+
VM_IMAGE: ${{ steps.image_name.outputs.image_name }}
114129
VM_FLAVOR: ${{ inputs.vm_flavor }}
115130
VM_NETWORK: ${{ inputs.vm_network }}
116131
VM_SUBNET: ${{ inputs.vm_subnet }}
@@ -191,6 +206,16 @@ jobs:
191206
run: |
192207
sudo docker image pull $KAYOBE_IMAGE
193208
209+
- name: Run growroot
210+
run: |
211+
sudo -E docker run -t --rm \
212+
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
213+
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
214+
$KAYOBE_IMAGE \
215+
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/growroot.yml'
216+
env:
217+
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
218+
194219
- name: Host configure
195220
run: |
196221
sudo -E docker run -t --rm \
@@ -243,6 +268,13 @@ jobs:
243268
run: |
244269
test $(wc -l < tempest-artifacts/failed-tests) -lt 1
245270
271+
- name: Upload logs artifact
272+
uses: actions/upload-artifact@v3
273+
with:
274+
name: kolla-logs-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}
275+
path: logs.zip
276+
if: failure()
277+
246278
- name: Destroy
247279
run: terraform destroy -auto-approve
248280
working-directory: ${{ github.workspace }}/terraform/aio

.github/workflows/stackhpc-pull-request.yml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ jobs:
7777
neutron_plugin: ovs
7878
# NOTE: The current SMS lab Rocky8 image has moved ahead of our release
7979
# train snapshots, causing failures installing some packages.
80-
vm_image: Rocky8-2022-11-08
81-
vm_interface: ens3
8280
OS_CLOUD: sms-lab-release
8381
secrets: inherit
8482
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
@@ -95,14 +93,12 @@ jobs:
9593
neutron_plugin: ovn
9694
# NOTE: The current SMS lab Rocky8 image has moved ahead of our release
9795
# train snapshots, causing failures installing some packages.
98-
vm_image: Rocky8-2022-11-08
99-
vm_interface: ens3
10096
OS_CLOUD: sms-lab-release
10197
secrets: inherit
10298
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
10399

104-
all-in-one-ubuntu-ovs:
105-
name: aio (Ubuntu OVS)
100+
all-in-one-ubuntu-focal-ovs:
101+
name: aio (Ubuntu Focal OVS)
106102
needs:
107103
- build-kayobe-image
108104
uses: ./.github/workflows/stackhpc-all-in-one.yml
@@ -112,13 +108,12 @@ jobs:
112108
os_release: focal
113109
ssh_username: ubuntu
114110
neutron_plugin: ovs
115-
vm_image: Ubuntu-20.04
116111
OS_CLOUD: sms-lab-release
117112
secrets: inherit
118113
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
119114

120-
all-in-one-ubuntu-ovn:
121-
name: aio (Ubuntu OVN)
115+
all-in-one-ubuntu-focal-ovn:
116+
name: aio (Ubuntu Focal OVN)
122117
needs:
123118
- build-kayobe-image
124119
uses: ./.github/workflows/stackhpc-all-in-one.yml
@@ -128,7 +123,36 @@ jobs:
128123
os_release: focal
129124
ssh_username: ubuntu
130125
neutron_plugin: ovn
131-
vm_image: Ubuntu-20.04
126+
OS_CLOUD: sms-lab-release
127+
secrets: inherit
128+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
129+
130+
all-in-one-ubuntu-jammy-ovs:
131+
name: aio (Ubuntu Jammy OVS)
132+
needs:
133+
- build-kayobe-image
134+
uses: ./.github/workflows/stackhpc-all-in-one.yml
135+
with:
136+
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
137+
os_distribution: ubuntu
138+
os_release: jammy
139+
ssh_username: ubuntu
140+
neutron_plugin: ovs
141+
OS_CLOUD: sms-lab-release
142+
secrets: inherit
143+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
144+
145+
all-in-one-ubuntu-jammy-ovn:
146+
name: aio (Ubuntu Jammy OVN)
147+
needs:
148+
- build-kayobe-image
149+
uses: ./.github/workflows/stackhpc-all-in-one.yml
150+
with:
151+
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
152+
os_distribution: ubuntu
153+
os_release: jammy
154+
ssh_username: ubuntu
155+
neutron_plugin: ovn
132156
OS_CLOUD: sms-lab-release
133157
secrets: inherit
134158
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
@@ -144,8 +168,6 @@ jobs:
144168
os_release: "9"
145169
ssh_username: cloud-user
146170
neutron_plugin: ovs
147-
vm_image: Rocky9
148-
vm_interface: ens3
149171
OS_CLOUD: sms-lab-release
150172
secrets: inherit
151173
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
@@ -161,8 +183,6 @@ jobs:
161183
os_release: "9"
162184
ssh_username: cloud-user
163185
neutron_plugin: ovn
164-
vm_image: Rocky9
165-
vm_interface: ens3
166186
OS_CLOUD: sms-lab-release
167187
secrets: inherit
168188
if: github.repository == 'stackhpc/stackhpc-kayobe-config'

etc/kayobe/environments/ci-aio/controllers.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@
55
# User with which to access the controllers via SSH during bootstrap, in order
66
# to setup the Kayobe user account. Default is {{ os_distribution }}.
77
controller_bootstrap_user: "{{ os_distribution if os_distribution == 'ubuntu' else 'cloud-user' }}"
8+
9+
# Controller lvm configuration. See intentory/group_vars/controllers/lvm.yml
10+
# for the exact configuration.
11+
controller_lvm_groups:
12+
- "{{ stackhpc_lvm_group_rootvg }}"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
# List of extra LVs to include in the rootvg VG.
3+
stackhpc_lvm_group_rootvg_lvs_extra:
4+
- "{{ stackhpc_lvm_lv_docker }}"
5+
6+
###############################################################################
7+
# StackHPC LVM Logical Volume (LV) configuration.
8+
9+
# StackHPC LVM lv_swap LV size.
10+
stackhpc_lvm_lv_swap_size: 500m
11+
12+
# StackHPC LVM lv_root LV size.
13+
stackhpc_lvm_lv_root_size: 2g
14+
15+
# StackHPC LVM lv_tmp LV size.
16+
stackhpc_lvm_lv_tmp_size: 2g
17+
18+
# StackHPC LVM lv_var LV size.
19+
stackhpc_lvm_lv_var_size: 2g
20+
21+
# StackHPC LVM lv_var_tmp LV size.
22+
stackhpc_lvm_lv_var_tmp_size: 2g
23+
24+
# StackHPC LVM lv_log LV size.
25+
stackhpc_lvm_lv_log_size: 2g
26+
27+
# StackHPC LVM lv_audit LV size.
28+
stackhpc_lvm_lv_audit_size: 250m
29+
30+
# StackHPC LVM lv_home LV size.
31+
stackhpc_lvm_lv_home_size: 2g
32+
33+
# StackHPC LVM lv_docker LV size.
34+
stackhpc_lvm_lv_docker_size: 95%FREE

etc/kayobe/environments/ci-aio/stackhpc-ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,10 @@ stackhpc_docker_registry_password: !vault |
8383
38333133393730633666613965653364316162353337313330346164303631313731646461363461
8484
3963323635373866630a633533376339363734626664333765313665623662613764363038383735
8585
38646138376438643533376161376634653439386230353365316239613430363338
86+
87+
# Overcloud host image tags
88+
stackhpc_centos_8-stream_overcloud_host_image_version: "yoga-20230525T095243"
89+
stackhpc_rocky_8_overcloud_host_image_version: "yoga-20230524T084837"
90+
stackhpc_rocky_9_overcloud_host_image_version: "yoga-20230515T145140"
91+
stackhpc_ubuntu_focal_overcloud_host_image_version: "yoga-20230609T120720"
92+
stackhpc_ubuntu_jammy_overcloud_host_image_version: "yoga-20230609T120720"

etc/kayobe/stackhpc-overcloud-dib.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,21 @@ stackhpc_overcloud_dib_env_vars:
5757
# FIXME: Support templating repo files.
5858
# DIB_YUM_MINIMAL_BOOTSTRAP_REPOS: /path/to/dir/containing/dib-mirror-*.repo
5959
YUM: dnf
60+
# Workaround for stack user home ownership bug
61+
DIB_IMAGE_CACHE: "/tmp/yum"
6062

6163
# StackHPC overcloud DIB image packages.
6264
stackhpc_overcloud_dib_packages:
6365
- "logrotate"
6466
- "net-tools"
6567
- "vim"
68+
- "git"
69+
- "less"
6670
- "{% if os_distribution == 'ubuntu' %}netbase{% endif %}"
6771
- "{% if os_distribution == 'ubuntu' %}iputils-ping{% endif %}"
72+
- "{% if os_distribution == 'ubuntu' %}curl{% endif %}"
73+
- "{% if os_distribution == 'ubuntu' %}apt-utils{% endif %}"
74+
- "{% if os_distribution == 'centos' %}openssh-clients{% endif %}"
6875

6976
# StackHPC overcloud DIB image block device configuration.
7077
# This image layout conforms to the CIS partition benchmarks.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
##############################
3+
# Overcloud host image sources
4+
5+
# WIP - currently unused
6+
# CentOS stream 8 overcloud host image source
7+
stackhpc_centos_8-stream_overcloud_host_image_url: "{{ stackhpc_release_pulp_content_url }}/kayobe-images/{{ openstack_release }}/centos/8-stream/{{ stackhpc_centos_overcloud_host_image_version }}/overcloud-centos-8-stream.qcow2"
8+
stackhpc_centos_8-stream_overcloud_host_image_version: "yoga-20230525T095243"
9+
10+
# Rocky 8 overcloud host image source
11+
stackhpc_rocky_8_overcloud_host_image_url: "{{ stackhpc_release_pulp_content_url }}/kayobe-images/{{ openstack_release }}/rocky/8/{{ stackhpc_rocky_overcloud_host_image_version }}/overcloud-rocky-linux-8.qcow2"
12+
stackhpc_rocky_8_overcloud_host_image_version: "yoga-20230524T084837"
13+
14+
# Rocky 9 overcloud host image source
15+
stackhpc_rocky_9_overcloud_host_image_url: "{{ stackhpc_release_pulp_content_url }}/kayobe-images/{{ openstack_release }}/rocky/9/{{ stackhpc_rocky_overcloud_host_image_version }}/overcloud-rocky-linux-9.qcow2"
16+
stackhpc_rocky_9_overcloud_host_image_version: "yoga-20230515T145140"
17+
18+
# Ubuntu focal overcloud host image source
19+
stackhpc_ubuntu_focal_overcloud_host_image_url: "{{ stackhpc_release_pulp_content_url }}/kayobe-images/{{ openstack_release }}/ubuntu/focal/{{ stackhpc_ubuntu_overcloud_host_image_version }}/overcloud-ubuntu-focal.qcow2"
20+
stackhpc_ubuntu_focal_overcloud_host_image_version: "yoga-20230609T120720"
21+
22+
# Ubuntu jammy overcloud host image source
23+
stackhpc_ubuntu_jammy_overcloud_host_image_url: "{{ stackhpc_release_pulp_content_url }}/kayobe-images/{{ openstack_release }}/ubuntu/jammy/{{ stackhpc_ubuntu_overcloud_host_image_version }}/overcloud-ubuntu-jammy.qcow2"
24+
stackhpc_ubuntu_jammy_overcloud_host_image_version: "yoga-20230609T120720"
25+
26+
# Whether to download overcloud host images from Ark. Default is true.
27+
# WIP - not yet implemented. Waiting on upstream bifrost changes
28+
# stackhpc_download_overcloud_images: false

terraform/aio/vm.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ resource "openstack_compute_instance_v2" "kayobe-aio" {
5959
block_device {
6060
uuid = local.image_is_uuid ? var.aio_vm_image: data.openstack_images_image_v2.image[0].id
6161
source_type = "image"
62-
volume_size = 100
62+
volume_size = 35
6363
boot_index = 0
6464
destination_type = "volume"
6565
delete_on_termination = true
@@ -73,8 +73,12 @@ resource "null_resource" "kayobe-aio" {
7373
host = openstack_compute_instance_v2.kayobe-aio.access_ip_v4
7474
user = var.ssh_username
7575
private_key = file("id_rsa")
76+
script_path = "/home/${var.ssh_username}/start.sh"
7677
}
7778

78-
inline = ["echo 'connected!'"]
79+
inline = [
80+
"#!/bin/sh",
81+
"echo 'connected!'"
82+
]
7983
}
8084
}

0 commit comments

Comments
 (0)