| clusters | ||
| components | ||
| groups | ||
| LICENSE | ||
| readme.md | ||
Environment as a Service
Important
If you came to this article from the Environment as a service articles (one of the first 4) and are lookingfor the setup described i those article please swicth to the
eaas-articlestag.
This repo contains a set of gitops configuration to setup a developer platform based on OpenShift.
This repo mainly focuses on the Environment as a Service use case.
This repo tries to showcase a realistic scenario featuring:
- a multi cluster setup: we have three cluster at play, hub, non-prod prod. Other clusters can be easily added.
- a multi tenant setup: we have two teams configured: team-a, team-b. More teams can be easily added.
- a multi environment setup: each application can have multiple environments. In this example we have: dev, qa (running in the non-prod cluster) and prod (running in the prod cluster)
This is a gitops repo build from the red hat CoP starter template and populated ion large part with elements from the red hat CoP gitops catalog
This example was built starting from the AWS Blank Open Environment Red Hat demo catalog item, you might have to adjust pieces of the configuration if you start from a different place. Adjustments should be minimal.
To get started run the following:
export gitops_repo=https://github.com/environment-aas/platform-iac.git #<your newly created repo>
export cluster_name=hub #<your hub cluster name, typically "hub">
export cluster_base_domain=$(oc get ingress.config.openshift.io cluster --template={{.spec.domain}} | sed -e "s/^apps.//")
export platform_base_domain=${cluster_base_domain#*.}
oc apply -f .bootstrap/subscription.yaml
sleep 60
oc apply -f .bootstrap/cluster-rolebinding.yaml
envsubst < .bootstrap/argocd.yaml | oc apply -f -
sleep 30
envsubst < .bootstrap/root-application.yaml | oc apply -f -
To get the prod and non-prod cluster created you'll have to prepare a secret in the way ACM expects it, then run:
oc new-project open-cluster-management
oc delete secret aws-credentials -n open-cluster-management
oc apply -f ./.rosa/aws-secret.yaml
If you are using RHDP, after a restart run this to deal with the annoying race condition affecting ArgoCD
oc rollout restart deployment/openshift-gitops-operator-controller-manager -n openshift-operators
oc delete pods --all -n openshift-gitops