This repository allows you to get started installing OpenShift on AWS and on Wavelength subnets.
The automation will do the following:
- Setup local folders and downloads the
most recent
binaries for OpenShift installation - Sets up AWS by creating the following:
- VPC and associated resources (using CloudFormation templates)
- Carrier Gateway and associated resources (using CloudFormation templates)
- Public Hosted Zone
- Prepares all the materials for OpenShift installation, this includes
- Using the
install-config.yaml
to generate the install manifests - Create exactly two
MachineSets
of node/role type ofwavelength
set to run in Wavelength zones/subnets
- Using the
This repo was possible due to the brilliant work of Ashish Aggarwal of Red Hat
- Running an OpenShift Worker Node on AWS Wavelength for Edge Applications
- Building your first Red Hat OpenShift cluster on Verizon 5G Edge
- Linux host (Fedora 33+/RHEL 8) with the following installed
- Latest Ansible (2.9.x)
- Git
- Access to the AWS environment
aws configure
cli command has been run on the Linux host- The AWS credentials are stored under
~/.aws/credentials
file - At least two
Carrier IP
Elastic IPs allocated, one for every Wavelength zone, planned for installation
git clone https://github.com/vchintal/openshift-aws-wavelength
cd openshift-aws-wavelength
- Customize the
host_vars/localhost.yml
while following the embedded comments carefully- Ensure that the
pull_secret
that is updated is NOT surrounded in quotes - Ensure that each Wavelength zone you list has at least one
Carrier IP
Elastic IP allocated
- Ensure that the
- Customize the
roles/aws/templates/install-config.yaml.j2
file as required
ansible-playbook ocp-aws-wavelength-setup.yml
Once the playbook has finished running, it has prepared all the materials in install-dir
for OpenShift install
bin/openshift-install create cluster --dir=install-dir
Important: When the installation is proceeding, you will notice three
worker
nodes join the cluster but thee twowavelength
nodes still wouldn't show up withoc
client despite the VMs created in EC2. At that point, you need toassociate
theCarrier IP
Elastic IP toWavelength
EC2 instances for then to have access to the internet and eventually join the cluster.
For every Deployment
/DeploymentConfig
that need to run the workloads on the wavelength
nodes/machines, update the configuration to add the following:
# Namespace Name: demo
# DeploymentConfig Name: mariadb
bin/oc patch dc -n demo mariadb -p '{"spec": {"template":{"spec": {"nodeSelector": {"node-role.kubernetes.io/wavelength": ""}}}}}'
Alternatively, you can create a project that will deploy all the workloads created in it to only the wavelength
nodes with the following command:
# Project Name: demo
bin/oc adm new-project --node-selector=node-role.kubernetes.io/wavelength='' demo