Skip to content

Instantly share code, notes, and snippets.

@liveaverage
Last active May 4, 2021 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liveaverage/e8ae234465f767603c59c3bda77179c6 to your computer and use it in GitHub Desktop.
Save liveaverage/e8ae234465f767603c59c3bda77179c6 to your computer and use it in GitHub Desktop.
Sample install-config.yaml for AWS GovCloud deployment with pre-existing VPC and Subnet(s)
apiVersion: v1
baseDomain: ext.shifti.us
credentialsMode: Mint
compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
platform: {}
replicas: 2
controlPlane:
architecture: amd64
hyperthreading: Enabled
name: master
platform: {}
replicas: 3
metadata:
creationTimestamp: null
name: no53
networking:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
machineNetwork:
- cidr: 172.16.0.0/16
networkType: OpenShiftSDN
serviceNetwork:
- 172.30.0.0/16
platform:
aws:
region: us-gov-west-1
subnets:
- subnet-0e24t81687a44
amiID: ami-05543819601de48c632
userTags:
adminContact: liveaverage
pullSecret: '{"auths":{"cloud.openshift.com":{"auth":"secret","email":"liveaverage"},"registry.connect.redhat.com":{"auth":"secret","email":"liveaverage"},"registry.redhat.io":{"auth":"secret","email":"liveaverage"}}}'
publish: Internal
fips: false
proxy:
httpProxy: http://192.168.1.136:3128
httpsProxy: http://192.168.1.136:3128
noProxy: ocp-mirror.int.shifti.us,.int.shifti.us,.gxr.me,192.168.1.0/24,192.168.20.0/24
additionalTrustBundle: |
-----BEGIN CERTIFICATE-----
MIIEZTCCA02gAwIBAgIQQAF1BIMUpMghjISpDBbN3zANBgkqhkiG9w0BAQsFADA/
sshKey: |
ssh-rsa secret stack@int.shifti.us
apiVersion: v1
baseDomain: ext.shifti.us
credentialsMode: Mint
compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
platform: {}
replicas: 2
controlPlane:
architecture: amd64
hyperthreading: Enabled
name: master
platform: {}
replicas: 3
metadata:
creationTimestamp: null
name: no53
networking:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
machineNetwork:
- cidr: 172.16.0.0/16
networkType: OpenShiftSDN
serviceNetwork:
- 172.30.0.0/16
platform:
aws:
region: us-gov-west-1
subnets:
- subnet-0e24t81687a44
amiID: ami-05543819601de48c632
userTags:
adminContact: liveaverage
pullSecret: '{"auths":{"cloud.openshift.com":{"auth":"secret","email":"liveaverage"},"registry.connect.redhat.com":{"auth":"secret","email":"liveaverage"},"registry.redhat.io":{"auth":"secret","email":"liveaverage"}}}'
publish: Internal
fips: false
sshKey: |
ssh-rsa secret stack@int.shifti.us
export VMIMPORT_BUCKET_NAME=rhcos-shifti
export AWS_DEFAULT_REGION=us-gov-west-1
export RHCOS_VERSION=4.7.7
export AWS_PROFILE=gov
export awsreg=${AWS_DEFAULT_REGION}
export s3name=rhcos-shifti
cd /tmp && wget https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/latest/latest/rhcos-4.7.7-x86_64-aws.x86_64.vmdk.gz
gunzip rhcos-4.7.7-x86_64-aws.x86_64.vmdk.gz
aws s3api put-object --profile gov --bucket rhcos-shifti --key rhcos-4.7.7-x86_64-aws.x86_64.vmdk --body rhcos-4.7.7-x86_64-aws.x86_64.vmdk
## Update containers.json
aws ec2 import-snapshot --region ${AWS_DEFAULT_REGION} --description "RHCOS 4.7.7" --disk-container file://containers.json
watch -n 5 aws ec2 describe-import-snapshot-tasks --region ${AWS_DEFAULT_REGION}
aws ec2 describe-import-snapshot-tasks --region ${AWS_DEFAULT_REGION} | grep "completed" -B1
export snapid="snap-0ca6b60cc997129ac"
aws ec2 register-image --region ${AWS_DEFAULT_REGION} --architecture x86_64 --description "rhcos-4.7.7-x86_64-aws.x86_64" --ena-support --name "rhcos-4.7.7-x86_64-aws.x86_64" --virtualization-type hvm --root-device-name '/dev/xvda' --block-device-mappings 'DeviceName=/dev/xvda,Ebs={DeleteOnTermination=true,SnapshotId='${snapid}'}'
## Reference the AMI ID in your install-config.yaml sample below
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment