This collection of modules will deploy a bare metal OpenShift using the assisted installer.
Terraform is just a single binary. Visit their download page, choose your operating system, make the binary executable, and move it into your path.
Here is an example for macOS:
curl -LO https://releases.hashicorp.com/terraform/1.2.3/terraform_1.2.3_darwin_amd64.zip
unzip terraform_1.2.3_darwin_amd64.zip
chmod +x terraform
sudo mv terraform /usr/local/bin/
Example for Linux:
wget https://releases.hashicorp.com/terraform/1.2.3/terraform_1.2.3_linux_amd64.zip
unzip terraform_1.2.3_linux_amd64.zip
sudo install terraform /usr/local/bin/
local-exec
provisioners require the use of:
curl
jq
To install jq
on RHEL/CentOS:
wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
sudo install jq-linux64 /usr/local/bin/jq
To download this project, run the following command:
git clone https://github.com/waynedovey/openshift-on-equinix-metal.git
cd openshift-on-equinix-metal
-
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="CHANGEME" export TF_VAR_auth_token="CHANGEME"
-
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 -target metal_spot_market_request.bastion -target metal_spot_market_request.master0 terraform apply -target metal_spot_market_request.bastion -target metal_spot_market_request.master0 -target metal_spot_market_request.master1 -target metal_spot_market_request.master2 terraform apply