Commit Graph

9 Commits

Author SHA1 Message Date
Michael Schurter
33c015bcc7 Add Cleanup method to Driver interface
Cleanup can be used for cleaning up resources created by drivers to run
a task. Initially the Docker driver is the only user (to remove
downloaded images).
2017-01-11 17:23:33 -08:00
Michael Schurter
de7351b959 Move chroot building into TaskRunner
* Refactor AllocDir to have a TaskDir struct per task.
* Drivers expose filesystem isolation preference
* Fix lxc mounting of `secrets/`
2017-01-05 16:31:49 -08:00
Michael Schurter
ee17940dfe Add Driver.Prestart method
The Driver.Prestart method currently does very little but lays the
foundation for where lifecycle plugins can interleave execution _after_
task environment setup but _before_ the task starts.

Currently Prestart does two things:

* Any driver specific task environment building
* Download Docker images

This change also attaches a TaskEvent emitter to Drivers, so they can
emit events during task initialization.
2016-12-02 11:03:48 -08:00
Michael Schurter
8c31bef917 Forgot to flip a bit 2016-11-01 14:35:22 -07:00
Michael Schurter
ba0983c35a Add LXC docs and enable by default for lxc builds 2016-11-01 10:18:16 -07:00
Michael Schurter
aeb410c07c Put lxc support behind a flag
Since lxc support requires linking to a C lib at compile and runtime
I'm putting it behind a build flag to avoid forcing all nomad users to
install liblxc (lxc-dev for development).
2016-10-26 14:55:54 -07:00
Michael Schurter
1566b979e3 Disable lxc by default 2016-10-13 13:22:12 -07:00
Michael Schurter
487a4980e0 Mount secret dir 2016-10-13 12:45:33 -07:00
Diptanu Choudhury
7300ea8463 Implemented an LXC Driver 2016-10-12 17:18:58 -07:00