Snap package for Cinder
Go to file
OpenDev Sysadmins 6a1227774d OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:50:43 +00:00
patches Initial Cookiecutter Commit. 2017-07-19 21:05:35 +00:00
snap Fine-tune config and services for cinder 2017-07-19 21:08:02 +00:00
tests Added missing cinder cleanup step to snapstack test. 2017-08-17 20:37:17 +00:00
.gitignore Added snapstack tests. 2017-08-15 16:08:21 +00:00
.gitreview OpenDev Migration Patch 2019-04-19 19:50:43 +00:00
CONTRIBUTING.rst Initial Cookiecutter Commit. 2017-07-19 21:05:35 +00:00
LICENSE Initial Cookiecutter Commit. 2017-07-19 21:05:35 +00:00
README.md Update README snap install command 2017-08-09 17:20:52 -04:00
bindep.txt Initial Cookiecutter Commit. 2017-07-19 21:05:35 +00:00
requirements.txt Initial Cookiecutter Commit. 2017-07-19 21:05:35 +00:00
snapcraft.yaml Update LVM2 tar path 2017-08-10 17:37:24 -04:00
tox.ini Added snapstack tests. 2017-08-15 16:08:21 +00:00

README.md

The cinder snap

This repository contains the source code for the cinder snap.

Cinder provides on demand, self-service access to software defined block storage resources on top of various traditional backend block storage devices.

Installing this snap

The cinder snap can be installed directly from the snap store:

sudo snap install --channel=ocata/edge cinder

The cinder snap is working towards publication across tracks for OpenStack releases. The edge channel for each track will contain the tip of the OpenStack project's master branch, with the beta, candidate and release channels being reserved for released versions. These three channels will be used to drive the CI process for validation of snap updates. This should result in an experience such as:

sudo snap install --channel=ocata/stable cinder
sudo snap install --channel=pike/edge cinder

This snap can make use of the Linux SCSI target user-space daemon running on the host operating system when using the LVM backend. To do this, the tgt package must be installed:

sudo apt install tgt

Configuring cinder

The cinder snap gets its default configuration from the following $SNAP and $SNAP_COMMON locations:

/snap/cinder/current/etc/
└── cinder
    ├── cinder.conf
    └── ...

/var/snap/cinder/common/etc/
├── cinder
│   └── cinder.conf.d
│       └── cinder-snap.conf
├── nginx
│   ├── snap
│   │   ├── nginx.conf
│   │   └── sites-enabled
│   │       └── cinder.conf
└── uwsgi
    └── snap
        └── cinder-api.ini

The cinder applications can be configured in a few ways. The directory structure can be modified to override config as follows:

The cinder snap supports configuration updates via its $SNAP_COMMON writable area. The default cinder configuration can be overridden as follows:

/var/snap/cinder/common/etc/
├── cinder
│   ├── cinder.conf.d
│   │   ├── cinder-snap.conf
│   │   ├── database.conf
│   │   ├── keystone.conf
│   │   ├── lvm.conf
│   │   └── rabbitmq.conf
│   └── cinder.conf
├── nginx
│   ├── snap
│   │   ├── nginx.conf
│   │   └── sites-enabled
│   │       └── cinder.conf
│   ├── nginx.conf
│   ├── sites-enabled
│   │   └── cinder.conf
└── uwsgi
    ├── snap
    │   └── cinder-api.ini
    └── cinder-api.ini

The cinder configuration can be overridden or augmented by writing configuration snippets to files in the cinder.conf.d directory.

Alternatively, cinder configuration can be overridden by adding a full cinder.conf file to the cinder/ directory. If overriding in this way, you'll need to either point this config file at additional config files located in $SNAP, or add those to $SNAP_COMMON as well.

The cinder nginx configuration can be overridden by adding an nginx/nginx.conf and new site config files to the nginx/sites-enabled directory. In this case the nginx/nginx.conf file would include that sites-enabled directory. If nginx/nginx.conf exists, nginx/snap/nginx.conf will no longer be used.

The cinder uwsgi configuration can be overridden similarly by adding a uwsgi/cinder.ini file. If uwsgi/cinder.ini exists, uwsgi/snap/cinder.ini will no longer be used.

Logging cinder

The services for the cinder snap will log to its $SNAP_COMMON writable area: /var/snap/cinder/common/log.

Restarting cinder services

To restart all cinder services:

sudo systemctl restart snap.cinder.*

or an individual service can be restarted by dropping the wildcard and specifying the full service name.

Building the cinder snap

Simply clone this repository and then install and run snapcraft:

git clone https://github.com/openstack/snap-cinder
sudo apt install snapcraft
cd snap-cinder
snapcraft

Support

Please report any bugs related to this snap at: Launchpad.

Alternatively you can find the OpenStack Snap team in #openstack-snaps on Freenode IRC.