Openshift SNO Installation - mazsola2k/openshift GitHub Wiki

SNO (Single Node Openshift Installation)

pre-requisite: install a free developer access @ http://developer.redhat.com

Recommended: Run the fully automated Openshift SNO Installation Ansible playbook: https://github.com/mazsola2k/openshift/blob/main/openshift-sno-install.yaml

Only - if you do not want to run the playbook, you can do manually like below:

Plese navigate to https://console.redhat.com/openshift/install/metal

Select Local Agent-based / CLI-based option

image

image

image

Recommended: Run the Openshift SNO Installation Ansible playbook: https://github.com/mazsola2k/openshift/blob/main/openshift-sno-install.yaml

If you do not want to run the playbook, you can do manually like below:

https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-install-linux.tar.gz

tar -xvzf openshift-install-linux.tar.gz

curl -k https://mirror.openshift.com/pub/openshift-v4/clients/ocp/$OCP_VERSION/openshift-client-linux.tar.gz -o oc.tar.gz curl -k https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.11.1/openshift-client-linux.tar.gz -o oc.tar.gz tar -xvzf oc.tar.gz

sudo mv -t /usr/local/bin/ oc kubectl

Generate RSA key: ssh-keygen -t rsa -b 4096 -C "[email protected]"

sudo dnf install -y python3 python3-pip

pip install --upgrade pip

pip install ansible

install-config.yaml

apiVersion: v1

baseDomain: modernhackers.com

compute:

- architecture: amd64

hyperthreading: Enabled

name: worker

replicas: 0

controlPlane:

architecture: amd64

hyperthreading: Enabled

name: openshift

replicas: 1

metadata: name: openshift

networking:

clusterNetwork:

- cidr: 10.128.0.0/14

`hostPrefix: 23`

machineNetwork: - cidr: 192.168.128.0/24

networkType: OVNKubernetes

serviceNetwork:

- 172.30.0.0/16

platform: none: {}

pullSecret: 'hash'

sshKey: |

ssh-rsa hash

agent-config.yaml

apiVersion: v1beta1

kind: AgentConfig

metadata:

name: openshift-cluster

rendezvousIP: 192.168.128.130

hosts:

- hostname: openshift

`interfaces:`

  `- name: eno1`

    `macAddress: 00:0c:29:18:a7:c3`

`rootDeviceHints:`

  `deviceName: /dev/nvme0n1`

`networkConfig:`

  `interfaces:`

    `- name: eno1`

      `type: ethernet`

      `state: up`

      `mac-address: 00:0c:29:18:a7:c3`

      `ipv4:`

        `enabled: true`

        `address:`

          `- ip: 192.168.128.130`

            `prefix-length: 24`

        `dhcp: false`

  `dns-resolver:`

    `config:`

      `server:`

        `- 192.168.128.2`

  `routes:`

    `config:`

      `- destination: 0.0.0.0/0`

        `next-hop-address: 192.168.128.2`

        `next-hop-interface: eno1`

        `table-id: 254`

./openshift-install agent create image

This will return a prepared ISO file based on the configs: agent.x86_64.iso

You can find the kubeadminb password in the 'auth' folder created by openshift-install script: auth/kubeadmin-password

This will be needed only after the unattanded agent based installation completed.

Bootup with the ISO to VM or Baremetal and let the installer to run (between 1 hours to 2-3 hours in case of vm)

Connect from Web GUI to get a token: https://console-openshift-console.apps..domain.com / kubeadmin and under Copy login command

image

Display Token and connect from CLI:

**oc login **--token=sha256~TOKEN --server=https://api.openshift.modernhackers.com:6443

oc cluster-info Kubernetes control plane is running at https://api.openshift.modernhackers.com:6443

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

⚠️ **GitHub.com Fallback** ⚠️