Permalink
Browse files

Consolidate deploy_stack.sh files

Currently there are multiple deploy_stack.sh files and the user has to select the version appropriate to the target architecture so that the correct images are deployed.  Further, the armhf deploy script lacks the basic auth by default scripting that is in the x86_64 version.

This change adds a case/select to deploy_stack.sh that will determine the hardware architecture and select the appropriate docker-compose file.

The deploy_stack.armhf.sh is also changed, rather than deleted, so that existing references are still valid.

Signed-off-by: Richard Gee <richard@technologee.co.uk>
  • Loading branch information...
rgee0 authored and alexellis committed Dec 21, 2018
1 parent 334288b commit a02e2d2aa21d0ce6bb2e90d05bf4dd7e9f748713
Showing with 15 additions and 9 deletions.
  1. +1 −7 deploy_stack.armhf.sh
  2. +14 −2 deploy_stack.sh
@@ -1,9 +1,3 @@
#!/bin/sh

if ! [ -x "$(command -v docker)" ]; then
echo 'Unable to find docker command, please install Docker (https://www.docker.com/) and retry' >&2
exit 1
fi

echo "Deploying stack"
docker stack deploy func --compose-file docker-compose.armhf.yml
sh ./deploy_stack.sh
@@ -49,6 +49,18 @@ else
echo ""
fi

echo "Deploying OpenFaaS core services"
arch=$(uname -m)
case "$arch" in

docker stack deploy func --compose-file docker-compose.yml
"armv7l") echo "Deploying OpenFaaS core services for ARM"
composefile="docker-compose.armhf.yml"
;;
"aarch64") echo "Deploying OpenFaaS core services for ARM64"
composefile="docker-compose.arm64.yml"
;;
*) echo "Deploying OpenFaaS core services"
composefile="docker-compose.yml"
;;
esac

docker stack deploy func --compose-file $composefile

0 comments on commit a02e2d2

Please sign in to comment.