You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggest adding a disclaimer due to the age of this pattern.
Also copied the README from the pattern repo to add some content.
Please review and accept or deny. I've copied Jonny on a comment to see if this would be acceptable.
Copy file name to clipboardExpand all lines: content/patterns/cockroachdb/_index.md
+196Lines changed: 196 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,203 @@ links:
14
14
---
15
15
16
16
# Cockroach
17
+
## About Multi-Region CockroachDB Gitops
18
+
19
+
**Disclaimer: This pattern was last reviewed in 2022. Your experience may vary. If you successfully deploy this pattern, please consider contributing an update.**
20
+
17
21
18
22
A multicloud pattern using cockroachdb and submariner, deployed via RHACM.
The pattern deploys CockroachDB across multi OpenShift clusters that are spread across different geographic regions and hosted on clouds like [Azure](https://portal.azure.com/), [AWS](https://aws.amazon.com/) or [GKE](https://cloud.google.com/kubernetes-engine). It deploys a CockroachDB [StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/)
29
+
into each separate cluster, and links them by deploying [Submariner add-on](https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.5/html/add-ons/add-ons-overview#submariner) on the hub cluster.
30
+
31
+
If you've followed a link to this repository, but are not really sure what it contains
32
+
or how to use it, head over to [Multicloud GitOps](http://validatedpatterns.io/multicloud-gitops/)
33
+
for additional context and installation instructions.
34
+
35
+
## Prerequisites
36
+
37
+
1. An OpenShift cluster (Go to [the OpenShift console](https://console.redhat.com/openshift/create)). See also [sizing your cluster](../cluster-sizing).
38
+
1. A GitHub account (and, optionally, a token for it with repositories permissions, to read from and write to your forks)
39
+
1. The helm binary, see [here](https://helm.sh/docs/intro/install/)
40
+
1. Atleast two OpenShift clusters deployed in different regions or across different clouds. Clusters should be deployed with different IP CIDR ranges.
41
+
42
+
| Cluster | Pod CIDR | Service CIDR |
43
+
|---|---|---|
44
+
| cluster1 | 10.128.0.0/14 | 172.30.0.0/16 |
45
+
| cluster2 | 10.132.0.0/14 | 172.31.0.0/16 |
46
+
| cluster3 | 10.140.0.0/14 | 172.32.0.0/16 |
47
+
48
+
ACM does not support configuring Submariner add-on for OpenShift clusters deployed in Azure cloud. Additonal steps are required to configure Submariner on Azure cluster. Before deploying cockroachdb-pattern ensure the following steps have been completed for Azure clusters.
49
+
50
+
### Prepare Azure Clusters for Submariner
51
+
52
+
Submariner Gateway nodes need to be able to accept traffic over UDP ports (4500 and 4490 by default). Submariner also uses UDP port 4800 to encapsulate traffic from the worker and master nodes to the Gateway nodes, and TCP port 8080 to retrieve metrics from the Gateway nodes. Additionally, the default OpenShift deployment does not allow assigning an elastic public IP to existing worker nodes, which may be necessary on one end of the tunnel connection.
53
+
54
+
subctl cloud prepare is a command designed to update your OpenShift installer provisioned infrastructure for Submariner deployments, handling the requirements specified above.
For more information on how to prepare Azure OpenShift cluster for Submariner deployment, refer to the [submariner](https://submariner.io/getting-started/quickstart/openshift/azure/#prepare-azure-clusters-for-submariner) documentation.
65
+
66
+
If you do not have a running Red Hat OpenShift cluster, you can start one on a
1. Fork the [cockroachdb-pattern](https://github.com/validatedpatterns/cockroachdb-pattern) repository on GitHub. It is necessary to fork because your fork will be updated as part of the GitOps and DevOps processes.
1. You can deploy the pattern using the [validated pattern operator](/infrastructure/using-validated-pattern-operator/). If you do use the operator then skip to Validating the Environment below.
102
+
103
+
1. Preview the changes
104
+
105
+
```sh
106
+
make show
107
+
```
108
+
109
+
1. Login to your hub cluster using oc login or exporting the KUBECONFIG
110
+
111
+
```sh
112
+
oc login
113
+
```
114
+
115
+
or set KUBECONFIG to the path to your `kubeconfig` file. For example:
116
+
117
+
```sh
118
+
export KUBECONFIG=~/my-ocp-env/hub/auth/kubconfig
119
+
```
120
+
121
+
1. Apply the changes to your cluster
122
+
123
+
```sh
124
+
make install
125
+
```
126
+
127
+
1. Check the operators have been installed
128
+
129
+
```text
130
+
OpenShift Console Web UI -> Installed Operators
131
+
```
132
+
133
+
1. Check all applications are synchronised
134
+
Under the project `cockroachdb-pattern-hub` click on the URL for the `hub`gitops`server`. The Vault application is not synched.
135
+
136
+
1. Check all the managed clusters have been imported.
137
+
Go to the routes and search for`multi` within `All Projects`. Click the link to launch ACM console. Under the clusters verify if all the managed clusters have been imported. Click on Cluster add-ons and verify if the Submariner add-on has been installed.
138
+
139
+
1. Login to your managed cluster `cluster1` using oc login or exporting the KUBECONFIG as described in step 1.
140
+
141
+
1. Select the project cockroachdb
142
+
143
+
```sh
144
+
oc project cockroachdb
145
+
```
146
+
147
+
1. Check the pods are running and the crete-certs and init-cockroachdb-xxxxx have completed.
148
+
149
+
```sh
150
+
NAME READY STATUS RESTARTS AGE
151
+
cockroachdb-0 1/1 Running 0 77s
152
+
cockroachdb-1 1/1 Running 0 77s
153
+
cockroachdb-2 1/1 Running 0 77s
154
+
cockroachdb-client-secure 1/1 Running 0 77s
155
+
create-certs 0/1 Completed 0 77s
156
+
init-cockroachdb-jhnns 0/1 Completed 0 77s
157
+
```
158
+
159
+
1. Verify if the cockroach db is replicated across clusters.
0 commit comments