Check out my earlier posts –

Deploying an OpenStack Single node. – https://kdinesh.in/blob-aio/

Deploying Openstack Multi-node with External Ceph Storage – https://kdinesh.in/openstackhacluster/

Openstack cloud (Core and cinder service)

Enough CPU/Memory/Storage resources and user/project permission.

Internet Access

You can check more details of requirements and different deployment options in the official Redhat doc –

https://docs.openshift.com/container-platform/4.14/installing/installing_openstack/installing-openstack-installer-custom.html

We will use Heat stack to deploy the Openstack.

Once the heat stack is Launched, the OCP Deployment instance is created, and the OCP deployment instance will start the RedHat OpenShift cluster based on the user inputs.

One Temporary Bootstrap instance is created automatically; once cluster deployment is completed automatically, it will be terminated.

RHEL cores OS, Private network, router, security groups, cinder volumes, Server groups …etc. It was created as part of cluster deployment.

Create a dedicated Flavors or use existing flavour (I created three dedicated flavours for deploying the OCP Cluster)

Recommended Flavors: –

Deployment instance – Min 2 vCpu,4GB RAM and 25 to 40 GB Storage.

Control Plane Node – Min 4 vCpu (additional are strongly recommended), Memory 16GB, 100Gb Storage.

Worker Nodes – Min 2 vCpu, Memory 8GB, 100Gb Storage.

Allocate two floating IPs—one IP for API and the other IP for ingress.

I am using the admin project and admin user to deploy the OCP cluster. Assign sufficient quotes for deploying the cluster. (I specified as VCUPs and RAM as -1, which means unlimited. The production environment uses dedicated projects and limited quotes).

Create DNS records for API VIP and Ingress VIP DNS A/AAAA and PTR Records with Cluster name

api.<cluster_name>.<base_domain>.                               #api.ocp4.k8s.lab

*.apps.<cluster_name>.<base_domain>.                         #*.apps.ocp4.k8s.lab

Go to Orchestration> stack > click on the Launch Stack button.

You can download Heat Stack using the below link: –

https://github.com/Dineshk1205/RedhatOCPstack

Browse Template. Click on Next.

Enter OCP deployment instance and cluster details: –

Stack Name

You choose any name

Creation Timeout (minutes)

By default, 60 min

Password for user “admin”

Stack password: you can assign any password

BASE_DOMAIN

Enter Domain name Ex: – k8s.lab.

DEPLOYMENT_INSTANCE_FLAVOR

Select Flavor from the drop-down list, Recommend m1—medium flavor.

DEPLOYMENT_INSTANCE_IMAGE

Select Cent OS image. Don’t select any other OS.

DEPLOYMENT_INSTANCE_KEY_NAME

Select the existing key pair.

DEPLOYMENT_INSTANCE_NETWORK

Select Network from the drop-down list. Deployment instance network

DEPLOYMENT_INSTANCE_OCP_USER_PASSWORD


By default, the ocp user is created in the Deployment instance, and the ocp user password is configured and used to log in to the deployment instance.

OCP_API_FLOATING_IP

Enter reserved API Floating IP.DNS entry created API IP.

OCP_CLUSTER_NAME

Enter Cluster name. Each cluster required a dedicated cluster name. DNS records are created using cluster names.

OCP_CLUSTER_NETWORK

By default, the network CIDR is 10.128.0.0/14. OCP cluster internal network. Each pod will get a dedicated IP.

OCP_EXTERNAL_NETWORK

Enter the OpenStack External Network name. Check your Openstack external network name and enter.

OCP_INGRESS_FLOATING_IP

Enter Ingress Floating IP. Floating IP pre-allocated and DNS record configured.

OCP_MACHINE_NETWORK

By default, the network CIDR is 10.0.0.0/16. In OpenStack, a private network is created and attached to the router. The network is used for OCP cluster instances. In case of any conflict with your existing network, you can update the CIDR.

OCP_MASTER_NODES_FLAVOR

Enter the Flavor name. Check mini flavor requirements.

OCP_NETWORK_TYPE

By default, network – OVNKuberntentes. You can also choose OpenshiftSDN based on your requirements.

OCP_PULL_SECRET

Paste Pull Secret Key. You can download pull secret from the Redhat Website.

OCP_SERVICE_NETWORK


By default, CIDR Range – 172.30.0.0/16 Is the internal cluster service network.

OCP_SSH_KEY

Paste the SSH Key. SSH key is injected into cluster nodes; node access is required to troubleshoot the nodes.

OCP_VERSION


Select OCP version 4.14/13 based on your requirements.

OCP_WORKER_NODES_COUNT

Based on your requirement, enter the worker node count.

OCP_WORKER_NODES_FLAVOR

Enter the Flavor name. Check mini flavor requirements.

OPENSTACK_AUTH_URL


Enter OpenStack URL

OPENSTACK_PROJECT_DOMAIN_NAME

Enter the OpenStack cloud project domain name.

OPENSTACK_PROJECT_NAME

Enter the Openstack project name.

OPENSTACK_USER_DOMAIN_NAME

Enter the Openstack user domain name.

OPENSTACK_USER_NAME

Enter Openstack User Name

OPENSTACK_USER_PASSWORD

Enter the Openstack user password.

Pull secret – Download your installation pull secret from the Red Hat OpenShift Cluster Manager.

SSH key – You can generate an SSH key on any Linux machine (You can access cluster nodes using this machine).

$ ssh-keygen -t ed25519 -N ” -f <path>/<file_name>

$ eval “$(ssh-agent -s)”

$ ssh-add <path>/<file_name>

$ cat ~/.ssh/id_ed25519.pub (copy and paste in the SSH key section in Heat stack)

Once the Heat stack is launched, an OCP Deployment instance will be created. You can Relax.OCP Cluster deployment takes 35 to 40 min.

Once the instance is ready, you can log into the deployment machine using the ocp username and password.

You check cluster deployment logs

Switch to root user and ocp directory

$ su sudo

$ cd /ocp/

$tail -f .openshift_install.log

RHEL Core image upload.

The control plane and bootstrap instance were created.

On deployment node. Export kubeconfig.

$ export KUBECONFIG=/ocp/auth/kubeconfig

You can see the screenshot below. Control-plane nodes up and running.

Cluster node nodes were provisioned successfully.

Below, three control planes and one worker node were created, and the bootstrap instance was deleted.

You can check the network topology. A private network is created(cluster instance connected to private network), and a router is created and attached to the external network.

Once deployed, completed. You can check logs in the log’s web console using the URL, username, and password.

Default Web console URL – kubeadmin

Password – you can find it in the Logs, and You can see it in the ocp/auth / directory

Web-Console – You can find this in the logs, or you can run the below command

$ oc get router -n openshift-console

After logging in, you can check the node status.

In future, if you want to scale worker nodes. Compute> Machine Sets and edit Machines sets.

Machine changed 1 to 2.

New worker node provision started.