- Using a preconfigured yaml file(files/osp-ng-dataplane-netconfig.yaml) we will configure the topology for each data plane network.
If needed cd to files:
cd dp-demo/demo/files
Apply the network confguration:
oc apply -f osp-ng-dataplane-netconfig.yaml
Go to https://access.redhat.com/downloads/content/479/ver=/rhel---9/9.3/x86_64/product-software and login. Scroll down to Red Hat Enterprise Linux 9.3 KVM Guest Image and copy the link and replace rhellink below. Keep the double quotes, otherwise the download will fail.
- Download the RHEL image on lab-user(hypervisor) server:
sudo -i
cd /var/lib/libvirt/images
curl -o rhel9-3.qcow2 "rhellink"
cp rhel9-3.qcow2 rhel9-guest.qcow2
qemu-img info rhel9-guest.qcow2
qemu-img resize rhel9-guest.qcow2 +90G
chown -R qemu:qemu rhel9-*.qcow2
virt-customize -a rhel9-guest.qcow2 --run-command 'growpart /dev/sda 4'
virt-customize -a rhel9-guest.qcow2 --run-command 'xfs_growfs /'
virt-customize -a rhel9-guest.qcow2 --root-password password:redhat
virt-customize -a rhel9-guest.qcow2 --run-command 'systemctl disable cloud-init'
virt-customize -a /var/lib/libvirt/images/rhel9-guest.qcow2 --ssh-inject root:file:/root/.ssh/id_rsa.pub
virt-customize -a /var/lib/libvirt/images/rhel9-guest.qcow2 --selinux-relabel
qemu-img create -f qcow2 -F qcow2 -b /var/lib/libvirt/images/rhel9-guest.qcow2 /var/lib/libvirt/images/osp-compute-0.qcow2
virt-install --virt-type kvm --ram 16384 --vcpus 4 --cpu=host-passthrough --os-variant rhel8.4 --disk path=/var/lib/libvirt/images/osp-compute-0.qcow2,device=disk,bus=virtio,format=qcow2 --network network:ocp4-provisioning --network network:ocp4-net --boot hd,network --noautoconsole --vnc --name osp-compute0 --noreboot
virsh start osp-compute0
- Verify IP from 192.168.123.0/24
watch virsh domifaddr osp-compute0 --source agent
(control + C to continue)
virsh domifaddr osp-compute0 --source agent
ssh to the IP assigned
ssh root@192.168.123.61
Replace uuid
ex +'/BEGIN CERTIFICATE/,/END CERTIFICATE/p' <(echo | openssl s_client -showcerts -connect quay.apps.uuid.dynamic.redhatworkshops.io:443) -scq > server.pem
sudo cp server.pem /etc/pki/ca-trust/source/anchors/
sudo cp server.pem /etc/pki/tls/certs/
sudo update-ca-trust
nmcli co delete 'Wired connection 1'
nmcli con add con-name "static-eth0" ifname eth0 type ethernet ip4 172.22.0.100/24 ipv4.dns "172.22.0.89"
nmcli con up "static-eth0"
nmcli co delete 'Wired connection 2'
nmcli con add con-name "static-eth1" ifname eth1 type ethernet ip4 192.168.123.61/24 ipv4.dns "192.168.123.100" ipv4.gateway "192.168.123.1"
nmcli con up "static-eth1"
cat >> /etc/resolv.conf <<EOF
# Generated by NetworkManager
search aio.example.com
nameserver 172.22.0.89
EOF
And log off VM
logout
ssh root@172.22.0.100
sudo hostnamectl set-hostname edpm-compute-0.aio.example.com
subscription-manager register
sudo subscription-manager repos --disable=*
subscription-manager repos --enable=rhceph-6-tools-for-rhel-9-x86_64-rpms --enable=rhel-9-for-x86_64-baseos-rpms --enable=rhel-9-for-x86_64-appstream-rpms --enable=rhel-9-for-x86_64-highavailability-rpms --enable=openstack-17.1-for-rhel-9-x86_64-rpms --enable=fast-datapath-for-rhel-9-x86_64-rpms
sudo subscription-manager release --set=9.3
sudo dnf install -y podman
podman login registry.redhat.io
podman login --username "quay_user" --password "openstack" quay.apps.uuid.dynamic.redhatworkshops.io/quay_user/dp3-openstack-operator-index
Log off
logout
virsh snapshot-create-as osp-compute0 preprovisioned
scp /root/.ssh/id_rsa root@192.168.123.100:/root/.ssh/id_rsa_compute
scp /root/.ssh/id_rsa.pub root@192.168.123.100:/root/.ssh/id_rsa_compute.pub
- Back on the bastion server:
oc create secret generic dataplane-ansible-ssh-private-key-secret --save-config --dry-run=client --from-file=authorized_keys=/root/.ssh/id_rsa_compute.pub --from-file=ssh-privatekey=/root/.ssh/id_rsa_compute --from-file=ssh-publickey=/root/.ssh/id_rsa_compute.pub -n openstack -o yaml | oc apply -f-
ssh-keygen -f ./id -t ecdsa-sha2-nistp521 -N ''
oc create secret generic nova-migration-ssh-key --from-file=ssh-privatekey=id --from-file=ssh-publickey=id.pub -n openstack -o yaml | oc apply -f-
- Deploy the Dataplane
Replace uuid in osp-ng-dataplane-node-set-deploy.yaml and apply
oc apply -f osp-ng-dataplane-node-set-deploy.yaml
oc apply -f osp-ng-dataplane-deployment.yaml