{"id":16598124,"url":"https://github.com/msmygit/dse-pkg-install","last_synced_at":"2026-04-16T16:39:50.536Z","repository":{"id":145568754,"uuid":"202153964","full_name":"msmygit/dse-pkg-install","owner":"msmygit","description":"DataStax softwares installation using package install method","archived":false,"fork":false,"pushed_at":"2020-08-08T21:11:14.000Z","size":177,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-17T05:43:58.828Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msmygit.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-13T13:46:27.000Z","updated_at":"2021-04-12T14:08:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"9846121a-e5d5-4fd9-b95b-5dcdeb9ab896","html_url":"https://github.com/msmygit/dse-pkg-install","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msmygit%2Fdse-pkg-install","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msmygit%2Fdse-pkg-install/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msmygit%2Fdse-pkg-install/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msmygit%2Fdse-pkg-install/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msmygit","download_url":"https://codeload.github.com/msmygit/dse-pkg-install/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242332574,"owners_count":20110345,"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":[],"created_at":"2024-10-12T00:07:44.117Z","updated_at":"2026-04-16T16:39:45.507Z","avatar_url":"https://github.com/msmygit.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Playbooks\nInventory of playbooks and examples used to manage the day to day operational tasks of installing and configuring DataStax Enterprise software suite using package install method.\n\nAt end of this exercise, we would have installed the following,\n* DSE `6.8.3` cluster with two datacenters\n* A 2-node DC1 with _C*_ only workload; A 2-node DC2 with _C* + Analytics_ workload\n* OpsCenter `6.8.0` with an active-passive setup (i.e. 2 VMs in total for running OpsCenter daemon)\n* A 2-node DSE `6.8.3` cluster dedicated for storing OpsCenter collection metrics data of the monitored cluster\n* Agents installed on all the DSE nodes\n* This playbook covers installation of DSE softwares both `online` and `offline` where, `online` refers to servers having\ninternet connectivity and `offline` for servers without internet connectivity\n\n**_Note_**: This could be customized to deploy _N_-number of DCs with _N_-number of nodes with varying workloads.\n\n## Assumptions\n* This playbook was built and tested using a supported version of Ansible [v2.8.3](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#release-status) at the time of this writing.\n* In future, if updating Ansible version, thoroughly test the playbooks to ensure there is backward compatiblity.\n* Only `Package Installation` is currently tested \u0026 supported at the moment although there are some code related to `Tarball Installation` in this playbooks which could be used in future for customizations.\n* There are variety of ways to manage the layout of the Ansible roles \u0026 playbooks as per the user's need/requirement and this whole setup could be customized accordingly.\n* Environment provisioning is not covered by this Ansible scripts\n\n## Provisioned Infrastructure Expectations\n* All the required virtual machines are available as per the sizing for the required workload,\n* All provisioned virtual machines are pre-applied with [DataStax Recommended Settings](https://docs.datastax.com/en/dse/6.7/dse-admin/datastax_enterprise/config/configRecommendedSettings.html),\n* All required [DataStax Enterprise](https://docs.datastax.com/en/security/6.7/security/secFirewallPorts.html) and [OpsCenter](https://docs.datastax.com/en/opscenter/6.7/opsc/reference/opscLcmPorts.html) ports are opened between the virtual machines accordingly,\n* An Ansible control machine / node is provisioned per the [requirements](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#control-node-requirements)\n\n## DataStax softwares installation using package install method\nThis is a playbook to build the DSE environment on the infrastructure created and provisioned. The IP addresses are placed into named groups and the the playbook assumes a RHEL 7.6 Maipo image. The playbook should be executed from the users designated Ansible control machine / host. The password / private key to gain access to the hosts will be provided as part of the pre-requisite steps for creating the infrastructure.\n\nThis particular playbook has the following defined roles:\n* `os-settings`: create users, groups and configure any kernel settings.\n* `standard-packages`: install any packages required.\n* `store-prep`: Download DSE and Agents for the OpsCenter cluster\n* `db-prep`: Download DSE and Agents for the OpsCenter cluster\n* `store-configure`: Configure parameters and correct DSE version\n* `db-configure`: Configure parameters and correct DSE version\n* `opscenter-prep`: Download OpsCenter\n* `opscenter-configure`: Configure OpsCenter parameters and correct version.\n* `rolling-restart`: Perform a conditional rolling restart.\n\nExecute the playbook using the following to add any pre-tasks:\n```\nansible-playbook -u \u003cusername\u003e --ask-pass --ask-become-pass -i inventory/hosts pre-tasks.yml\n\n# Optionally use `-v` at the end of the command to run it in verbose mode (or) run it with `--check` option for a trial run (or) use `--syntax-check` to test syntax.\n```\n\nThe aim of the playbook is to automate the OS configuration, deployment of all DataStax software and configuration.\n\nIt may be easier to stored the specific user configurations in different branches i.e. diffent branches for Dev, Pre-prod, Production etc.,\n\n### Directory Layout\nAs of the initial delivery, [the default file locations for the package installation](https://docs.datastax.com/en/install/6.7/install/dsePackageLoc.html) is followed which could be customized and updated accordingly.\n\n## Deployment Process\n\n### Do some pre-requisites for the Ansible control center / host\nBased on the Linux environment, use either `apt` (or) `yum` to install required dependencies.\n```\nsudo apt-get install software-properties-common\nsudo apt-add-repository -y ppa:ansible/ansible\nsudo apt-get update\nsudo apt-get install -y ansible\nsudo apt-get install -y git\n\n(or)\n\nsudo yum install -y ansible-2.8.3\n```\nOne could also download RPM package and install it. **Reference**: [How to install or upgrade an RPM package in RHEL?](https://access.redhat.com/solutions/1189)\n\nTweak [Ansible configuration file](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-settings-locations) file, `ansible.cfg`\n```\nforks=50\nhost_key_checking = False\n```\n\n### Setup Inventory\nUse hosts file in the repo as an example and configure `/etc/ansible/hosts` (or) hosts file in user's custom location appropriately.\n\n### Deploy DSE, OpsCenter and Agents. Also, configure automatic failover setup for OpsCenter\n```\nansible-playbook -u \u003cusername\u003e --ask-pass --ask-become-pass -i inventory/hosts build-site.yml\n\n# Optionally use `-v` at the end of the command to run it in verbose mode (or) run it with `--check` option for a trial run (or) use `--syntax-check` to test syntax.\n```\n\n### Perform a DSE patch upgrade. For e.g. upgrade from `6.8.2` to `6.8.3` version\n```\nansible-playbook -u \u003cusername\u003e --ask-pass --ask-become-pass -i inventory/hosts patch-version-upgrade.yml --extra-vars \"worker_jobs_killed=\u003cy_or_n\u003e dse_patch_version=\u003c6.8.latest\u003e\"\n\n# Optionally use `-v` at the end of the command to run it in verbose mode (or) run it with `--check` option for a trial run (or) use `--syntax-check` to test syntax.\n```\n\n### Start the metrics and multi-datacenter `OnionDSEDev` cluster\n```\nansible-playbook -i inventory/host rolling-restart.yml\n```\n\n## Key files to configure\nBelow are key files that one would need to update, per environment prior to running the Ansible playbooks to install \u0026 configure DSE softwares.\n\n### `inventory/hosts` file\nThis is the file where we will be placing the public/private IPs of the VMs.\n\nThe layout will be as follows,\n```\n[opscenter]\n\u003cformat: IP_address failover_role=[active|passive] in its own line\u003e\n\u003cthere can be at most only 2 rows here. 1st row will be active OpsCenter IP with `failover_role=active` and 2nd row will be passive OpsCenter IP with `failover_role=passive`\u003e\n\n[storeseeds]\n\u003cformat: IP_address rack=\u003crack_name\u003e in its own line\u003e\n\n[storenonseeds]\n\u003cformat: IP_address rack=\u003crack_name\u003e in its own line\u003e\n\n[store:children]\nstoreseeds\nstorenonseeds\n\n[clusterseeds]\n\u003cformat: IP address in its own line\u003e\n\n[cluster:children]\n\u003cformat: Name of the sub-group in its own line. For e.g. DC1\u003e\n\u003cformat: Name of the sub-group in its own line. For e.g. DC2\u003e\n\n[DC1]\n\u003cformat: IP address rack=\u003crack_name\u003e in its own line\u003e\n\n[DC2]\n\u003cformat: IP address rack=\u003crack_name\u003e in its own line\u003e\n```\n\nAn example layout is below,\n```\n[opscenter]\n40.124.26.172 failover_role=active\n13.85.60.218 failover_role=passive\n\n[storeseeds]\n157.54.201.233 rack=rack1\n\n[storenonseeds]\n23.98.278.165 rack=rack2\n\n[store:children]\nstoreseeds\nstorenonseeds\n\n[clusterseeds]\n40.44.239.9\n40.84.139.112\n\n[cluster:children]\nDC1\nDC2\n\n[DC1]\n40.87.239.9 rack=rack1\n40.84.393.57 rack=rack2\n\n[DC2]\n102.214.117.55 rack=rack1\n401.84.199.112 rack=rack2\n```\n\n### `group_vars/[all|DC1|DC2|store]/vars.yaml` file\nUpdate the detail in these files accordingly. If one doesn't have a separate DSE cluster to store OpsCenter metrics collection data, set `metrics_cluster` to `false` at `all/vars.yaml` file.\n\n# Disclaimer\nAny Ansible code shared is distributed on an _\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND_, either expressed or implied. Users will need to be maintaining it going forward based on their custom needs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsmygit%2Fdse-pkg-install","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsmygit%2Fdse-pkg-install","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsmygit%2Fdse-pkg-install/lists"}