Switch to classic confinement
Classic confinement allows the snap to behave like a traditionally packaged application with full access to the system, and enables the use of traditional directories such as /etc and /var/log. We will continue to store all of the snap's files in $SNAP* directories. This enables the snap to cleanup after itself if it is removed. However, traditional directory locations are symlinked to their corresponding $SNAP* directories. For example, neutron configs are installed in $SNAP_COMMON/etc/neutron which has a symlink at /etc/neutron. The neutron apps then use the traditional directories when running commands and services. Change-Id: I392ba95cfaad1509b58beb2f82ba865b73971d5a
This commit is contained in:
parent
33e106e3f1
commit
fd1265eb20
@ -1 +1,2 @@
|
||||
snapcraft [platform:dpkg]
|
||||
snapd [platform:dpkg]
|
||||
|
@ -1,31 +1,34 @@
|
||||
setup:
|
||||
dirs:
|
||||
- "{snap_common}/etc/neutron.conf.d"
|
||||
- "{snap_common}/etc/neutron"
|
||||
- "{snap_common}/etc/neutron/conf.d"
|
||||
- "{snap_common}/etc/neutron/plugins/ml2"
|
||||
- "{snap_common}/etc/neutron/policy.d"
|
||||
- "{snap_common}/etc/neutron/rootwrap.d"
|
||||
- "{snap_common}/log"
|
||||
- "{snap_common}/lock"
|
||||
- "{snap_common}/lib/neutron"
|
||||
- "{snap_common}/log/neutron"
|
||||
- "{snap_common}/lock/neutron"
|
||||
symlinks:
|
||||
"{snap_common}/etc/neutron": /etc/neutron
|
||||
"{snap_common}/lib/neutron": /var/lib/neutron
|
||||
"{snap_common}/log/neutron": /var/log/neutron
|
||||
"{snap_common}/lock/neutron": /var/lock/neutron
|
||||
templates:
|
||||
"neutron-snap.conf.j2": "{snap_common}/etc/neutron.conf.d/neutron-snap.conf"
|
||||
neutron-snap.conf.j2: "{snap_common}/etc/neutron/conf.d/neutron-snap.conf"
|
||||
copyfiles:
|
||||
"{snap}/etc/neutron": "{snap_common}/etc/neutron"
|
||||
entry_points:
|
||||
neutron-db-manage:
|
||||
binary: neutron-db-manage
|
||||
config-files:
|
||||
- "{snap}/etc/neutron/neutron.conf"
|
||||
- "{snap_common}/etc/neutron/neutron.conf"
|
||||
- "{snap}/etc/neutron/plugins/ml2/ml2_conf.ini"
|
||||
- "{snap_common}/etc/neutron/plugins/ml2/ml2_conf.ini"
|
||||
- "/etc/neutron/neutron.conf"
|
||||
- "/etc/neutron/plugins/ml2/ml2_conf.ini"
|
||||
config-dirs:
|
||||
- "{snap_common}/etc/neutron.conf.d"
|
||||
- "/etc/neutron/conf.d"
|
||||
neutron-server:
|
||||
binary: neutron-server
|
||||
config-files:
|
||||
- "{snap}/etc/neutron/neutron.conf"
|
||||
- "{snap_common}/etc/neutron/neutron.conf"
|
||||
- "{snap}/etc/neutron/plugins/ml2/ml2_conf.ini"
|
||||
- "{snap_common}/etc/neutron/plugins/ml2/ml2_conf.ini"
|
||||
- "/etc/neutron/neutron.conf"
|
||||
- "/etc/neutron/plugins/ml2/ml2_conf.ini"
|
||||
config-dirs:
|
||||
- "{snap_common}/etc/neutron.conf.d"
|
||||
log-file: "{snap_common}/log/neutron-server.log"
|
||||
- "/etc/neutron/conf.d"
|
||||
log-file: "/var/log/neutron/neutron-server.log"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[DEFAULT]
|
||||
# Set state path to writable directory
|
||||
state_path = {{ snap_common }}
|
||||
state_path = /var/lib/neutron
|
||||
|
||||
[oslo_concurrency]
|
||||
# Oslo Concurrency lock path
|
||||
lock_path = {{ snap_common }}/lock
|
||||
lock_path = /var/lock/neutron
|
||||
|
@ -2,20 +2,18 @@ name: neutron
|
||||
version: ocata
|
||||
summary: OpenStack Network Service (neutron)
|
||||
description: OpenStack Network Service (neutron)
|
||||
confinement: strict
|
||||
confinement: classic
|
||||
grade: devel
|
||||
|
||||
environment:
|
||||
PATH: $PATH:$SNAP/bin
|
||||
|
||||
apps:
|
||||
api:
|
||||
command: snap-openstack neutron-server
|
||||
daemon: simple
|
||||
plugs:
|
||||
- network
|
||||
- network-bind
|
||||
manage:
|
||||
command: snap-openstack neutron-db-manage
|
||||
plugs:
|
||||
- network
|
||||
|
||||
parts:
|
||||
neutron:
|
||||
@ -25,21 +23,19 @@ parts:
|
||||
python-packages:
|
||||
- pymysql
|
||||
- python-memcached
|
||||
- git+https://github.com/openstack-snaps/snap.openstack#egg=snap.openstack
|
||||
- git+https://github.com/openstack/snap.openstack#egg=snap.openstack
|
||||
constraints: https://raw.githubusercontent.com/openstack/requirements/master/upper-constraints.txt
|
||||
build-packages:
|
||||
- gcc
|
||||
- libffi-dev
|
||||
- libssl-dev
|
||||
- pkg-config
|
||||
templates:
|
||||
after:
|
||||
- neutron
|
||||
after: [neutron]
|
||||
plugin: dump
|
||||
source: snap
|
||||
# TODO: replace below with scriplets once implemented in snapcraft
|
||||
config:
|
||||
after:
|
||||
- neutron
|
||||
after: [neutron]
|
||||
plugin: dump
|
||||
source: http://tarballs.openstack.org/neutron/neutron-master.tar.gz
|
||||
organize:
|
||||
|
Loading…
x
Reference in New Issue
Block a user