{"id":20111284,"url":"https://github.com/openstack/charm-ceph-mon","last_synced_at":"2025-05-06T10:33:00.869Z","repository":{"id":39636403,"uuid":"52858662","full_name":"openstack/charm-ceph-mon","owner":"openstack","description":"Juju Charm - Ceph MON. Mirror of code maintained at opendev.org.","archived":false,"fork":false,"pushed_at":"2024-10-18T13:42:43.000Z","size":2666,"stargazers_count":13,"open_issues_count":0,"forks_count":24,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-19T19:32:12.005Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opendev.org/openstack/charm-ceph-mon","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-03-01T07:53:20.000Z","updated_at":"2024-10-17T13:45:16.000Z","dependencies_parsed_at":"2023-02-14T07:35:20.262Z","dependency_job_id":"657e6b5a-0299-4449-9b47-bab27a4e854a","html_url":"https://github.com/openstack/charm-ceph-mon","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-ceph-mon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-ceph-mon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-ceph-mon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-ceph-mon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openstack","download_url":"https://codeload.github.com/openstack/charm-ceph-mon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224499855,"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:15:14.438Z","updated_at":"2024-11-13T18:15:15.117Z","avatar_url":"https://github.com/openstack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\n[Ceph][ceph-upstream] is a unified, distributed storage system designed for\nexcellent performance, reliability, and scalability.\n\nThe ceph-mon charm deploys Ceph monitor nodes, allowing one to create a monitor\ncluster. It is used in conjunction with the [ceph-osd][ceph-osd-charm] charm.\nTogether, these charms can scale out the amount of storage available in a Ceph\ncluster.\n\n# Usage\n\n## Configuration\n\nThis section covers common and/or important configuration options. See file\n`config.yaml` for the full list of options, along with their descriptions and\ndefault values. See the [Juju documentation][juju-docs-config-apps] for details\non configuring applications.\n\n#### `customize-failure-domain`\n\nThe `customize-failure-domain` option determines how a Ceph CRUSH map is\nconfigured.\n\nA value of 'false' (the default) will lead to a map that will replicate data\nacross hosts (implemented as [Ceph bucket type][upstream-ceph-buckets] 'host').\nWith a value of 'true' all MAAS-defined zones will be used to generate a map\nthat will replicate data across Ceph availability zones (implemented as bucket\ntype 'rack').\n\nThis option is also supported by the ceph-osd charm. Its value must be the same\nfor both charms.\n\n#### `monitor-count`\n\nThe `monitor-count` option gives the number of ceph-mon units in the monitor\nsub-cluster (where one ceph-mon unit represents one MON). The default value is\n'3' and is generally a good choice, but it is good practice to set this\nexplicitly to avoid a possible race condition during the formation of the\nsub-cluster. To establish quorum and enable partition tolerance an odd number\nof ceph-mon units is required.\n\n\u003e **Important**: A monitor count of less than three is not recommended for\n  production environments. Test environments can use a single ceph-mon unit by\n  setting this option to '1'.\n\n#### `expected-osd-count`\n\nThe `expected-osd-count` option states the number of OSDs expected to be\ndeployed in the cluster. This value can influence the number of placement\ngroups (PGs) to use per pool. The PG calculation is based either on the actual\nnumber of OSDs or this option's value, whichever is greater. The default value\nis '0', which tells the charm to only consider the actual number of OSDs. If\nthe actual number of OSDs is less than three then this option must explicitly\nstate that number. Only until a sufficient (or prescribed) number of OSDs has\nbeen attained will the charm be able to create Ceph pools.\n\n\u003e **Note**: The inability to create a pool due to an insufficient number of\n  OSDs will cause any consuming application (characterised by a relation\n  involving the `ceph-mon:client` endpoint) to remain in the 'waiting' state.\n\n#### `source`\n\nThe `source` option states the software sources. A common value is an OpenStack\nUCA release (e.g. 'cloud:xenial-queens' or 'cloud:bionic-ussuri'). See [Ceph\nand the UCA][cloud-archive-ceph]. The underlying host's existing apt sources\nwill be used if this option is not specified (this behaviour can be explicitly\nchosen by using the value of 'distro').\n\n## Deployment\n\nA cloud with three MON nodes is a typical design whereas three OSDs are\nconsidered the minimum. For example, to deploy a Ceph cluster consisting of\nthree OSDs (one per ceph-osd unit) and three MONs:\n\n    juju deploy -n 3 --config ceph-osd.yaml ceph-osd\n    juju deploy -n 3 --to lxd:0,lxd:1,lxd:2 ceph-mon\n    juju add-relation ceph-osd:mon ceph-mon:osd\n\nHere, a containerised MON is running alongside each storage node. We've assumed\nthat the machines spawned in the first command are assigned IDs of 0, 1, and 2.\n\nBy default, the monitor cluster will not be complete until three ceph-mon units\nhave been deployed. This is to ensure that a quorum is achieved prior to the\naddition of storage devices.\n\nSee the [Ceph documentation][ceph-docs-monitors] for notes on monitor cluster\ndeployment strategies.\n\n\u003e **Note**: Refer to the [Install OpenStack][cdg-install-openstack] page in the\n  OpenStack Charms Deployment Guide for instructions on installing a monitor\n  cluster for use with OpenStack.\n\n## Network spaces\n\nThis charm supports the use of Juju [network spaces][juju-docs-spaces] (Juju\n`v.2.0`). This feature optionally allows specific types of the application's\nnetwork traffic to be bound to subnets that the underlying hardware is\nconnected to.\n\n\u003e **Note**: Spaces must be configured in the backing cloud prior to deployment.\n\nThe ceph-mon charm exposes the following Ceph traffic types (bindings):\n\n* 'public' (front-side)\n* 'cluster' (back-side)\n\nFor example, providing that spaces 'data-space' and 'cluster-space' exist, the\ndeploy command above could look like this:\n\n    juju deploy -n 3 --config ceph-mon.yaml ceph-mon \\\n       --bind \"public=data-space cluster=cluster-space\"\n\nAlternatively, configuration can be provided as part of a bundle:\n\n```yaml\n    ceph-mon:\n      charm: cs:ceph-mon\n      num_units: 1\n      bindings:\n        public: data-space\n        cluster: cluster-space\n```\n\nRefer to the [Ceph Network Reference][ceph-docs-network-ref] to learn about the\nimplications of segregating Ceph network traffic.\n\n\u003e **Note**: Existing ceph-mon units configured with the `ceph-public-network`\n  or `ceph-cluster-network` options will continue to honour them. Furthermore,\n  these options override any space bindings, if set.\n\n## Monitoring\n\nThe charm supports Ceph metric monitoring with Prometheus. Add relations to the\n[prometheus][prometheus-charm] application in this way:\n\n    juju deploy prometheus2\n    juju add-relation ceph-mon prometheus2\n\n\u003e **Note**: Prometheus support is available starting with Ceph Luminous\n  (xenial-queens UCA pocket).\n\nAlternatively, integration with the [COS Lite][cos-lite] observability\nstack is available via the metrics-endpoint relation.\n\nRelating to prometheus-k8s via the metrics-endpoint interface (as is\nfound in the [COS Lite][cos-lite] bundle) will send metrics to\nprometheus. Additionally, alerting rules will be configured for\nprometheus as well. Alerting rules are configured as a resource\n`alert-rules`; the default rules are taken from [upstream ceph\nrules][ceph-rules]. It is possible to replace the default with\ncustomized rules by attaching a resource:\n\n    juju attach ceph-mon alert-rules=./my-prom-alerts.yaml.rules\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. To\ndisplay action descriptions run `juju actions ceph-mon`. If the charm is not\ndeployed then see file `actions.yaml`.\n\n* `change-osd-weight`\n* `copy-pool`\n* `create-cache-tier`\n* `create-crush-rule`\n* `create-erasure-profile`\n* `create-pool`\n* `crushmap-update`\n* `delete-erasure-profile`\n* `delete-pool`\n* `get-erasure-profile`\n* `get-health`\n* `list-erasure-profiles`\n* `list-inconsistent-objs`\n* `list-pools`\n* `pause-health`\n* `pool-get`\n* `pool-set`\n* `pool-statistics`\n* `purge-osd`\n* `remove-cache-tier`\n* `remove-pool-snapshot`\n* `rename-pool`\n* `resume-health`\n* `security-checklist`\n* `set-noout`\n* `set-pool-max-bytes`\n* `show-disk-free`\n* `snapshot-pool`\n* `unset-noout`\n\n## Presenting the list of Ceph pools with details\n\nThe following example returns the list of pools with details: `id`, `name`,\n`size` and `min_size`.\nThe [jq][jq] utility has been used to parse the action output in json format.\n\n    juju run-action --wait ceph-mon/leader list-pools detail=true \\\n      --format json | jq '.[].results.pools | fromjson | .[]\n      | {pool:.pool, name:.pool_name, size:.size, min_size:.min_size}'\n\nSample output:\n\n    {\n      \"pool\": 1,\n      \"name\": \"test\",\n      \"size\": 3,\n      \"min_size\": 2\n    }\n    {\n      \"pool\": 2,\n      \"name\": \"test2\",\n      \"size\": 3,\n      \"min_size\": 2\n    }\n\n# Bugs\n\nPlease report bugs on [Launchpad][lp-bugs-charm-ceph-mon].\n\nFor general charm questions refer to the OpenStack [Charm Guide][cg].\n\n\u003c!-- LINKS --\u003e\n\n[ceph-upstream]: https://ceph.io\n[cg]: https://docs.openstack.org/charm-guide\n[ceph-osd-charm]: https://jaas.ai/ceph-osd\n[juju-docs-actions]: https://jaas.ai/docs/actions\n[juju-docs-spaces]: https://jaas.ai/docs/spaces\n[juju-docs-config-apps]: https://juju.is/docs/configuring-applications\n[ceph-docs-network-ref]: http://docs.ceph.com/docs/master/rados/configuration/network-config-ref\n[ceph-docs-monitors]: https://docs.ceph.com/docs/master/dev/mon-bootstrap\n[lp-bugs-charm-ceph-mon]: https://bugs.launchpad.net/charm-ceph-mon/+filebug\n[cdg-install-openstack]: https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/install-openstack.html\n[prometheus-charm]: https://jaas.ai/prometheus2\n[cloud-archive-ceph]: https://wiki.ubuntu.com/OpenStack/CloudArchive#Ceph_and_the_UCA\n[upstream-ceph-buckets]: https://docs.ceph.com/docs/master/rados/operations/crush-map/#types-and-buckets\n[jq]: https://stedolan.github.io/jq/\n[cos-lite]: https://charmhub.io/cos-lite\n[ceph-rules]: https://github.com/ceph/ceph/blob/351e1ac63950164ea5f08a6bfc7c14af586bb208/monitoring/ceph-mixin/prometheus_alerts.yml\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fcharm-ceph-mon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenstack%2Fcharm-ceph-mon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fcharm-ceph-mon/lists"}