This repository contains configuration files and scripts intended to deploy OCP 3.x and 4.x environments to aid in developing and testing Cluster Application Migration Tool. All workflows are leveraging https://github.com/redhat-cop/agnosticd.
This repository is focused on providing the exact scripts/config files we are using so we may all work from a common configuration. The intent is that all future contributions continue to be done upstream in https://github.com/redhat-cop/agnosticd and this repo serves as the specific bash and yaml files to kick off agnosticd in the exact manner we require.
Note we are only provisioning to AWS with the provided configurations.
An OpenShift Ansible provisioned AWS multi-node environment leveraging CloudFormation for AWS infrastructure.
The https://github.com/konveyor/mig-agnosticd/tree/master/3.x directory provides a means of deploying a '3.11' cluster. Additionally we will install:
-
Velero (our Fork): https://github.com/konveyor/velero
-
Velero Plugins:
-
Restic (our Fork): https://github.com/konveyor/restic
An OpenShift Installer provisoned (IPI) AWS multi-node environment leveraging Terraform via the installer.
The https://github.com/konveyor/mig-agnosticd/tree/master/4.x directory provides a means of deploying a '4.1' cluster. Additionally we will install:
-
Velero (our Fork): https://github.com/konveyor/velero
-
Velero Plugins:
-
Restic (our Fork): https://github.com/konveyor/restic
-
Migration CRDs/Controllers: https://github.com/konveyor/mig-controller
-
Migration UI: https://github.com/konveyor/mig-ui
This repository is simply configuration files to drive https://github.com/redhat-cop/agnosticd, 'agnosticd' is a collection of Ansible configs/roles we are leveraging to deploy our OCP environments.
The installation of the Velero and Migration bits are handled via roles in agnosticd which are leveraging the below operators:
- https://github.com/konveyor/velero-operator
- https://github.com/konveyor/mig-operator
At this point in time, the operators are not integrated with OLM. The intent is that agnosticd is installing our operators via regular Deployments and then creating the needed CR's to instruct Operators to install their applications.
-
Follow the Software Requirements on workstation from agnosticd docs
-
AWS Access, you will need AWS access according to the needs of OCP 3.x and 4.x deployments.
- Admin Access is currently required for OCP 4.x
- Access to a HostedZone in AWS Route53 is required, meaning you need a domain name managed by Route53 which can serve as the subdomain for your clusters
-
Checkout of https://github.com/redhat-cop/agnosticd
-
Environment Variable set of 'AGNOSTICD_HOME' pointing to your agnosticd checkout
-
Creation of secret files in the base directory of this repo, see https://github.com/konveyor/mig-agnosticd/blob/master/secret.yml.sample
Intent is that you will do something like:
cp secret.yml.sample secret.yml
vim secret.yml
# and update the variables as comments instruct- Additionally, based on the environment (OCP4 or OCP3) you're provisioning, you will also need to configure an additional secret specific to the OCP version:
- For OCP 3, you will copy the
secret.ocp3.yml.sample
tosecret.ocp3.yml
and update the file - For OCP 4, you will copy the
secret.ocp4.yml.sample
tosecret.ocp4.yml
and update the file
- For OCP 3, you will copy the
# Clone 'agnosticd' repo, which 'mig-agnosticd' (this repo) will call into for provisioning
git clone https://github.com/redhat-cop/agnosticd.git
cd agnosticd
export AGNOSTICD_HOME=`pwd` # Consider exporting 'AGNOSTICD_HOME' in ~/.bashrc to the full repo path for future use.
cd ..
# Clone 'mig-agnosticd' repo (this repo)
git clone https://github.com/konveyor/mig-agnosticd.git
cd mig-agnosticd
cp secret.yml.sample secret.yml
vim secret.yml # Update based on comments in file
# Fill out required vars for provisioning OpenShift 3.x
cd 3.x
cp my_vars.yml.sample my_vars.yml
vim my_vars.yml # Update based on comments in file
cd ..
# Fill out required vars for provisioning OpenShift 4.x
cd 4.x
cp my_vars.yml.sample my_vars.yml
vim my_vars.yml # Update based on comments in file
cd ..
FIPS is disabled by default.
# ocp4_fips_enable: true
-
Installing Virtualenv
python3 -m venv env
-
Activate Virtualenv and install requirements
source env/bin/activate PIP_CONSTRAINT=constraints.txt pip3 install -r requirements.txt ansible-galaxy collection install amazon.aws:2.2.0 community.aws:2.1.0
- See PyYAML 5.4.1: AttributeError: cython_sources #207 for why the PIP_CONSTRAINT file is being used.
-
To update any requirements
pip3 freeze > requirements.txt
Before provisioning, ensure you have populated all necessary vars in:
./secret.yml
./3.x/my_vars.yml
./4.x/my_vars.yml
To provision an OpenShift Cluster with AgnosticD:
- 3.x cluster, see ./3.x/README.md.
- 4.x cluster, see ./4.x/README.md.