You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build versioned v2plugin from versioned binaries (#1040)
* Build versioned v2plugin from versioned binaries
This enables build and docker image caching on a build machine for the
v2plugin.
The new target demo-v2plugin-from-local does everything it can locally
before spawning the VM, failing much faster on any PR issues,
which is good for CI turnaround. It runs a little faster than
demo-v2plugin after base image layers are cached.
v2plugin_rootfs (called by host-pluginfs-create) builds a docker
container runtime with a versioned archive of netplugin binaries, then
extracts the entire filesystem from the container, which is now left as
a versioned tarball.
The versioned archive of netplugin binaries used for v2plugin can now be
created in two ways:
* run-build (dependency for demo-v2plugin) will compile then version an
archive with built assets (runs only on the VM)
* tar target (locally or in VM)
host-pluginfs-create can be run in the VM or locally
The plugin rootfs is left as a tarball because:
* docker in a VM had internal issues when creating the plugin when the
rootfs was unarchived on the host and exposed though a virtualbox
mount, at least on OS X
* the rootfs is versioned
This adjusted host-plugin-release and demo-v2plugin both use a new
target 'host-pluginfs-unpack'
Drive-by:
* Fix config.template for the CONTIV_V2PLUGIN_NAME replacement
* gtar support for OS X
* use cp -a for maintaining owner
Signed-off-by: Chris Plock <[email protected]>
* review feedback
* comments, revert a var rename for smaller diff
* more dockerignore
* comments, and don't remove rootfs
* review testing feedback binaries-from-container and host-plugin-update
* simplify usage for v2plugin-update
* feedback for v2plugin docker version variable
# complete workflow to create rootfs, create/enable plugin and start swarm-mode
306
-
demo-v2plugin:
307
-
CONTIV_V2PLUGIN_NAME="$${CONTIV_V2PLUGIN_NAME:-contiv/v2plugin:0.1}" CONTIV_DOCKER_VERSION="$${CONTIV_DOCKER_VERSION:-1.13.1}" CONTIV_DOCKER_SWARM="$${CONTIV_DOCKER_SWARM:-swarm_mode}" make ssh-build
308
-
vagrant ssh netplugin-node1 -c 'bash -lc "source /etc/profile.d/envvar.sh && cd /opt/gopath/src/github.com/contiv/netplugin && make host-pluginfs-create host-plugin-restart host-swarm-restart"'
0 commit comments