{"id":18291213,"url":"https://github.com/rhecosystemappeng/ansible-multicluster-cockroachdb","last_synced_at":"2026-03-19T03:44:12.068Z","repository":{"id":44143753,"uuid":"419865506","full_name":"RHEcosystemAppEng/ansible-multicluster-cockroachdb","owner":"RHEcosystemAppEng","description":"Automated cockroachdb multi cluster deployment","archived":false,"fork":false,"pushed_at":"2022-09-19T15:39:01.000Z","size":313,"stargazers_count":0,"open_issues_count":2,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-09T07:49:39.096Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RHEcosystemAppEng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-21T20:19:37.000Z","updated_at":"2022-08-31T17:44:26.000Z","dependencies_parsed_at":"2023-01-18T14:30:44.088Z","dependency_job_id":null,"html_url":"https://github.com/RHEcosystemAppEng/ansible-multicluster-cockroachdb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RHEcosystemAppEng/ansible-multicluster-cockroachdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Fansible-multicluster-cockroachdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Fansible-multicluster-cockroachdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Fansible-multicluster-cockroachdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Fansible-multicluster-cockroachdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RHEcosystemAppEng","download_url":"https://codeload.github.com/RHEcosystemAppEng/ansible-multicluster-cockroachdb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Fansible-multicluster-cockroachdb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28667881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T17:07:18.858Z","status":"ssl_error","status_checked_at":"2026-01-22T17:05:02.040Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T14:13:31.816Z","updated_at":"2026-01-22T18:05:25.200Z","avatar_url":"https://github.com/RHEcosystemAppEng.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automated cockroachdb multicluster deployment\n**Currently under construction**\n\n## Synopsis\nThis provides an easy automated way to deploy the CockroachDB multicluster setup on Red Hat Advanced Cluster Management utilizing the Submariner Add-on.\n\nThe automation will do the following:\n- Install Advanced cluster management (ACM)\n- Import multiple openshift clusters into an ACM multi cluster Hub\n- Create the `ClusterSet` on the ACM HUB cluster\n- Create the Submariner Add-on for the clusterSet\n- Deploy the CockroachDB multicluster setup\n\n## Prerequistes\n- A minimum of 3 kubernetes clusters are recommended but not enforced.\n  - 1 cluster as the dedicated ACM Hub which meets [requirements](https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.4/html/install/installing#sizing-your-cluster \"ACM install\")\n    - Tested on OpenShift 4.9.9\n    - Tested on OpenShift 4.10\n  - 2 or more clusters will be imported as `ManagedClusters` and connected via the submariner-addon\n  - Managed Clusters **must** have non-overlapping Pod and Service CIDR ranges\n  - Your kubeconfig contexts must have the necessary permissions sets to create the kubernetes objects needed for the automation. We recommend a cluster-admin role assigned to your user.\n  - Your cloud credentials (AWS, GCP, Azure) must have necessary permissions to create networking configuraion for the Submariner addon. _We recommend admin permissions for handling such tasks._\n\n## Automation Requirements\n\n[Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html \"Ansible installation requirements\") \u003e= 2.11 - This includes all requirements needed for ansible and modules\n\n-  Modules\n   - [k8s](https://docs.ansible.com/ansible/latest/collections/kubernetes/core/k8s_module.html#ansible-collections-kubernetes-core-k8s-module \"k8s module\") - To install it, use: `ansible-galaxy collection install kubernetes.core`\n   - [k8_info](https://docs.ansible.com/ansible/latest/collections/kubernetes/core/k8s_info_module.html#ansible-collections-kubernetes-core-k8s-info-module \"k8_info module\") - comes with the install of kubernetes.core\n   - Other dependent modules:\n      - ```bash\n         pip3 install openshift pyyaml kubernetes jmespath --user\n        ```\n\n[kubectl](https://kubernetes.io/docs/tasks/tools/ \"kubectl install\") - The Kubernetes command-line tool\n\n[cockroach cli](https://www.cockroachlabs.com/docs/stable/install-cockroachdb-mac.html \"cockroachdb cli install\") - The cockroachdb command line tool\n\n[kubeconfig context configured](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/ \"Configure Access to Multiple Clusters\") - Your kubeconfig must be configured properly with the context of each of your clusters\n  - The context name is vitally import as it is used as the **[clusterid](https://submariner.io/operations/deployment/subctl/#join)** for submariner and must be named in compliance with this\n  - You should of a context setup for all the clusters that you want to use for the automation hub, and managed clusters\n  - https://github.com/cmwylie19/kubeconfig-builder can build your master kubeconfig by combining KubeConfig's into one \n\nAccess to push and clone from the remote repository\n\n## Setup\nAdd environment variables:\n\n| Environment variable | Description |\n| --- | --- |\n| AWS_ACCESS_KEY | The AWS access key id for the AWS clusters you are importing\n| AWS_SECRET_KEY | The AWS secret key for the AWS clusters you are importing\n| GIT_SSH_COMMAND | Git push will use this command instead of ssh when connecting to a remote system\n| OCP_SERVICE_ACCOUNT | [GCP Service Account](https://cloud.google.com/iam/docs/service-accounts)\n| IR_PASSWORD | image registry password\n\nFor Azure managed clusters:\n- must have an `~/.azure/osServicePrincipal.json` with with admin permissions for the automation to configure the network\n\nModify variables in **group_vars/all.yml**:\n\n| Variable | Description\n| --- | --- |\n| clusters | A list that includes: name of the cluster you want, and the name of the context associated with the cluster in your kubeconfig, and the cloud that the cluster is running in\n| hub_context | The context name for your hub cluster\n| ocp_pull_secret_path | The path to your OpenShift container platform [pull secret](cloud.redhat.com/openshift/install/pull-secret)\n| clusterset_name | Default cockroackdb-clusterset the name of the clusterset you want\n| kubectl | The path to your kubectl \n| az | The path to your ([Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)) \n| cockroach | The path to your [cockroachdb CLI](https://www.cockroachlabs.com/docs/releases/index.html#production-releases)\n| git_url | Your repo location in ssh format\n| git_branch | Must always be main. You cannot change this at this time.\n| git_msg | Defaults to \"update files with ansible\" is the message sent when automation pushes \n| git_remove_local | Defaults to false\n| git_username | Defaults to ansible_git your username for github\n| git_email | Defaults to ansible_git@ansible.com the email associated with your github account\n| Resources | Resources for the `pod.spec.containers.resources` and `volumeClaimTemplate.spec.resources.requests.storage`\n\n## Usage\n| Description | Command |\n| ----------- | ------- |\nInstall | `ansible-playbook install-all.yml`   \nDelete | `ansible-playbook delete-all.yml`  \n\nor command can be run one by one for more control:\n- `ansible-playbook -i localhost install-acm.yml`\n- `ansible-playbook -i localhost import-clusters`\n- `ansible-playbook -i localhost create-clusterset`\n- `ansible-playbook -i localhost install-submar-addon.yml`\n- `ansible-playbook -i localhost install-multi-cockroachdb.yml`\n\n**Please note:** Due to the nature of ACM, this is a very slow process. I recommend running the plays one by one, letting them  finish individually for best results. It can take 15-20 for a single play to finish depending on how many clusters are preset. The uninstallation, removing a `ManagedCluster` in ACM can take many hours. The installation add files to this repository used in the automation - after an installation the uninstall **MUST** run to clean up the repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhecosystemappeng%2Fansible-multicluster-cockroachdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhecosystemappeng%2Fansible-multicluster-cockroachdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhecosystemappeng%2Fansible-multicluster-cockroachdb/lists"}