From 9e29717e47babe0dce123e81ec52af478859e6fe Mon Sep 17 00:00:00 2001 From: Nadine Spies <17709352+Nadine2016@users.noreply.github.com> Date: Fri, 4 Oct 2024 15:50:57 -0400 Subject: [PATCH 1/3] Adding Argo CD guides (#10173) Co-authored-by: Nadine Spies Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> --- changelog/v1.18.0-beta25/doc-argocd.yaml | 5 + .../content/installation/enterprise/_index.md | 167 +++++++++++++++++ docs/content/installation/gateway/argo.md | 171 ++++++++++++++++++ 3 files changed, 343 insertions(+) create mode 100644 changelog/v1.18.0-beta25/doc-argocd.yaml create mode 100644 docs/content/installation/gateway/argo.md diff --git a/changelog/v1.18.0-beta25/doc-argocd.yaml b/changelog/v1.18.0-beta25/doc-argocd.yaml new file mode 100644 index 00000000000..d8db609f46b --- /dev/null +++ b/changelog/v1.18.0-beta25/doc-argocd.yaml @@ -0,0 +1,5 @@ +changelog: + - type: NON_USER_FACING + description: >- + Add docs for Argo CD. + skipCI-kube-tests:true diff --git a/docs/content/installation/enterprise/_index.md b/docs/content/installation/enterprise/_index.md index 09cde4fa830..a40bcf55d45 100644 --- a/docs/content/installation/enterprise/_index.md +++ b/docs/content/installation/enterprise/_index.md @@ -116,6 +116,173 @@ Using Helm 2 is not supported in Gloo Gateway. Once you've installed Gloo Gateway, please be sure [to verify your installation](#verify-your-installation). +### Argo CD installation + +[Argo Continuous Delivery (Argo CD)](https://argo-cd.readthedocs.io/en/stable/) is a declarative, Kubernetes-native continuous deployment tool that can read and pull code from Git repositories and deploy it to your cluster. Because of that, you can integrate Argo CD into your GitOps pipeline to automate the deployment and synchronization of your apps. + +**Set up Argo CD** + +1. Install Argo CD in your cluster. + ```sh + kubectl create namespace argocd + until kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.12.3/manifests/install.yaml > /dev/null 2>&1; do sleep 2; done + # wait for deployment to complete + kubectl -n argocd rollout status deploy/argocd-applicationset-controller + kubectl -n argocd rollout status deploy/argocd-dex-server + kubectl -n argocd rollout status deploy/argocd-notifications-controller + kubectl -n argocd rollout status deploy/argocd-redis + kubectl -n argocd rollout status deploy/argocd-repo-server + kubectl -n argocd rollout status deploy/argocd-server + ``` + +2. Update the default Argo CD password for the admin user to solo.io. + ```sh + # bcrypt(password)=$2a$10$79yaoOg9dL5MO8pn8hGqtO4xQDejSEVNWAGQR268JHLdrCw6UCYmy + # password: solo.io + kubectl -n argocd patch secret argocd-secret \ + -p '{"stringData": { + "admin.password": "$2a$10$79yaoOg9dL5MO8pn8hGqtO4xQDejSEVNWAGQR268JHLdrCw6UCYmy", + "admin.passwordMtime": "'$(date +%FT%T%Z)'" + }}' + ``` + +3. Port-forward the Argo CD server on port 9999. + ```sh + kubectl port-forward svc/argocd-server -n argocd 9999:443 + ``` + +4. Open the [Argo CD UI](https://localhost:9999/). + +5. Log in with the `admin` username and `solo.io` password. + +**Install Gloo Gateway** + +1. Use the following YAML file to create an Argo CD application and deploy the Gloo Gateway Enterprise Helm chart. Make sure to enter your license key in the `license_key` field. You can add custom settings to the `spec.source.helm.values` section. + + {{% notice note %}} + Argo CD does not have a concept of installs or upgrades. All updates are executed by using syncs. Because of that, the value of `gateway.certGenJob.runOnUpdate` (if set) is ignored. Instead, the job runs on every sync. + {{% /notice %}} + + ```yaml + kubectl apply -f- < + repoURL: https://storage.googleapis.com/gloo-ee-helm + targetRevision: {{< readfile file="static/content/version_gee_latest.md" markdown="true">}} + syncPolicy: + automated: + # Prune resources during auto-syncing (default is false) + prune: true + # Sync the app in part when resources are changed only in the target Kubernetes cluster + # but not in the git source (default is false). + selfHeal: true + syncOptions: + - CreateNamespace=true + EOF + ``` + +2. Verify that the `gloo` control plane components are up and running. + ```sh + kubectl get pods -n gloo-system + ``` + + Example output: + ``` + NAME READY STATUS RESTARTS AGE + extauth-7449fc4b67-wcgn5 1/1 Running 0 3m6s + gloo-b9ff69d5d-c85wx 1/1 Running 0 3m6s + gloo-resource-migration-c86hp 0/1 Completed 0 3m33s + gloo-resource-rollout-9vnjj 0/1 Completed 0 3m6s + gloo-resource-rollout-check-m8rhk 0/1 Completed 0 2m50s + gloo-resource-rollout-cleanup-z6ktl 0/1 Completed 0 3m22s + rate-limit-84656bddb7-dpmql 1/1 Running 0 3m6s + redis-54757c7964-dnh67 1/1 Running 0 3m6s + ``` + +3. Open the Argo CD UI and verify that you see the Argo CD application with a `Healthy` and `Synced` status. + +**Optional: Cleanup**
+ +If you no longer need this quick-start Gloo Gateway environment, you can uninstall your setup by following these steps: + +{{< tabs >}} +{{% tab name="Argo CD UI" %}} +1. Port-forward the Argo CD server on port 9999. + ```sh + kubectl port-forward svc/argocd-server -n argocd 9999:443 + ``` + +2. Open the [Argo CD UI](https://localhost:9999/applications). + +3. Log in with the `admin` username and `solo.io` password. +4. Find the application that you want to delete and click **x**. +5. Select **Foreground** and click **Ok**. +6. Verify that the pods were removed from the `gloo-system` namespace. + ```sh + kubectl get pods -n gloo-system + ``` + + Example output: + ``` + No resources found in gloo-system namespace. + ``` + +{{% /tab %}} +{{% tab name="Argo CD CLI" %}} +1. Port-forward the Argo CD server on port 9999. + ```sh + kubectl port-forward svc/argocd-server -n argocd 9999:443 + ``` + +2. Log in to the Argo CD UI. + ```sh + argocd login localhost:9999 --username admin --password solo.io --insecure + ``` + +3. Delete the application. + ```sh + argocd app delete gloo-gateway-ee-helm --cascade --server localhost:9999 --insecure + ``` + + Example output: + ``` + Are you sure you want to delete 'gloo-gateway-ee-helm' and all its resources? [y/n] y + application 'gloo-gateway-ee-helm' deleted + ``` + +4. Verify that the pods were removed from the `gloo-system` namespace. + ```sh + kubectl get pods -n gloo-system + ``` + + Example output: + ``` + No resources found in gloo-system namespace. + ``` +{{% /tab %}} +{{< /tabs >}} + ### Airgap installation You can install Gloo Gateway Enterprise in an air-gapped environment, such as an on-premises datacenter, clusters that run on an intranet or private network only, or other disconnected environments. diff --git a/docs/content/installation/gateway/argo.md b/docs/content/installation/gateway/argo.md new file mode 100644 index 00000000000..7f8c8197cfa --- /dev/null +++ b/docs/content/installation/gateway/argo.md @@ -0,0 +1,171 @@ +--- +title: Argo CD +weight: 30 +description: Use Argo CD to automate the deployment and management of Gloo Gateway. +--- + +[Argo Continuous Delivery (Argo CD)](https://argo-cd.readthedocs.io/en/stable/) is a declarative, Kubernetes-native continuous deployment tool that can read and pull code from Git repositories and deploy it to your cluster. Because of that, you can integrate Argo CD into your GitOps pipeline to automate the deployment and synchronization of your apps. + +## Before you begin + +1. Install the following command line tools: + * [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl), the Kubernetes command line tool. Download the `kubectl` version that is within one minor version of the Kubernetes clusters you plan to use. + * [argocd](https://argo-cd.readthedocs.io/en/stable/cli_installation/), the Argo CD command line tool. + +2. Create or use an existing Kubernetes cluster. + +## Set up Argo CD + +1. Install Argo CD in your cluster. + ```sh + kubectl create namespace argocd + until kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.12.3/manifests/install.yaml > /dev/null 2>&1; do sleep 2; done + # wait for deployment to complete + kubectl -n argocd rollout status deploy/argocd-applicationset-controller + kubectl -n argocd rollout status deploy/argocd-dex-server + kubectl -n argocd rollout status deploy/argocd-notifications-controller + kubectl -n argocd rollout status deploy/argocd-redis + kubectl -n argocd rollout status deploy/argocd-repo-server + kubectl -n argocd rollout status deploy/argocd-server + ``` + +2. Update the default Argo CD password for the admin user to solo.io. + ```sh + # bcrypt(password)=$2a$10$79yaoOg9dL5MO8pn8hGqtO4xQDejSEVNWAGQR268JHLdrCw6UCYmy + # password: solo.io + kubectl -n argocd patch secret argocd-secret \ + -p '{"stringData": { + "admin.password": "$2a$10$79yaoOg9dL5MO8pn8hGqtO4xQDejSEVNWAGQR268JHLdrCw6UCYmy", + "admin.passwordMtime": "'$(date +%FT%T%Z)'" + }}' + ``` + +3. Port-forward the Argo CD server on port 9999. + ```sh + kubectl port-forward svc/argocd-server -n argocd 9999:443 + ``` + +4. Open the [Argo CD UI](https://localhost:9999/). + +5. Log in with the `admin` username and `solo.io` password. + +## Install Gloo Gateway + +1. Create an Argo CD application to install the Gloo Gateway open source Helm chart. + ```yaml + kubectl apply -f- <}} + syncPolicy: + automated: + # Prune resources during auto-syncing (default is false) + prune: true + # Sync the app in part when resources are changed only in the target Kubernetes cluster + # but not in the git source (default is false). + selfHeal: true + syncOptions: + - CreateNamespace=true + EOF + ``` + +2. Verify that the `gloo` control plane is up and running. + ```sh + kubectl get pods -n gloo-system + ``` + + Example output: + ``` + NAME READY STATUS RESTARTS AGE + discovery-76768ff46-db4cb 1/1 Running 0 76s + gateway-proxy-7d6b9db55b-6flwm 1/1 Running 0 76s + gloo-7b5c894cd7-lp7rr 1/1 Running 0 76s + gloo-resource-migration-xxqph 0/1 Completed 0 103s + gloo-resource-rollout-check-bj9ft 0/1 Completed 0 62s + gloo-resource-rollout-cleanup-j6575 0/1 Completed 0 93s + gloo-resource-rollout-vzt7s 0/1 Completed 0 76s + ``` + +3. Verify that the `gloo-gateway` GatewayClass is created. You can optionally take a look at how the gateway class is configured by adding the `-o yaml` option to your command. + ```sh + kubectl get gatewayclass gloo-gateway + ``` + +4. Open the Argo CD UI and verify that you see the Argo CD application with a `Healthy` and `Synced` status. + +## Optional: Cleanup + +If you no longer need this quick-start Gloo Gateway environment, you can uninstall your setup by following these steps: + +{{< tabs >}} +{{% tab name="Argo CD UI" %}} +1. Port-forward the Argo CD server on port 9999. + ```sh + kubectl port-forward svc/argocd-server -n argocd 9999:443 + ``` + +2. Open the [Argo CD UI](https://localhost:9999/applications). + +3. Log in with the `admin` username and `solo.io` password. +4. Find the application that you want to delete and click **x**. +5. Select **Foreground** and click **Ok**. +6. Verify that the pods were removed from the `gloo-system` namespace. + ```sh + kubectl get pods -n gloo-system + ``` + + Example output: + ``` + No resources found in gloo-system namespace. + ``` + +{{% /tab %}} +{{% tab name="Argo CD CLI" %}} +1. Port-forward the Argo CD server on port 9999. + ```sh + kubectl port-forward svc/argocd-server -n argocd 9999:443 + ``` + +2. Log in to the Argo CD UI. + ```sh + argocd login localhost:9999 --username admin --password solo.io --insecure + ``` + +3. Delete the application. + ```sh + argocd app delete gloo-gateway-oss-helm --cascade --server localhost:9999 --insecure + ``` + + Example output: + ``` + Are you sure you want to delete 'gloo-gateway-oss-helm' and all its resources? [y/n] y + application 'gloo-gateway-oss-helm' deleted + ``` + +4. Verify that the pods were removed from the `gloo-system` namespace. + ```sh + kubectl get pods -n gloo-system + ``` + + Example output: + ``` + No resources found in gloo-system namespace. + ``` +{{% /tab %}} +{{< /tabs >}} \ No newline at end of file From 1fc72dfc14e842590e635ed303a528de0796ab04 Mon Sep 17 00:00:00 2001 From: Nadine Spies Date: Fri, 4 Oct 2024 16:28:28 -0400 Subject: [PATCH 2/3] version bumps --- docs/content/static/content/version_gee_latest.md | 2 +- docs/content/static/content/version_gee_n-1.md | 2 +- docs/content/static/content/version_gee_n-1_oldpatch.md | 2 +- docs/content/static/content/version_geoss_latest.md | 2 +- docs/content/static/content/version_geoss_n+1.md | 2 +- docs/content/static/content/version_geoss_n-1.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/content/static/content/version_gee_latest.md b/docs/content/static/content/version_gee_latest.md index 0e1f39b86c5..250f3597453 100644 --- a/docs/content/static/content/version_gee_latest.md +++ b/docs/content/static/content/version_gee_latest.md @@ -1 +1 @@ -1.17.2 \ No newline at end of file +1.17.4 \ No newline at end of file diff --git a/docs/content/static/content/version_gee_n-1.md b/docs/content/static/content/version_gee_n-1.md index 3b29464e91c..44edc68c8e7 100644 --- a/docs/content/static/content/version_gee_n-1.md +++ b/docs/content/static/content/version_gee_n-1.md @@ -1 +1 @@ -1.16.14 \ No newline at end of file +1.16.15 \ No newline at end of file diff --git a/docs/content/static/content/version_gee_n-1_oldpatch.md b/docs/content/static/content/version_gee_n-1_oldpatch.md index be8bdd470c9..3b29464e91c 100644 --- a/docs/content/static/content/version_gee_n-1_oldpatch.md +++ b/docs/content/static/content/version_gee_n-1_oldpatch.md @@ -1 +1 @@ -1.16.13 \ No newline at end of file +1.16.14 \ No newline at end of file diff --git a/docs/content/static/content/version_geoss_latest.md b/docs/content/static/content/version_geoss_latest.md index 0a627272e97..9d21fd5ca4d 100644 --- a/docs/content/static/content/version_geoss_latest.md +++ b/docs/content/static/content/version_geoss_latest.md @@ -1 +1 @@ -1.17.10 \ No newline at end of file +1.17.14 \ No newline at end of file diff --git a/docs/content/static/content/version_geoss_n+1.md b/docs/content/static/content/version_geoss_n+1.md index 14a6014bffd..4865174136a 100644 --- a/docs/content/static/content/version_geoss_n+1.md +++ b/docs/content/static/content/version_geoss_n+1.md @@ -1 +1 @@ -1.18.0-beta23 +1.18.0-beta24 diff --git a/docs/content/static/content/version_geoss_n-1.md b/docs/content/static/content/version_geoss_n-1.md index 5d788f82ad8..a515392c46f 100644 --- a/docs/content/static/content/version_geoss_n-1.md +++ b/docs/content/static/content/version_geoss_n-1.md @@ -1 +1 @@ -1.16.20 \ No newline at end of file +1.16.22 \ No newline at end of file From 73bf231b35dd641921b73f9c21cd95f2b060a049 Mon Sep 17 00:00:00 2001 From: Nadine Spies Date: Fri, 4 Oct 2024 16:29:22 -0400 Subject: [PATCH 3/3] changelog --- .../{v1.18.0-beta25/doc-argocd.yaml => v1.17.15/doc-fixes.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename changelog/{v1.18.0-beta25/doc-argocd.yaml => v1.17.15/doc-fixes.yaml} (74%) diff --git a/changelog/v1.18.0-beta25/doc-argocd.yaml b/changelog/v1.17.15/doc-fixes.yaml similarity index 74% rename from changelog/v1.18.0-beta25/doc-argocd.yaml rename to changelog/v1.17.15/doc-fixes.yaml index d8db609f46b..9a05b388d57 100644 --- a/changelog/v1.18.0-beta25/doc-argocd.yaml +++ b/changelog/v1.17.15/doc-fixes.yaml @@ -1,5 +1,5 @@ changelog: - type: NON_USER_FACING description: >- - Add docs for Argo CD. + Backports of doc fixes. skipCI-kube-tests:true