f011198f5b
nova-placement-api is a bit tricky. The wsgi application doesn't accept CLI arguments, so we can't pass --config-file, --config-dir, or --log-file via uwsgi's pyargv. Additionally, nova-placement-api doesn't pass the [keystone_authtoken] from the config file found in OS_PLACEMENT_CONFIG_DIR to keystonemiddleware. We continue to use the OS_PLACEMENT_CONFIG_DIR environment variable to point at the default nova.conf in $SNAP/etc/nova.conf. This default nova.conf includes logdir=$SNAP_COMMON/log/, enabling nova-placement-api.log to be written to the correct directory. Passing [keystone_authtoken] to keystonemiddleware is fixed in oslo.config. The prior commit titled "Patch (_COMMON) dirs into oslo.config defaults" includes a patch for this. keystonemiddleware gets the [keystone_authtoken] config via oslo.config's find_config_files() and find_config_dirs(), which are patched to include the $SNAP and $SNAP_COMMON config directories. Change-Id: I02e2a5d9df91eb8cbf36beb474809bc1e80fe80b Closes-Bug: 1696830 |
||
---|---|---|
patches | ||
snap | ||
.gitignore | ||
.gitreview | ||
CONTRIBUTING.rst | ||
LICENSE | ||
README.md | ||
bindep.txt | ||
requirements.txt | ||
snapcraft.yaml | ||
tox.ini |
README.md
Nova Snap
This repository contains the source code of the snap for the OpenStack Compute service, Nova.
This snap specifically provides the compute controller daemons as part of a snap based OpenStack deployment.
Installing this snap
The nova snap can be installed directly from the snap store:
sudo snap install --edge --classic nova
The nova 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 or stable branch, with the beta, candidate, and stable channels being reserved for released versions. The same version will be published progressively to beta, then candidate, and then stable once CI validation completes for the channel. This should result in an experience such as:
sudo snap install --classic --channel=ocata/stable nova
sudo snap install --classic --channel=pike/edge nova
Configuring nova
The nova snap gets its default configuration from the following $SNAP and $SNAP_COMMON locations:
/snap/nova/current/etc/
└── nova
├── nova.conf
└── ...
/var/snap/nova/common/etc/
├── nova
│ └── nova.conf.d
│ └── nova-snap.conf
├── nginx
│ ├── snap
│ │ ├── nginx.conf
│ │ └── sites-enabled
│ │ └── nova.conf
└── uwsgi
└── snap
└── nova-placement-api.ini
The nova snap supports configuration updates via its $SNAP_COMMON writable area. The default nova configuration can be overridden as follows:
/var/snap/nova/common/etc/
├── nova
│ ├── nova.conf.d
│ │ ├── nova-snap.conf
│ │ ├── database.conf
│ │ └── rabbitmq.conf
│ └── nova.conf
├── nginx
│ ├── snap
│ │ ├── nginx.conf
│ │ └── sites-enabled
│ │ └── nova.conf
│ ├── nginx.conf
│ ├── sites-enabled
│ │ └── nova.conf
└── uwsgi
├── snap
│ └── nova-placement-api.ini
└── nova-placement-api.ini
The nova configuration can be overridden or augmented by writing configuration snippets to files in the nova.conf.d directory.
Alternatively, nova configuration can be overridden by adding a full nova.conf file to the nova/ directory. If overriding in this way, you'll need to update your config to point at additional config files located in $SNAP, or add those to $SNAP_COMMON as well.
The nova 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 nova uwsgi configuration can be overridden similarly by adding a uwsgi/nova-placement-api.ini file. If uwsgi/nova-placement-api.ini exists, uwsgi/snap/nova-placement-api.ini will no longer be used.
Logging nova
The services for the nova snap will log to its $SNAP_COMMON writable area: /var/snap/nova/common/log.
Managing nova
The nova snap will drop privileges to run daemons and commands under a regular user named snap-nova. Additionally, permissions and ownership of files and directories in /var/snap/nova/common/ are modified to restrict access from other users.
The nova snap has alias support that enables use of the well-known nova-manage command. To enable the alias, run the following prior to using the command:
sudo snap alias nova.manage nova-manage
Restarting nova services
To restart all nova services:
sudo systemctl restart snap.nova.*
or an individual service can be restarted by dropping the wildcard and specifying the full service name.
Building the nova snap
Simply clone this repository and then install and run snapcraft:
git clone https://github.com/openstack/snap-nova
sudo apt install snapcraft
cd snap-nova
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.