[systemd-devel] How to deploy systemd-nspawn containers and use for deployment
lennart at poettering.net
Wed Oct 19 22:41:57 UTC 2016
On Wed, 12.10.16 15:29, Samuel Williams (space.ship.traveller at gmail.com) wrote:
> I've been thinking about how I could use systemd-nspawn containers.
> Ideally, we have a local container which can then be pushed to one or more
> VPS instances.
> An example workflow might look like this:
> - Step 1: On development box, update some software in a container and test.
> It's okay.
> - Step 2: Push the container to several VPSs, some procedure to minimise
> downtime while updating.
> - Step 3: ...
> - Step 4: Profit.
> For step 2, what would be the best practice. Rsync the local container to
> the remote container?
That's one option. Another one is to do "machinectl export-tar foo |
ssh someothermachine machinectl import-tar foo"...
You can also upload a tarball generated like that to some web server and then issue
"machinectl pull-tar" with the URL to download it on the host you want
to run it on.
Another way to generate images for deployment is to use the new
"mkiso" tool, which spits out signatures and shasums too, which make
it easy to place the stuff on a http server that machinectl pull-tar
can make use of...
Lennart Poettering, Red Hat
More information about the systemd-devel