Skip to content

Commit

Permalink
Adoption of public SSH key for Amphorae
Browse files Browse the repository at this point in the history
OSPNET-1078
  • Loading branch information
weinimo committed Dec 4, 2024
1 parent a0ef587 commit d9fbac4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
9 changes: 9 additions & 0 deletions docs_user/modules/proc_adopting-the-loadbalancer-service.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ dual CA configuration.
include::../../tests/roles/dataplane_adoption/tasks/octavia_certs.yaml[lines="7..83",indent=0]
----

. (Optional) Public SSH key of Amphorae
+
These commands will copy the existing public SSH key that can be used for connecting to the amphorae and install it in Openshift in order to get reused in the new environment.
+
[source,bash]
----
include::../../tests/roles/dataplane_adoption/tasks/octavia_ssh.yaml[lines="7..20",indent=0]
----

. Add the octavia interfaces to each NodeNetworkConfigurationPolicy.
+
The following command adds the network interface that is being
Expand Down
6 changes: 5 additions & 1 deletion tests/roles/dataplane_adoption/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,16 @@
ansible.builtin.include_tasks:
file: neutron_verify.yaml


- name: Adopt Octavia Certificates Wallaby->Antelope FFU
when: octavia_adoption|bool
ansible.builtin.include_tasks:
file: octavia_certs.yaml

- name: Adopt Octavia Amphora public SSH key Wallaby->Antelope FFU
when: octavia_adoption|bool
ansible.builtin.include_tasks:
file: octavia_ssh.yaml

- name: Adopted Cinder post-checks
ansible.builtin.include_tasks:
file: cinder_verify.yaml
20 changes: 20 additions & 0 deletions tests/roles/dataplane_adoption/tasks/octavia_ssh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
- name: Migrate old Octavia public SSH key for amphorae
ansible.builtin.shell: |
{{ shell_header }}
{{ oc_header }}
CONTROLLER1_SCP="{{ controller1_ssh | regex_replace('^ssh', 'scp')}}"
${CONTROLLER1_SCP}:/etc/octavia/ssh/octavia_id_rsa.pub $HOME/octavia_sshkey.pub
# Install new data in k8s
oc apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: sshPubkey
namespace: openstack
data:
key: $(cat $HOME/octavia_sshkey.pub)
EOF
rm -f $HOME/octavia_sshkey.pub

0 comments on commit d9fbac4

Please sign in to comment.