Remote per project containers


#1

LXD containers that don’t live on the same host currently can’t be used with snapcraft’s new containerized mode. The project folder is mounted using a LXC device which only deals with folders that exist on the server.

To solve this, we need to use sshfs to make the project folder available via an SSH connection. Slave mode can be used to reverse mount the folder into the container - that’s what we need since we assume that containers can be discarded at any time and shouldn’t store any important data. This way the client running snapcraft only needs to spawn an sftp-server as a user, with no need for sshd. We can easily connect to the container by pushing a generated key.


Per project containers
In progress: snapcraft 2.30
Week 21 of 2017 in snapcraft
Where to get openssh-sftp-server from
Week 37 of 2017 in snapcraft
Done: snapcraft 2.31
Where to get openssh-sftp-server from
#2

The branch has finally landed, this was not an easy beast to tame :smiley:

Note: the final implementation doesn’t use SSH anymore but only relies on the LXD connection so that containers don’t need to be in the same network as snapcraft.