From d7b4405317b832968282987054cd26fe4766fb97 Mon Sep 17 00:00:00 2001 From: Gregory Giguashvili Date: Tue, 21 Mar 2023 11:03:02 +0200 Subject: [PATCH] Port the Getting Started procedure to use RHEL 9 OS with MicroShift 4.13 packages --- docs/config/microshift-starter.ks | 4 ++-- docs/getting_started.md | 30 ++++++++++++++++-------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/docs/config/microshift-starter.ks b/docs/config/microshift-starter.ks index 4de738d54d..d475d94aff 100644 --- a/docs/config/microshift-starter.ks +++ b/docs/config/microshift-starter.ks @@ -37,7 +37,7 @@ git jq make NetworkManager-ovs -python36 +python3 selinux-policy-devel %end @@ -54,7 +54,7 @@ fi # Configure systemd journal service to persist logs between boots and limit their size to 1G sudo mkdir -p /etc/systemd/journald.conf.d -cat </dev/null +tee /etc/systemd/journald.conf.d/microshift.conf &>/dev/null < Other architectures, versions or flavors of operating systems are not supported in this opinionated environment. For this setup, only use the RHEL 8.7 DVD image for the x86_64 architecture. +Download the Red Hat Enterprise Linux 9 DVD ISO image for the `x86_64` architecture from [Red Hat Developer](https://developers.redhat.com/products/rhel/download) site and copy the file to the `/var/lib/libvirt/images` directory. +> Other architectures, versions or flavors of operating systems are not supported in this opinionated environment. Download the OpenShift pull secret from the https://console.redhat.com/openshift/downloads#tool-pull-secret page and save it into the `~/.pull-secret.json` file. @@ -27,7 +27,7 @@ Run the following commands to initiate the creation process of the `microshift-s ```bash VMNAME=microshift-starter -DVDISO=/var/lib/libvirt/images/rhel-8.7-x86_64-dvd.iso +DVDISO=/var/lib/libvirt/images/rhel-baseos-9.*-$(uname -i)-dvd.iso KICKSTART=https://raw.githubusercontent.com/openshift/microshift/main/docs/config/microshift-starter.ks sudo -b bash -c " \ @@ -50,29 +50,30 @@ The OS console is also accessible from the `virt-manager GUI` as a result of run ## Access MicroShift -From the OS console of the virtual machine, it is possible to log into the machine using your user credentials, `redhat:redhat`. - +It is possible to use the OS console of the virtual machine to log into the system using the `redhat:redhat` user credentials. However, it is most convenient to access the MicroShift virtual machine using SSH. + First, get the machine IP address with the following command. ```bash sudo virsh domifaddr microshift-starter - Name MAC address Protocol Address -------------------------------------------------------------------------------- - vnet2 52:54:00:6d:08:f7 ipv4 192.168.122.2/24 +``` + +Set the `USHIFT_IP` variable with the machine IP address value to be used in the subsequent commands. + +```bash  +USHIFT_IP=192.168.122.2 ``` Copy your pull secret file to the MicroShift virtual machine using `redhat:redhat` credentials. ```bash -USHIFT_IP=192.168.122.2 scp ~/.pull-secret.json redhat@${USHIFT_IP}: ``` - -Log into the MicroShift virtual machine. +Log into the MicroShift virtual machine using `redhat:redhat` credentials. ```bash -ssh redhat@192.168.122.2 # when prompted, password is `redhat` +ssh redhat@${USHIFT_IP} ``` The remaining commands are to be executed from within the virtual machine as the `redhat` user. @@ -87,12 +88,13 @@ Enable the MicroShift RPM repos and install MicroShift and the `oc` and `kubectl ```bash sudo subscription-manager repos \ - --enable rhocp-4.12-for-rhel-8-x86_64-rpms \ - --enable fast-datapath-for-rhel-8-x86_64-rpms + --enable rhocp-4.13-for-rhel-9-$(uname -i)-rpms \ + --enable fast-datapath-for-rhel-9-$(uname -i)-rpms sudo dnf install -y microshift openshift-clients ``` Confgure the minimum required firewall rules. + ```bash sudo firewall-cmd --permanent --zone=trusted --add-source=10.42.0.0/16 sudo firewall-cmd --permanent --zone=trusted --add-source=169.254.169.1