Skip to content

Helper scripts to create OpenShift clusters on different cloud providers, /./.\.

Notifications You must be signed in to change notification settings

swghosh/raining-openshift-clusters

Repository files navigation

OpenShift Cluster Creation Scripts

This repo contains bash scripts to help automate creation of OpenShift clusters across cloud providers. (Note: it has functionality very similar to that of Cluster Bot except it can just run out of the box to help create IPI (installer-provisioned-infrastructure) clusters).

Pre-requisites:

  • oc cli installed and available in $PATH
  • cloud provider cli setup with necessary authentication for eg. AWS credentials available to be inferred from current environment or GCP credentials gcloud default auth setup
  • necessary cloud provider quota required for spinning up cluster resources for OpenShift
  • ~/.docker/config.json file on your system to contain the necessary pull secrets required for cluster creation
    • or any other location would work for the pull secrets file, however you would need to set PULL_SECRET_PATH environment variable explicitly
  • either ~/.ssh/google_compute_engine.pub (for GCP) or ~/.ssh/id_rsa.pub (for AWS, Azure) to be present on your system

You can download all these binaries either from: https://console.redhat.com/openshift/downloads or from our OpenShift CI: https://amd64.ocp.releases.ci.openshift.org/

Before running each of the .sh scripts consider taking a look over the initial block of code in each of the script preceeding # --------------------, should contains description for each environment variable necessary for the cluster creation to run. They have been filled with default values (yet wont work out of the box), instead you need to set those variables in your environment (i.e. either before calling the script or by creating a wrapper script which contains exact values of the required variables) especially, the cloud provider resource ids eg. cloud project, cloud region, base domain, etc.

Amazon Web Services (AWS)

Google Cloud Platform (GCP)

Microsoft Azure

Cleanup

All the clusters created using this script will have a prefix that is determined by running whoami from the shell. At the time of destroying the clusters, be mindful to use the same username or the cleanup won't work the way as desired. ./destroy-clusters.sh N will attempt cleanup (a.k.a openshift-install destroy cluster) of all but the last N clusters. If the value of N is omitted, the script will attempt to cleanup all the clusters from the directories that can it can find.

Additional references:

  1. https://docs.openshift.com/container-platform/latest/installing/index.html
  2. https://github.com/openshift/installer/blob/master/docs/user/overview.md
  3. https://github.com/openshift/cloud-credential-operator/blob/master/docs/ccoctl.md

About

Helper scripts to create OpenShift clusters on different cloud providers, /./.\.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published