Configuration, Installation, and Use of Red Hat OpenStack Services on OpenShift
Access Your Lab Environment
-
Access to the bastion executing the following command:
ssh {bastion_ssh_user_name}@{bastion_public_hostname} -p {bastion_ssh_port}
SSH password is
{bastion_ssh_password}
. The uuid of your lab is:my-guid
-
Optionally copy your public SSH key to the bastion allowing you to authenticate with the server without entering a password every time you connect:
ssh-copy-id -p {bastion_ssh_port} {bastion_ssh_user_name}@{bastion_public_hostname}
If needed, you can navigate to the OpenShift console URL: {openshift_cluster_console_url}[{openshift_cluster_console_url}^] using user
admin
and password{openshift_cluster_admin_password}
Prerequisites for Installation
Some prerequisites needed to install Red Hat OpenStack Services on OpenShift (RHOSO) are already included in the lab environment such as:
-
An operational OpenShift cluster which supports Multus CNI
-
oc command line tool on your workstation (bastion host)
-
podman command line tool on your workstation (bastion host)
-
Access to repositories which contain the Dev Preview code
-
Access to an existing registry or create a local Quay registry
-
Example YAML files are available in this repository which can be cloned or copy and pasted for use. For ease of instructions it will be assumed the repo has been cloned
Install the Prerequisite Operators
There are three operators that are required to be installed before you can install the OpenStack Operator, the NMState Operator the MetalLB Operator and the Cert-Manager + Operator
Accessing the Cluster
From the bastion, execute:
oc get nodes
NAME STATUS ROLES AGE VERSION control-plane-cluster-x55dt-1 Ready control-plane,master,worker 3d19h v1.29.10+67d3387 control-plane-cluster-x55dt-2 Ready control-plane,master,worker 3d19h v1.29.10+67d3387 control-plane-cluster-x55dt-3 Ready control-plane,master,worker 3d19h v1.29.10+67d3387
NMState Operator
Create the nmstate Operator namespace:
cat << EOF | oc apply -f -
apiVersion: v1
kind: Namespace
metadata:
labels:
kubernetes.io/metadata.name: openshift-nmstate
name: openshift-nmstate
name: openshift-nmstate
spec:
finalizers:
- kubernetes
EOF
Create the OperatorGroup:
cat << EOF | oc apply -f -
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
annotations:
olm.providedAPIs: NMState.v1.nmstate.io
name: openshift-nmstate
namespace: openshift-nmstate
spec:
targetNamespaces:
- openshift-nmstate
EOF
Confirm the OperatorGroup is installed in the namespace:
oc get operatorgroup -n openshift-nmstate
Subscribe to the nmstate Operator:
cat << EOF| oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
labels:
operators.coreos.com/kubernetes-nmstate-operator.openshift-nmstate: ""
name: kubernetes-nmstate-operator
namespace: openshift-nmstate
spec:
channel: stable
installPlanApproval: Automatic
name: kubernetes-nmstate-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
EOF
Confirm that NMstate operator is running. Repeat this command until you see the desired output:
oc get clusterserviceversion -n openshift-nmstate -o custom-columns=Name:.metadata.name,Phase:.status.phase -w
Click Control + C when you see that the operator has moved to Succeded state
Name Phase kubernetes-nmstate-operator.4.13.0-202402211707 Succeeded
Create instance of the nmstate operator:
cat << EOF | oc apply -f -
apiVersion: nmstate.io/v1
kind: NMState
metadata:
name: nmstate
EOF
Confirm that the deployment for the nmstate operator is running:
oc get clusterserviceversion -n openshift-nmstate \
-o custom-columns=Name:.metadata.name,Phase:.status.phase
MetalLB Operator
Create the MetalLB Operator namespace:
cat << EOF | oc apply -f -
apiVersion: v1
kind: Namespace
metadata:
name: metallb-system
EOF
Create the OperatorGroup:
cat << EOF | oc apply -f -
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: metallb-operator
namespace: metallb-system
EOF
Confirm the OperatorGroup is installed in the namespace:
oc get operatorgroup -n metallb-system
Subscribe to the metallb Operator:
cat << EOF| oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: metallb-operator-sub
namespace: metallb-system
spec:
channel: stable
name: metallb-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
EOF
Confirm the metallb installplan is in the namespace:
oc get installplan -n metallb-system
Confirm the metallb operator is installed:
oc get clusterserviceversion -n metallb-system \
-o custom-columns=Name:.metadata.name,Phase:.status.phase -w
Type Control + C when you see that the operator has moved to Succeded state
Name Phase metallb-operator.v4.16.0-202502260004 Succeeded
Create a single instance of a metallb resource:
cat << EOF | oc apply -f -
apiVersion: metallb.io/v1beta1
kind: MetalLB
metadata:
name: metallb
namespace: metallb-system
spec:
nodeSelector:
node-role.kubernetes.io/worker: ""
EOF
Verify that the deployment for the controller is running:
oc get deployment -n metallb-system controller
Repeat the command until AVAILABLE is 1
Verify that the daemon set for the speaker is running:
oc get daemonset -n metallb-system speaker
Cert-Manager Operator
The cert-manager-operator is already installed in this environment:
Verify that cert-manager pods are up and running by entering the following command:
oc get pods -n cert-manager
Repeat command until all pods are showing READY 1/1
NAME READY STATUS RESTARTS AGE cert-manager-cainjector-5df47878b-knmwg 1/1 Running 0 19s cert-manager-webhook-66c75fcddf-8kldt 1/1 Running 0 23s