Skip to content

Commit 851a5c6

Browse files
authored
Merge branch 'stackhpc/yoga' into jph/designate
2 parents 1f78495 + 68026c4 commit 851a5c6

File tree

55 files changed

+2322
-83
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2322
-83
lines changed

.github/workflows/overcloud-host-image-promote.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,26 @@ name: Promote overcloud host image
33
on:
44
workflow_dispatch:
55
inputs:
6-
os_image:
7-
description: Image to promote
8-
type: choice
9-
required: true
10-
default: 'CentOS Stream 8'
11-
options:
12-
- 'CentOS Stream 8'
13-
- 'Rocky Linux 8'
14-
- 'Rocky Linux 9'
15-
- 'Ubuntu Focal 20.04'
16-
- 'Ubuntu Jammy 22.04'
6+
centos:
7+
description: Promote CentOS Stream 8
8+
type: boolean
9+
default: true
10+
rocky8:
11+
description: Promote Rocky Linux 8
12+
type: boolean
13+
default: true
14+
rocky9:
15+
description: Promote Rocky Linux 9
16+
type: boolean
17+
default: true
18+
ubuntu-focal:
19+
description: Promote Ubuntu 20.04 Focal
20+
type: boolean
21+
default: true
22+
ubuntu-jammy:
23+
description: Promote Ubuntu 22.04 Jammy
24+
type: boolean
25+
default: true
1726
image_tag:
1827
description: Tag to promote
1928
type: string
@@ -78,14 +87,6 @@ jobs:
7887
source src/kayobe-config/kayobe-env --environment ci-builder &&
7988
kayobe control host bootstrap
8089
81-
- name: Configure the seed host
82-
run: |
83-
source venvs/kayobe/bin/activate &&
84-
source src/kayobe-config/kayobe-env --environment ci-builder &&
85-
kayobe seed host configure
86-
env:
87-
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
88-
8990
- name: Promote CentOS Stream 8 overcloud host image artifact
9091
run: |
9192
source venvs/kayobe/bin/activate &&
@@ -98,7 +99,7 @@ jobs:
9899
env:
99100
OVERCLOUD_HOST_IMAGE_TAG: ${{ inputs.image_tag }}
100101
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
101-
if: os_image == 'CentOS Stream 8'
102+
if: inputs.centos
102103

103104
- name: Promote Rocky Linux 8 overcloud host image artifact
104105
run: |
@@ -112,7 +113,7 @@ jobs:
112113
env:
113114
OVERCLOUD_HOST_IMAGE_TAG: ${{ inputs.image_tag }}
114115
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
115-
if: os_image == 'Rocky Linux 8'
116+
if: inputs.rocky8
116117

117118
- name: Promote Rocky Linux 9 overcloud host image artifact
118119
run: |
@@ -126,7 +127,7 @@ jobs:
126127
env:
127128
OVERCLOUD_HOST_IMAGE_TAG: ${{ inputs.image_tag }}
128129
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
129-
if: os_image == 'Rocky Linux 9'
130+
if: inputs.rocky9
130131

131132
- name: Promote Ubuntu Focal 20.04 overcloud host image artifact
132133
run: |
@@ -140,7 +141,7 @@ jobs:
140141
env:
141142
OVERCLOUD_HOST_IMAGE_TAG: ${{ inputs.image_tag }}
142143
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
143-
if: os_image == 'Ubuntu Focal 20.04'
144+
if: inputs.ubuntu-focal
144145

145146
- name: Promote Ubuntu Jammy 22.04 overcloud host image artifact
146147
run: |
@@ -154,4 +155,4 @@ jobs:
154155
env:
155156
OVERCLOUD_HOST_IMAGE_TAG: ${{ inputs.image_tag }}
156157
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
157-
if: os_image == 'Ubuntu Jammy 22.04'
158+
if: inputs.ubuntu-jammy

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

Lines changed: 30 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 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}') >> $GITHUB_OUTPUT
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 image_name=overcloud-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ steps.image_tag.outputs.image_tag }} >> $GITHUB_OUTPUT
90+
else
91+
echo image_name=${{ inputs.vm_image_override }} >> $GITHUB_OUTPUT
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 \

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

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ jobs:
7575
os_distribution: rocky
7676
os_release: "8"
7777
neutron_plugin: ovs
78-
# NOTE: The current SMS lab Rocky8 image has moved ahead of our release
79-
# train snapshots, causing failures installing some packages.
80-
vm_image: Rocky8-2022-11-08
81-
vm_interface: ens3
8278
OS_CLOUD: sms-lab-release
8379
secrets: inherit
8480
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
@@ -93,10 +89,6 @@ jobs:
9389
os_distribution: rocky
9490
os_release: "8"
9591
neutron_plugin: ovn
96-
# NOTE: The current SMS lab Rocky8 image has moved ahead of our release
97-
# train snapshots, causing failures installing some packages.
98-
vm_image: Rocky8-2022-11-08
99-
vm_interface: ens3
10092
OS_CLOUD: sms-lab-release
10193
secrets: inherit
10294
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
@@ -112,7 +104,6 @@ jobs:
112104
os_release: focal
113105
ssh_username: ubuntu
114106
neutron_plugin: ovs
115-
vm_image: Ubuntu-20.04
116107
OS_CLOUD: sms-lab-release
117108
secrets: inherit
118109
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
@@ -128,7 +119,36 @@ jobs:
128119
os_release: focal
129120
ssh_username: ubuntu
130121
neutron_plugin: ovn
131-
vm_image: Ubuntu-20.04
122+
OS_CLOUD: sms-lab-release
123+
secrets: inherit
124+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
125+
126+
all-in-one-ubuntu-jammy-ovs:
127+
name: aio (Ubuntu Jammy OVS)
128+
needs:
129+
- build-kayobe-image
130+
uses: ./.github/workflows/stackhpc-all-in-one.yml
131+
with:
132+
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
133+
os_distribution: ubuntu
134+
os_release: jammy
135+
ssh_username: ubuntu
136+
neutron_plugin: ovs
137+
OS_CLOUD: sms-lab-release
138+
secrets: inherit
139+
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
140+
141+
all-in-one-ubuntu-jammy-ovn:
142+
name: aio (Ubuntu Jammy OVN)
143+
needs:
144+
- build-kayobe-image
145+
uses: ./.github/workflows/stackhpc-all-in-one.yml
146+
with:
147+
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
148+
os_distribution: ubuntu
149+
os_release: jammy
150+
ssh_username: ubuntu
151+
neutron_plugin: ovn
132152
OS_CLOUD: sms-lab-release
133153
secrets: inherit
134154
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
@@ -144,8 +164,6 @@ jobs:
144164
os_release: "9"
145165
ssh_username: cloud-user
146166
neutron_plugin: ovs
147-
vm_image: Rocky9
148-
vm_interface: ens3
149167
OS_CLOUD: sms-lab-release
150168
secrets: inherit
151169
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
@@ -161,8 +179,6 @@ jobs:
161179
os_release: "9"
162180
ssh_username: cloud-user
163181
neutron_plugin: ovn
164-
vm_image: Rocky9
165-
vm_interface: ens3
166182
OS_CLOUD: sms-lab-release
167183
secrets: inherit
168184
if: github.repository == 'stackhpc/stackhpc-kayobe-config'

doc/source/configuration/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ the various features provided.
1616
cephadm
1717
monitoring
1818
wazuh
19+
vault
20+
magnum-capi
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
=========================
2+
Magnum Cluster API Driver
3+
=========================
4+
A new driver for magnum has been written. It is an alternative to heat (as heat gets phased out due to maintenance burden) that allows the definition of clusters as Kubernetes CRDs as opposed to heat templates. The two are compatible and can both be active on the same deployment, and the decision of which driver is used for a given template depends on certain parameters inferred from the template. For the new driver, these are `{'server_type' : 'vm', 'os' : 'ubuntu', 'coe': kubernetes'}`.
5+
Drivers can be enabled and disabled via the `disabled_drivers` parameter of `[drivers]` under `magnum.conf`.
6+
7+
Prerequisites for deploying the CAPI driver in magnum:
8+
9+
Management Cluster
10+
===================
11+
The CAPI driver relies on a management Kubernetes cluster, installed inside the cloud, to manage tenant Kubernetes clusters.
12+
The easiest way to get one is by deploying `this <https://github.com/stackhpc/azimuth-config/tree/feature/capi-mgmt-config>`__ branch of azimuth-config, and look at the `capi-mgmt-example` environment. Refer to the `azimuth-config wiki <https://stackhpc.github.io/azimuth-config/>`__ for detailed steps on how to deploy.
13+
14+
Ensure that you have set `capi_cluster_apiserver_floating_ip: true`, as the management cluster will need an externally accessible IP. The external network this corresponds to is whatever you have set `azimuth_capi_operator_external_network_id` to. This network needs to be reachable from wherever the magnum container is running.
15+
16+
It's preferable that most Day 2 ops be done via a `CD Pipeline <https://stackhpc.github.io/azimuth-config/deployment/automation/>`__.
17+
18+
Kayobe Config
19+
==============
20+
Ensure that your kayobe-config branch is up to date on |current_release_git_branch_name|.
21+
22+
Copy the kubeconfig found at `kubeconfig-capi-mgmt-<your-az-environment>.yaml` to your kayobe environment (e.g. `<your-skc-environment>/kolla/config/magnum/kubeconfig`. It is highly likely you'll want to add this file to ansible vault.
23+
24+
Ensure that your magnum.conf has the following set:
25+
26+
.. code-block:: yaml
27+
28+
[nova_client]
29+
endpoint_type = publicURL
30+
31+
32+
This is used to generate the application credential config injected into the tenant Kubernetes clusters, such that it is usable from within an OpenStack project, so you can't use the "internal API" end point here.
33+
34+
Control Plane
35+
==============
36+
Ensure that the nodes (either controllers or dedicated network hosts) that you are running the magnum containers on have connectivity to the network on which your management cluster has a floating IP (so that the magnum containers can reach the IP listed in the kubeconfig).
37+
38+
Magnum Templates
39+
================
40+
41+
`azimuth-images <https://github.com/stackhpc/azimuth-images>`__ builds the required Ubuntu Kubernetes images, and `capi-helm-charts <https://github.com/stackhpc/capi-helm-charts/blob/main/.github/workflows/test.yaml>`__ CI runs conformance tests on each image built.
42+
43+
Magnum templates can be deployed using `openstack-config <https://github.com/stackhpc/openstack-config>`__. Typically, you would create a fork `<environment>-config` of this repository, move the resources defined in `examples/capi-templates-images.yml` into `etc/openstack-config/openstack-config.yml`, and then follow the instructions in the readme to deploy these.
44+
45+

0 commit comments

Comments
 (0)