Check configdrive size before writing to partition

Avoids writing a configdrive out to disk that is larger than
the intended partition.

Change-Id: I4e067ccb23ba528d96e4faad39219f67b4178e82
Use systemd-nspawn instead of docker for image

Using systemd-nspawn gives us more flexibility in what hardware the
agent can see. With this setup, the network is not virtualized, and the
/dev inside the container looks nearly identical to the one in the host.

Also added RestartSec=30s to the unit file because without this, systemd
will respawn the agent every 100ms if it dies (say, because DHCP hasn't
completed yet). Since it retries a max of 5 times per 60s, unless the restart value is
set higher it will be marked 'failed' forever and not retry. Adding this prevents that.

Change-Id: Ic64ab4b0824595683e5428464512594dd90eed83
Merge "Check configdrive size before writing to partition"
Make docker image smaller by using Precise

Changing to precise means we don't have both python 3 and 2 installed in
the image, only python 2. Also do some cleanup at the end of the build
since we are exporting the final filesystem, and don't care about the
size of the intermediate layers.

Change-Id: Iac61d4a882aee19214de5dd74bbbaacc8b0f3414
Merge "Make docker image smaller by using Precise"
Fix broken path to shell scripts

This was broken when extensions/ subdirectory was created.
Also add test to ensure this doesn't break again.

Change-Id: I12524a927397c3d2a90d00198873e2e1b4786171
Remove Heartbeat-Before check from heartbeat

Ironic does not send this header - agent should not look for it.

Change-Id: I7b8857fa5f744bc03ee0907424a95b9305811c51
(cherry picked from commit c5e8670b230d43e4d8216dd9116ba2b66efea5d3)