{"id":21601333,"url":"https://github.com/dominodatalab/ranchhand","last_synced_at":"2025-04-11T02:13:22.480Z","repository":{"id":35003253,"uuid":"172600449","full_name":"dominodatalab/ranchhand","owner":"dominodatalab","description":":cow: Create a Rancher HA installation","archived":false,"fork":false,"pushed_at":"2025-03-24T20:08:48.000Z","size":5043,"stargazers_count":9,"open_issues_count":1,"forks_count":12,"subscribers_count":14,"default_branch":"develop","last_synced_at":"2025-04-11T02:13:13.594Z","etag":null,"topics":["ansible","kubernetes","rancher","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dominodatalab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-25T23:11:51.000Z","updated_at":"2025-01-18T02:47:56.000Z","dependencies_parsed_at":"2024-02-13T23:27:49.879Z","dependency_job_id":"63a718c1-8a90-4cfb-9892-afb61f7dd6bd","html_url":"https://github.com/dominodatalab/ranchhand","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominodatalab%2Franchhand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominodatalab%2Franchhand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominodatalab%2Franchhand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominodatalab%2Franchhand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dominodatalab","download_url":"https://codeload.github.com/dominodatalab/ranchhand/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328163,"owners_count":21085261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ansible","kubernetes","rancher","terraform"],"created_at":"2024-11-24T19:09:02.383Z","updated_at":"2025-04-11T02:13:22.457Z","avatar_url":"https://github.com/dominodatalab.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RanchHand\n\n[![Release](https://img.shields.io/github/release/dominodatalab/ranchhand.svg)](https://github.com/dominodatalab/ranchhand/releases/latest)\n[![CircleCI](https://img.shields.io/circleci/project/github/dominodatalab/ranchhand/master.svg)](https://circleci.com/gh/dominodatalab/ranchhand)\n\nDeploy Rancher in HA mode onto existing hardware.\n\n## Design\n\nThis tool aims to automate the steps listed in Rancher's official [HA Install][] documentation in a reproducable manner. It also enforces many of the recommendations given inside Rancher's [hardening guide][].\n\n## Usage\n\n1. Ensure that the Rancher version is \u003e= 2.6. \n1. Download the [latest release][] from GitHub.\n1. [Install Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) (version \u003e=2.8) locally\n1.  (optional) To update the Rancher default password, set the `RANCHER_PASSWORD` environment variable:\n     `export RANCHER_PASSWORD=\u003cnew password\u003e`\n    1.    (required) Configure ansible for proper output:\n            `export ANSIBLE_COW_SELECTION=random`\n1. Execute `ansible-galaxy install -r ansible/requirements.yml` to install dependencies\n1. Execute `ansible-playbook -i '1.2.4.5,...,10.20.30.40,' --private-key=~/.ssh/id_rsa --user=ubuntu ansible/prod.yml --diff --check` to perform a dry run of all the changes.\n\n### Example\n\nThis example shows a manual run of the production playbook (prod.yml) from a local machine imaging a cluster behind a bastion/proxy server.\n\n```\nansible-playbook -i '10.0.1.6,10.0.1.51,10.0.1.94,' --private-key=/Users/myhost/.ssh/id_rsa --user=ubuntu --ssh-common-args='-o StrictHostKeyChecking=no -o StrictHostKeyChecking=no -o ProxyCommand=\"ssh -o StrictHostKeyChecking=no -W %h:%p -q ubuntu@54.190.1.95\"' ansible/prod.yml --diff\n```\n\nIn the example above, only the bastion server, 54.190.1.95, is publicly accessible. However, including the Terraform module should be sufficient for most users.\n\n## Terraform\n\nUsing the Terraform module, you can leverage Ranchhand to create a Rancher cluster on a specific set of nodes.\n\n```hcl\nmodule \"ranchhand\" {\n  source = \"github.com/dominodatalab/ranchhand\"\n\n  node_ips         = [\"...\"]\n  working_dir      = \"...\"\n  cert_dnsnames    = [\"...\"]\n  cert_ipaddresses = [\"...\"]\n\n  ssh_username   = \"...\"\n  ssh_key_path   = \"...\"\n  ssh_proxy_user = \"...\"\n  ssh_proxy_host = \"...\"\n}\n```\n\n## Development\n\nPlease submit any feature enhancements, bug fixes, or ideas via pull requests or issues.  If you need to test local changes e2e, you can do so using Vagrant and Virtualbox. Here are the recommended steps:\n\n1. Make sure you have Vagrant and VirtualBox installed.\n\n    `brew cask install vagrant virtualbox`\n\n1. Create one or more VMs. For convenience, a pre-configured [Vagrantfile][] is available.\n\n    ```\n    cd test/\n    NODE_COUNT=N NODE_DISTRO=\"ubuntu_xenial|ubuntu_bionic|centos|rhel\" vagrant up\n    ```\n\n1. Use `ansible` to launch a Ranchhand run against your VM(s) and verify your changes.\n\n    ```\n    ansible-galaxy install -r ansible/requirements.yml\n    ansible-playbook -i '192.168.50.10,' \\\n      --private-key=~/.ssh/id_rsa \\\n      --ssh-common-args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' \\\n      --user=vagrant \\\n      -e \"cert_names=DNS:localhost\" \\\n      -e \"node_count=1\" \\\n      ansible/prod.yml \\\n      --diff\n    ```\n\n    _Note the trailing comma (\",\") in the host/ip list._\n\n### Ansible References\n\nHere are some helpful Ansible references for getting started with Ansible.\n\n1. [Ansible Overview](https://docs.ansible.com/ansible/latest/index.html)\n1. [Installation Guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)\n1. [Project Directory Layout](https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html#content-organization)\n1. [Roles](https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html)\n1. [Best Practices](https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html#best-practices)\n\n## Contribute\n\nContributions are always welcome! Please submit any questions, bugs or changes via an issue or PR. Thank you.\n\n[vagrantfile]: test/Vagrantfile\n\n[rke]: https://github.com/rancher/rke\n[ha install]: https://rancher.com/docs/rancher/v2.x/en/installation/ha/\n[hardening guide]: https://releases.rancher.com/documents/security/latest/Rancher_Hardening_Guide.pdf\n[latest release]: https://github.com/dominodatalab/ranchhand/releases/latest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominodatalab%2Franchhand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdominodatalab%2Franchhand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominodatalab%2Franchhand/lists"}