{"id":19347196,"url":"https://github.com/dcos/dcos-ansible","last_synced_at":"2025-08-16T15:16:26.567Z","repository":{"id":46815091,"uuid":"160501631","full_name":"dcos/dcos-ansible","owner":"dcos","description":"Ansibles roles to manage a Mesosphere DC/OS clusters life cycle","archived":false,"fork":false,"pushed_at":"2021-09-23T23:24:28.000Z","size":623,"stargazers_count":29,"open_issues_count":15,"forks_count":55,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-04-09T22:30:07.190Z","etag":null,"topics":["dcos","dcos-testing-guild"],"latest_commit_sha":null,"homepage":"https://dcos.io","language":"Python","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/dcos.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":"2018-12-05T10:31:00.000Z","updated_at":"2023-05-28T22:51:28.000Z","dependencies_parsed_at":"2022-09-06T23:12:02.282Z","dependency_job_id":null,"html_url":"https://github.com/dcos/dcos-ansible","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcos%2Fdcos-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcos%2Fdcos-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcos%2Fdcos-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcos%2Fdcos-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcos","download_url":"https://codeload.github.com/dcos/dcos-ansible/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223909905,"owners_count":17223592,"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":["dcos","dcos-testing-guild"],"created_at":"2024-11-10T04:14:54.862Z","updated_at":"2024-11-10T04:14:55.535Z","avatar_url":"https://github.com/dcos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Roles: Mesosphere DC/OS\n\nA set of Ansible Roles that manage a DC/OS cluster lifecycle on RedHat/CentOS Linux.\n\n## Requirements\n\nTo make best use of these roles, your nodes should resemble the Mesosphere recommended way of setting up infrastructure. Depending on your setup, it is expected to deploy to:\n\n* One or more master node ('masters')\n* One bootstrap node ('bootstraps')\n* Zero or more agent nodes, used for public facing services ('agents_public')\n* One or more agent nodes, not used for public facing services ('agents_private')\n\n### An example inventory file is provided as shown here:\n\n```ini\n[bootstraps]\nbootstrap1-dcos112s.example.com\n\n[masters]\nmaster1-dcos112s.example.com\nmaster2-dcos112s.example.com\nmaster3-dcos112s.example.com\n\n[agents_private]\nagent1-dcos112s.example.com\nremoteagent1-dcos112s.example.com\n\n[agents_public]\npublicagent1-dcos112s.example.com\n\n[agents:children]\nagents_private\nagents_public\n\n[common:children]\nbootstraps\nmasters\nagents\nagents_public\n```\n\n## Role Variables\n\nThe Mesosphere DC/OS Ansible roles make use of two sets of variables:\n\n1. A set of per-node type `group_var`'s\n2. A multi-level dictionary called `dcos`, that should be available to all nodes\n\n### Per group vars\n\n```ini\n[bootstraps:vars]\nnode_type=bootstrap\n\n[masters:vars]\nnode_type=master\ndcos_legacy_node_type_name=master\n\n[agents_private:vars]\nnode_type=agent\ndcos_legacy_node_type_name=slave\n\n[agents_public:vars]\nnode_type=agent_public\ndcos_legacy_node_type_name=slave_public\n```\n\n### Global vars\n\n```yml\ndcos:\n  download: \"https://downloads.dcos.io/dcos/stable/1.13.4/dcos_generate_config.sh\"\n  download_checksum: \"sha256:a3d295de33ad55b10f5dc66c9594d9175a40f5aaec7734d664493968a9f751fd\"\n  version: \"1.13.4\"\n  enterprise_dcos: false\n  selinux_mode: enforcing\n\n  config:\n    cluster_name: \"examplecluster\"\n    security: strict\n    bootstrap_url: http://int-bootstrap1-examplecluster.example.com:8080\n    exhibitor_storage_backend: static\n    master_discovery: static\n    master_list:\n      - 172.31.42.1\n```\n\n#### Cluster wide variables\n\n| Name                    | Required?    | Description                                                                                                                                                                                                                                        |\n|:------------------------|:-------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| download                | REQUIRED     | (https) URL to download the Mesosphere DC/OS install from                                                                                                                                                                                          |\n| download_checksum       | no           | Checksum to check the download against. It should start with the method being used. E.g. \"sha256:\u003cchecksum\u003e\"\n| version                 | REQUIRED     | Version string that reflects the version that the installer (given by `download`) installs. Can be collected by running `dcos_generate_config.sh --version`.                                                                                       |\n| version_to_upgrade_from | for upgrades | Version string of Mesosphere DC/OS the upgrade procedure expectes to upgrade FROM. A per-version upgrade script will be generated on the bootstrap machine, each cluster node downloads the proper upgrade for its currenly running DC/OS version. |\n| image_commit            | no           | Can be used to force same version / same config upgrades. Mostly useful for deploying/upgrading non-released versions, e.g. `1.12-dev`. This parameter takes precedence over `version`.                                                            |\n| enterprise_dcos         | REQUIRED     | Specifies if the installer (given by `download`) installs an 'open' or 'enterprise' version of Mesosphere DC/OS. This is required as there are additional post-upgrade checks for enterprise-only components.                                      |\n| selinux_mode            | REQUIRED     | Indicates the cluster nodes operating sytems SELinux mode. Mesosphere DC/OS supports running in `enforcing` mode starting with **1.12**. Older versions require `permissive`.                                                                      |\n|                         |              |                                                                                                                                                                                                                                                    |\n| config                  | yes          | Yaml structure that represents a valid Mesosphere DC/OS config.yml, see below.                                                                                                                                                                     |\n\n#### DC/OS config.yml parameters\nPlease see [the official Mesosphere DC/OS configuration reference](https://docs.mesosphere.com/1.13/installing/production/advanced-configuration/configuration-reference/) for a full list of possible parameters.\nThere are a few parameters that are used by these roles outside the DC/OS config.yml, specifically:\n\n* `bootstrap_url`: Should point to http://*your bootstrap node*:8080. Will be used internally and conviniently overwritten for the installer/upgrader to point to a version specific sub-directory.\n* `ip_detect_contents`: Is used to determine a user-supplied IP detection script. Overwrites the build-in enviroment detection and usage of a generic AWS and/or on premise script. [Official Mesosphere DC/OS ip-detect reference](https://docs.mesosphere.com/1.13/installing/production/deploying-dcos/installation/#create-an-ip-detection-script)\n* `ip_detect_public_contents`: Is used to determine a user-supplied public IP detection script. Overwrites the build-in enviroment detection and usage of a generic AWS and/or on premise script. [Official Mesosphere DC/OS ip-detect reference](https://docs.mesosphere.com/1.13/installing/production/deploying-dcos/installation/#create-an-ip-detection-script)\n* `fault_domain_detect_contents`: Is used to determine a user-supplied fault domain detection script. Overwrites the build-in enviroment detection and usage of a generic AWS and/or on premise script.\n\n#### Ansible dictionary merge behavior caveat\n\nDue to the nested structure of the `dcos` configuration, it might be required to set Ansible to ['merge' instead of 'replace'](https://docs.ansible.com/ansible/2.4/intro_configuration.html#hash-behaviour), when combining config from multiple places.\n\n##### Example\n\n```ini\n# ansible.cfg\nhash_behaviour = merge\n```\n\n#### Safeguard during interactive use: `dcos_cluster_name_confirmed`\n\nWhen invoking these roles interactively (for example from the operator's machine), the `DCOS.bootstrap` role will require a manual confirmation of the cluster to run against. This is a safeguarding mechanism to avoid unintentional upgrade or config changes. In non-interactive plays, a variable can be set to skip this step, e.g.:\n\n```bash\nansible-playbook -e 'dcos_cluster_name_confirmed=True' dcos.yml\n```\n\n## Example playbook\n\nMesosphere DC/OS is a complex system, spanning multiple nodes to form a full multi-node cluster. There are some constraints in making a playbook use the provided roles:\n\n1. Order of groups to run their respective roles on (e.g. bootstrap node first, then masters, then agents)\n2. Concurrency for upgrades (e.g. `serial: 1` for master nodes)\n\nThe provided `dcos.yml` playbook can be used as-is for installing and upgrading Mesosphere DC/OS.\n\n## Tested OS and Mesosphere DC/OS versions\n\n* CentOS 7, RHEL 7\n* DC/OS 1.12, both open as well as enterprise version\n\n## License\n\n[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\n## Author Information\n\nThis role was created by team SRE @ Mesosphere and others in 2018, based on multiple internal tools and non-public Ansible roles that have been developed internally over the years.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcos%2Fdcos-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcos%2Fdcos-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcos%2Fdcos-ansible/lists"}