Recommended ways of installing configuration files in SNAP_USER_DATA?

Jacek Nykis jacek.nykis at canonical.com
Tue Dec 13 10:13:08 UTC 2016


On 13/12/16 09:42, Stuart Bishop wrote:
>> I might be one step close to getting this to work but I was wondering what
>> is the common/recommended practice to do what I’m trying to achieve here?
> 
> 
> I used the same approach you did, and got it building locally and working (
> https://code.launchpad.net/~stub/+git/pgbouncer-snap/+ref/master , please
> steal freely if there is anything useful there ). I haven't published it
> anywhere because I thought there was a reasonable chance you would be
> looking at it :) Also, I'm holding out hope that we can run non-root
> daemons sooner rather than later since pgbouncer is another app that
> refuses to run as root. I wasn't looking forward to documenting how to
> manually install systemd service definitions :)

I also had similar problem and had to write small wrapper. If you want
one more example to look at you can find source code here:

https://git.launchpad.net/prometheus-pushgateway-snap/tree/

There is an enhancement request in launchpad where we asked for a
standard way to deploy initial config files without need for every snap
to ship with custom wrappers:

https://bugs.launchpad.net/snappy/+bug/1611287

If that would help you you can mark the bug as affecting you to let
developers know.

Regards,
Jacek Nykis


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 299 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20161213/92a6348e/attachment.sig>


More information about the Snapcraft mailing list