---
title: Add A Remote Cluster
slug: add-a-remote-cluster
docTags: 
createdAt: 2024-02-06T20:05:01.962Z
---

## Bootstrap the remote cluster

OpsVerse supports deployments to remote clusters hosted and managed by the customer (*also referred to as "Private SaaS" or "Remote"*). This section has the steps to bootstrap a new remote cluster.

Once a remote cluster is bootstrapped, it can be used to deploy any of the OpsVerse apps.

## Prerequisites

- Check the context / kubeconfig and make sure that it is pointing to the right cluster.
- Ensure that the `kubectl` and `helm` binaries are installed.
- **(AWS Only)** Check that the private subnets associated with this EKS cluster have the tag `kubernetes.io/role/internal-elb` set to `1`
- (**AWS Only)** SSL Cert: If the load balancer cert is being maintained in AWS ACM, send the associated ARN to the OpsVerse POC.

:::hint{type="info"}
Please note that this needs supervision from the OpsVerse team and is a collaborative step. Please coordinate with the OpsVerse team before proceeding further.
:::

## Install the bootstrap components

`Argo CD` is used as the remote agent to manage the cluster. Along with it, `Bitnami Sealed Secrets` is used to securely transfer secrets to the cluster. Run the following script to install these two components.

```curl
curl -s https://raw.githubusercontent.com/devopsnow-deployments/tools/main/scripts/remote-cluster-bootstrap.sh | \
     bash -s \
      cluster_name=<cluster_name> \
      cluster_type=remote \
      cluster_provider=<cloud_provider> \
      cluster_region=<cluster_region> \
      namespace=devopsnow \
      opsverse_repo_username=<repo_username> \
      opsverse_repo_password=<repo_password> \
      opsverse_registry_username=<registry_username> \
      opsverse_registry_password=<registry_password> \
      opsverse_application_sourceRepoURL=https://github.com/devopsnow-deployments/<customer_name>.git
```

:::hint{type="info"}
Values for keys `opsverse_repo_username`, `opsverse_repo_password`, `opsverse_registry_username`, and `opsverse_registry_password` are custom values for each customer. Credentials have a short-lived TTL (*Generally 7 days*). Please reach out to OpsVerse POC to get these values.

Substitute the placeholders (*Mentioned as \<>*) with the actual values.

The [script](https://raw.githubusercontent.com/devopsnow-deployments/tools/main/scripts/remote-cluster-bootstrap.sh) is publically accessible for review
:::

For instance, following is the command if the cluster name is `opsverse-eks-cluster`, cluster\_provider is `aws`, cluster\_region is `us-west-2`, opsverse\_repo\_username is `opsverse-user`, opsverse\_repo\_password is `!DontRememberPassword`, opsverse\_registry\_username is `opsverse-user` , `opsverse_registry_password` is `!DontRememberPassword` and customer name is `opsdemo`

```shell
curl -s https://raw.githubusercontent.com/devopsnow-deployments/tools/main/scripts/remote-cluster-bootstrap.sh | \
     bash -s \
      cluster_name=opsverse-eks-cluster \
      cluster_type=remote \
      cluster_provider=aws \
      cluster_region=us-wast-2 \
      namespace=devopsnow \
      opsverse_repo_username="opsverse-user" \
      opsverse_repo_password="!DontRememberPasswor" \
      opsverse_repo_username="robot\$corcentric-bootstrap" \
      opsverse_registry_username="opsverse-user" \
      opsverse_registry_password="!DontRememberPasswor" \
      opsverse_application_sourceRepoURL=https://github.com/devopsnow-deployments/opsdemo.git
```

The output is expected to be something like this:

```shell
Validating input arguments ...
All required arguments are present. Continuing ...

Installing ArgoCD CRD
customresourcedefinition.apiextensions.k8s.io/applications.argoproj.io configured
Installing the bootstrap components to the namespace devopsnow ...
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: <redacted>
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: <redacted>
Release "remote-bootstrap-now" does not exist. Installing it now.
NAME: remote-bootstrap-now
LAST DEPLOYED: Tue Apr 23 19:56:18 2024
NAMESPACE: devopsnow
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
--------------------------
OpsVerse Remote Bootstrap
--------------------------
Cluster boostrap has been completed successfully.

You can now register this cluster as a deployment target for OpsVerse

---- Some Important Links ---

Admin Console: <redacted>
Docs: https://docs.opsverse.io
Website: https://opsverse.io

Waiting for sealed-secrets component to create the key pair ...
Please send the following public key (base64 encoded) back to OpsVerse...

LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUV6VENDQXJXZ0F3SUJBZ0lSQU1LdDVQdiszczZob1paVjl2UXRyUVF3RFFZSktvWklodmNOQVFFTEJRQXcKQURBZUZ3MHlOREEwTWpNeE5ESTNORFZhRncwek5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UZJQ0FURS0tLS0tCg==
```

The above command generates a key pair in the remote cluster. Send the public key back to the OpsVerse POC.

Also, when `ArgoCD` is fully up, it will automatically pull the following additional components and deploy:

- `nginx-ingress` controller
- Jaeger, Prometheus and Victoria Metrics operators
- OpsVerse agent

## Check the status

The status of the bootstrap components can be checked with the following commands:

```text
kubectl get pods -n devopsnow
```

```shell
$ kubectl get pods -n opsverse
NAME                                                              READY   STATUS    RESTARTS   AGE
devopsnow-agent-agent-ct2zf                                       1/1     Running   0          136m
devopsnow-agent-agent-dmlq4                                       1/1     Running   0          136m
devopsnow-agent-agent-swq2s                                       1/1     Running   0          136m
devopsnow-agent-kubestatemetrics-5c9df46dcc-9jls4                 1/1     Running   0          10h
operators-now-jaeger-operator-869c5b7c6b-wwqnz                    1/1     Running   0          10h
operators-now-prometheus-o-operator-65bc895dbb-8bhbm              1/1     Running   0          10h
operators-now-vmop-d99957474-cd7kp                                1/1     Running   0          10h
remote-bootstrap-now-argocd-application-controller-b47b5c7qvjcv   1/1     Running   0          10h
remote-bootstrap-now-argocd-redis-576c9468d7-62qzf                1/1     Running   0          10h
remote-bootstrap-now-argocd-repo-server-86f6b58cc4-rn6rt          1/1     Running   0          10h
remote-bootstrap-now-argocd-server-7cfdbb6569-7x9qm               1/1     Running   0          10h
remote-bootstrap-now-sealedsecrets-787cfb47dc-6zxpm               1/1     Running   0          10h
```

### Enable the Argo CD UI and check the apps

Running the following command will make the Argo CD UI accessible on [https://localhost:8001](https://localhost:8001)

```shell
kubectl port-forward -n opsverse svc/remote-bootstrap-now-argocd-server 8001:80
```

Use `admin` as the username and please reach out to OpsVerse POC for the default password.

## Deploy the observability stack

:::hint{type="info"}
The deployment will happen by an OpsVerse admin through the below inputs by the customer
:::

### Input

The following details are required for deploying the observability stack:

- DNS Names
- Name of the object storage bucket to be used for log storage (e.g., S3 bucket, GCS bucket, or Azure storage container)
- ARN of the role with access to this S3 bucket (or GCP IAM Service Account or Azure storage account key)

### Deployment

This is done by the `OpsVerse admin` remotely by pushing the deployment configs to the GitHub repo polled by the `Argo CD` agent.

### DNS entries

Find out the host name of the `nginx-ingress` `LoadBalancer` using the following command:

```shell
echo `kubectl get svc -n nginx-ingress nginx-ingress-now-ingress-nginx-controller -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'`
```

Set the above host name as a CNAME record for all the DNS entries identified in the previous step.

### Access Grafana

Access the grafana URL in a browser. SSO can be used to login to Grafana. By default, SSO based users are granted `Viewer` permission in Grafana. This permission can be changed by logging in as the `admin` user. To find out the `admin` users password, run the following command:

```shell
echo `kubectl get secret -n <orgName>-<instanceName>-observe grafana-secret -o jsonpath='{.data.admin-password}' | base64 -D`
```

## Collect telemetry and start observing

At this point, your observability backend is fully ready to receive telemetry data. Follow the steps under the [collection](https://docs.opsverse.io/ALha-overview) section to collect telemetry from your infrastructure.
