Create the Data Plane VM
In this lab we are going to use pre-provisioned compute node for deployment of dataplane.
Follow the steps on this page to create a pre-provisioned compute node for use with dataplane deployment.
-
Make sure you are accessing hypervisor host as root user.
Sample Output[root@hypervisor ~]#
-
Run below commands to create the RHEL compute on the hypervisor server:
cd /var/lib/libvirt/images wget http://opentraining-na100.ole.redhat.com/downloads/images/rhel9-3.qcow2 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
RHEL9.3 qcow2 image is made available for your convenience. Ideally you will be dowloading the image from customer portal. -
Check for the IP of compute node from
192.168.123.0/24
network.watch virsh domifaddr osp-compute0 --source agent
Sample OutputEvery 2.0s: virsh domifaddr osp-compute0 --source agent hypervisor: Wed Apr 17 07:03:13 2024 Name MAC address Protocol Address ------------------------------------------------------------------------------- lo 00:00:00:00:00:00 ipv4 127.0.0.1/8 - - ipv6 ::1/128 eth0 52:54:00:c0:0a:26 ipv4 172.22.0.202/24 - - ipv6 fe80::16:d083:92f4:f201/64 eth1 52:54:00:e5:ce:09 ipv4 192.168.123.61/24 - - ipv6 fe80::bfc0:e5db:a655:729f/64
(Press
CTRL + C
to continue)virsh domifaddr osp-compute0 --source agent
-
Use the IP assigned to
eth1
above in the next step. -
SSH to the new VM (no password required) to configure Ethernet Devices on the new Compute.
ssh root@192.168.123.61
-
Setup the compute server network for static IP in
172.22.0.0/24
and192.168.123.0/24
subnets foreth0
andeth1
interfaces respectively.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"
-
Log off VM
logout
-
Log into the compute server via
172.22.0.0/24
network.ssh root@172.22.0.100
-
Set hostname
sudo hostnamectl set-hostname edpm-compute-0.aio.example.com
-
Subscribe the compute node to the RHEL9.3 repositories and RHOSP18 development preview channel on satellite.
curl -ko /etc/pki/ca-trust/source/anchors/demosat-ha.infra.demo.redhat.com.ca.crt "https://demosat-ha.infra.demo.redhat.com/pub/katello-server-ca.crt" update-ca-trust yum install -y "https://demosat-ha.infra.demo.redhat.com/pub/katello-ca-consumer-latest.noarch.rpm" subscription-manager register --org="Red_Hat_RHDP_Labs" --activationkey="demosat-smt-b1374-1711111157" --serverurl=https://demosat-ha.infra.demo.redhat.com:8443/rhsm --baseurl=https://demosat-ha.infra.demo.redhat.com/pulp/repos 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-dev-preview-for-rhel-9-x86_64-rpms --enable=fast-datapath-for-rhel-9-x86_64-rpms
-
Install podman on the compute.
dnf install -y podman
-
Login to
registry.redhat.io
podman login registry.redhat.io
Sample output[root@edpm-compute-0 ~]# podman login registry.redhat.io Username: rhn-support-ashishks Password: Login Succeeded!
-
Log off from the Compute Server.
logout
-
Snapshot the Compute Server
virsh snapshot-create-as osp-compute0 preprovisioned
-
Set SSH key for root user on the compute server.
scp -o StrictHostKeyChecking=accept-new /root/.ssh/id_rsa root@192.168.123.100:/root/.ssh/id_rsa_compute scp -o StrictHostKeyChecking=accept-new /root/.ssh/id_rsa.pub root@192.168.123.100:/root/.ssh/id_rsa_compute.pub
We had copied the id_rsa.pub key form hypervisor to compute VM while creating the VM in earlier steps on this page. |