Provisioned for Docker V2 plugin on multiple architectures, blocked CHECKPOINT, updated docs
This commit is contained in:
1 parent
c3cc2107c6
commit
78f596fbda
24 files changed
+191
-80
No files matched your search
@@ -2,8 +2,19 @@
|
||||
|
||||
All changes made to the weave net codebase during the reweave effort will be documented in this file.
|
||||
|
||||
## 2.8.6-beta1
|
||||
|
||||
### Changed
|
||||
|
||||
* Changed the V2 plugin build and clean tools to build (and clean) multiple architecture-specific plugins per version, since Docker Managed Plugins are not multi-architecture capable
|
||||
* Changed the V2 plugin configuration `prog/net-plugin/config.json` to include `CHECKPOINT_DISABLE` as an option, set to `1` by default to disable latest version checking.
|
||||
* Changed the `weave` script to include `export CHECKPOINT_DISABLE=`. This will disable latest version checking for the legacy plugin as well.
|
||||
* Changed the documentation in the `website` directory as appropriate.
|
||||
|
||||
## 2.8.5
|
||||
|
||||
### Changed
|
||||
|
||||
* Changed version in `reweave/Makefile` to 2.8.5
|
||||
* Modified reweave and main CHANGELOG.md
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
IMAGE_VERSION ?= 2.8.5
|
||||
IMAGE_VERSION ?= 2.8.6-beta1
|
||||
REGISTRY_USER ?= rajchaudhuri
|
||||
|
||||
ALPINE_BASEIMAGE ?= alpine:3.19.1
|
||||
|
||||
@@ -6,33 +6,79 @@ set -e
|
||||
: "${IMAGE_VERSION:=}"
|
||||
: "${REGISTRY_USER:=}"
|
||||
|
||||
# This variable is used to flag plugin publishing
|
||||
: "${PUBLISH:=}"
|
||||
|
||||
if [ -z "${IMAGE_VERSION}" ] || [ -z "${REGISTRY_USER}" ] ; then
|
||||
>&2 echo "Please provide valid values for IMAGE_VERSION and REGISTRY_USER."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# To build the plugin for multiple architecture, the
|
||||
# local Docker engine needs to have the containerd
|
||||
# snapshotter enabled.
|
||||
if [ "overlayfs" != "$(docker info -f '{{.Driver}}')" ]; then
|
||||
echo "To ensure that the plugin can be built for multiple architectures, the"
|
||||
echo "Docker Engine needs to have the containerd image store feature enabled."
|
||||
echo "Please see https://docs.docker.com/storage/containerd/ to find out how."
|
||||
echo "Run this build again after enabling it."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# This variable is used to control the architectures for
|
||||
# which the plugin will be built.
|
||||
: "${PLATFORMS:=amd64,arm,arm64,ppc64le,s390x}"
|
||||
|
||||
# This variable is used to flag plugin publishing
|
||||
: "${PUBLISH:=}"
|
||||
|
||||
WEAVER_IMAGE=${REGISTRY_USER}/weave:${IMAGE_VERSION}
|
||||
PLUGIN_IMAGE=${REGISTRY_USER}/net-plugin:${IMAGE_VERSION}
|
||||
PLUGIN_BUILD_IMG="plugin-builder"
|
||||
PLUGIN_PARENT_DIR="../prog/net-plugin"
|
||||
PLUGIN_WORK_DIR="${PLUGIN_PARENT_DIR}/rootfs"
|
||||
|
||||
docker container rm -f ${PLUGIN_BUILD_IMG} 2>/dev/null
|
||||
docker container create --name=${PLUGIN_BUILD_IMG} "${WEAVER_IMAGE}" true
|
||||
rm -rf ${PLUGIN_WORK_DIR}
|
||||
mkdir ${PLUGIN_WORK_DIR}
|
||||
docker export ${PLUGIN_BUILD_IMG} | tar -x -C ${PLUGIN_WORK_DIR}
|
||||
docker container rm -f ${PLUGIN_BUILD_IMG}
|
||||
cp "${PLUGIN_PARENT_DIR}/launch.sh" "${PLUGIN_WORK_DIR}/home/weave/launch.sh"
|
||||
set +e
|
||||
docker plugin disable "${PLUGIN_IMAGE}" 2>/dev/null
|
||||
docker plugin rm "${PLUGIN_IMAGE}" 2>/dev/null
|
||||
set -e
|
||||
docker plugin create "${PLUGIN_IMAGE}" "${PLUGIN_PARENT_DIR}"
|
||||
# $1 - Architecture to build for
|
||||
build_plugin() {
|
||||
PLUGIN_ARCH=${1:-amd64}
|
||||
PLUGIN_IMAGE=${REGISTRY_USER}/net-plugin:${IMAGE_VERSION}-${PLUGIN_ARCH}
|
||||
PLUGIN_BUILD_IMG="plugin-builder-${PLUGIN_ARCH}"
|
||||
PLUGIN_PARENT_DIR="../prog/net-plugin"
|
||||
PLUGIN_WORK_DIR="${PLUGIN_PARENT_DIR}/rootfs"
|
||||
|
||||
if [ "${PUBLISH}" = "true" ]; then
|
||||
docker plugin push "${PLUGIN_IMAGE}"
|
||||
fi
|
||||
echo "Building ${PLUGIN_IMAGE}..."
|
||||
|
||||
docker container rm -f "${PLUGIN_BUILD_IMG}" 2>/dev/null
|
||||
docker container create --platform="${PLUGIN_ARCH}" --name="${PLUGIN_BUILD_IMG}" "${WEAVER_IMAGE}" true
|
||||
rm -rf ${PLUGIN_WORK_DIR}
|
||||
mkdir ${PLUGIN_WORK_DIR}
|
||||
docker export "${PLUGIN_BUILD_IMG}" | tar -x -C ${PLUGIN_WORK_DIR}
|
||||
docker container rm -f "${PLUGIN_BUILD_IMG}"
|
||||
cp "${PLUGIN_PARENT_DIR}/launch.sh" "${PLUGIN_WORK_DIR}/home/weave/launch.sh"
|
||||
set +e
|
||||
docker plugin disable "${PLUGIN_IMAGE}" 2>/dev/null
|
||||
docker plugin rm "${PLUGIN_IMAGE}" 2>/dev/null
|
||||
set -e
|
||||
docker plugin create "${PLUGIN_IMAGE}" "${PLUGIN_PARENT_DIR}"
|
||||
|
||||
if [ "${PUBLISH}" = "true" ]; then
|
||||
echo "Pushing ${PLUGIN_IMAGE}..."
|
||||
docker plugin push "${PLUGIN_IMAGE}"
|
||||
|
||||
# If this is not a beta release, also create a "latest-release-$ARCH"
|
||||
# plugin.
|
||||
case "$IMAGE_VERSION" in
|
||||
*-beta*) IS_BETA=1 ;;
|
||||
*) IS_BETA= ;;
|
||||
esac
|
||||
|
||||
if [ -z ${IS_BETA} ]; then
|
||||
echo "Tagging ${PLUGIN_IMAGE} as latest_release..."
|
||||
LATEST_IMAGE=${REGISTRY_USER}/net-plugin:latest_release-${PLUGIN_ARCH}
|
||||
docker plugin create "${LATEST_IMAGE}" "${PLUGIN_PARENT_DIR}"
|
||||
echo "Pushing ${LATEST_IMAGE}..."
|
||||
docker plugin push "${LATEST_IMAGE}"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
echo "Done."
|
||||
}
|
||||
|
||||
for i in $( echo "$PLATFORMS" | tr ',' ' '); do
|
||||
build_plugin "$i"
|
||||
done
|
||||
@@ -11,6 +11,22 @@ if [ -z "${IMAGE_VERSION}" ] || [ -z "${REGISTRY_USER}" ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PLUGIN_IMAGE=${REGISTRY_USER}/net-plugin:${IMAGE_VERSION}
|
||||
# This variable is used to control the architectures for
|
||||
# which the plugin will be built.
|
||||
: "${PLATFORMS:=amd64,arm,arm64,ppc64le,s390x}"
|
||||
|
||||
docker plugin rm "${PLUGIN_IMAGE}" 2>/dev/null
|
||||
# $1 - Architecture to build for
|
||||
delete_plugin() {
|
||||
PLUGIN_ARCH=${1:-amd64}
|
||||
PLUGIN_IMAGE=${REGISTRY_USER}/net-plugin:${IMAGE_VERSION}-${PLUGIN_ARCH}
|
||||
echo "Deleting plugin ${PLUGIN_IMAGE}..."
|
||||
set +e
|
||||
docker plugin rm "${PLUGIN_IMAGE}" 2>/dev/null
|
||||
set -e
|
||||
}
|
||||
|
||||
for i in $( echo "$PLATFORMS" | tr ',' ' '); do
|
||||
delete_plugin "$i"
|
||||
done
|
||||
|
||||
rm -rf "../prog/net-plugin/rootfs"
|
||||
Reference in new issue
Block a user