Skip to content

Commit c252097

Browse files
authored
Merge branch 'stackhpc/2023.1' into feature/yoga/redfish-exporter
2 parents 7511f66 + d6b1b3a commit c252097

File tree

136 files changed

+52230
-50727
lines changed

Some content is hidden

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

136 files changed

+52230
-50727
lines changed

.automation.conf/tempest/tempest-ci-multinode.overrides.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ max_microversion = 3.70
3232
build_timeout = 600
3333

3434
[dashboard]
35-
dashboard_url = http://192.168.39.2
35+
dashboard_url = https://192.168.39.2

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

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
VM_NETWORK: ${{ inputs.vm_network }}
168168
VM_SUBNET: ${{ inputs.vm_subnet }}
169169
VM_INTERFACE: ${{ inputs.vm_interface }}
170-
VM_VOLUME_SIZE: ${{ inputs.upgrade && '45' || '35' }}
170+
VM_VOLUME_SIZE: ${{ inputs.upgrade && '50' || '40' }}
171171
VM_TAGS: '["skc-ci-aio", "PR=${{ github.event.number }}"]'
172172

173173
- name: Terraform Plan
@@ -179,6 +179,7 @@ jobs:
179179
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
180180

181181
- name: Terraform Apply
182+
id: tf_apply
182183
run: |
183184
for attempt in $(seq 5); do
184185
if terraform apply -auto-approve; then
@@ -354,7 +355,22 @@ jobs:
354355
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
355356
if: inputs.upgrade
356357

358+
- name: Ensure we have IP on breth1 to reach the instances
359+
# NOTE(wszumski): Whilst we don't need to create resources again, in some circumstances
360+
# we can lose the IP address that allows us to connect to the instances. This playbook
361+
# also fixes that issue.
362+
run: |
363+
docker run -t --rm \
364+
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
365+
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
366+
${{ steps.kayobe_image.outputs.kayobe_image }} \
367+
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh etc/kayobe/ansible/configure-aio-resources.yml
368+
env:
369+
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
370+
if: inputs.upgrade
371+
357372
- name: Tempest tests
373+
id: tempest
358374
run: |
359375
mkdir -p tempest-artifacts
360376
docker run -t --rm \
@@ -366,16 +382,55 @@ jobs:
366382
env:
367383
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
368384

385+
- name: StackHPC OpenStack tests
386+
id: stackhpc-openstack-tests
387+
continue-on-error: true
388+
run: |
389+
mkdir -p sot-results
390+
docker run -t --rm \
391+
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
392+
-v $(pwd)/sot-results:/stack/sot-results \
393+
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
394+
$KAYOBE_IMAGE \
395+
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/stackhpc-openstack-tests.yml'
396+
env:
397+
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
398+
399+
- name: Collect diagnostic information
400+
id: diagnostics
401+
run: |
402+
mkdir -p diagnostics
403+
sudo -E docker run -t --rm \
404+
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
405+
-v $(pwd)/diagnostics:/stack/diagnostics \
406+
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
407+
$KAYOBE_IMAGE \
408+
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/diagnostics.yml'
409+
env:
410+
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
411+
if: ${{ !cancelled() && steps.tf_apply.outcome == 'success' }}
412+
369413
- name: Upload test result artifacts
370414
uses: actions/upload-artifact@v4
371415
with:
372-
name: tempest-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}${{ inputs.upgrade && '-upgrade' }}
373-
path: tempest-artifacts/*
416+
name: test-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}${{ inputs.upgrade && '-upgrade' || '' }}
417+
path: |
418+
diagnostics/
419+
tempest-artifacts/
420+
sot-results/
421+
if: ${{ !cancelled() && (steps.tempest.outcome == 'success' || steps.stackhpc-openstack-tests.outcome == 'success' || steps.diagnostics.outcome == 'success') }}
374422

375423
- name: Fail if any Tempest tests failed
376424
run: |
377425
test $(wc -l < tempest-artifacts/failed-tests) -lt 1
378426
427+
- name: Fail if any StackHPC OpenStack tests failed
428+
run: |
429+
echo "Some StackHPC OpenStack tests failed."
430+
echo "See HTML results artifact (sot-results) for details."
431+
exit 1
432+
if: steps.stackhpc-openstack-tests.outcome == 'failure'
433+
379434
- name: Destroy
380435
run: terraform destroy -auto-approve
381436
working-directory: ${{ github.workspace }}/terraform/aio

.github/workflows/stackhpc-container-image-build.yml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ on:
3434
required: false
3535
default: true
3636
push-dirty:
37-
description: Push scanned images that have vulnerabilities?
37+
description: Push scanned images that have critical vulnerabilities?
3838
type: boolean
3939
required: false
40-
# NOTE(Alex-Welsh): This default should be flipped once we resolve existing failures
41-
default: true
40+
default: false
4241

4342
env:
4443
ANSIBLE_FORCE_COLOR: True
@@ -136,6 +135,10 @@ jobs:
136135
run: |
137136
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b /usr/local/bin v0.49.0
138137
138+
- name: Install yq
139+
run: |
140+
curl -sL https://github.com/mikefarah/yq/releases/download/v4.42.1/yq_linux_amd64.tar.gz | tar xz && sudo mv yq_linux_amd64 /usr/bin/yq
141+
139142
- name: Install Kayobe
140143
run: |
141144
mkdir -p venvs &&
@@ -149,7 +152,7 @@ jobs:
149152
# Normally installed during host configure.
150153
- name: Install Docker Python SDK
151154
run: |
152-
sudo pip install docker
155+
sudo pip install docker 'requests<2.32.0'
153156
154157
- name: Get Kolla tag
155158
id: write-kolla-tag
@@ -176,7 +179,7 @@ jobs:
176179
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
177180

178181
- name: Create build logs output directory
179-
run: mkdir image-build-logs
182+
run: mkdir image-build-logs
180183

181184
- name: Build kolla overcloud images
182185
id: build_overcloud_images
@@ -228,16 +231,23 @@ jobs:
228231
run: mv image-scan-output image-build-logs/image-scan-output
229232

230233
- name: Fail if no images have passed scanning
231-
run: if [ $(wc -l < image-build-logs/image-scan-output/clean-images.txt) -le 0 ]; then exit 1; fi
234+
run: if [ $(wc -l < image-build-logs/image-scan-output/critical-images.txt) -gt 0 ]; then exit 1; fi
232235
if: ${{ !inputs.push-dirty }}
233236

234237
- name: Copy clean images to push-attempt-images list
235238
run: cp image-build-logs/image-scan-output/clean-images.txt image-build-logs/push-attempt-images.txt
236239
if: inputs.push
237240

241+
# NOTE(seunghun1ee): This always appends dirty images with CVEs severity lower than critical.
242+
# This should be reverted when it's decided to filter high level CVEs as well.
238243
- name: Append dirty images to push list
239244
run: |
240245
cat image-build-logs/image-scan-output/dirty-images.txt >> image-build-logs/push-attempt-images.txt
246+
if: ${{ inputs.push }}
247+
248+
- name: Append images with critical vulnerabilities to push list
249+
run: |
250+
cat image-build-logs/image-scan-output/critical-images.txt >> image-build-logs/push-attempt-images.txt
241251
if: ${{ inputs.push && inputs.push-dirty }}
242252

243253
- name: Push images
@@ -249,11 +259,11 @@ jobs:
249259
250260
while read -r image; do
251261
# Retries!
252-
for i in {1..5}; do
262+
for i in {1..5}; do
253263
if docker push $image; then
254264
echo "Pushed $image"
255265
break
256-
elif $i == 5; then
266+
elif [ $i -eq 5 ] ; then
257267
echo "Failed to push $image"
258268
echo $image >> image-build-logs/push-failed-images.txt
259269
else
@@ -283,8 +293,15 @@ jobs:
283293
run: if [ $(wc -l < image-build-logs/push-failed-images.txt) -gt 0 ]; then cat image-build-logs/push-failed-images.txt && exit 1; fi
284294
if: ${{ !cancelled() }}
285295

286-
- name: Fail when images failed scanning
287-
run: if [ $(wc -l < image-build-logs/dirty-images.txt) -gt 0 ]; then cat image-build-logs/dirty-images.txt && exit 1; fi
296+
# NOTE(seunghun1ee): Currently we want to mark the job fail only when critical CVEs are detected.
297+
# This can be used again instead of "Fail when critical vulnerabilities are found" when it's
298+
# decided to fail the job on detecting high CVEs as well.
299+
# - name: Fail when images failed scanning
300+
# run: if [ $(wc -l < image-build-logs/image-scan-output/dirty-images.txt) -gt 0 ]; then cat image-build-logs/image-scan-output/dirty-images.txt && exit 1; fi
301+
# if: ${{ !inputs.push-dirty && !cancelled() }}
302+
303+
- name: Fail when critical vulnerabilities are found
304+
run: if [ $(wc -l < image-build-logs/image-scan-output/critical-images.txt) -gt 0 ]; then cat image-build-logs/image-scan-output/critical-images.txt && exit 1; fi
288305
if: ${{ !inputs.push-dirty && !cancelled() }}
289306

290307
# NOTE(mgoddard): Trigger another CI workflow in the

doc/source/configuration/cephadm.rst

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
================
2-
Cephadm & Kayobe
3-
================
1+
====
2+
Ceph
3+
====
44

55
This section describes how to use the Cephadm integration included in StackHPC
6-
Kayobe configuration since Xena to deploy Ceph.
6+
Kayobe configuration to deploy Ceph.
77

88
The Cephadm integration takes the form of custom playbooks that wrap
99
around the Ansible `stackhpc.cephadm collection
@@ -19,10 +19,10 @@ create or modify Ceph cluster deployments. Supported features are:
1919
Resources
2020
=========
2121

22-
- https://docs.ceph.com/en/pacific/cephadm/index.html
23-
- https://docs.ceph.com/en/pacific/
2422
- https://docs.ceph.com/en/quincy/cephadm/index.html
2523
- https://docs.ceph.com/en/quincy/
24+
- https://docs.ceph.com/en/reef/cephadm/index.html
25+
- https://docs.ceph.com/en/reef/
2626
- https://github.com/stackhpc/ansible-collection-cephadm
2727

2828
Configuration
@@ -107,7 +107,7 @@ OSD specification
107107
~~~~~~~~~~~~~~~~~
108108

109109
The following example is a basic OSD spec that adds OSDs for all
110-
available disks:
110+
available disks with encryption at rest:
111111

112112
.. code:: yaml
113113
@@ -118,9 +118,10 @@ available disks:
118118
host_pattern: "*"
119119
data_devices:
120120
all: true
121+
encrypted: true
121122
122123
More information about OSD service placement is available
123-
`here <https://docs.ceph.com/en/pacific/cephadm/services/osd/#advanced-osd-service-specifications>`__.
124+
`here <https://docs.ceph.com/en/quincy/cephadm/services/osd/#advanced-osd-service-specifications>`__.
124125

125126
Container image
126127
~~~~~~~~~~~~~~~
@@ -264,6 +265,24 @@ post-deployment configuration is applied. Commands in the
264265
``cephadm_commands_post`` list are executed after the rest of the Ceph
265266
post-deployment configuration is applied.
266267

268+
Messenger v2 encryption in transit
269+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
270+
271+
Messenger v2 is the default on-wire protocol since the Nautilus release. It
272+
supports `encryption of data in transit
273+
<https://docs.ceph.com/en/quincy/rados/configuration/msgr2/#connection-mode-configuration-options>`_,
274+
but this is not used by default. It may be enabled as follows:
275+
276+
.. code:: yaml
277+
278+
# A list of commands to pass to cephadm shell -- ceph. See stackhpc.cephadm.commands
279+
# for format.
280+
cephadm_commands_pre:
281+
# Enable messenger v2 encryption in transit.
282+
- "config set global ms_cluster_mode secure"
283+
- "config set global ms_service_mode secure"
284+
- "config set global ms_client_mode secure"
285+
267286
Manila & CephFS
268287
~~~~~~~~~~~~~~~
269288

0 commit comments

Comments
 (0)