Share this
How to deploy a Cockroach DB Cluster in GCP? Part II
by Jorge Fernandez on Dec 9, 2022 12:00:00 AM
In the first part of the blog, we determined the different requirements our cluster needed, and we planned all the details of the cluster. Then we created the VPC structure and the CDB node template we will use to build all the nodes. To have an idea of the solution we want to implement, please take a look at this high-level diagram. After creating the remaining nodes, we will need to create an Instance Group for each of the nodes. Then we will add those IG to the backend of the Load Balancer. This way, we can load balance against the 9 nodes of the cluster.
Create Cluster
Let’s go ahead and create the nodes we need completed our 9 nodes cluster.
The following commands can be executed from the GCP Cloud Shell. It will use the Machine Image created in the first part of the blog and will create nodes in each of the subnets across the different regions. (Replace –metadata parameter)
gcloud beta compute instances create cdb-cluster-node2 --project=cdbblog --zone=us-central1-b --machine-type=n2d-standard-4 --network-interface=subnet=private-us-central1-b,no-address –metadata****** --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=458159664907-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --min-cpu-platform=Automatic --tags=cdb,private --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any --source-machine-image=cdb-cluster-node-image gcloud beta compute instances create cdb-cluster-node3 --project=cdbblog --zone=us-central1-c --machine-type=n2d-standard-4 --network-interface=subnet=private-us-central1-c,no-address –metadata****** --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=458159664907-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --min-cpu-platform=Automatic --tags=cdb,private --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any --source-machine-image=cdb-cluster-node-image gcloud beta compute instances create cdb-cluster-node4 --project=cdbblog --zone=europe-southwest1-a --machine-type=n2d-standard-4 --network-interface=subnet=private-europe-southwest1-a,no-address –metadata****** --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=458159664907-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --min-cpu-platform=Automatic --tags=cdb,private --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any --source-machine-image=cdb-cluster-node-image gcloud beta compute instances create cdb-cluster-node5 --project=cdbblog --zone=europe-southwest1-b --machine-type=n2d-standard-4 --network-interface=subnet=private-europe-southwest1-b,no-address –metadata****** --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=458159664907-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --min-cpu-platform=Automatic --tags=cdb,private --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any --source-machine-image=cdb-cluster-node-image gcloud beta compute instances create cdb-cluster-node6 --project=cdbblog --zone=europe-southwest1-c --machine-type=n2d-standard-4 --network-interface=subnet=private-europe-southwest1-c,no-address –metadata****** --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=458159664907-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --min-cpu-platform=Automatic --tags=cdb,private --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any --source-machine-image=cdb-cluster-node-image gcloud beta compute instances create cdb-cluster-node7 --project=cdbblog --zone=southamerica-east1-a --machine-type=n2d-standard-4 --network-interface=subnet= private-southamerica-east1-a,no-address –metadata****** --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=458159664907-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --min-cpu-platform=Automatic --tags=cdb,private --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any --source-machine-image=cdb-cluster-node-image gcloud beta compute instances create cdb-cluster-node8 --project=cdbblog --zone=southamerica-east1-b --machine-type=n2d-standard-4 --network-interface=subnet= private-southamerica-east1-b,no-address –metadata****** --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=458159664907-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --min-cpu-platform=Automatic --tags=cdb,private --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any --source-machine-image=cdb-cluster-node-image gcloud beta compute instances create cdb-cluster-node9 --project=cdbblog --zone=southamerica-east1-c --machine-type=n2d-standard-4 --network-interface=subnet= private-southamerica-east1-c,no-address –metadata****** --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=458159664907-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --min-cpu-platform=Automatic --tags=cdb,private --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any --source-machine-image=cdb-cluster-node-image
To effectively balance the load across the cluster, GCP offers a fully managed TCP Proxy Load Balancer. This service lets you use a single IP address for all users around the world, automatically routing traffic to the instances that are closest to the user. For each of the AZ running a node we would need to create a distinct instance group. Let’s go ahead and create all the instance groups. These would need to point to the 26257 port, the CDB default port.
gcloud compute instance-groups unmanaged create ig-cdb-cluster-us-central1-a --project=cdbblog --zone=us-central1-a gcloud compute instance-groups unmanaged set-named-ports ig-cdb-cluster-us-central1-a --project=cdbblog --zone=us-central1-a --named-ports=cdb-port:26257 gcloud compute instance-groups unmanaged add-instances ig-cdb-cluster-us-central1-a --project=cdbblog --zone=us-central1-a --instances=cdb-cluster-node1
gcloud compute instance-groups unmanaged create ig-cdb-cluster-us-central1-b --project=cdbblog --zone=us-central1-b gcloud compute instance-groups unmanaged set-named-ports ig-cdb-cluster-us-central1-b --project=cdbblog --zone=us-central1-b --named-ports=cdb-port:26257 gcloud compute instance-groups unmanaged add-instances ig-cdb-cluster-us-central1-b --project=cdbblog --zone=us-central1-b --instances=cdb-cluster-node2
gcloud compute instance-groups unmanaged create ig-cdb-cluster-us-central1-c --project=cdbblog --zone=us-central1-c gcloud compute instance-groups unmanaged set-named-ports ig-cdb-cluster-us-central1-c --project=cdbblog --zone=us-central1-c --named-ports=cdb-port:26257 gcloud compute instance-groups unmanaged add-instances ig-cdb-cluster-us-central1-c --project=cdbblog --zone=us-central1-c --instances=cdb-cluster-node3
gcloud compute instance-groups unmanaged create ig-cdb-cluster-europe-southwest1-a --project=cdbblog -–zone=europe-southwest1-a gcloud compute instance-groups unmanaged set-named-ports ig-cdb-cluster-europe-southwest1-a --project=cdbblog --zone=europe-southwest1-a --named-ports=cdb-port:26257 gcloud compute instance-groups unmanaged add-instances ig-cdb-cluster-europe-southwest1-a --project=cdbblog --zone=europe-southwest1-a --instances=cdb-cluster-node4
gcloud compute instance-groups unmanaged create ig-cdb-cluster-europe-southwest1-b --project=cdbblog --zone=europe-southwest1-b gcloud compute instance-groups unmanaged set-named-ports ig-cdb-cluster-europe-southwest1-b --project=cdbblog --zone=europe-southwest1-b --named-ports=cdb-port:26257 gcloud compute instance-groups unmanaged add-instances ig-cdb-cluster-europe-southwest1-b --project=cdbblog --zone=europe-southwest1-b --instances=cdb-cluster-node5
gcloud compute instance-groups unmanaged create ig-cdb-cluster-europe-southwest1-c --project=cdbblog --zone=europe-southwest1-c gcloud compute instance-groups unmanaged set-named-ports ig-cdb-cluster-europe-southwest1-c --project=cdbblog --zone=europe-southwest1-c --named-ports=cdb-port:26257 gcloud compute instance-groups unmanaged add-instances ig-cdb-cluster-europe-southwest1-c --project=cdbblog --zone=europe-southwest1-c --instances=cdb-cluster-node6
gcloud compute instance-groups unmanaged create ig-cdb-cluster-southamerica-east1-a --project=cdbblog --zone=southamerica-east1-a gcloud compute instance-groups unmanaged set-named-ports ig-cdb-cluster-southamerica-east1-a --project=cdbblog --zone=southamerica-east1-a --named-ports=cdb-port:26257 gcloud compute instance-groups unmanaged add-instances ig-cdb-cluster-southamerica-east1-a --project=cdbblog --zone=southamerica-east1-a --instances=cdb-cluster-node7
gcloud compute instance-groups unmanaged create ig-cdb-cluster-southamerica-east1-b --project=cdbblog --zone=southamerica-east1-b gcloud compute instance-groups unmanaged set-named-ports ig-cdb-cluster-southamerica-east1-b --project=cdbblog --zone=southamerica-east1-b --named-ports=cdb-port:26257 gcloud compute instance-groups unmanaged add-instances ig-cdb-cluster-southamerica-east1-b --project=cdbblog --zone=southamerica-east1-b --instances=cdb-cluster-node8
gcloud compute instance-groups unmanaged create ig-cdb-cluster-southamerica-east1-c --project=cdbblog --zone=southamerica-east1-c gcloud compute instance-groups unmanaged set-named-ports ig-cdb-cluster-southamerica-east1-c --project=cdbblog --zone=southamerica-east1-c --named-ports=cdb-port:26257 gcloud compute instance-groups unmanaged add-instances ig-cdb-cluster-southamerica-east1-c --project=cdbblog --zone=southamerica-east1-c --instances=cdb-cluster-node9
Create Load Balancer
With all the instance groups created, we can work on a couple of other requirements for the Load Balancer: a firewall rule and a health check.
To determine if any of the instance group nodes are available or not, we need to create a health check to verify the port 8080 of the nodes (The Cockroach console is running against the 8080 port.
gcloud compute health-checks create tcp cdb-cluster-hc --project=cdbblog --port 8080
And the firewall is to allow the Load Balancer to perform the health check on the cluster nodes:
gcloud compute --project=cdbblog firewall-rules create cdb-cluster-lb-ingress --direction=INGRESS --priority=1000 --network=private-cdb-cluster-prod --action=ALLOW --rules=tcp:26257,tcp:8080 --source-ranges=34.117.211.236,130.211.0.0/22,35.191.0.0/16
Lets create a backend for the LB:
gcloud compute backend-services create cdb-tcp-lb --project=cdbblog --global-health-checks --global --protocol TCP --health-checks cdb-cluster-hc --timeout 5m --port-name tcp26257
Add all the instance groups to the backend:
gcloud compute backend-services add-backend cdb-tcp-lb --project=cdbblog --global --instance-group ig-cdb-cluster-us-central1-a --instance-group-zone us-central1-a --balancing-mode UTILIZATION --max-utilization 0.8 gcloud compute backend-services add-backend cdb-tcp-lb --project=cdbblog --global --instance-group ig-cdb-cluster-us-central1-b --instance-group-zone us-central1-b --balancing-mode UTILIZATION --max-utilization 0.8 gcloud compute backend-services add-backend cdb-tcp-lb --project=cdbblog --global --instance-group ig-cdb-cluster-us-central1-c --instance-group-zone us-central1-c --balancing-mode UTILIZATION --max-utilization 0.8 gcloud compute backend-services add-backend cdb-tcp-lb --project=cdbblog --global --instance-group ig-cdb-cluster-europe-southwest1-a --instance-group-zone europe-southwest1-a --balancing-mode UTILIZATION --max-utilization 0.8 gcloud compute backend-services add-backend cdb-tcp-lb --project=cdbblog --global --instance-group ig-cdb-cluster-europe-southwest1-b --instance-group-zone europe-southwest1-b --balancing-mode UTILIZATION --max-utilization 0.8 gcloud compute backend-services add-backend cdb-tcp-lb --project=cdbblog --global --instance-group ig-cdb-cluster-europe-southwest1-c --instance-group-zone europe-southwest1-c --balancing-mode UTILIZATION --max-utilization 0.8 gcloud compute backend-services add-backend cdb-tcp-lb --project=cdbblog --global --instance-group ig-cdb-cluster-southamerica-east1-a --instance-group-zone southamerica-east1-a --balancing-mode UTILIZATION --max-utilization 0.8 gcloud compute backend-services add-backend cdb-tcp-lb --project=cdbblog --global --instance-group ig-cdb-cluster-southamerica-east1-b --instance-group-zone southamerica-east1-b --balancing-mode UTILIZATION --max-utilization 0.8 gcloud compute backend-services add-backend cdb-tcp-lb --project=cdbblog --global --instance-group ig-cdb-cluster-southamerica-east1-c --instance-group-zone southamerica-east1-c --balancing-mode UTILIZATION --max-utilization 0.8
Configure a target TCP proxy / Reserve a static IPv4 / Configure a global forwarding rule / Create route with the IP reserved for the LB:
Note: The last command is in beta, so it could not work in the future. Execute the step manually from the console if that is the case.
gcloud compute target-tcp-proxies create cdb-tcp-lb-target-proxy --project=cdbblog --backend-service cdb-tcp-lb --proxy-header NONE gcloud compute addresses create cdb-tcp-lb-static-ipv4 --project=cdbblog --ip-version=IPV4 --global gcloud compute forwarding-rules create cdb-tcp-lb-ipv4-forwarding-rule --project=cdbblog --global --target-tcp-proxy cdb-tcp-lb-target-proxy --address cdb-tcp-lb-static-ipv4 --ports 26257 gcloud beta compute routes create cdb-private-to-lb --project=cdbblog --network=private-cdb-cluster-prod --priority=1000 --destination-range=34.117.211.236 --next-hop-gateway=default-internet-gateway
The Load Balancer configuration is done. Proceed with the cluster creation.
First, create a certificate for each of the nodes specifying the private IP of the nodes and the IP for the LB. This is to secure the connection to the cluster. Use the bastion host to connect to each node and execute the following command. Please check your assigned IPs, they will not be the same as in the example:
root@cdb-cluster-node1:/cdb# cockroach cert create-node 10.14.1.4 cdb-cluster-node1 localhost 127.0.0.1 34.117.211.236 --certs-dir=certs --ca-key=my-safe-directory/ca.key root@cdb-cluster-node2:/cdb# cockroach cert create-node 10.14.2.4 cdb-cluster-node2 localhost 127.0.0.1 34.117.211.236 --certs-dir=certs --ca-key=my-safe-directory/ca.key root@cdb-cluster-node3:/cdb# cockroach cert create-node 10.14.3.3 cdb-cluster-node3 localhost 127.0.0.1 34.117.211.236 --certs-dir=certs --ca-key=my-safe-directory/ca.key root@cdb-cluster-node4:/cdb# cockroach cert create-node 10.20.1.3 cdb-cluster-node4 localhost 127.0.0.1 34.117.211.236 --certs-dir=certs --ca-key=my-safe-directory/ca.key root@cdb-cluster-node5:/cdb# cockroach cert create-node 10.20.2.3 cdb-cluster-node5 localhost 127.0.0.1 34.117.211.236 --certs-dir=certs --ca-key=my-safe-directory/ca.key root@cdb-cluster-node6:/cdb# cockroach cert create-node 10.20.3.3 cdb-cluster-node6 localhost 127.0.0.1 34.117.211.236 --certs-dir=certs --ca-key=my-safe-directory/ca.key root@cdb-cluster-node7:/cdb# cockroach cert create-node 10.50.1.3 cdb-cluster-node7 localhost 127.0.0.1 34.117.211.236 --certs-dir=certs --ca-key=my-safe-directory/ca.key root@cdb-cluster-node8:/cdb# cockroach cert create-node 10.50.2.3 cdb-cluster-node8 localhost 127.0.0.1 34.117.211.236 --certs-dir=certs --ca-key=my-safe-directory/ca.key root@cdb-cluster-node9:/cdb# cockroach cert create-node 10.50.3.3 cdb-cluster-node9 localhost 127.0.0.1 34.117.211.236 --certs-dir=certs --ca-key=my-safe-directory/ca.key
All the nodes are now secure. Let’s start the cluster. The command to start the cluster will include the cluster name, the IP of all the joining nodes, and the locality. It will also specify the location of the data and temporal files. Execute the command on each of the nodes from the mount point /cdb:
root@cdb-cluster-node1:/cdb# cockroach start --certs-dir=certs --advertise-addr=10.14.1.4 --cluster-name="CDBPYTHIAN" --join=10.14.1.4,10.14.2.4,10.14.3.3,10.20.1.3,10.20.2.3,10.20.3.3,10.50.1.3,10.50.2.3,10.50.3.3 --cache=.25 --max-sql-memory=.25 --background --locality=region=us-central1,zone=us-central1-a --store=/cdb_data --temp-dir=/cdb_logs root@cdb-cluster-node2:/cdb# cockroach start --certs-dir=certs --advertise-addr=10.14.2.4 --cluster-name="CDBPYTHIAN" --join=10.14.1.4,10.14.2.4,10.14.3.3,10.20.1.3,10.20.2.3,10.20.3.3,10.50.1.3,10.50.2.3,10.50.3.3 --cache=.25 --max-sql-memory=.25 --background --locality=region=us-central1,zone=us-central1-b --store=/cdb_data --temp-dir=/cdb_logs root@cdb-cluster-node3:/cdb# cockroach start --certs-dir=certs --advertise-addr=10.14.3.3 --cluster-name="CDBPYTHIAN" --join=10.14.1.4,10.14.2.4,10.14.3.3,10.20.1.3,10.20.2.3,10.20.3.3,10.50.1.3,10.50.2.3,10.50.3.3 --cache=.25 --max-sql-memory=.25 --background --locality=region=us-central1,zone=us-central1-c --store=/cdb_data --temp-dir=/cdb_logs root@cdb-cluster-node4:/cdb# cockroach start --certs-dir=certs --advertise-addr=10.20.1.3 --cluster-name="CDBPYTHIAN" --join=10.14.1.4,10.14.2.4,10.14.3.3,10.20.1.3,10.20.2.3,10.20.3.3,10.50.1.3,10.50.2.3,10.50.3.3 --cache=.25 --max-sql-memory=.25 --background --locality=region=europe-southwest1,zone=europe-southwest1-a --store=/cdb_data --temp-dir=/cdb_logs root@cdb-cluster-node5:/cdb# cockroach start --certs-dir=certs --advertise-addr=10.20.2.3 --cluster-name="CDBPYTHIAN" --join=10.14.1.4,10.14.2.4,10.14.3.3,10.20.1.3,10.20.2.3,10.20.3.3,10.50.1.3,10.50.2.3,10.50.3.3 --cache=.25 --max-sql-memory=.25 --background --locality=region=europe-southwest1,zone=europe-southwest1-b --store=/cdb_data --temp-dir=/cdb_logs root@cdb-cluster-node6:/cdb# cockroach start --certs-dir=certs --advertise-addr=10.20.3.3 --cluster-name="CDBPYTHIAN" --join=10.14.1.4,10.14.2.4,10.14.3.3,10.20.1.3,10.20.2.3,10.20.3.3,10.50.1.3,10.50.2.3,10.50.3.3 --cache=.25 --max-sql-memory=.25 --background --locality=region=europe-southwest1,zone=europe-southwest1-c --store=/cdb_data --temp-dir=/cdb_logs root@cdb-cluster-node7:/cdb# cockroach start --certs-dir=certs --advertise-addr=10.50.1.3 --cluster-name="CDBPYTHIAN" --join=10.14.1.4,10.14.2.4,10.14.3.3,10.20.1.3,10.20.2.3,10.20.3.3,10.50.1.3,10.50.2.3,10.50.3.3 --cache=.25 --max-sql-memory=.25 --background --locality=region=southamerica-east1,zone=southamerica-east1-a --store=/cdb_data --temp-dir=/cdb_logs root@cdb-cluster-node8:/cdb# cockroach start --certs-dir=certs --advertise-addr=10.50.2.3 --cluster-name="CDBPYTHIAN" --join=10.14.1.4,10.14.2.4,10.14.3.3,10.20.1.3,10.20.2.3,10.20.3.3,10.50.1.3,10.50.2.3,10.50.3.3 --cache=.25 --max-sql-memory=.25 --background --locality=region=southamerica-east1,zone=southamerica-east1-b --store=/cdb_data --temp-dir=/cdb_logs root@cdb-cluster-node9:/cdb# cockroach start --certs-dir=certs --advertise-addr=10.50.3.3 --cluster-name="CDBPYTHIAN" --join=10.14.1.4,10.14.2.4,10.14.3.3,10.20.1.3,10.20.2.3,10.20.3.3,10.50.1.3,10.50.2.3,10.50.3.3 --cache=.25 --max-sql-memory=.25 --background --locality=region=southamerica-east1,zone=southamerica-east1-c --store=/cdb_data --temp-dir=/cdb_logs
Configure CDB Cluster
Connect to Node 1 to create root certificate:
root@cdb-cluster-node1:/cdb# cockroach cert create-client root --certs-dir=certs --ca-key=my-safe-directory/ca.key
From Node 1 where root certificate is located:
root@cdb-cluster-node1:/cdb# cockroach init --certs-dir=certs --host=10.14.1.4 --cluster-name="CDBPYTHIAN" Cluster successfully initialized
Test the connection to the cluster using the LB IP:
root@cdb-cluster-node1:/cdb# cockroach sql --certs-dir=certs --host=34.117.211.236 # # Welcome to the CockroachDB SQL shell. # All statements must be terminated by a semicolon. # To exit, type: \q. # # Server version: CockroachDB CCL v22.1.8 (x86_64-pc-linux-gnu, built 2022/09/29 14:21:51, go1.17.11) (same version as client) # Cluster ID: 9c34c89a-5e8c-4cc0-9a4e-9dffb72f5350 # # Enter \? for a brief introduction. # root@34.117.211.236:26257/defaultdb> show database; database ------------- defaultdb (1 row) Time: 4ms total (execution 1ms / network 3ms)
Check the Cluster Nodes:
root@cdb-cluster-node1:/cdb# cockroach node status --host=10.14.1.4 --certs-dir=certs id | address | sql_address | build | started_at | updated_at | locality | is_available | is_live -----+-----------------+-----------------+---------+----------------------------+----------------------------+-----------------------------------------------------+--------------+---------- 1 | 10.14.1.4:26257 | 10.14.1.4:26257 | v22.1.8 | 2022-10-28 02:37:15.882796 | 2022-10-28 02:37:51.907174 | region=us-central1,zone=us-central1-a | true | true 2 | 10.20.1.3:26257 | 10.20.1.3:26257 | v22.1.8 | 2022-10-28 02:37:16.327332 | 2022-10-28 02:37:52.399986 | region=europe-southwest1,zone=europe-southwest1-a | true | true 3 | 10.14.3.3:26257 | 10.14.3.3:26257 | v22.1.8 | 2022-10-28 02:37:16.425969 | 2022-10-28 02:37:52.449046 | region=us-central1,zone=us-central1-c | true | true 4 | 10.50.2.3:26257 | 10.50.2.3:26257 | v22.1.8 | 2022-10-28 02:37:16.608995 | 2022-10-28 02:37:52.698948 | region=southamerica-east1,zone=southamerica-east1-b | true | true 5 | 10.20.3.3:26257 | 10.20.3.3:26257 | v22.1.8 | 2022-10-28 02:37:17.276413 | 2022-10-28 02:37:53.347691 | region=europe-southwest1,zone=europe-southwest1-c | true | true 6 | 10.20.2.3:26257 | 10.20.2.3:26257 | v22.1.8 | 2022-10-28 02:37:17.901019 | 2022-10-28 02:37:49.471961 | region=europe-southwest1,zone=europe-southwest1-b | true | true 7 | 10.50.3.3:26257 | 10.50.3.3:26257 | v22.1.8 | 2022-10-28 02:37:19.393231 | 2022-10-28 02:37:50.98388 | region=southamerica-east1,zone=southamerica-east1-c | true | true 8 | 10.14.2.4:26257 | 10.14.2.4:26257 | v22.1.8 | 2022-10-28 02:37:19.472042 | 2022-10-28 02:37:50.990753 | region=us-central1,zone=us-central1-b | true | true 9 | 10.50.1.3:26257 | 10.50.1.3:26257 | v22.1.8 | 2022-10-28 02:37:19.636315 | 2022-10-28 02:37:51.225812 | region=southamerica-east1,zone=southamerica-east1-a | true | true (9 rows)
To access the web console, set up a VNC session to the bastion host and connect to any of the nodes on port 8080.
Before you will need to create a console user from the DB side and grant the “ADMIN” role:
root@10.14.1.4:26257/defaultdb> create user dba with password 'admin'; CREATE ROLE Time: 1.947s total (execution 1.947s / network 0.000s) root@10.14.1.4:26257/defaultdb> grant admin to dba; GRANT
On the console front page, we can see the Node status, replications status, and the capacity usage of the cluster and nodes:

The Cluster is up and running with all the nodes. We can now start playing around with it.
In the next chapter of the blog, we will change the replication and test how it behaves when losing nodes. We will also test transactions and how the load is balanced across the nodes.
Stay tuned.
Share this
- Technical Track (816)
- Oracle (488)
- Database (229)
- MySQL (144)
- Cloud (133)
- Microsoft SQL Server (124)
- Open Source (84)
- Google Cloud (82)
- Microsoft Azure (67)
- Amazon Web Services (AWS) (63)
- Big Data (50)
- Cassandra (44)
- Google Cloud Platform (44)
- DevOps (38)
- Linux (28)
- Pythian (27)
- PostgreSQL (26)
- Podcasts (25)
- Site Reliability Engineering (23)
- Performance (22)
- Docker (21)
- Oracle E-Business Suite (21)
- DBA (18)
- Oracle Cloud Infrastructure (OCI) (18)
- MongoDB (17)
- Security (17)
- Hadoop (16)
- BigQuery (15)
- Amazon RDS (14)
- Automation (14)
- Exadata (14)
- Oracleebs (14)
- Snowflake (14)
- Ansible (13)
- Oracle Database (13)
- Oracle Exadata (13)
- ASM (12)
- Data (12)
- LLM (12)
- Artificial Intelligence (AI) (11)
- GenAI (11)
- Kubernetes (11)
- Machine Learning (11)
- Advanced Analytics (10)
- Datascape Podcast (10)
- Oracle Applications (10)
- Replication (10)
- Authentication, SSO and MFA (8)
- ChatGPT (8)
- Cloud Migration (8)
- Infrastructure (8)
- Monitoring (8)
- Percona (8)
- Analytics (7)
- Apache (7)
- Apache Cassandra (7)
- Data Governance (7)
- High Availability (7)
- Mariadb (7)
- Microsoft Azure SQL Database (7)
- Myrocks (7)
- Oracle EBS (7)
- Python (7)
- Rman (7)
- SAP (7)
- Series (7)
- AWR (6)
- Airflow (6)
- Apache Beam (6)
- Data Guard (6)
- Innodb (6)
- Migration (6)
- Oracle Enterprise Manager (OEM) (6)
- Orchestrator (6)
- RocksDB (6)
- Azure Synapse Analytics (5)
- Covid-19 (5)
- Data Enablement (5)
- Disaster Recovery (5)
- Microsoft (5)
- Performance Tuning (5)
- Scala (5)
- Serverless (5)
- Cloud Security (4)
- Cloud Spanner (4)
- CockroachDB (4)
- Data Management (4)
- Data Pipeline (4)
- Data Security (4)
- Data Strategy (4)
- Data Visualization (4)
- Databases (4)
- Dataflow (4)
- Generative AI (4)
- Google (4)
- Google BigQuery (4)
- Oracle Autonomous Database (Adb) (4)
- Oracle Cloud (4)
- Oracle Enterprise Manager (4)
- Redhat (4)
- Ssl (4)
- Windows (4)
- Xtrabackup (4)
- Amazon Relational Database Service (Rds) (3)
- Apex (3)
- Cloud Database (3)
- Cloud FinOps (3)
- Data Analytics (3)
- Data Migrations (3)
- Database Migration (3)
- Digital Transformation (3)
- ERP (3)
- Google Chrome (3)
- Google Cloud Sql (3)
- Google Workspace (3)
- Heterogeneous Database Migration (3)
- Oracle Live Sql (3)
- Oracle Rac (3)
- Perl (3)
- Power Bi (3)
- Prometheus (3)
- Remote Teams (3)
- Slob (3)
- Tensorflow (3)
- Terraform (3)
- Amazon Data Migration Service (2)
- Amazon Ec2 (2)
- Anisble (2)
- Apache Flink (2)
- Apache Kafka (2)
- Apexexport (2)
- Ashdump (2)
- Aurora (2)
- Azure Data Factory (2)
- Cloud Armor (2)
- Cloud Data Fusion (2)
- Cloud Hosting (2)
- Cloud Infrastructure (2)
- Cloud Shell (2)
- Cloud Sql (2)
- Conferences (2)
- Cosmos Db (2)
- Cosmosdb (2)
- Cost Management (2)
- Data Discovery (2)
- Data Integration (2)
- Data Quality (2)
- Data Streaming (2)
- Database Administrator (2)
- Database Consulting (2)
- Database Monitoring (2)
- Database Performance (2)
- Database Troubleshooting (2)
- Dataguard (2)
- Dataops (2)
- Enterprise Data Platform (EDP) (2)
- Events (2)
- Fusion Middleware (2)
- Gemini (2)
- Graphite (2)
- Infrastructure As Code (2)
- Innodb Cluster (2)
- Innodb File Structure (2)
- Innodb Group Replication (2)
- Liquibase (2)
- NLP (2)
- Nosql (2)
- Oracle Data Guard (2)
- Oracle Datase (2)
- Oracle Flashback (2)
- Oracle Forms (2)
- Oracle Installation (2)
- Oracle Io Testing (2)
- Podcast (2)
- Rdbms (2)
- Redshift (2)
- Remote DBA (2)
- Remote Sre (2)
- S3 (2)
- Single Sign-On (2)
- Webinars (2)
- X5 (2)
- AI (1)
- Actifio (1)
- Adop (1)
- Advanced Data Services (1)
- Afd (1)
- Alloydb (1)
- Amazon (1)
- Amazon Aurora Backtrack (1)
- Amazon Efs (1)
- Amazon Redshift (1)
- Amazon S3 (1)
- Amazon Sagemaker (1)
- Amazon Vpc Flow Logs (1)
- Analysis (1)
- Analytical Models (1)
- Anthos (1)
- Application Migration (1)
- Ash (1)
- Asmlib (1)
- Atp (1)
- Autonomous (1)
- Awr Data Mining (1)
- Awr Mining (1)
- Azure Data Lake (1)
- Azure Data Lake Analytics (1)
- Azure Data Lake Store (1)
- Azure Data Migration Service (1)
- Azure OpenAI (1)
- Azure Sql Data Warehouse (1)
- Batches In Cassandra (1)
- Business Insights (1)
- Business Intelligence (1)
- Chown (1)
- Chrome Security (1)
- Cloud Browser (1)
- Cloud Build (1)
- Cloud Consulting (1)
- Cloud Cost Optimization (1)
- Cloud Data Warehouse (1)
- Cloud Database Management (1)
- Cloud Dataproc (1)
- Cloud Foundry (1)
- Cloud Networking (1)
- Cloud SQL Replica (1)
- Cloud Scheduler (1)
- Cloud Services (1)
- Cloud Strategies (1)
- Compliance (1)
- Conversational AI (1)
- Cyber Security (1)
- Data Analysis (1)
- Data Analytics Platform (1)
- Data Box (1)
- Data Classification (1)
- Data Cleansing (1)
- Data Encryption (1)
- Data Engineering (1)
- Data Estate (1)
- Data Insights (1)
- Data Integrity (1)
- Data Leader (1)
- Data Lifecycle Management (1)
- Data Lineage (1)
- Data Masking (1)
- Data Mesh (1)
- Data Migration (1)
- Data Migration Assistant (1)
- Data Migration Service (1)
- Data Mining (1)
- Data Monetization (1)
- Data Policy (1)
- Data Profiling (1)
- Data Protection (1)
- Data Retention (1)
- Data Safe (1)
- Data Sheets (1)
- Data Summit (1)
- Data Vault (1)
- Data Warehouse (1)
- Database Consultant (1)
- Database Link (1)
- Database Management (1)
- Database Migrations (1)
- Database Modernization (1)
- Database Provisioning (1)
- Database Provisioning Failed (1)
- Database Replication (1)
- Database Schemas (1)
- Database Upgrade (1)
- Databricks (1)
- Datascape 59 (1)
- DeepSeek (1)
- Docker-Composer (1)
- Duet AI (1)
- Edp (1)
- Etl (1)
- Gcp Compute (1)
- Gcp-Spanner (1)
- Global Analytics (1)
- Google Analytics (1)
- Google Cloud Architecture Framework (1)
- Google Cloud Data Services (1)
- Google Cloud Partner (1)
- Google Cloud Spanner (1)
- Google Cloud VMware Engine (1)
- Google Compute Engine (1)
- Google Dataflow (1)
- Google Datalab (1)
- Google Grab And Go (1)
- Graph Algorithms (1)
- Graph Inferences (1)
- Graph Theory (1)
- GraphQL (1)
- Health Check (1)
- Healthcheck (1)
- Information (1)
- Infrastructure As A Code (1)
- Innobackupex (1)
- Innodb Concurrency (1)
- Innodb Flush Method (1)
- It Industry (1)
- Kubeflow (1)
- LMSYS Chatbot Arena (1)
- Linux Host Monitoring (1)
- Linux Storage Appliance (1)
- Looker (1)
- MMLU (1)
- Managed Services (1)
- Migrate (1)
- Neo4J (1)
- Newsroom (1)
- Nifi (1)
- OPEX (1)
- Odbcs (1)
- Odbs (1)
- On-Premises (1)
- Open Source Database (1)
- Ora-01852 (1)
- Ora-7445 (1)
- Oracle Cursor (1)
- Oracle Database@Google Cloud (1)
- Oracle Exadata Smart Scan (1)
- Oracle Licensing (1)
- Oracle Linux Virtualization Manager (1)
- Oracle Oda (1)
- Oracle Openworld (1)
- Oracle Parallelism (1)
- Oracle RMAN (1)
- Oracle Rdbms (1)
- Oracle Real Application Clusters (1)
- Oracle Reports (1)
- Oracle Security (1)
- Perfomrance (1)
- Performance Schema (1)
- Policy (1)
- Prompt Engineering (1)
- Public Cloud (1)
- Pythian News (1)
- Rdb (1)
- Replication Error (1)
- Retail (1)
- SAP HANA Cloud (1)
- Securing Sql Server (1)
- Serverless Computing (1)
- Sso (1)
- Tenserflow (1)
- Teradata (1)
- Vertex AI (1)
- Videos (1)
- Workspace Security (1)
- Xbstream (1)
- August 2025 (1)
- July 2025 (3)
- June 2025 (1)
- May 2025 (3)
- March 2025 (2)
- February 2025 (1)
- January 2025 (2)
- December 2024 (1)
- October 2024 (2)
- September 2024 (7)
- August 2024 (4)
- July 2024 (2)
- June 2024 (6)
- May 2024 (3)
- April 2024 (2)
- February 2024 (1)
- January 2024 (11)
- December 2023 (10)
- November 2023 (9)
- October 2023 (11)
- September 2023 (9)
- August 2023 (6)
- July 2023 (2)
- June 2023 (13)
- May 2023 (4)
- April 2023 (6)
- March 2023 (10)
- February 2023 (6)
- January 2023 (5)
- December 2022 (10)
- November 2022 (10)
- October 2022 (10)
- September 2022 (13)
- August 2022 (16)
- July 2022 (12)
- June 2022 (13)
- May 2022 (11)
- April 2022 (4)
- March 2022 (5)
- February 2022 (4)
- January 2022 (14)
- December 2021 (16)
- November 2021 (11)
- October 2021 (6)
- September 2021 (11)
- August 2021 (6)
- July 2021 (9)
- June 2021 (4)
- May 2021 (8)
- April 2021 (16)
- March 2021 (16)
- February 2021 (6)
- January 2021 (12)
- December 2020 (12)
- November 2020 (17)
- October 2020 (11)
- September 2020 (10)
- August 2020 (11)
- July 2020 (13)
- June 2020 (6)
- May 2020 (9)
- April 2020 (18)
- March 2020 (21)
- February 2020 (13)
- January 2020 (15)
- December 2019 (10)
- November 2019 (11)
- October 2019 (12)
- September 2019 (16)
- August 2019 (15)
- July 2019 (10)
- June 2019 (16)
- May 2019 (20)
- April 2019 (21)
- March 2019 (14)
- February 2019 (18)
- January 2019 (18)
- December 2018 (5)
- November 2018 (16)
- October 2018 (12)
- September 2018 (20)
- August 2018 (27)
- July 2018 (31)
- June 2018 (34)
- May 2018 (28)
- April 2018 (27)
- March 2018 (17)
- February 2018 (8)
- January 2018 (20)
- December 2017 (14)
- November 2017 (4)
- October 2017 (1)
- September 2017 (3)
- August 2017 (5)
- July 2017 (4)
- June 2017 (2)
- May 2017 (7)
- April 2017 (7)
- March 2017 (8)
- February 2017 (8)
- January 2017 (5)
- December 2016 (3)
- November 2016 (4)
- October 2016 (8)
- September 2016 (9)
- August 2016 (10)
- July 2016 (9)
- June 2016 (8)
- May 2016 (13)
- April 2016 (16)
- March 2016 (13)
- February 2016 (11)
- January 2016 (6)
- December 2015 (11)
- November 2015 (11)
- October 2015 (5)
- September 2015 (16)
- August 2015 (4)
- July 2015 (1)
- June 2015 (3)
- May 2015 (6)
- April 2015 (5)
- March 2015 (5)
- February 2015 (4)
- January 2015 (3)
- December 2014 (7)
- October 2014 (4)
- September 2014 (6)
- August 2014 (6)
- July 2014 (16)
- June 2014 (7)
- May 2014 (6)
- April 2014 (5)
- March 2014 (4)
- February 2014 (10)
- January 2014 (6)
- December 2013 (8)
- November 2013 (12)
- October 2013 (9)
- September 2013 (6)
- August 2013 (7)
- July 2013 (9)
- June 2013 (7)
- May 2013 (7)
- April 2013 (4)
- March 2013 (7)
- February 2013 (4)
- January 2013 (4)
- December 2012 (6)
- November 2012 (8)
- October 2012 (9)
- September 2012 (3)
- August 2012 (5)
- July 2012 (5)
- June 2012 (7)
- May 2012 (11)
- April 2012 (1)
- March 2012 (8)
- February 2012 (1)
- January 2012 (6)
- December 2011 (8)
- November 2011 (5)
- October 2011 (9)
- September 2011 (6)
- August 2011 (4)
- July 2011 (1)
- June 2011 (1)
- May 2011 (5)
- April 2011 (2)
- February 2011 (2)
- January 2011 (2)
- December 2010 (1)
- November 2010 (7)
- October 2010 (3)
- September 2010 (8)
- August 2010 (2)
- July 2010 (4)
- June 2010 (7)
- May 2010 (2)
- April 2010 (1)
- March 2010 (3)
- February 2010 (3)
- January 2010 (2)
- November 2009 (6)
- October 2009 (6)
- August 2009 (3)
- July 2009 (3)
- June 2009 (3)
- May 2009 (2)
- April 2009 (8)
- March 2009 (6)
- February 2009 (4)
- January 2009 (3)
- November 2008 (3)
- October 2008 (7)
- September 2008 (6)
- August 2008 (9)
- July 2008 (9)
- June 2008 (9)
- May 2008 (9)
- April 2008 (8)
- March 2008 (4)
- February 2008 (3)
- January 2008 (3)
- December 2007 (2)
- November 2007 (7)
- October 2007 (1)
- August 2007 (4)
- July 2007 (3)
- June 2007 (8)
- May 2007 (4)
- April 2007 (2)
- March 2007 (2)
- February 2007 (5)
- January 2007 (8)
- December 2006 (1)
- November 2006 (3)
- October 2006 (4)
- September 2006 (3)
- July 2006 (1)
- May 2006 (2)
- April 2006 (1)
- July 2005 (1)
No Comments Yet
Let us know what you think