diff --git a/_topic_maps/_topic_map.yml b/_topic_maps/_topic_map.yml index beccd6e770..c1dce710c9 100644 --- a/_topic_maps/_topic_map.yml +++ b/_topic_maps/_topic_map.yml @@ -1625,6 +1625,8 @@ Topics: File: installing-openshift-gitops - Name: Uninstalling OpenShift GitOps File: uninstalling-openshift-gitops + - Name: Setting up a new Argo CD instance + File: setting-up-argocd-instance - Name: Configuring an OpenShift cluster by deploying an application with cluster configurations File: configuring-an-openshift-cluster-by-deploying-an-application-with-cluster-configurations - Name: Deploying a Spring Boot application with Argo CD diff --git a/cicd/gitops/setting-up-argocd-instance.adoc b/cicd/gitops/setting-up-argocd-instance.adoc new file mode 100644 index 0000000000..f4ececbf1e --- /dev/null +++ b/cicd/gitops/setting-up-argocd-instance.adoc @@ -0,0 +1,15 @@ +:_content-type: ASSEMBLY +[id="setting-up-argocd-instance"] += Setting up a new Argo CD instance +include::_attributes/common-attributes.adoc[] +:context: setting-up-argocd-instance + +toc::[] + +By default, the {gitops-title} installs an instance of Argo CD in the `openshift-gitops` namespace with additional permissions for managing certain cluster-scoped resources. To manage cluster configurations or deploy applications, you can install and deploy a new Argo CD instance. By default, any new instance has permissions to manage resources only in the namespace where it is deployed. + +include::modules/gitops-argo-cd-installation.adoc[leveloffset=+1] + +include::modules/gitops-enable-replicas-for-argo-cd-server.adoc[leveloffset=+1] + +include::modules/gitops-deploy-resources-different-namespaces.adoc[leveloffset=+1] diff --git a/modules/gitops-argo-cd-installation.adoc b/modules/gitops-argo-cd-installation.adoc new file mode 100644 index 0000000000..acfa2ffe63 --- /dev/null +++ b/modules/gitops-argo-cd-installation.adoc @@ -0,0 +1,26 @@ +// Module included in the following assemblies: +// +// * gitops-argo-cd-installation.adoc + +:_content-type: PROCEDURE +[id="gitops-argo-cd-installation_{context}"] += Installing Argo CD + +To manage cluster configurations or deploy applications, you can install and deploy a new Argo CD instance. + +.Procedure +. Log in to the {product-title} web console. + +. Click *Operators* -> *Installed Operators*. + +. Create or select the project where you want to install the Argo CD instance from the *Project* drop-down menu. + +. Select *Openshift GitOps Operator* from the installed operators and select the *Argo CD* tab. + +. Click *Create* to configure the following parameters: + +.. For *Name*, enter `/`. + +.. Create an external OS Route to access Argo CD server. Click *Server* -> *Route* and, for *Enable Route*, select *true*. + +. To open the Argo CD web UI, click the route that is created in the project where the Argo CD instance is installed. \ No newline at end of file diff --git a/modules/gitops-deploy-resources-different-namespaces.adoc b/modules/gitops-deploy-resources-different-namespaces.adoc new file mode 100644 index 0000000000..f9d020fe76 --- /dev/null +++ b/modules/gitops-deploy-resources-different-namespaces.adoc @@ -0,0 +1,21 @@ +// Module included in the following assemblies: +// +// * gitops-argo-cd-installation.adoc + +:_content-type: PROCEDURE +[id="gitops-deploy-resources-different-namespaces_{context}"] += Deploying resources to a different namespace + +To allow Argo CD to manage resources in other namespaces apart from where it is installed, configure the target namespace with a `argocd.argoproj.io/managed-by` label. + +.Procedure + +* Configure the namespace: ++ +[source,terminal] +---- +$ oc label namespace && \ +argocd.argoproj.io/managed-by= <1> +---- +<1> The namespace where Argo CD is installed. + diff --git a/modules/gitops-enable-replicas-for-argo-cd-server.adoc b/modules/gitops-enable-replicas-for-argo-cd-server.adoc new file mode 100644 index 0000000000..c254a79cc6 --- /dev/null +++ b/modules/gitops-enable-replicas-for-argo-cd-server.adoc @@ -0,0 +1,37 @@ +// Module included in the following assemblies: +// +// * gitops-argo-cd-installation.adoc + +:_content-type: PROCEDURE +[id="gitops-enable-replicas-for-argo-cd-server_{context}"] += Enabling replicas for Argo CD server and repo server + +Argo CD-server and Argo CD-repo-server workloads are stateless. To better distribute your workloads among pods, you can increase the number of Argo CD-server and Argo CD-repo-server replicas. However, if a horizontal autoscaler is enabled on the Argo CD-server, it overrides the number of replicas you set. + +.Procedure + +* Set the `replicas` parameters for the `repo` and `server` spec to the number of replicas you want to run: ++ +.Example Argo CD custom resource + +[source,yaml] +---- +apiVersion: argoproj.io/v1alpha1 +kind: ArgoCD +metadata: + name: example-argocd + labels: + example: repo +spec: + repo: + replicas: + server: + replicas: + route: + enabled: true + path: / + tls: + insecureEdgeTerminationPolicy: Redirect + termination: passthrough + wildcardPolicy: None +---- \ No newline at end of file