{"id":25314722,"url":"https://github.com/rguske/openshift-agent-based-installer","last_synced_at":"2025-06-29T06:33:25.927Z","repository":{"id":273855916,"uuid":"921101466","full_name":"rguske/openshift-agent-based-installer","owner":"rguske","description":"Installing OpenShift using the Agent-Based Installer on platform specification \"baremetal\".","archived":false,"fork":false,"pushed_at":"2025-03-24T09:18:57.000Z","size":178,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T15:14:28.356Z","etag":null,"topics":["kubernetes","openshift","openshift-container-platform","openshift-v4","redhat"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rguske.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-23T10:41:01.000Z","updated_at":"2025-03-24T09:19:01.000Z","dependencies_parsed_at":"2025-03-14T11:22:40.804Z","dependency_job_id":"1ab032b6-d702-4cb4-9248-d72f968661d4","html_url":"https://github.com/rguske/openshift-agent-based-installer","commit_stats":null,"previous_names":["rguske/openshift-agent-based-installer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rguske/openshift-agent-based-installer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rguske%2Fopenshift-agent-based-installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rguske%2Fopenshift-agent-based-installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rguske%2Fopenshift-agent-based-installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rguske%2Fopenshift-agent-based-installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rguske","download_url":"https://codeload.github.com/rguske/openshift-agent-based-installer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rguske%2Fopenshift-agent-based-installer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262547223,"owners_count":23327129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kubernetes","openshift","openshift-container-platform","openshift-v4","redhat"],"created_at":"2025-02-13T17:36:06.155Z","updated_at":"2025-06-29T06:33:25.801Z","avatar_url":"https://github.com/rguske.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Installing OpenShift using the Agent-Based Installer\n\n⚠️ WIP\n\nThe Agent-based installation comprises a bootable ISO that contains the Assisted discovery agent and the Assisted Service. Both are required to perform the cluster installation, but the latter runs on only one of the hosts.\n\n- [Installing OpenShift using the Agent-Based Installer](#installing-openshift-using-the-agent-based-installer)\n  - [Installation Information](#installation-information)\n    - [Configurable Manifest files](#configurable-manifest-files)\n    - [Bootstrapping the OpenShift Cluster](#bootstrapping-the-openshift-cluster)\n    - [Different Platform Types](#different-platform-types)\n  - [Cluster Preperations](#cluster-preperations)\n    - [Run a Bastion Host](#run-a-bastion-host)\n    - [NIC name validation using a RHEL Live Iso](#nic-name-validation-using-a-rhel-live-iso)\n    - [Bastion Host Preperation](#bastion-host-preperation)\n    - [Setting up VMs on vSphere](#setting-up-vms-on-vsphere)\n  - [Manifest Configurations](#manifest-configurations)\n  - [Create the Agent Iso](#create-the-agent-iso)\n    - [Boot from Iso](#boot-from-iso)\n  - [Run a `httpd` Webserver on the Bastion to share the Iso](#run-a-httpd-webserver-on-the-bastion-to-share-the-iso)\n  - [Connect to OCP Cluster](#connect-to-ocp-cluster)\n  - [Troubleshooting](#troubleshooting)\n\n## Installation Information\n\n### Configurable Manifest files\n\nThe openshift-install agent create image subcommand generates an ephemeral ISO based on the inputs that you provide. You can choose to provide inputs through the following manifests:\n\nPreferred:\n\n`install-config.yaml`\n\n`agent-config.yaml`\n\nOptional: ZTP manifests\n\n`cluster-manifests/cluster-deployment.yaml`\n\n`cluster-manifests/agent-cluster-install.yaml`\n\n`cluster-manifests/pull-secret.yaml`\n\n`cluster-manifests/infraenv.yaml`\n\n`cluster-manifests/cluster-image-set.yaml`\n\n`cluster-manifests/nmstateconfig.yaml`\n\n`mirror/registries.conf`\n\n`mirror/ca-bundle.crt`\n\n### Bootstrapping the OpenShift Cluster\n\nOne of the control plane hosts runs the Assisted Service at the start of the boot process and eventually becomes the bootstrap host. This node is called the rendezvous host (node 0). The Assisted Service ensures that all the hosts meet the requirements and triggers an OpenShift Container Platform cluster deployment. All the nodes have the Red Hat Enterprise Linux CoreOS (RHCOS) image written to the disk. The non-bootstrap nodes reboot and initiate a cluster deployment. Once the nodes are rebooted, the rendezvous host reboots and joins the cluster. The bootstrapping is complete and the cluster is deployed.\n\n![node-installation-workflow](assets/node-installation-worklflow.png)\n\n[Official Documentation - OCP Installation using the Agent-Based Installer](https://docs.redhat.com/en/documentation/openshift_container_platform/4.17/html/installing_an_on-premise_cluster_with_the_agent-based_installer/preparing-to-install-with-agent-based-installer#agent-based-installer-recommended-resources_preparing-to-install-with-agent-based-installer)\n\n### Different Platform Types\n\n\u003e In the install-config.yaml, specify the platform on which to perform the installation. The following platforms are supported:\n\u003e\n\u003e * `baremetal`\n\u003e * `vsphere`\n\u003e * `none`\n\n\u003e Important\n\u003e For platform none:\n\u003e\n\u003e The none option requires the provision of DNS name resolution and load balancing infrastructure in your cluster. See Requirements for a cluster using the platform \"none\" option in the \"Additional resources\" section for more information.\nReview the information in the guidelines for deploying OpenShift Container Platform on non-tested platforms before you attempt to install an OpenShift Container Platform cluster in virtualized or cloud environments.\n\n## Cluster Preperations\n\n### Run a Bastion Host\n\nSetup a Bastion Host using e.g RHEL9.\n\nOn the bastion host, download the cli's:\n\n`curl -LO \u003curl\u003e`\n\n- [openshift-install-rhel9](https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.17.6/openshift-install-rhel9-amd64.tar.gz)\n- [openshift-client-linux-amd64](https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.17.6/openshift-client-linux-amd64-rhel9-4.17.6.tar.gz)\n\nUnpack the `.gz`files and copy them into your path:\n\nIf /usr/local/bin isn't included in the $PATH, run\n`export PATH=/usr/local/bin:$PATH`\n\n```shell\ncp openshift-install /usr/local/bin/\ncp oc /usr/local/bin/\ncp kubectl /usr/local/bin/\n```\n\n### NIC name validation using a RHEL Live Iso\n\nIn order to get the nic interface names of your servers, it could be helpful to quickly run a live-iso RHEL.\n\n`curl -LO https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.17/latest/rhcos-4.17.2-x86_64-live.x86_64.iso`\n\n### Bastion Host Preperation\n\n`cat ~/.ssh/id_ed25519.pub | ssh rguske@rguske-bastion.rguske.coe.muc.redhat.com \"mkdir -p ~/.ssh \u0026\u0026 cat \u003e\u003e ~/.ssh/authorized_keys \u0026\u0026 chmod 600 ~/.ssh/authorized_keys \u0026\u0026 chmod 700 ~/.ssh\"`\n\n`sudo subscription-manager register --username  --password `\n\n### Setting up VMs on vSphere\n\n- created 3 Control-Plane nodes\n- created 2 Worker-Nodes\n\n**IMPORTANT** configure the Advanced Parameters `disk.EnableUUID = True` when VMs got created manually on vSphere.\n\nIt'll be a HA OCP cluster. Three types of clusters are supported:\n\n- Single-Node cluster (SNO)\n- Compact cluster (three nodes - master and worker in one)\n- HA cluster (three cp nodes and three worker nodes)\n\nCollecting the necessary nic information:\n\n| name  | nic | mac | ipv4 | comment |\n|---|---|---|---|---|\n| ocp1-cp1  | ens33 | 00:50:56:88:0e:0c | 10.32.96.122  | Control Plane Node 1  |\n| ocp1-cp2  | ens33 |  00:50:56:88:17:c1 | 10.32.96.123  | Control Plane Node 2  |\n| ocp1-cp3  | ens33 | 00:50:56:88:97:e8 | 10.32.96.124  | Control Plane Node 3  |\n| ocp1-n1  | ens33 | 00:50:56:88:9b:a4 | 10.32.96.125  | Worker Node 1  |\n| ocp1-n2  | ens33 | 00:50:56:88:fe:2e | 10.32.96.126  | Worker Node 2  |\n\nBaseDomain: rguske.coe.muc.redhat.com\n\n## Manifest Configurations\n\n`agent-config.yaml`\n\n```yaml\ncat \u003e agent-config.yaml \u003c\u003c EOF\napiVersion: v1beta1\nkind: AgentConfig\nmetadata:\n  name: ocp1\nrendezvousIP: 10.32.96.122\nhosts:\n  - hostname: ocp1-cp1.rguske.coe.muc.redhat.com\n    role: master\n    interfaces:\n      - name: ens33\n        macAddress: 00:50:56:88:0e:0c\n    networkConfig:\n      interfaces:\n        - name: ens33\n          type: ethernet\n          state: up\n          mac-address: 00:50:56:88:0e:0c\n          ipv4:\n            enabled: true\n            address:\n              - ip: 10.32.96.122\n                prefix-length: 20\n            dhcp: false\n      dns-resolver:\n        config:\n          server:\n            - 10.32.96.1\n      routes:\n        config:\n          - destination: 0.0.0.0/0\n            next-hop-address: 10.32.111.254\n            next-hop-interface: ens33\n            table-id: 254\n  - hostname: ocp1-cp2.rguske.coe.muc.redhat.com\n    role: master\n    interfaces:\n      - name: ens33\n        macAddress: 00:50:56:88:17:c1\n    networkConfig:\n      interfaces:\n        - name: ens33\n          type: ethernet\n          state: up\n          mac-address: 00:50:56:88:17:c1\n          ipv4:\n            enabled: true\n            address:\n              - ip: 10.32.96.123\n                prefix-length: 20\n            dhcp: false\n      dns-resolver:\n        config:\n          server:\n            - 10.32.96.1\n      routes:\n        config:\n          - destination: 0.0.0.0/0\n            next-hop-address: 10.32.111.254\n            next-hop-interface: ens33\n            table-id: 254\n  - hostname: ocp1-cp3.rguske.coe.muc.redhat.com\n    role: master\n    interfaces:\n      - name: ens33\n        macAddress: 00:50:56:88:97:e8\n    networkConfig:\n      interfaces:\n        - name: ens33\n          type: ethernet\n          state: up\n          mac-address: 00:50:56:88:97:e8\n          ipv4:\n            enabled: true\n            address:\n              - ip: 10.32.96.124\n                prefix-length: 20\n            dhcp: false\n      dns-resolver:\n        config:\n          server:\n            - 10.32.96.1\n      routes:\n        config:\n          - destination: 0.0.0.0/0\n            next-hop-address: 10.32.111.254\n            next-hop-interface: ens33\n            table-id: 254\n  - hostname: ocp1-n1.rguske.coe.muc.redhat.com\n    role: worker\n    interfaces:\n      - name: ens33\n        macAddress: 00:50:56:88:9b:a4\n    networkConfig:\n      interfaces:\n        - name: ens33\n          type: ethernet\n          state: up\n          mac-address: 00:50:56:88:9b:a4\n          ipv4:\n            enabled: true\n            address:\n              - ip: 10.32.96.125\n                prefix-length: 20\n            dhcp: false\n      dns-resolver:\n        config:\n          server:\n            - 10.32.96.1\n      routes:\n        config:\n          - destination: 0.0.0.0/0\n            next-hop-address: 10.32.111.254\n            next-hop-interface: ens33\n            table-id: 254\n  - hostname: ocp1-n2.rguske.coe.muc.redhat.com\n    role: worker\n    interfaces:\n      - name: ens33\n        macAddress: 00:50:56:88:fe:2e\n    networkConfig:\n      interfaces:\n        - name: ens33\n          type: ethernet\n          state: up\n          mac-address: 00:50:56:88:fe:2e\n          ipv4:\n            enabled: true\n            address:\n              - ip: 10.32.96.126\n                prefix-length: 20\n            dhcp: false\n      dns-resolver:\n        config:\n          server:\n            - 10.32.96.1\n      routes:\n        config:\n          - destination: 0.0.0.0/0\n            next-hop-address: 10.32.111.254\n            next-hop-interface: ens33\n            table-id: 254\nEOF\n```\n\n`install-config.yaml`\n\n```yaml\ncat \u003e install-config.yaml \u003c\u003c EOF\napiVersion: v1\nbaseDomain: rguske.coe.muc.redhat.com\ncompute:\n- name: worker\n  replicas: 2\ncontrolPlane:\n  name: master\n  replicas: 3\nmetadata:\n  name: ocp1\nnetworking:\n  clusterNetwork:\n    - cidr: 10.128.0.0/14\n      hostPrefix: 23\n  machineNetwork:\n    - cidr: 10.32.96.0/20\n  serviceNetwork:\n    - 172.30.0.0/16\n  networkType: OVNKubernetes\nplatform:\n  baremetal:\n    apiVIPs:\n    - 10.32.96.120\n    ingressVIPs:\n    - 10.32.96.121\nfips: false\npullSecret: '{\"auths\":{\"cloud.openshift.com\":...'\nsshKey: 'ssh-rsa AAAAB3...'\nEOF\n```\n\n## Create the Agent Iso\n\n`mkdir conf`\n\nCreate the install-config.yaml and agent-install.yaml file.\n\nRun `openshift-install agent create image --dir conf/`\n\nValidate the installer progress using `openshift-install wait-for install-complete --dir conf/`\n\n\n### Boot from Iso\n\nMount the `agent.x86_64.iso` on the machines (BM or VM) and boot the machines and wait until the installation is done.\n\n## Run a `httpd` Webserver on the Bastion to share the Iso\n\nDepending on your environment, providing the created iso can be cumbersome. One quick and easy way could be by making it downloadable via a webserver.\n\nInstall `httpd` on the bastion host.\n\n```bash\ndnf install httpd\nsudo systemctl enable --now httpd\nsudo firewall-cmd --permanent --add-service=http\nsudo firewall-cmd --reload\nsudo firewall-cmd --list-all\n```\n\nValidate the service is running:\n\n```bash\nsudo ss -tuln | grep :80\ncurl -I http://localhost\nsudo tail -f /var/log/httpd/error_log\n```\n\nCopy the created iso into `/var/www/html/`.\n\nDownload the iso by using e.g. `curl -LO http://\u003cbastion-name/ip\u003e/agent.x86_64.iso` or `wget`.\n\n## Connect to OCP Cluster\n\n`export KUBECONFIG=auth/kubeconfig`\n\n`oc whoami --show-console`\n\n`cat auth/kubeadmin-password`\n\n`kubectl get nodes`\n\n## Troubleshooting\n\nRemove the Agent cache dir `rm -rf /home/rguske/.cache/agent`\n\nSsh to one of the nodes: `ssh -l core ocp1-cp1.rguske.coe.muc.redhat.com`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frguske%2Fopenshift-agent-based-installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frguske%2Fopenshift-agent-based-installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frguske%2Fopenshift-agent-based-installer/lists"}