This collection of modules will deploy a bare metal OpenShift environment consisting of (1) ephemeral bootstrap node, (3) control plane nodes, and a user-configured count of worker nodes1 on Equinix Metal. DNS records are automatically configured using Cloudflare, AWS Route53, or Linode DNS.
With your Equinix Metal account, project, and a User API token, you can use Terraform v1+ to install a proof-of-concept demonstration environment for OpenShift on Equinix Metal.
local-exec
provisioners require the use of:
curl
(install instructions)jq
(install instructions)
To download this project, run the following command:
git clone https://github.com/equinix/terraform-metal-openshift-on-baremetal.git
cd terraform-metal-openshift
-
Follow this to configure your Equinix Metal project and collect required parameters.
-
Follow this to configure your Cloudflare account and collect required parameters.
-
Obtain an OpenShift Cluster Manager API Token for pullSecret generation.
-
Configure TF_VARs applicable to your Equinix Metal project, DNS settings, and OpenShift API Token:
export TF_VAR_project_id="kajs886-l59-8488-19910kj" export TF_VAR_auth_token="lka6702KAmVAP8957Abny01051" export TF_VAR_cluster_basedomain="domain.com" export TF_VAR_ocp_cluster_manager_token="eyJhbGc...d8Agva" export TF_VAR_dns_provider="cloudflare" # aws and linode are also supported export TF_VAR_dns_options='{"email": "[email protected]", "api_key": "...", "api_token": "..."}' # fields differ by DNS provider
-
Initialize and validate terraform:
terraform init -upgrade terraform validate
-
Provision all resources and start the installation. This process takes between 30 and 50 minutes:
terraform apply
-
Cleanup the boostrap node once provisioning and installation is complete by permanently (recommended) or temporarily setting
count_bootstrap=0
terraform apply -var="count_bootstrap=0"
If you need to obtain your
kubeadmin
credentials at a later time:terraform output
This repository is Experimental!
1 As of OpenShift Container Platform 4.5 you can deploy three-node clusters on bare metal. Setting count_compute=0
will support deployment of a 3-node cluster. ↩