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 recentbinaries 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.yamlto generate the install manifests - Create exactly two
MachineSetsof node/role type ofwavelengthset 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 configurecli command has been run on the Linux host- The AWS credentials are stored under
~/.aws/credentialsfile - At least two
Carrier IPElastic 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.ymlwhile following the embedded comments carefully- Ensure that the
pull_secretthat is updated is NOT surrounded in quotes - Ensure that each Wavelength zone you list has at least one
Carrier IPElastic IP allocated
- Ensure that the
- Customize the
roles/aws/templates/install-config.yaml.j2file as required
ansible-playbook ocp-aws-wavelength-setup.ymlOnce the playbook has finished running, it has prepared all the materials in install-dir for OpenShift install
bin/openshift-install create cluster --dir=install-dirImportant: When the installation is proceeding, you will notice three
workernodes join the cluster but thee twowavelengthnodes still wouldn't show up withocclient despite the VMs created in EC2. At that point, you need toassociatetheCarrier IPElastic IP toWavelengthEC2 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