<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Automation on Home</title><link>/tags/automation/</link><description>Recent content in Automation on Home</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sat, 09 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="/tags/automation/" rel="self" type="application/rss+xml"/><item><title>Deploying OpenShift on AWS with Automated Cluster Provisioning</title><link>/2026/deploying-openshift-on-aws-with-automated-cluster-provisioning/</link><pubDate>Sat, 09 May 2026 00:00:00 +0000</pubDate><guid>/2026/deploying-openshift-on-aws-with-automated-cluster-provisioning/</guid><description>&lt;figure&gt;&lt;img src="/images/posts/post_20/overview.png"data-src="/images/posts/post_20/overview.png"
/&gt;&lt;figcaption&gt;
&lt;h4&gt;The full provisioning pipeline: CLI setup, ocp-on-aws config, and a single script that spins up VPCs, EC2 instances, DNS records, and an Argo CD baseline - AI generated&lt;/h4&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;In this post, I want to describe how to deploy &lt;strong&gt;Red Hat OpenShift&lt;/strong&gt; in a blank Amazon Web Services (AWS) environment using a fully automated and repeatable approach. This post is part of a series of two posts: 1. This post covers the cluster provisioning step. 2. The installation of OpenShift AI on top of the running OpenShift cluster is covered in a separate post: &lt;a href="/2026/installing-openshift-ai-on-openshift/"&gt;Install OpenShift AI on OpenShift&lt;/a&gt;. If you already have an OpenShift cluster available, feel free to jump straight to that post.
Both workflows build on two GitHub repositories that cover both infrastructure provisioning and the installation of the AI platform components, and they reduce what could easily be a multi-hour manual effort to a handful of shell commands.&lt;/p&gt;
&lt;p&gt;I should be upfront: one purpose of this post is also to serve as a personal reference for future me, who will inevitably return here after six months asking &amp;ldquo;wait, what was the exact command again?&amp;rdquo; Consider this the written documentation I should have filed away the first time.&lt;/p&gt;
&lt;p&gt;A special thanks goes to my team mate &lt;a href="https://github.com/alvarolop"&gt;&lt;strong&gt;Álvaro López Medina&lt;/strong&gt;&lt;/a&gt;, who created and maintains the &lt;a href="https://github.com/alvarolop/ocp-on-aws"&gt;ocp-on-aws&lt;/a&gt; and &lt;a href="https://github.com/alvarolop/rhoai-gitops"&gt;rhoai-gitops&lt;/a&gt; repositories. Without his work and support, setting up this environment would have been significantly more involved.&lt;/p&gt;
&lt;h2 id="prerequisites"&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before starting, a Linux workstation or jump host is recommended for running the commands. The following command line tools must be installed and configured:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/cli_tools/openshift-cli-oc#cli-getting-started"&gt;&lt;strong&gt;OpenShift CLI (oc)&lt;/strong&gt;&lt;/a&gt; – required to interact with the OpenShift cluster&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html"&gt;&lt;strong&gt;AWS CLI&lt;/strong&gt;&lt;/a&gt; – required to provision and manage AWS infrastructure&lt;/li&gt;
&lt;li&gt;&lt;a href="https://httpd.apache.org/docs/current/programs/htpasswd.html"&gt;&lt;strong&gt;htpasswd&lt;/strong&gt;&lt;/a&gt; – required to generate user credentials for the cluster&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These are fundamental prerequisites. The installation scripts will fail or behave unexpectedly without them.&lt;/p&gt;
&lt;h2 id="ordering-an-aws-blank-environment"&gt;Ordering an AWS Blank Environment&lt;/h2&gt;
&lt;p&gt;For Red Hat employees and Red Hat partners, the easiest starting point is an &lt;a href="https://catalog.demo.redhat.com/catalog?item=babylon-catalog-prod/sandboxes-gpte.sandbox-open.prod&amp;amp;utm_source=webapp&amp;amp;utm_medium=share-link"&gt;AWS Blank Open Environment&lt;/a&gt; from the &lt;a href="https://catalog.demo.redhat.com/catalog"&gt;Red Hat Demo Platform (RHDP)&lt;/a&gt;. Otherwise, an existing AWS account accessed through the &lt;a href="https://aws.amazon.com/"&gt;AWS Web Console&lt;/a&gt; works just as well.&lt;/p&gt;
&lt;p&gt;This tutorial was validated against eu-west-1. The blank environment provides a clean, ephemeral AWS account with the necessary IAM permissions and service quotas to support an &lt;em&gt;Installer-Provisioned Infrastructure (IPI)&lt;/em&gt; deployment of OpenShift.&lt;/p&gt;
&lt;p&gt;Once the environment is provisioned, the service overview page contains the AWS access credentials and the base DNS zone that will be needed in the configuration step below.&lt;/p&gt;
&lt;h2 id="deploying-openshift-on-aws"&gt;Deploying OpenShift on AWS&lt;/h2&gt;
&lt;p&gt;With the AWS environment in place, the &lt;a href="https://github.com/alvarolop/ocp-on-aws"&gt;ocp-on-aws&lt;/a&gt; repository handles the rest of the cluster provisioning. The repository wraps the OpenShift IPI installer in a shell script and manages user creation, cluster-admin group configuration, and the pull secret in a structured, repeatable way.&lt;/p&gt;
&lt;h3 id="preparing-the-repository"&gt;Preparing the repository&lt;/h3&gt;
&lt;p&gt;Throughout the following steps, any value written in &lt;code&gt;&amp;lt;angle brackets&amp;gt;&lt;/code&gt; is a placeholder and must be replaced with your actual value before running the command.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Clone the repository:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git clone https://github.com/alvarolop/ocp-on-aws
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ocp-on-aws
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="2"&gt;
&lt;li&gt;Copy the authentication file templates:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cp auth/users.htpasswd.example auth/users.htpasswd
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cp auth/group-cluster-admins.yaml.example auth/group-cluster-admins.yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="3"&gt;
&lt;li&gt;Generate a password hash for your user:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;htpasswd -b -B auth/users.htpasswd &amp;lt;user_name&amp;gt; &amp;lt;password&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="4"&gt;
&lt;li&gt;Adjust &lt;code&gt;auth/group-cluster-admins.yaml&lt;/code&gt; to list the users that should receive &lt;code&gt;cluster-admin&lt;/code&gt; privileges:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;apiVersion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;user.openshift.io/v1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Group&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;cluster-admins&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;users&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;redhat&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;&amp;lt;user_name&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="configuring-the-installation"&gt;Configuring the installation&lt;/h3&gt;
&lt;ol start="5"&gt;
&lt;li&gt;Copy the configuration template:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cp aws-ocp4-config aws-ocp4-config-labs
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="6"&gt;
&lt;li&gt;Open the configuration file and adjust the following parameters:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;vi aws-ocp4-config-labs
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The key values to review:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;OPENSHIFT_VERSION&lt;/code&gt; (Line 6):&lt;/strong&gt; Set this to match your local &lt;code&gt;oc&lt;/code&gt; client version for maximum compatibility.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;RHPDS_TOP_LEVEL_ROUTE53_DOMAIN&lt;/code&gt; (Line 9):&lt;/strong&gt; The base DNS zone for your cluster; find this in the RHDP service overview.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;AWS_ACCESS_KEY_ID&lt;/code&gt; and &lt;code&gt;AWS_SECRET_ACCESS_KEY&lt;/code&gt; (Lines 16–18):&lt;/strong&gt; The programmatic access credentials from the RHDP environment, required to create the VPC and EC2 instances.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;RHOCM_PULL_SECRET&lt;/code&gt; (Line 31):&lt;/strong&gt; Retrieve this from the &lt;a href="https://console.redhat.com/openshift/install/pull-secret"&gt;Hybrid Cloud Console&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;WORKER_REPLICAS&lt;/code&gt; (Line 47):&lt;/strong&gt; Set to the number of worker nodes required for your workload.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="running-the-installation"&gt;Running the installation&lt;/h3&gt;
&lt;ol start="7"&gt;
&lt;li&gt;Start the cluster installation:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./aws-ocp4-install.sh aws-ocp4-config-labs
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The script invokes the OpenShift IPI installer and creates all required AWS infrastructure: VPC, subnets, EC2 instances, Elastic Load Balancers, and Route53 DNS records. The process typically takes 30 to 45 minutes. It is worth monitoring the AWS console in the corresponding region during this time to observe the resources coming up.&lt;/p&gt;
&lt;figure&gt;&lt;img src="/images/posts/post_20/aws_console.png"data-src="/images/posts/post_20/aws_console.png"
/&gt;&lt;figcaption&gt;
&lt;h4&gt;EC2 instances and load balancers provisioned in AWS after the installation completes&lt;/h4&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Once the installer finishes, the cluster API and console URLs, along with the &lt;code&gt;kubeconfig&lt;/code&gt; file, will be available in the output and in the &lt;code&gt;auth/&lt;/code&gt; directory of the repository.&lt;/p&gt;
&lt;figure&gt;&lt;img src="/images/posts/post_20/argo_cd.png"data-src="/images/posts/post_20/argo_cd.png"
/&gt;&lt;figcaption&gt;
&lt;h4&gt;Argo CD applications deployed as part of the cluster bootstrap&lt;/h4&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The installation script also bootstraps a set of &lt;em&gt;Argo CD&lt;/em&gt; applications that manage cluster-level configurations through GitOps from the start. This gives the cluster a solid, declarative baseline before any additional workloads are installed.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;The combination of the AWS blank environment and the &lt;code&gt;ocp-on-aws&lt;/code&gt; repository makes it straightforward to spin up a fully functional OpenShift cluster in under an hour with minimal manual intervention. The IPI installer handles the infrastructure details, and the GitOps bootstrap ensures a consistent cluster configuration from the first login.&lt;/p&gt;
&lt;p&gt;With the cluster in place, the next step is installing OpenShift AI and enabling GPU support, which is covered in the follow-up post: &lt;a href="/2026/installing-openshift-ai-on-openshift/"&gt;Install OpenShift AI on OpenShift&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="references"&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;ocp-on-aws - GitHub repository by Álvaro López Medina - &lt;a href="https://github.com/alvarolop/ocp-on-aws"&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;rhoai-gitops - GitHub repository by Álvaro López Medina - &lt;a href="https://github.com/alvarolop/rhoai-gitops"&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Red Hat Demo Platform - &lt;a href="https://catalog.demo.redhat.com/catalog"&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;OpenShift CLI - Getting started - &lt;a href="https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/cli_tools/openshift-cli-oc#cli-getting-started"&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;AWS CLI - Installation guide - &lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html"&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;htpasswd - &lt;a href="https://httpd.apache.org/docs/current/programs/htpasswd.html"&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Red Hat Hybrid Cloud Console - Pull Secret - &lt;a href="https://console.redhat.com/openshift/install/pull-secret"&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>