Home > Workload Solutions > Container Platforms > Red Hat OpenShift Container Platform > Guides > Implementation Guide—Red Hat OpenShift Container Platform 4.12 on Intel-powered Dell Infrastructure > Zero-Touch Provisioning deployment
You can use Zero-Touch Provisioning (ZTP) to deploy OpenShift Container Platform in a hub-spoke architecture, where a single hub cluster manages multiple spoke clusters in a disconnected environment. For more information, see Red Hat ZTP documentation.
To use ZTP, you need:
CSAH nodes host the RHCOS ISO and RootFS images that are used to provision the distributed unit bare-metal hosts.
[core@csah-pri ~]$ export ISO_IMAGE_NAME= rhcos-4.12.17-x86_64-live.x86_64.iso
[core@csah-pri ~]$ export ROOTFS_IMAGE_NAME= rhcos-4.12.17-x86_64-live-rootfs.x86_64.img
[core@csah-pri ~]$ export OCP_VERSION=4.12.17
[core@csah-pri ~]$ sudo wget https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.12/${OCP_VERSION}/${ISO_IMAGE_NAME} -O /var/www/html/${ISO_IMAGE_NAME}
[core@csah-pri ~]$ sudo wget https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.12/${OCP_VERSION}/${ROOTFS_IMAGE_NAME} -O /var/www/html/${ROOTFS_IMAGE_NAME}
At a high level, preparing the hub cluster includes:
The assisted installer service deploys OpenShift Container Platform clusters. Create an instance of AgentServiceConfig CR by using this sample YAML file and updating the required parameters. Run the following command:
[core@csah-pri ~]$ oc apply -f <agentServiceConfig.yaml>
To configure the hub cluster for ZTP:
This installation automatically installs Argo CD.
i Export the argocd directory from the ztp-site-generate container image by running the following commands:
[core@csah-pri ~]$ mkdir gitops
[core@csah-pri ~]$ cd gitops
[core@csah-pri gitops]$ podman pull registry.redhat.io/openshift4/ztp-site-generate-rhel8:v4.12
Note: If the pull command fails, verify that you are logged in using the podman login registry.redhat.io command and Red Hat credentials.
[core@csah-pri gitops]$ mkdir -p ./out
[core@csah-pri gitops]$ podman run --log-driver=none --rm registry.redhat.io/openshift4/ztp-site-generate-rhel8:v4.12 extract /home/ztp --tar | tar x -C ./out
ii Create a directory structure with separate paths for the SiteConfig and PolicyGenTemplate custom resources (CRs) in your GitHub repository by following the structure in the out/argocd/example directory.
i In the OpenShift console, click the Bento menu icon in the upper right-hand corner and select Cluster Argo CD. Log in using your OpenShift credentials.
ii Under Settings, configure access to the repository:
Repositories: Add the connection information and credentials. The URL must end in .git—for example, https://github.com/dell-esg/openshift-bare-metal.git.
Certificates: Add the public certificate for the repository, if needed.
If needed, update the out/argocd/deployment/policies-app.yaml file.
[core@csah-pri gitops]$ oc patch argocd openshift-gitops \
-n openshift-gitops --type=merge \
--patch-file out/argocd/deployment/argocd-openshift-gitops-patch.json
[core@csah-pri gitops]$ oc apply -k out/argocd/deployment
To prepare the hub cluster for site deployment, start ZTP by pushing CRs to your Git repository. Then:
These resources must be in a namespace with a name matching the cluster name.
$ export CLUSTERNS=compact
$ oc create namespace $CLUSTERNS
$ oc create -f <file name>
$ oc create -f <file name>
The ArgoCD pipeline detects the changes and begins the site deployment.
$ oc get AgentClusterInstall -n compact