diff --git a/snap/hooks/install b/snap/hooks/install index 91a3633f..0928b5be 100755 --- a/snap/hooks/install +++ b/snap/hooks/install @@ -3,3 +3,6 @@ set -uex conf="${SNAP_DATA}/conf" mkdir -p -m 0755 "${conf}" cp "${SNAP}/share/metadata.yaml" "${conf}" + +# TODO: add a symlink to etc/ceph +ln -s $conf /etc/ceph \ No newline at end of file diff --git a/snap/hooks/remove b/snap/hooks/remove new file mode 100644 index 00000000..fe6f14cb --- /dev/null +++ b/snap/hooks/remove @@ -0,0 +1,5 @@ +#!/bin/sh +set -uex +conf="${SNAP_DATA}/conf" +# TODO: remove the symlink to etc/ceph +rm $conf \ No newline at end of file diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 816897a1..da58b597 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -16,6 +16,10 @@ plugs: modules: - name: rbd load: on-boot + etc-ceph: + interface: system-files + read: /etc/ceph + write: /etc/ceph slots: ceph-conf: @@ -55,6 +59,7 @@ apps: - network - network-bind - microceph-support + - etc-ceph slots: - microceph mds: