You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A terraform module for creating a testbed for Disconnected OpenShift clusters. It configures resources on Amazon to emulate a disconnected environment, providing the means for a user to practice or demonstrate "sneakernet" use-cases for getting OpenShift content into a disconnected environment on AWS, while still allowing for API connectivity. This is similar enough to other IPI use cases (Metal3, vSphere) that are very common on other infrastructures, as well as closely related to the experience on "disconnected" AWS overlays, to be a meaningful test bench.
For an example of this Terraform module's intended use cases, including more robust configuration post-provisioning please see the oc-mirror E2E testing framework repository.
Basic Information
Environment Prerequisites
Terraform >= 1.4.2
An AWS profile defined in ~/.aws/credentials or IAM credentials (access key id and secret is fine) exported
This AWS profile needs to have a significant amount of privilege
You should have a Route53 Hosted Zone available on the account
What do I get?
This terraform module creates a VPC with 7 subnets across 3 availability zones:
Three of those subnets (one in each zone) are on a traditional AWS IGW that enables outbound internet access
These are the "connected" subnets
One of those subnets is the designated NAT subnet, with a unique CIDR, access to the IGW, and source/dest check disabled on AWS
Three of them (one in each zone) are on an AWS subnet with a route set to the instance in the NAT subnet
These are the "isolated" subnets
Three instances are stood up:
One in a "connected" subnet, designated to be a registry
TCP ports 443 and 80 are allowed to this instance
An elastic IP and Route53 record are created for this instance
You need to configure this as a registry yourself
One in the NAT subnet, designated to be the proxy for isolated subnets
An elastic IP and Route53 record are created for this instance
You need to configure this as a proxy yourself
One in an "isolated" subnet, designated to be the disconnected bastion
You need to ensure that proxy configuration meets your expectations for this instance
An S3 bucket and IAM credentials to use it (read/write) are created:
These are designed for use by the registry
And finally, a set of IAM credentials which are adequate to install OpenShift are created.
Example usage
Reference the module from your own terraform, with an initialized AWS provider. An example terraform file might look like this:
Some more robust examples, including parametrized ones with outputs, are available in the examples directory. Terraform outputs are expected to be required for consumption by follow-on automation.
The name you will be giving your OpenShift cluster in metadata.name in install-config.yaml. A new private HostedZone will be created for this as a subdomain of the cluster_domain.
The name you will be giving your OpenShift cluster in metadata.name in install-config.yaml. A new private HostedZone will be created for this as a subdomain of the cluster_domain.
The name of the domain under which your OpenShift cluster will reside. Will be used in the construction of DNS records for the registry in the public and private zones.
The name you will be giving your OpenShift cluster in metadata.name in install-config.yaml. Will be used in the construction of DNS records for the registry in the public and private zones.