Skip to content

Commit

Permalink
Fix nova extra config
Browse files Browse the repository at this point in the history
Signed-off-by: Bohdan Dobrelia <[email protected]>
  • Loading branch information
bogdando committed Nov 13, 2023
1 parent d309bf2 commit d58240a
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 1 deletion.
47 changes: 47 additions & 0 deletions docs/openstack/edpm_adoption.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,52 @@ EOF
EOF
```
* Generate an ssh key-pair `nova-migration-ssh-key` secret
```bash
cd "$(mktemp -d)"
ssh-keygen -f ./id -t ed25519 -N ''
oc create secret generic nova-migration-ssh-key \
-n openstack \
--from-file=ssh-privatekey=id \
--from-file=ssh-publickey=id.pub \
--type kubernetes.io/ssh-auth
rm -f id*
cd -
* Create a Nova Compute Extra Config service
```yaml
oc apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: nova-compute-extraconfig
namespace: openstack
data:
19-nova-compute-cell1-workarounds.conf: |
[workarounds]
disable_compute_service_check_for_ffu=true
---
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneService
metadata:
name: nova-compute-extraconfig
namespace: openstack
spec:
label: nova.compute.extraconfig
configMaps:
- nova-compute-extraconfig
configSecrets:
- nova-cell1-compute-config
- nova-migration-ssh-key
playbook: osp.edpm.nova
EOF
```
The secret ``nova-cell<X>-compute-config`` is auto-generated for each
``cell<X>``. That secret, alongside ``nova-migration-ssh-key``, should
always be specified for each custom `OpenStackDataPlaneService` related to Nova.
* Deploy OpenStackDataPlaneNodeSet:
```yaml
Expand All @@ -125,6 +171,7 @@ EOF
- run-os
- libvirt
- nova
- nova-compute-extraconfig
- ovn
env:
- name: ANSIBLE_CALLBACKS_ENABLED
Expand Down
47 changes: 47 additions & 0 deletions tests/roles/dataplane_adoption/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,53 @@
ssh-privatekey: "{{ edpm_encoded_privatekey | default(edpm_privatekey.content) }}"
EOF
- name: generate an ssh key-pair nova-migration-ssh-key secret
no_log: "{{ use_no_log }}"
ansible.builtin.shell: |
{{ shell_header }}
{{ oc_header }}
cd "$(mktemp -d)"
ssh-keygen -f ./id -t ed25519 -N ''
oc create secret generic nova-migration-ssh-key \
-n openstack \
--from-file=ssh-privatekey=id \
--from-file=ssh-publickey=id.pub \
--type kubernetes.io/ssh-auth
rm -f id*
cd -
- name: create a Nova Compute Extra Config service
no_log: "{{ use_no_log }}"
ansible.builtin.shell: |
{{ shell_header }}
{{ oc_header }}
oc apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: nova-compute-extraconfig
namespace: openstack
data:
19-nova-compute-cell1-workarounds.conf: |
[workarounds]
disable_compute_service_check_for_ffu=true
---
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneService
metadata:
name: nova-compute-extraconfig
namespace: openstack
spec:
label: nova.compute.extraconfig
configMaps:
- nova-compute-extraconfig
configSecrets:
- nova-cell1-compute-config
- nova-migration-ssh-key
playbook: osp.edpm.nova
EOF
- name: deploy dataplane
ansible.builtin.shell: |
{{ shell_header }}
Expand Down
1 change: 0 additions & 1 deletion tests/roles/nova_adoption/tasks/wait.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@
name: nova-cell1-novncproxy
- cr: novaschedulers
name: nova-scheduler

0 comments on commit d58240a

Please sign in to comment.