{"id":19716368,"url":"https://github.com/computestacks/ansible-install","last_synced_at":"2025-04-29T20:30:44.769Z","repository":{"id":42387682,"uuid":"321211422","full_name":"ComputeStacks/ansible-install","owner":"ComputeStacks","description":"Install ComputeStacks using Ansible","archived":false,"fork":false,"pushed_at":"2025-04-15T19:54:53.000Z","size":441,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T20:44:33.753Z","etag":null,"topics":["ansible"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/ComputeStacks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-14T02:32:57.000Z","updated_at":"2025-04-15T19:54:57.000Z","dependencies_parsed_at":"2022-09-16T10:03:11.520Z","dependency_job_id":"ac85f370-de68-4f49-aa36-27093ae446ca","html_url":"https://github.com/ComputeStacks/ansible-install","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComputeStacks%2Fansible-install","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComputeStacks%2Fansible-install/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComputeStacks%2Fansible-install/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComputeStacks%2Fansible-install/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ComputeStacks","download_url":"https://codeload.github.com/ComputeStacks/ansible-install/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251578272,"owners_count":21612007,"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"],"created_at":"2024-11-11T22:41:54.223Z","updated_at":"2025-04-29T20:30:43.211Z","avatar_url":"https://github.com/ComputeStacks.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible playbooks to install a complete ComputeStacks installation\n\nBefore proceeding, be sure to review our [architecture overview](https://computestacks.notion.site/Architecture-Overview-63ad0f8b371a41c7b89770f315191648), and our [minimum requirements](https://computestacks.notion.site/Installation-Plan-d40223528e254733a7bf08925059c711#cb50536966fc46cb8980ed71535e4cb7). We are also more than happy to help you design your ComputeStacks environments. Please [contact us](https://www.computestacks.com/contact) to learn more.\n\n## Local Machine Prerequisites\n\n* make _(installed by default on all linux \u0026 mac systems)_\n* [ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)\n\nOnce ansible is installed, run:\n\n```bash\nmake roles\n```\n\n\n\u003e Please first check and see if [terraform]((https://github.com/ComputeStacks?q=terraform\u0026type=\u0026language=)) scripts exist for your platform. This is will greatly aid in building your inventory file and ensuring a more successful installation process.\n\n### Inventory File\n\nIf you used one of our [terraform setup scripts](https://github.com/ComputeStacks?q=terraform\u0026type=\u0026language=) **_(RECOMMENDED)_** to create your cluster, then you should already have a skeleton `inventory.yml` file that you can place in this directory. Otherwise, `cp inventory.yml.sample inventory.yml`.\n\nEnsure you fill out all the variables and ensure everything is correct. To see all available settings, check each [role](roles/) and look at their `defaults/main.yml` file.\n\n### DNS\n\nVarious parts of this ansible package will require the domains defined in your `inventory.yml` file to be correctly setup. Please configure those domains and ensure the changes have been propagated before proceeding.\n\n\u003cdetails\u003e\n\u003csummary\u003eExample DNS Settings\u003c/summary\u003e\n\u003cp\u003e\n\n```\na.dev.cmptstks.net. IN A %{PUBLIC IP OF NODE}\nmetrics.dev.cmptstks.net. IN A %{PUBLIC IP OF METRICS SERVER}\n*.a.dev.cmptstks.net. IN CNAME a.dev.cmptstks.net.\nportal.dev.cmptstks.net. IN A %{controller ip address}\ncr.dev.cmptstks.net. IN CNAME portal.dev.cmptstks.net.\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n### Requirements for each server\n#### Server Hostnames (Skip if you used Terraform)\n\nEnsure all hostnames are configured properly on each node.\nOur system expects the hostnames on nodes to be 1 lowercase word (dashes or underscores are ok), no special characters or spaces. They should not be FQDN or have the dot notation.\n\n\u003cdetails\u003e\n\u003csummary\u003eExample using node101, node102, node103\u003c/summary\u003e\n\u003cp\u003e\n\n```bash\nhostname node101 \u0026\u0026 echo \"node101\" \u003e /etc/hostname \u0026\u0026 echo \"127.0.0.1 node101\" \u003e\u003e /etc/hosts\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n#### Install the following packages (Skip if you used Terraform)\n\n\u003cdetails\u003e\n\u003csummary\u003eRequired packages when NOT using our terraform provisioners\u003c/summary\u003e\n\u003cp\u003e\n\n```bash\napt-get update\napt-get -y install openssl \\\n                   ca-certificates \\\n                   linux-headers-amd64 \\\n                   python3 \\\n                   python3-pip \\\n                   python3-openssl \\\n                   python3-apt \\\n                   python3-setuptools \\\n                   python3-wheel\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n***\n## Running the installer\n\n### Bootstrap A New Cluster\n\n```bash\nmake bootstrap\n```\n\nThe last step in this script will reboot servers to finalize configuration.\n\n\n## Post-Installation\n\nAfter running and allowing the servers to reboot, you can perform some basic validation by running:\n\n```bash\nmake validate\n```\n\n## Add Region / Availability Zone\nTo add a new region or availability zone, make a copy of your previous `inventory.yml` file and make the following changes:\n\n1. Change `region_name` and/or, `availability_zone_name`\n2. Replace all nodes with your new nodes\n3. (optional) Change metrics / backup servers. You can re-use the existing ones if you wish.\n\nRe-run the bootstrap command:\n\n```bash\nmake bootstrap\n```\n\n\n## FAQ\n\n### How to install ansible\n\n\u003cdetails\u003e\n\u003csummary\u003eMac OSX\u003c/summary\u003e\n\u003cp\u003e\n\n[Install Homebrew](https://docs.brew.sh/Installation)\n\n```bash\nbrew install ansible\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eLinux\u003c/summary\u003e\n\u003cp\u003e\n\n[Install pyenv](https://github.com/pyenv/pyenv) for your local (non-root) user account.\n\nYou can set the new version with `pyenv global 3.9.1` _(replace `3.9.1` with the version you installed)_\n\n```bash\npython -m pip install --user ansible\necho 'export PATH=\"$PATH:$HOME/.local/bin\"' \u003e\u003e ~/.bashrc\n```\n\n_Note: Check if you have a `.bashrc` file, it may be `.bash_profile` for your distribution._\n\nThis will ensure you have the most recent version of ansible.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n### Enable Swap Limit\n\nIn order to allow swap limitations set on containers, you need to perform the following on each node:\n\n1) Modify the file `/etc/default/grub`\n2) Add `cgroup_enable=memory swapaccount=1` to the existing `GRUB_CMDLINE_LINUX_DEFAULT` setting\n3) run `update-grub`\n4) reboot\n\n_Note: This can add about 1% of overhead._\n\n## Troubleshooting\n### NetworkManager Hostname Error\n\nHow to Resolve `set-hostname: current hostname was changed outside NetworkManager: '\u003chostname\u003e'` in logs:\n\nEdit `/etc/NetworkManager/NetworkManager.conf` and add `hostname-mode=none` to the `[main]` block, and reboot the server.\n\n**Example:**\n\n```\n[main]\n#plugins=ifcfg-rh,ibft\nhostname-mode=none\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomputestacks%2Fansible-install","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomputestacks%2Fansible-install","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomputestacks%2Fansible-install/lists"}