Skip to content

Commit

Permalink
Merge pull request openstack-k8s-operators#157 from fao89/edpm_ovn
Browse files Browse the repository at this point in the history
Rely on automatic ConfigMap/Secret configuration of EDPM OVN services
  • Loading branch information
jistr authored Sep 19, 2023
2 parents 14d7e31 + 6c1edce commit 2af62ea
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
21 changes: 14 additions & 7 deletions docs/openstack/edpm_adoption.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,19 @@ EOF
$(cat ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa | base64 | sed 's/^/ /')
EOF
```
* Create the Nova Metadata secret (Workaround while nova isn't adopted yet):
```bash
oc apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
name: nova-metadata-neutron-config
data:
05-nova-metadata.conf: |
$(echo "[DEFAULT]\nnova_metadata_host = 1.2.3.4\nnova_metadata_port = 8775\nnova_metadata_protocol = http\nmetadata_proxy_shared_secret = 1234567842\n" | base64 | sed 's/^/ /')
EOF
```
* Stop the nova services.
Expand Down Expand Up @@ -143,6 +156,7 @@ done
- ctlplane
preProvisioned: true
services:
- download-cache
- configure-network
- validate-network
- install-os
Expand Down Expand Up @@ -207,17 +221,10 @@ done
edpm_nodes_validation_validate_controllers_icmp: false
edpm_nodes_validation_validate_gateway_icmp: false
edpm_ovn_metadata_agent_DEFAULT_transport_url: $(oc get secret rabbitmq-transport-url-neutron-neutron-transport -o json | jq -r .data.transport_url | base64 -d)
edpm_ovn_metadata_agent_metadata_agent_ovn_ovn_sb_connection: $(oc get ovndbcluster ovndbcluster-sb -o json | jq -r .status.dbAddress)
edpm_ovn_metadata_agent_metadata_agent_DEFAULT_nova_metadata_host: $(oc get svc nova-metadata-internal -o json |jq -r '.status.loadBalancer.ingress[0].ip')
edpm_ovn_metadata_agent_metadata_agent_DEFAULT_metadata_proxy_shared_secret: $(oc get secret osp-secret -o json | jq -r .data.MetadataSecret | base64 -d)
edpm_ovn_metadata_agent_DEFAULT_bind_host: 127.0.0.1
edpm_chrony_ntp_servers:
- clock.redhat.com
- clock2.redhat.com
edpm_ovn_dbs: $(oc get ovndbcluster ovndbcluster-sb -o json | jq -r '.status.networkAttachments."openstack/internalapi"')
edpm_ovn_controller_agent_image: quay.io/podified-antelope-centos9/openstack-ovn-controller:current-podified
edpm_iscsid_image: quay.io/podified-antelope-centos9/openstack-iscsid:current-podified
edpm_logrotate_crond_image: quay.io/podified-antelope-centos9/openstack-cron:current-podified
Expand Down
23 changes: 16 additions & 7 deletions tests/roles/dataplane_adoption/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@
ssh-privatekey: "{{ edpm_encoded_privatekey|default(edpm_privatekey.content) }}"
EOF
- name: "[hack] create nova-metadata-neutron-config-secret.yaml"
no_log: "{{ use_no_log }}"
ansible.builtin.shell: |
{{ shell_header }}
{{ oc_header }}
oc apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
name: nova-metadata-neutron-config
data:
05-nova-metadata.conf: |
$(echo "[DEFAULT]\nnova_metadata_host = 1.2.3.4\nnova_metadata_port = 8775\nnova_metadata_protocol = http\nmetadata_proxy_shared_secret = 1234567842\n" | base64 | sed 's/^/ /')
EOF
- name: set Nova copy shell vars
no_log: "{{ use_no_log }}"
ansible.builtin.set_fact:
Expand Down Expand Up @@ -153,6 +168,7 @@
- ctlplane
preProvisioned: true
services:
- download-cache
- configure-network
- validate-network
- install-os
Expand Down Expand Up @@ -217,15 +233,8 @@
edpm_nodes_validation_validate_controllers_icmp: false
edpm_nodes_validation_validate_gateway_icmp: false
edpm_ovn_metadata_agent_DEFAULT_transport_url: $(oc get secret rabbitmq-transport-url-neutron-neutron-transport -o json | jq -r .data.transport_url | base64 -d)
edpm_ovn_metadata_agent_metadata_agent_ovn_ovn_sb_connection: $(oc get ovndbcluster ovndbcluster-sb -o json | jq -r .status.dbAddress)
edpm_ovn_metadata_agent_metadata_agent_DEFAULT_nova_metadata_host: $(oc get svc nova-metadata-internal -o json |jq -r '.status.loadBalancer.ingress[0].ip')
edpm_ovn_metadata_agent_metadata_agent_DEFAULT_metadata_proxy_shared_secret: $(oc get secret osp-secret -o json | jq -r .data.MetadataSecret | base64 -d)
edpm_ovn_metadata_agent_DEFAULT_bind_host: 127.0.0.1
edpm_chrony_ntp_servers: {{ edpm_chrony_ntp_servers|default(default_edpm_chrony_ntp_servers) }}
edpm_ovn_dbs: $(oc get ovndbcluster ovndbcluster-sb -o json | jq -r '.status.networkAttachments."openstack/internalapi"')
edpm_ovn_controller_agent_image: "{{ registry_name }}/{{ registry_namespace }}/openstack-ovn-controller:{{ image_tag }}"
edpm_iscsid_image: "{{ registry_name }}/{{ registry_namespace }}/openstack-iscsid:{{ image_tag }}"
edpm_logrotate_crond_image: "{{ registry_name }}/{{ registry_namespace }}/openstack-cron:{{ image_tag }}"
Expand Down

0 comments on commit 2af62ea

Please sign in to comment.