Giter Club home page Giter Club logo

terraform-equinix-metal-openshift-on-baremetal's Introduction

Terraform CI

OpenShift via Terraform on Equinix Metal

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.

Install

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.

Additional requirements

local-exec provisioners require the use of:

Download this project

To download this project, run the following command:

git clone https://github.com/equinix/terraform-metal-openshift-on-baremetal.git
cd terraform-metal-openshift

Usage

  1. Follow this to configure your Equinix Metal project and collect required parameters.

  2. Follow this to configure your Cloudflare account and collect required parameters.

  3. Obtain an OpenShift Cluster Manager API Token for pullSecret generation.

  4. 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
  5. Initialize and validate terraform:

    terraform init -upgrade
    terraform validate
  6. Provision all resources and start the installation. This process takes between 30 and 50 minutes:

    terraform apply
  7. 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

Experimental Statement

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. โ†ฉ

terraform-equinix-metal-openshift-on-baremetal's People

Contributors

agonzalezrh avatar codinja1188 avatar ctreatma avatar dfedorov-ciena avatar displague avatar liveaverage avatar mrmrcoleman avatar rawkode avatar saschagrunert avatar wtcross avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-equinix-metal-openshift-on-baremetal's Issues

Bootstrap issues with 4.9.0 image

Hey, I have the issue that the bootstrap node is not bootable any more. The installations seems to be fine, then it restarts the machine from the iPXE process. Then the reboot got stuck with:

Booting from Hard drive C:
..
error: ../../grub-core/disk/i386/pc/biosdisk.c:498:failure reading sector 0x0
from `cd'.

I tried provisioning multiple facilities (da11, ams6, fra1) without any success.


It also happens that the CoreOS kernel boot screen of grub appears, but then the screen turns black via the out of band console. Pinging the machine is possible but not accessing any service like ssh.

Update to the Equinix TF Provider

The Metal provider is deprecated. Update the module to use the Equinix provider.

The release notes may be used to communicate upgrade in place notes, but this can also be done as a link to the Migration guide. We can provide additional commentary on the process if prompted in Slack or GH.

Cluster certificate is not trusted

The generated certificate for external access to the cluster is not trusted.

This may be due to failure reported by provisioners:

module.openshift_install.null_resource.ocp_approve_pending_csrs (remote-exec): error: one or more CSRs must be specified as <name> or -f <filename>
module.openshift_install.null_resource.ocp_approve_pending_csrs (remote-exec): W0225 10:50:20.232961   29397 warnings.go:67] certificates.k8s.io/v1beta1 CertificateSigningRequest is deprecated in v1.19+, unavailable in v1.22+; use certificates.k8s.io/v1 CertificateSigningRequest
module.openshift_install.null_resource.ocp_approve_pending_csrs (remote-exec): error: one or more CSRs must be specified as <name> or -f <filename>

These provisioner errors do not reappear on subsequent provisions, but the certificate is invalid (bad issuer?):

subject=/CN=*.apps.clustername.example.com
issuer=/CN=ingress-operator@1614149495

I think this may be related to assets/letsencrypt/1_configure_ingresscerts.sh not being called (and requiring Cloudflare credentials). The older CSR records may be a problem too.

To keep this simple, we may need to enable LetsEncrypt (by default) using an HTTP prover instead of DNS.

Originally posted by @displague in #2 (comment)

bastion kubeconfig is not persisted between boots

For operations where the bastion kubeconfig is needed on subsequent bootups, the file should be stored in a permanent location. Currently, this file is stored in /tmp.

/tmp/artifacts/install/auth/kubeconfig

Migrate from RedHatSI/Packet to Equinix Metal

This Terraform module was originally https://github.com/RedHatSI/terraform-packet-openshift.

This fork of the project migrates all Packet references, including Terraform resources, to use Equinix Metal branding and Terraform resources.

This migration also seeks to further modularize components of the module (DNS) and bring other enhancements (dynamic SSH Keys) found in other Equinix Metal modules: https://registry.terraform.io/namespaces/equinix

These goals are inline with RedHatGov/terraform-packet-openshift#46. At the end of this migration, this module will be published to the Terraform Registry.

This issue will not deal with the migration of existing deployments. We can explore that in a new issue, if raised.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.