From 9c110443e261c1ec7c467b30dd62f6adde9a0ea1 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 19 May 2016 18:51:15 +0200 Subject: generic bootstrap --- bootstrap-bluegreen | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 bootstrap-bluegreen diff --git a/bootstrap-bluegreen b/bootstrap-bluegreen new file mode 100755 index 0000000..5f15aaf --- /dev/null +++ b/bootstrap-bluegreen @@ -0,0 +1,61 @@ +#!/bin/bash + +# Bootstrap the Taler setup for the user account that +# is currently logged in. + +# The setup generated by this script is suitable for +# blue-green deployments, where two users run +# identical environments, and traffic can be switched +# between them. + +# To create a demo setup, run +# demo-blue$ ~/deployment/bootstrap-bluegreen demo +# demo-green$ ~/deployment/bootstrap-bluegreen demo + +# There MUST be a user with the same name +# as the deployment basename to share data +# between the blue/red deployment. + +set -eu + +usage() { + echo "$0: DEPLOYMENT_BASENAME" +} + +if [ -z ${1+x} ]; then + usage + exit 1 +fi + +DEPLOYMENT_BASENAME=$1 + +cd $HOME + +if ! test -d $HOME/gnunet; then + svn checkout https://gnunet.org/svn/gnunet +fi + +if ! test -d $HOME/libmicrohttpd; then + svn checkout https://gnunet.org/svn/libmicrohttpd +fi + +for component in bank merchant gnurl landing exchange merchant-frontends deployment; do + if ! test -d $HOME/$component; then + git clone /var/git/$component.git + fi +done + +for component in bank merchant landing exchange merchant-frontends; do + git -C $HOME/$component checkout stable +done + +cat >$HOME/activate <