Skip to content

Commit 35db133

Browse files
authored
Merge branch 'stackhpc/2023.1' into bugfix/INFRA-629-2
2 parents 4f7e364 + e3ade14 commit 35db133

File tree

57 files changed

+1140
-279
lines changed

Some content is hidden

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

57 files changed

+1140
-279
lines changed

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

Lines changed: 44 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' || '35' }}
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
@@ -355,6 +356,7 @@ jobs:
355356
if: inputs.upgrade
356357

357358
- name: Tempest tests
359+
id: tempest
358360
run: |
359361
mkdir -p tempest-artifacts
360362
docker run -t --rm \
@@ -366,16 +368,55 @@ jobs:
366368
env:
367369
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
368370

371+
- name: StackHPC OpenStack tests
372+
id: stackhpc-openstack-tests
373+
continue-on-error: true
374+
run: |
375+
mkdir -p sot-results
376+
docker run -t --rm \
377+
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
378+
-v $(pwd)/sot-results:/stack/sot-results \
379+
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
380+
$KAYOBE_IMAGE \
381+
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/stackhpc-openstack-tests.yml'
382+
env:
383+
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
384+
385+
- name: Collect diagnostic information
386+
id: diagnostics
387+
run: |
388+
mkdir -p diagnostics
389+
sudo -E docker run -t --rm \
390+
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
391+
-v $(pwd)/diagnostics:/stack/diagnostics \
392+
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
393+
$KAYOBE_IMAGE \
394+
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/diagnostics.yml'
395+
env:
396+
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
397+
if: ${{ !cancelled() && steps.tf_apply.outcome == 'success' }}
398+
369399
- name: Upload test result artifacts
370400
uses: actions/upload-artifact@v4
371401
with:
372-
name: tempest-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}${{ inputs.upgrade && '-upgrade' }}
373-
path: tempest-artifacts/*
402+
name: test-results-${{ inputs.os_distribution }}-${{ inputs.os_release }}-${{ inputs.neutron_plugin }}${{ inputs.upgrade && '-upgrade' || '' }}
403+
path: |
404+
diagnostics/
405+
tempest-artifacts/
406+
sot-results/
407+
if: ${{ !cancelled() && (steps.tempest.outcome == 'success' || steps.stackhpc-openstack-tests.outcome == 'success' || steps.diagnostics.outcome == 'success') }}
374408

375409
- name: Fail if any Tempest tests failed
376410
run: |
377411
test $(wc -l < tempest-artifacts/failed-tests) -lt 1
378412
413+
- name: Fail if any StackHPC OpenStack tests failed
414+
run: |
415+
echo "Some StackHPC OpenStack tests failed."
416+
echo "See HTML results artifact (sot-results) for details."
417+
exit 1
418+
if: steps.stackhpc-openstack-tests.outcome == 'failure'
419+
379420
- name: Destroy
380421
run: terraform destroy -auto-approve
381422
working-directory: ${{ github.workspace }}/terraform/aio

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ jobs:
136136
run: |
137137
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b /usr/local/bin v0.49.0
138138
139+
- name: Install yq
140+
run: |
141+
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
142+
139143
- name: Install Kayobe
140144
run: |
141145
mkdir -p venvs &&
@@ -149,7 +153,7 @@ jobs:
149153
# Normally installed during host configure.
150154
- name: Install Docker Python SDK
151155
run: |
152-
sudo pip install docker
156+
sudo pip install docker 'requests<2.32.0'
153157
154158
- name: Get Kolla tag
155159
id: write-kolla-tag
@@ -253,7 +257,7 @@ jobs:
253257
if docker push $image; then
254258
echo "Pushed $image"
255259
break
256-
elif $i == 5; then
260+
elif [ $i -eq 5 ] ; then
257261
echo "Failed to push $image"
258262
echo $image >> image-build-logs/push-failed-images.txt
259263
else

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

doc/source/configuration/monitoring.rst

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ depending on your configuration, you may need set the
126126
``kolla_enable_prometheus_ceph_mgr_exporter`` variable to ``true`` in order to
127127
enable the ceph mgr exporter.
128128

129+
.. _os-capacity:
130+
129131
OpenStack Capacity
130132
==================
131133

@@ -149,9 +151,19 @@ project domain name in ``stackhpc-monitoring.yml``:
149151
stackhpc_os_capacity_openstack_region_name: <openstack_region_name>
150152
151153
Additionally, you should ensure these credentials have the correct permissions
152-
for the exporter. If you are deploying in a cloud with internal TLS, you may be required
153-
to disable certificate verification for the OpenStack Capacity exporter
154-
if your certificate is not signed by a trusted CA.
154+
for the exporter.
155+
156+
If you are deploying in a cloud with internal TLS, you may be required
157+
to provide a CA certificate for the OpenStack Capacity exporter if your
158+
certificate is not signed by a trusted CA. For example, to use a CA certificate
159+
named ``vault.crt`` that is also added to the Kolla containers:
160+
161+
.. code-block:: yaml
162+
163+
stackhpc_os_capacity_openstack_cacert: "{{ kayobe_env_config_path }}/kolla/certificates/ca/vault.crt"
164+
165+
Alternatively, to disable certificate verification for the OpenStack Capacity
166+
exporter:
155167

156168
.. code-block:: yaml
157169

doc/source/configuration/release-train.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,33 @@ By default, HashiCorp images (Consul and Vault) are not synced from Docker Hub
147147
to the local Pulp. To sync these images, set ``stackhpc_sync_hashicorp_images``
148148
to ``true``.
149149

150+
Custom container images
151+
-----------------------
152+
153+
A custom list of container images can be synced to the local Pulp using the
154+
``stackhpc_pulp_repository_container_repos_extra`` and
155+
``stackhpc_pulp_distribution_container_extra`` variables.
156+
157+
.. code-block:: yaml
158+
159+
# List of extra container image repositories.
160+
stackhpc_pulp_repository_container_repos_extra:
161+
- name: "certbot/certbot"
162+
url: "https://registry-1.docker.io"
163+
policy: on_demand
164+
proxy_url: "{{ pulp_proxy_url }}"
165+
state: present
166+
include_tags: "nightly"
167+
required: True
168+
169+
# List of extra container image distributions.
170+
stackhpc_pulp_distribution_container_extra:
171+
- name: certbot
172+
repository: certbot/certbot
173+
base_path: certbot/certbot
174+
state: present
175+
required: True
176+
150177
Usage
151178
=====
152179

doc/source/configuration/vault.rst

Lines changed: 56 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -84,47 +84,6 @@ Setup Vault on the seed node
8484
ansible-vault encrypt --vault-password-file ~/vault.pass $KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/vault/seed-vault-keys.json
8585
ansible-vault encrypt --vault-password-file ~/vault.pass $KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/vault/overcloud.key
8686
87-
Setup HAProxy config for Vault
88-
------------------------------
89-
90-
1. Create the HAProxy config to reverse proxy the Vault HA container
91-
92-
Set the vault_front to the external VIP address or internal VIP address depending on the installation. Set the vault_back to the IPs of the control nodes.
93-
94-
Set the following in etc/kayobe/kolla/config/haproxy/services.d/vault.cfg or if environments are being used etc/kayobe/environments/$KAYOBE_ENVIRONMENT/kolla/config/haproxy/services.d/vault.cfg
95-
96-
.. code-block::
97-
98-
# Delete "verify none" if not using self-signed/unknown issuer
99-
{% raw %}
100-
frontend vault_front
101-
mode tcp
102-
option tcplog
103-
bind {{ kolla_internal_vip_address }}:8200
104-
default_backend vault_back
105-
106-
backend vault_back
107-
mode tcp
108-
option httpchk GET /v1/sys/health
109-
# https://www.vaultproject.io/api-docs/system/health
110-
# 200: initialized, unsealed, and active
111-
# 501: not initialised (required for bootstrapping)
112-
# 503: sealed (required for bootstrapping)
113-
http-check expect rstatus (200|501|503)
114-
115-
{% for host in groups['control'] %}
116-
{% set host_name = hostvars[host].ansible_facts.hostname %}
117-
{% set host_ip = 'api' | kolla_address(host) %}
118-
server {{ host_name }} {{ host_ip }}:8200 check check-ssl verify none inter 2000 rise 2 fall 5
119-
{% endfor %}
120-
{% endraw %}
121-
122-
2. Deploy HAProxy with the new Vault service configuration:
123-
124-
.. code-block::
125-
126-
kayobe overcloud service deploy --skip-tags os_capacity -kt haproxy
127-
12887
Setup Vault HA on the overcloud hosts
12988
-------------------------------------
13089

@@ -215,6 +174,55 @@ Create the backend TLS and RabbitMQ TLS certificates
215174
216175
ansible-vault encrypt --vault-password-file ~/vault.pass $KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/kolla/certificates/<controller>-key.pem
217176
177+
.. _vault-haproxy:
178+
179+
HAProxy integration
180+
===================
181+
182+
It is possible to expose the overcloud Vault service via the Kolla Ansible HAProxy load balancer.
183+
This provides a single highly available API endpoint, as well as monitoring of the Vault backends when combined with Prometheus.
184+
HAProxy integration is no longer required for generating OpenStack control plane certificates, making it possible to deploy Vault and generate certificates before any containers have been deployed by Kolla Ansible.
185+
186+
1. Create the HAProxy config to reverse proxy the Vault HA container
187+
188+
Set the vault_front to the external VIP address or internal VIP address depending on the installation. Set the vault_back to the IPs of the control nodes.
189+
190+
Set the following in etc/kayobe/kolla/config/haproxy/services.d/vault.cfg or if environments are being used etc/kayobe/environments/$KAYOBE_ENVIRONMENT/kolla/config/haproxy/services.d/vault.cfg
191+
192+
.. code-block::
193+
194+
# Delete "verify none" if not using self-signed/unknown issuer
195+
{% raw %}
196+
frontend vault_front
197+
mode tcp
198+
option tcplog
199+
bind {{ kolla_internal_vip_address }}:8200
200+
default_backend vault_back
201+
202+
backend vault_back
203+
mode tcp
204+
option httpchk GET /v1/sys/health
205+
# https://www.vaultproject.io/api-docs/system/health
206+
# 200: initialized, unsealed, and active
207+
# 429: standby
208+
http-check expect rstatus (200|429)
209+
210+
{% for host in groups['control'] %}
211+
{% set host_name = hostvars[host].ansible_facts.hostname %}
212+
{% set host_ip = 'api' | kolla_address(host) %}
213+
server {{ host_name }} {{ host_ip }}:8200 check check-ssl verify none inter 2000 rise 2 fall 5
214+
{% endfor %}
215+
{% endraw %}
216+
217+
2. If HAProxy has not yet been deployed, continue to :ref:`certificates deployment <vault-certificates>`.
218+
If HAProxy has been deployed, it may be redeployed with the new Vault service configuration:
219+
220+
.. code-block::
221+
222+
kayobe overcloud service deploy -kt haproxy
223+
224+
.. _vault-certificates:
225+
218226
Certificates deployment
219227
=======================
220228

@@ -231,6 +239,7 @@ Enable the required TLS variables in kayobe and kolla
231239
232240
# Whether TLS is enabled for the external API endpoints. Default is 'no'.
233241
kolla_enable_tls_external: yes
242+
kolla_public_openrc_cacert: "{{ '/etc/pki/tls/certs/ca-bundle.crt' if os_distribution in ['centos', 'rocky'] else '/etc/ssl/certs/ca-certificates.crt' }}"
234243
235244
See :ref:`tempest-cacert` for information on adding CA certificates to the trust store when running Tempest.
236245

@@ -240,6 +249,9 @@ Enable the required TLS variables in kayobe and kolla
240249
241250
# Whether TLS is enabled for the internal API endpoints. Default is 'no'.
242251
kolla_enable_tls_internal: yes
252+
kolla_admin_openrc_cacert: "{{ '/etc/pki/tls/certs/ca-bundle.crt' if os_distribution in ['centos', 'rocky'] else '/etc/ssl/certs/ca-certificates.crt' }}"
253+
254+
See :ref:`os-capacity` for information on adding CA certificates to the trust store when deploying the OpenStack Capacity exporter.
243255

244256
3. Set the following in etc/kayobe/kolla/globals.yml or if environments are being used etc/kayobe/environments/$KAYOBE_ENVIRONMENT/kolla/globals.yml
245257

@@ -289,6 +301,8 @@ Enable the required TLS variables in kayobe and kolla
289301
Barbican integration
290302
====================
291303

304+
Barbican integration depends on :ref:`HAProxy integration <vault-haproxy>`.
305+
292306
Enable Barbican in kayobe
293307
-------------------------
294308

@@ -339,7 +353,7 @@ Configure Barbican
339353
enabled_secretstore_plugins=vault_plugin
340354
341355
[vault_plugin]
342-
vault_url = https://{{ kolla_internal_vip_address }}:8200
356+
vault_url = https://{{ kolla_internal_fqdn }}:8200
343357
use_ssl = True
344358
{% raw %}
345359
ssl_ca_crt_file = {{ openstack_cacert }}

0 commit comments

Comments
 (0)