{"id":20111487,"url":"https://github.com/openstack/charm-glance","last_synced_at":"2025-08-02T09:15:03.242Z","repository":{"id":66174605,"uuid":"52858742","full_name":"openstack/charm-glance","owner":"openstack","description":"Juju Charm - Glance. Mirror of code maintained at opendev.org.","archived":false,"fork":false,"pushed_at":"2024-06-21T23:29:32.000Z","size":2880,"stargazers_count":13,"open_issues_count":0,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-06-22T13:56:23.837Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opendev.org/openstack/charm-glance","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:54:25.000Z","updated_at":"2024-06-22T13:56:24.148Z","dependencies_parsed_at":"2023-02-20T18:00:22.953Z","dependency_job_id":"fb4fa6f5-19b4-4caf-aec4-f45acefac2a4","html_url":"https://github.com/openstack/charm-glance","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-glance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-glance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-glance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-glance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openstack","download_url":"https://codeload.github.com/openstack/charm-glance/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:18.401Z","updated_at":"2024-11-13T18:16:19.006Z","avatar_url":"https://github.com/openstack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nThe glance charm deploys [Glance][upstream-glance], the core OpenStack service\nthat acts as the central repository for virtual machine (VM) images. The charm\nworks alongside other Juju-deployed OpenStack services.\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#### `openstack-origin`\n\nThe `openstack-origin` option states the software sources. A common value is an\nOpenStack UCA release (e.g. 'cloud:bionic-ussuri' or 'cloud:focal-victoria').\nSee [Ubuntu Cloud Archive][wiki-uca]. The underlying host's existing apt\nsources will be used if this option is not specified (this behaviour can be\nexplicitly chosen by using the value of 'distro').\n\n#### `pool-type`\n\nThe `pool-type` option dictates the Ceph storage pool type. See sections 'Ceph\npool type' and 'Ceph backed storage' for more information.\n\n## Deployment\n\nThis section includes five different deployment scenarios (with their\nrespective backends). Each scenario requires these applications to be present:\nkeystone, nova-cloud-controller, nova-compute, and a cloud database.\n\n\u003e **Note**: The database application is determined by the series. Prior to focal\n  [percona-cluster][percona-cluster-charm] is used, otherwise it is\n  [mysql-innodb-cluster][mysql-innodb-cluster-charm]. In the example\n  deployments below mysql-innodb-cluster has been chosen.\n\n### Ceph-backed storage\n\nCeph is the recommended storage backend solution for Glance. The steps below\nassume a pre-existing Ceph cluster (see the [ceph-mon][ceph-mon-charm] and\n[ceph-osd][ceph-osd-charm] charms).\n\nHere, Glance is deployed to a new container on machine '1' and related to the\nCeph cluster via the ceph-mon charm:\n\n    juju deploy --to lxd:1 glance\n    juju add-relation glance:ceph ceph-mon:client\n\nProceed with a group of commands common to all four scenarios:\n\n    juju add-relation glance:identity-service keystone:identity-service\n    juju add-relation glance:image-service nova-cloud-controller:image-service\n    juju add-relation glance:image-service nova-compute:image-service\n\n    juju deploy mysql-router glance-mysql-router\n    juju add-relation glance-mysql-router:db-router mysql-innodb-cluster:db-router\n    juju add-relation glance-mysql-router:shared-db glance:shared-db\n\nThis configuration can be used to support Glance in HA/scale-out deployments.\n\n\u003e **Note**: In this scenario Glance acts as a Ceph client, which requires\n  L3 network connectivity to Ceph monitors and OSDs. For MAAS-based deployments\n  this can be addressed with network spaces (see section 'Network spaces'\n  below).\n\n### Object storage-backed storage\n\nGlance can use Object storage as its storage backend. OpenStack Swift, Ceph\nRADOS Gateway, and external S3 are supported, and all resulting configurations\ncan be used to support Glance in HA/scale-out deployments.\n\n#### Swift\n\nThe steps below assume a pre-existing Swift deployment (see the\n[swift-proxy][swift-proxy-charm] and [swift-storage][swift-storage-charm]\ncharms).\n\nHere, Glance is deployed to a new container on machine '1' and related to Swift\nvia the swift-proxy charm:\n\n    juju deploy --to lxd:1 glance\n    juju add-relation glance:object-store swift-proxy:object-store\n\nProceed with the common group of commands from the Ceph scenario.\n\n#### Ceph RADOS Gateway\n\nThe steps below assume a pre-existing Ceph RADOS Gateway deployment (see the\n[ceph-radosgw][ceph-radosgw-charm] charm).\n\nHere, Glance is deployed to a new container on machine '1' and related to the\nceph-radosgw application:\n\n    juju deploy --to lxd:1 glance\n    juju add-relation glance:object-store ceph-radosgw:object-store\n\nProceed with the common group of commands from the Ceph scenario.\n\n#### External S3\n\nThe step below assumes an external and pre-existing S3 compatible server\navailable.\n\nS3 server information can be passed via charm config options:\n\n    juju config glance \\\n        s3-store-host='http://my-object-storage.example.com:8080' \\\n        s3-store-access-key='ACCESS_KEY' \\\n        s3-store-secret-key='SECRET_KEY' \\\n        s3-store-bucket='BUCKET_NAME'\n\n\u003e **Note**: The S3 backend is supported starting with OpenStack Ussuri.\n  Enabling S3 backend overrides `expose-image-locations` as false not to\n  expose S3 credentials through Glance API.\n\n### Cinder LVM-backed storage\n\nGlance can also use Cinder LVM-backed storage as its storage backend, the\nconfiguration option cinder-volume-types can be used to specify the volume\ntypes in Cinder. The steps below assume a pre-existing Cinder LVM-backed\ndeployment (see the [cinder][cinder-charm] and [cinder-lvm][cinder-lvm-charm]\ncharms).\n\nHere, Glance is deployed to machine '1' and related to Cinder:\n\n    juju deploy --to 1 glance\n    juju add-relation cinder:image-service glance:image-service\n    juju add-relation cinder:cinder-volume-service glance:cinder-volume-service\n\nProceed with the common group of commands from the Ceph scenario.\n\n\u003e **Note**: To support Cinder LVM-backed storage, Glance unit should be deployed\n  on a baremetal machine or a virtual machine.\n\n### Local storage\n\nGlance can simply use the storage available on the application unit's machine\nto store image data. Here, Glance is deployed to a new container on machine\n'1':\n\n    juju deploy --to lxd:1 glance\n\nProceed with the common group of commands from the Ceph scenario.\n\n## Multiple backends\n\nMultiple storage backend support allows for one backend of each type:\n\n* Ceph\n* Swift (includes Ceph RADOS Gateway)\n* S3\n* Cinder\n* local\n\nWith multiple backends configured, the cloud operator can specify, at image\nupload time, which backend will be used to store the image. This is done by\nusing the `--store` option to the `glance` CLI client:\n\n    glance image-create --store \u003cbackend-name\u003e ...\n\nThe default order of precedence is given by the following backend names:\n'ceph', 'swift', 's3', 'cinder', and then 'local'.\n\n\u003e **Important**: The backend name of 'swift' denotes both object storage\n  solutions: Swift and Ceph RADOS Gateway. Only one of these solutions can\n  therefore be used.\n\n## Actions\n\nThis section covers 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 --schema glance`. If the charm is\nnot deployed then see file `actions.yaml`.\n\n* `openstack-upgrade`\n* `pause`\n* `resume`\n* `security-checklist`\n\n## Ceph pool type\n\nCeph storage pools can be configured to ensure data resiliency either through\nreplication or by erasure coding. This charm supports both types via the\n`pool-type` configuration option, which can take on the values of 'replicated'\nand 'erasure-coded'. The default value is 'replicated'.\n\nFor this charm, the pool type will be associated with Glance images.\n\n\u003e **Note**: Erasure-coded pools are supported starting with Ceph Luminous.\n\n### Replicated pools\n\nReplicated pools use a simple replication strategy in which each written object\nis copied, in full, to multiple OSDs within the cluster.\n\nThe `ceph-osd-replication-count` option sets the replica count for any object\nstored within the 'glance' rbd pool. Increasing this value increases data\nresilience at the cost of consuming more real storage in the Ceph cluster. The\ndefault value is '3'.\n\n\u003e **Important**: The `ceph-osd-replication-count` option must be set prior to\n  adding the relation to the ceph-mon (or ceph-proxy) application. Otherwise,\n  the pool's configuration will need to be set by interfacing with the cluster\n  directly.\n\n### Erasure coded pools\n\nErasure coded pools use a technique that allows for the same resiliency as\nreplicated pools, yet reduces the amount of space required. Written data is\nsplit into data chunks and error correction chunks, which are both distributed\nthroughout the cluster.\n\n\u003e **Note**: Erasure coded pools require more memory and CPU cycles than\n  replicated pools do.\n\nWhen using erasure coded pools for Glance images two pools will be created: a\nreplicated pool (for storing RBD metadata) and an erasure coded pool (for\nstoring the data written into the RBD). The `ceph-osd-replication-count`\nconfiguration option only applies to the metadata (replicated) pool.\n\nErasure coded pools can be configured via options whose names begin with the\n`ec-` prefix.\n\n\u003e **Important**: It is strongly recommended to tailor the `ec-profile-k` and\n  `ec-profile-m` options to the needs of the given environment. These latter\n  options have default values of '1' and '2' respectively, which result in the\n  same space requirements as those of a replicated pool.\n\nSee [Ceph Erasure Coding][cdg-ceph-erasure-coding] in the [OpenStack Charms\nDeployment Guide][cdg] for more information.\n\n## Ceph BlueStore compression\n\nThis charm supports [BlueStore inline compression][ceph-bluestore-compression]\nfor its associated Ceph storage pool(s). The feature is enabled by assigning a\ncompression mode via the `bluestore-compression-mode` configuration option. The\ndefault behaviour is to disable compression.\n\nThe efficiency of compression depends heavily on what type of data is stored\nin the pool and the charm provides a set of configuration options to fine tune\nthe compression behaviour.\n\n\u003e **Note**: BlueStore compression is supported starting with Ceph Mimic.\n\n## High availability\n\nWhen more than one unit is deployed with the [hacluster][hacluster-charm]\napplication the charm will bring up an HA active/active cluster.\n\nThere are two mutually exclusive high availability options: using virtual IP(s)\nor DNS. In both cases the hacluster subordinate charm is used to provide the\nCorosync and Pacemaker backend HA functionality.\n\nSee [OpenStack high availability][cdg-ha-apps] in the [OpenStack Charms\nDeployment Guide][cdg] for details.\n\n\u003e **Important**: Glance in an HA configuration must be backed by either Ceph or\n  Swift.\n\n## Glance metering\n\nGlance metering can be achieved with Ceilometer. The\n[rabbitmq-server][rabbitmq-server-charm] and\n[ceilometer-agent][ceilometer-agent-charm] applications are required to be\npresent.\n\nAssuming Glance is deployed, add two relations:\n\n    juju add-relation glance:amqp rabbitmq-server:amqp\n    juju add-relation glance:amqp ceilometer-agent:amqp\n    juju add-relation glance:juju-info ceilometer-agent:container\n\n## Network spaces\n\nThis charm supports the use of Juju [network spaces][juju-docs-spaces]. This\nfeature optionally allows specific types of the application's network traffic\nto be bound to subnets that the underlying hardware is connected to.\n\n\u003e **Note**: Spaces must be configured in the backing cloud prior to deployment.\n\nAPI endpoints can be bound to distinct network spaces supporting the network\nseparation of public, internal and admin endpoints.\n\nGlance acts as a Ceph client and needs IP connectivity to Ceph monitors and\nOSDs. Binding the ceph endpoint to a space can solve this problem in case\nmonitors and OSDs are located on a single L2 broadcast domain (if they are not,\nstatic or dynamic routes need to be used in addition to spaces).\n\nAccess to the underlying MySQL instance can also be bound to a specific space\nusing the shared-db relation.\n\nTo use this feature, use the --bind option when deploying the charm:\n\n    juju deploy glance --bind \\\n       \"public=public-space \\\n        internal=internal-space \\\n        admin=admin-space \\\n        shared-db=internal-space \\\n        ceph=ceph-access-space\"\n\nAlternatively, these can also be provided as part of a juju native bundle\nconfiguration:\n\n```yaml\n    glance:\n      charm: cs:xenial/glance\n      num_units: 1\n      bindings:\n        public: public-space\n        admin: admin-space\n        internal: internal-space\n        shared-db: internal-space\n        ceph: ceph-access-space\n```\n\n\u003e **Note**: Existing glance units configured with the `os-admin-network`,\n  `os-internal-network`, or `os-public-network` options will continue to honour\n  them. Furthermore, these options override any space bindings, if set.\n\n## Policy overrides\n\nPolicy overrides is an advanced feature that allows an operator to override the\ndefault policy of an OpenStack service. The policies that the service supports,\nthe defaults it implements in its code, and the defaults that a charm may\ninclude should all be clearly understood before proceeding.\n\n\u003e **Caution**: It is possible to break the system (for tenants and other\n  services) if policies are incorrectly applied to the service.\n\nPolicy statements are placed in a YAML file. This file (or files) is then (ZIP)\ncompressed into a single file and used as an application resource. The override\nis then enabled via a Boolean charm option.\n\nHere are the essential commands (filenames are arbitrary):\n\n    zip overrides.zip override-file.yaml\n    juju attach-resource glance policyd-override=overrides.zip\n    juju config glance use-policyd-override=true\n\nSee [Policy overrides][cdg-appendix-n] in the [OpenStack Charms Deployment\nGuide][cdg] for a thorough treatment of this feature.\n\n# Documentation\n\nThe OpenStack Charms project maintains two documentation guides:\n\n* [OpenStack Charm Guide][cg]: for project information, including development\n  and support notes\n* [OpenStack Charms Deployment Guide][cdg]: for charm usage information\n\n# Bugs\n\nPlease report bugs on [Launchpad][lp-bugs-charm-glance].\n\n\u003c!-- LINKS --\u003e\n\n[cg]: https://docs.openstack.org/charm-guide\n[cdg]: https://docs.openstack.org/project-deploy-guide/charm-deployment-guide\n[cdg-appendix-n]: https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/app-policy-overrides.html\n[lp-bugs-charm-glance]: https://bugs.launchpad.net/charm-glance/+filebug\n[hacluster-charm]: https://jaas.ai/hacluster\n[ceph-mon-charm]: https://jaas.ai/ceph-mon\n[ceph-osd-charm]: https://jaas.ai/ceph-osd\n[ceph-radosgw-charm]: https://jaas.ai/ceph-radosgw\n[swift-proxy-charm]: https://jaas.ai/swift-proxy\n[swift-storage-charm]: https://jaas.ai/swift-storage\n[percona-cluster-charm]: https://jaas.ai/percona-cluster\n[mysql-innodb-cluster-charm]: https://jaas.ai/mysql-innodb-cluster\n[rabbitmq-server-charm]: https://jaas.ai/rabbitmq-server\n[ceilometer-agent-charm]: https://jaas.ai/ceilometer-agent\n[cdg-ha-apps]: https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/app-ha.html#ha-applications\n[juju-docs-spaces]: https://juju.is/docs/spaces\n[wiki-uca]: https://wiki.ubuntu.com/OpenStack/CloudArchive\n[juju-docs-config-apps]: https://juju.is/docs/configuring-applications\n[cdg-ceph-erasure-coding]: https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/app-erasure-coding.html\n[ceph-bluestore-compression]: https://docs.ceph.com/en/latest/rados/configuration/bluestore-config-ref/#inline-compression\n[upstream-glance]: https://docs.openstack.org/glance/latest/\n[juju-docs-actions]: https://jaas.ai/docs/actions\n[cinder-charm]: https://jaas.ai/cinder\n[cinder-lvm-charm]: https://jaas.ai/cinder-lvm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fcharm-glance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenstack%2Fcharm-glance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fcharm-glance/lists"}