{"id":20111419,"url":"https://github.com/openstack/charm-hacluster","last_synced_at":"2025-05-06T10:33:29.494Z","repository":{"id":66174603,"uuid":"60283399","full_name":"openstack/charm-hacluster","owner":"openstack","description":"Juju Charm - HACluster. Mirror of code maintained at opendev.org.","archived":false,"fork":false,"pushed_at":"2024-08-21T16:47:30.000Z","size":2208,"stargazers_count":14,"open_issues_count":0,"forks_count":17,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-21T18:52:59.817Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opendev.org/openstack/charm-hacluster","language":"Python","has_issues":false,"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/openstack.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":"2016-06-02T17:22:17.000Z","updated_at":"2024-08-21T16:47:33.000Z","dependencies_parsed_at":"2024-06-22T07:44:24.045Z","dependency_job_id":"5c41310d-d569-44db-b0ed-6829e1516f48","html_url":"https://github.com/openstack/charm-hacluster","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-hacluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-hacluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-hacluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-hacluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openstack","download_url":"https://codeload.github.com/openstack/charm-hacluster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224499851,"owners_count":17321605,"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-11-13T18:16:01.093Z","updated_at":"2024-11-13T18:16:01.649Z","avatar_url":"https://github.com/openstack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nThe hacluster charm provides high availability for OpenStack applications that\nlack native (built-in) HA functionality. The clustering solution is based on\nCorosync and Pacemaker.\n\nIt is a subordinate charm that works in conjunction with a principle charm that\nsupports the 'hacluster' interface. The current list of such charms can be\nobtained from the [Charm Store][charms-requires-hacluster] (the charms\nofficially supported by the OpenStack Charms project are published by\n'openstack-charmers').\n\nSee [OpenStack high availability][cdg-ha] in the [OpenStack Charms Deployment\nGuide][cdg] for a comprehensive treatment of HA with charmed OpenStack.\n\n\u003e **Note**: The hacluster charm is generally intended to be used with\n  MAAS-based clouds.\n\n# Usage\n\nHigh availability can be configured in two mutually exclusive ways:\n\n* virtual IP(s)\n* DNS\n\nThe virtual IP method of implementing HA requires that all units of the\nclustered OpenStack application are on the same subnet.\n\nThe DNS method of implementing HA requires that [MAAS][upstream-maas] is used\nas the backing cloud. The clustered nodes must have static or \"reserved\" IP\naddresses registered in MAAS. If using a version of MAAS earlier than 2.3 the\nDNS hostname(s) should be pre-registered in MAAS before use with DNS HA.\n\n## Configuration\n\nThis section covers common configuration options. See file `config.yaml` for\nthe full list of options, along with their descriptions and default values.\n\n#### `cluster_count`\n\nThe `cluster_count` option sets the number of hacluster units required to form\nthe principle application cluster (the default is 3). It is best practice to\nprovide a value explicitly as doing so ensures that the hacluster charm will\nwait until all relations are made to the principle application before building\nthe Corosync/Pacemaker cluster, thereby avoiding a race condition.\n\n## Deployment\n\nAt deploy time an application name should be set, and be based on the principle\ncharm name (for organisational purposes):\n\n    juju deploy hacluster \u003cprinciple-charm-name\u003e-hacluster\n\nA relation is then added between the hacluster application and the principle\napplication.\n\nIn the below example the VIP approach is taken. These commands will deploy a\nthree-node Keystone HA cluster, with a VIP of 10.246.114.11. Each will reside\nin a container on existing machines 0, 1, and 2:\n\n    juju deploy -n 3 --to lxd:0,lxd:1,lxd:2 --config vip=10.246.114.11 keystone\n    juju deploy --config cluster_count=3 hacluster keystone-hacluster\n    juju add-relation keystone-hacluster:ha keystone:ha\n\n## Actions\n\nThis section lists Juju [actions][juju-docs-actions] supported by the charm.\nActions allow specific operations to be performed on a per-unit basis.\n\n * `pause`\n * `resume`\n * `status`\n * `cleanup`\n * `update-ring`\n\nTo display action descriptions run `juju actions hacluster`. If the charm is\nnot deployed then see file ``actions.yaml``.\n\n## Presenting status information\n\nHere are a few examples of how to present useful information with the `status`\naction and the [jq][jq] utility.\n\n* Querying for `online` and `standby` parameter values:\n\n      juju run-action --wait hacluster/leader status \\\n        --format json | jq '.[] | {(.UnitId):.results.result | fromjson \\\n        | .nodes | .[] | {unit_name: .name, online: .online, standby: .standby}}'\n\n  output example\n\n      {\n        \"hacluster/0\": {\n          \"unit_name\": \"juju-a37bc0-3\",\n          \"online\": \"true\",\n          \"standby\": \"false\"\n        }\n      }\n      {\n        \"hacluster/0\": {\n          \"unit_name\": \"juju-a37bc0-4\",\n          \"online\": \"true\",\n          \"standby\": \"false\"\n        }\n      }\n      {\n        \"hacluster/0\": {\n          \"unit_name\": \"juju-a37bc0-5\",\n          \"online\": \"true\",\n          \"standby\": \"false\"\n        }\n      }\n\n* Displaying cluster resource information:\n\n      juju run-action --wait hacluster/leader status \\\n        --format json | jq '.[] | {(.UnitId):.results.result | fromjson \\\n        | .resources.groups}'\n\n# Bugs\n\nPlease report bugs on [Launchpad][lp-bugs-charm-hacluster].\n\nFor general charm questions refer to the [OpenStack Charm Guide][cg].\n\n\u003c!-- LINKS --\u003e\n\n[cg]: https://docs.openstack.org/charm-guide\n[lp-bugs-charm-hacluster]: https://bugs.launchpad.net/charm-hacluster/+filebug\n[juju-docs-actions]: https://juju.is/docs/olm/working-with-actions\n[cdg-ha]: https://docs.openstack.org/charm-guide/latest/admin/ha.html\n[upstream-maas]: https://maas.io\n[charms-requires-hacluster]: https://jaas.ai/search?requires=hacluster\n[cdg]: https://docs.openstack.org/project-deploy-guide/charm-deployment-guide\n[jq]: https://stedolan.github.io/jq/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fcharm-hacluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenstack%2Fcharm-hacluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fcharm-hacluster/lists"}