Openshift Single Node: Automated deployment

Fajlinuxblog
1 min readMay 24, 2024

--

This post is about the following article that I used to write the Openshift Single Node deployment:

Inside of project we have this structure :

scripts/
├── configure_libvirt_network.sh
├── configure_openshift.sh
├── create_files.sh
├── create_vm.sh
├── requirements.sh
└── vars

1) Install requirements

The following script will install all necessary packages Libvirt , DNSMasq and CoreOS Installer

./requirements.sh

2) Configuring the variables

First of all, you need to access the RedHat console to get the secret and clone the code repository

URL: https://console.redhat.com/openshift/create/local

Github: https://github.com/fabioabreureis/openshift-sno-libvirt/

If you have not configured the ssh key you must run “ssh-keygen” to get the content from /home/$user/.ssh/id_rsa.pub and then configure the template.

export VERSION="SET THE OPENSHIFT VERSION HERE"
export SSH_KEY="PASTE THE PUBLIC KEY HERE"
export SECRET='PASTE THE PULL SECRET COPIED FROM console.redhat.com HERE'

There are other variables that you can control the domain, libvirt network, and cluster name.

3) Creating the files

This step will download the necessary files

./create_files.sh

4) Configuring the Infra

This step will configure the libvirt network and dnsmasq

./configure_libvirt_network.sh

5) Configuring the install-config.yaml and ISO image with the ignition file

Executing the script to generate the deployment files and the ISO image.

./configure_openshift.sh

6) VM setup

You may adjust some variables as your necessity.

The default values are:

# Variables to control the vm 
export VM_MEM=20480
export VM_CPUS=8
export VM_DISK_SIZE=150


# Script execution

./create_vm.sh

--

--

No responses yet