An implementation of Red Hat GitOps (GitOps, ArgoCD) for managing the deployment of Red Hat OpenStack Services on OpenShift (RHOSO).
WARNING: Contents of this repository are a work in progress and not yet ready for usage in a production environment. The organization or contents of this repository may change drastically at any time.
applications/
base/
orchestration/
(deprecated)
Manifests are managed with kustomize (https://kustomize.io/) and can be
applied directly with oc apply -k <directory>
.
Expected order of operations is:
base/gitops/
directory to deploy Red Hat GitOps and the initial ArgoCD deployment.applications/
to the hub or unmanaged cluster.environments/
.You must first install Red Hat GitOps (GitOps) to provide the automation system for deploying RHOSO. Installation of GitOps can be done on a hub cluster or an unmanaged cluster. If installed on the hub cluster, you can use a GitOps Application to deploy GitOps on the managed cluster. If you are not using a hub cluster, then installation of GitOps on the unmanaged cluster must done first.
Prerequisites
kubernetes.core.k8s
.Procedure
Use the deployment.playbook
script to automate the installation of Red Hat GitOps with Ansible and Kustomize.
Login to the OpenShift cluster as the kubeadmin user from the workstation.
Install the Red Hat GitOps Operator and deploy an ArgoCD instance with the deployment.playbook
script:
$ ./base/gitops/deployment.playbook
Alternatively, deploy Red Hat GitOps and ArgoCD with Kustomize directly in stages.
Login to the OpenShift cluster as the kubeadmin user from the workstation.
Install the Red Hat GitOps Operator:
$ oc create --save-config -k base/gitops/subscribe
Validate the Subscription has been completed. The subscription status should return:
$ oc get subscription.operators.coreos.com/openshift-gitops-operator \
--namespace openshift-gitops-operator -ojsonpath='{.status.state}'
When the value returned is AtLastKnown
, then continue by deploying and ArgoCD instance.
Create the ArgoCD instance:
$ oc create --save-config -k base/gitops/enable
When using Red Hat Advanced Cluster Management (RHACM) to support GitOps Applications for managed clusters, we will configure the hub cluster in preparation for using GitOps to support managed cluster configuration.
If you are using GitOps on an unmanaged cluster without RHACM, then this will be unnecessary.
Prerequisites
Procedure
oc apply -k base/advanced-cluster-managment/
rhoso
ClusterSetYou can view progress and management of the Applications by looking up the host
address with oc
.
Procedure
$ oc get route/openshift-gitops-server -nopenshift-gitops -ojsonpath='{.spec.host}'
Deploy the prerequisites for deployment of a RHOSO environment by creating the
openstack-prerequisites
GitOps Application.
Procedure
openstack-prerequisites
GitOps Application:
$ oc create --save-config -k applications/base/prerequisites