@@ -19,7 +19,7 @@ TAR_EXT := tar.bz2
19
19
export NETPLUGIN_CONTAINER_TAG := $(shell ./scripts/getGitVersion.sh)
20
20
TAR_FILENAME := $(NAME ) -$(VERSION ) .$(TAR_EXT )
21
21
TAR_LOC := .
22
- export NETPLUGIN_TAR_FILE := $(TAR_LOC ) /$(TAR_FILENAME )
22
+ export TAR_FILE := $(TAR_LOC ) /$(TAR_FILENAME )
23
23
export V2PLUGIN_TAR_FILENAME := v2plugin-$(VERSION ) .tar.gz
24
24
GO_MIN_VERSION := 1.7
25
25
GO_MAX_VERSION := 1.8
@@ -302,19 +302,24 @@ host-plugin-create:
302
302
docker plugin create ${CONTIV_V2PLUGIN_NAME} install/v2plugin
303
303
docker plugin enable ${CONTIV_V2PLUGIN_NAME}
304
304
305
- # re-deploy the v2plugin in docker with latest versioned binaries
305
+ # Note: only updates a single host
306
+ # shortcut for an existing v2plugin cluster to update the netplugin
307
+ # binaries, recommended uses:
308
+ # 'make node1-make-targets=host-plugin-update tar make-on-node1-dep'
309
+ # on the VM: 'make compile archive host-plugin-update'
306
310
host-plugin-update : host-plugin-remove unarchive host-plugin-create
307
311
rm -rf install/v2plugin/rootfs
308
312
309
313
# cleanup all containers, recreate and start the v2plugin on all hosts
310
- # uses the latest compile binaries
314
+ # uses the latest compiled binaries
311
315
host-plugin-restart : unarchive
312
316
@echo dev: restarting services...
313
317
cd $(GOPATH ) /src/github.com/contiv/netplugin/scripts/python \
314
318
&& PYTHONIOENCODING=utf-8 ./startPlugin.py -nodes ${CLUSTER_NODE_IPS} \
315
319
-plugintype " v2plugin"
316
320
317
321
# unpack v2plugin archive created by host-pluginfs-create
322
+ # Note: do not unpack locally to share with VM, unpack on the target machine
318
323
host-pluginfs-unpack :
319
324
# clear out old plugin completely
320
325
sudo rm -rf install/v2plugin/rootfs
@@ -361,14 +366,9 @@ host-plugin-release: tar host-pluginfs-create host-pluginfs-unpack host-plugin-c
361
366
docker plugin push ${CONTIV_V2PLUGIN_NAME}
362
367
363
368
# unarchive versioned binaries to bin, usually as a helper for other targets
364
- # uses the version stored in file 'netplugin-version' which is produced anytime
365
- # binaries are compiled (and that version can be set with env var
366
- # 'BUILD_VERSION'
367
369
unarchive :
368
- @# $(NETPLUGIN_TAR_FILE) depends on local file netplugin-version (exists in image),
369
- @# but it is evaluated after we have extracted that file to local disk
370
370
@echo Updating bin/ with binaries versioned $(VERSION )
371
- tar -xf $(NETPLUGIN_TAR_FILE ) -C bin
371
+ tar -xf $(TAR_FILE ) -C bin
372
372
373
373
# pulls netplugin binaries from build container
374
374
binaries-from-container :
@@ -386,7 +386,7 @@ binaries-from-container:
386
386
archive :
387
387
$(TAR ) --version | grep -q GNU \
388
388
|| (echo Please use GNU tar as \' gtar\' or \' tar\' ; exit 1)
389
- $(TAR ) --owner=0 --group=0 -jcf $(NETPLUGIN_TAR_FILE ) \
389
+ $(TAR ) --owner=0 --group=0 -jcf $(TAR_FILE ) \
390
390
-C bin netplugin netmaster netctl contivk8s netcontiv \
391
391
-C ../scripts contrib/completion/bash/netctl get-contiv-diags
392
392
@@ -399,7 +399,7 @@ clean-tar:
399
399
400
400
# do not run directly, use "release" target
401
401
release-built-version : tar
402
- TAR_FILENAME=$(TAR_FILENAME ) TAR_FILE=$(NETPLUGIN_TAR_FILE ) OLD_VERSION=${OLD_VERSION} \
402
+ TAR_FILENAME=$(TAR_FILENAME ) TAR_FILE=$(TAR_FILE ) OLD_VERSION=${OLD_VERSION} \
403
403
NIGHTLY_RELEASE=${NIGHTLY_RELEASE} scripts/release.sh
404
404
@make clean-tar
405
405
0 commit comments