This Terraform module is a quickstart for provisioning a VPC to house a ROSA cluster in AWS GovCloud for demonstration purposes. It will also create a jumphost for access into the cluster once it comes up.
See examples and https://docs.redhat.com/en/documentation/openshift_container_platform/4.16/html/installing_on_aws/installer-provisioned-infrastructure#installing-aws-vpc for full requirements.
Ensure that aws, terraform, sshuttle, and rosa CLIs are installed and configured with credentials, if applicable.
- Clone this git repository and
cdinto it:git clone https://github.com/openshift/rosa-govcloud-quickstart cd rosa-govcloud-quickstart - Create an SSH key pair to use for a jumphost
ssh-keygen -f jumphost-key -q -N "" - Initialize and apply resources with terraform:
terraform init terraform apply
Terraform will output the command you should use to create your rosa cluster. Copy and run it to kick off the install It will look something like this:
rosa create cluster --cluster-name rosa-gc-demo --mode auto --sts \
--machine-cidr 10.0.0.0/17 --service-cidr 172.30.0.0/16 \
--pod-cidr 10.128.0.0/14 --host-prefix 23 --yes \
--private-link --subnet-ids subnet-03b5943cfb7921b85Once the installation has completed, review the next steps in cluster access from terraform like this:
terraform output next_stepsYou'll get an output of useful commands to create an admin user and an sshuttle VPN tunnel to enable you to access the cluster in your browser or via CLI from your laptop. It looks something like this:
# * Once the cluster is up, create an Admin user:
# $ rosa create admin -c rosa-gc-demo
# * Run the command provided above to log into the cluster
# * Create a sshuttle VPN via your jumphost:
# $ sshuttle --ssh-cmd 'ssh -i jumphost-key' --dns -NHr [email protected] 10.0.0.0/16
# * Find the URL of the cluster's console and log into it via your web browser
# $ rosa describe cluster -c rosa-gc-demo -o json | jq -r .console.urlIf you don't have sshuttle installed, you can download it from github here.
Delete the rosa cluster and destroy terraform assets:
rosa delete cluster
terraform destroy