--- /dev/null
+= Linux Containers For Developers
+:author: Bill Erickson, Software Development Engineer, King County Library System
+:email: berickxx@gmail.com
+:date: Evergreen Conference 2019
+:duration: 5
+:backend: slidy
+:max-width: 45em
+:deckjs_theme: web-2.0
+
+== LXC & LXD
+
+* Run a separate Linux OS inside a sandbox
+* Conceptually similar to Docker
+* Supports snapshots, cloning, standard VM stuff
+* https://blog.ubuntu.com/2016/03/22/lxd-2-0-your-first-lxd-container
+
+== Advantages over VMs
+
+* Requires fewer resources -- no virtualization layer.
+* Works fine with network aliases + lxd routing (or iptables)
+** Network bridging is not required to act as a server.
+* Very fast boot times
+* Direct file copy to/from image rootfs
+* You can run Evergreen on a Chromebook!
+
+== Limitations
+
+* Linux only
+* Some commands cannot be run (e.g. sysctl)
+
+== Create a Disk (OPTIONAL)
+
+* Many ways to do this.
+* ZFS and btrfs recommended
+** https://lxd.readthedocs.io/en/latest/storage/
+
+[source,sh]
+--------------------------------------------------------------------------
+lxc storage create pool1 btrfs source=/VM
+--------------------------------------------------------------------------
+
+== Init LXD and Create an Image
+
+[source,sh]
+--------------------------------------------------------------------------
+sudo lxd init # tell it about the storage pool
+sudo lxc launch ubuntu:16.04 eg-dev
+sudo lxc exec eg-dev -- bash
+--------------------------------------------------------------------------
+
+== Route Web Requests
+
+* Add a network alias on the host of (for example) 10.0.0.50
+* Relay requests against the alias address to the image
+
+[source,sh]
+--------------------------------------------------------------------------
+sudo lxc config device add eg-dev eg-dev-port80 proxy \
+ listen=tcp:10.0.0.50:80 connect=tcp:localhost:80
+sudo lxc config device add eg-dev eg-dev-port443 proxy \
+ listen=tcp:10.0.0.50:443 connect=tcp:localhost:443
+--------------------------------------------------------------------------
+
+== Snapshots and Cloning
+
+[source,sh]
+--------------------------------------------------------------------------
+sudo lxc snapshot eg-dev snap0-base # create
+sudo lxc restore eg-dev snap0-base # roll back to snapshot
+sudo lxc copy eg-dev/snap0-base eg-dev-2 # clone from snapshot
+--------------------------------------------------------------------------
+
+