Generic Snap questions
Andrew Mason
andrew at nocturnal.net.au
Fri Feb 3 12:06:04 UTC 2017
Hi All,
I have been listening to Alan Pope plugging snaps for a while now on the LUP
podcast and decided to try it out by installing a popular snap on a remote VM.
I ran into a few problems which had I installed this with a debian package or
from source I would know how to solve; however these being snaps I wasn't
immediately confident in what I could or shouldn't do.
Rather than trying to work through my particular problem I was hoping to get a
better sense (as a developer / sysadmin) as to how I should build my own snaps
and administer snaps others have created. I haven't found the answers to my
questions in the FAQ but apologies if I have missed some documentation which
answers these.
1. This particular snap was a collection of used a combination of Apache httpd
+ MySQL and a few other utilities.
I presume that if I wanted to use something like nginx instead of apache and
MariaDB instead of mysql I would need to rebuild the snap my self ? Is the
source / build instructions (.yml file?) available in some form that I can
access?
2. This snap in particular seemed to be configured to listen on the IP address
of machine it was running on. As this was deployed in Azure the VM is deployed
with a private 10.x IP address and sits behind a foobarqux.cloudapp.net so it
was not possible to visit the IP address directly; I ended up using an SSH
tunnel to address this, but conceptually if I wanted to change a configuration
element like this, what is the correct way to do so ?
3. Say a bunch of people want their own instance of this snappified service.
How are / should additional instances handled from an installation perspective
?
Also how would multiple instances be configured with regards to TCP port
access ?
4. There was some attempt by the package to install a Let's encrypt
certificate however that failed due (possibly) to the aforementioned IP
address issue..
Is there any provision to be able to execute certain parts of the post-install
/ pre-install scripts like there is with a debian package ? i.e -reconfigure
Assuming I am able to get a certificate manually...e.g I have an EV cert for
the domain; how would I go about installing the Certificate into my new snap.
I understand they are mounted images but from my understanding these are read
only. Do I just mount -o remount,rw ?
5. Prior to the installation of the aforementioned snap, I used UFW to add a
firewall restricting access to all but the SSH port.
After installing this snap it did not seem to automatically open a port. Is
this the correct behaviour ? If I am building a snap of my own application how
would I go about informing the user that this additional task is necessary ?
Can I prompt them to perform this action ?
If you have made it this far I really appreciate that you have taken the time
to consider the questions and any answers would be greatly valued.
Kind regards
Andrew
More information about the Snapcraft
mailing list