commit 3cd0fd23bf80dabddd736c8ba93187521c24d478 parent 0ae67e9d6f06098cddfe3d7b133e75def5899f55 Author: Florian Dold <florian.dold@gmail.com> Date: Mon, 21 Nov 2016 14:51:40 +0100 preparations for standalone envs Diffstat:
| M | bootstrap-standalone | | | 57 | +++++++++++++++++++++++++++++++++++++++++---------------- |
1 file changed, 41 insertions(+), 16 deletions(-)
diff --git a/bootstrap-standalone b/bootstrap-standalone @@ -1,33 +1,58 @@ #!/bin/bash -# Bootstrap a standalone Taler installation from source, -# on one single user account, without blue/green deployment. +# Bootstrap the Taler setup for the user account that +# is currently logged in. -set -eu +# Generates a setup for a single user, +# including a postgresql DB. -base=$HOME +set -eu -mkdir -p $base +ENVNAME=$USER -cd $base +cd $HOME -if ! test -d $base/gnunet; then - svn checkout https://gnunet.org/svn/gnunet +if ! test -d $HOME/gnunet; then + git clone git://gnunet.org/gnunet.git + git -C ~/gnunet checkout -q tags/taler-0.2.0 fi -if ! test -d $base/libmicrohttpd; then - svn checkout https://gnunet.org/svn/libmicrohttpd +if ! test -d $HOME/libmicrohttpd; then + git clone git://gnunet.org/libmicrohttpd.git + git -C ~/libmicrohttpd checkout -q tags/v0.9.52 fi for component in bank merchant gnurl landing exchange merchant-frontends deployment; do - if ! test -d $base/$component; then - git clone git://taler.net/$component + if ! test -d $HOME/$component; then + git clone /var/git/$component.git fi done -cat >$base/activate <<EOL +for component in bank merchant landing exchange merchant-frontends; do + echo "Checking out $component to $BRANCH" + git -C $HOME/$component checkout $BRANCH +done + +if ! test -d $HOME/talerdb; then + /usr/lib/postgresql/9.5/bin/initdb -D talerdb -U $USER +fi + +mkdir -p $HOME/sockets + +cat >$HOME/activate <<EOL #!/bin/bash -export PATH="$base/local/bin:$base/deployment/bin:\$PATH" -EOL -mkdir -p $base/.config +function taler-config-generate () { + echo "Command disabled. Clease use taler-deployment-config-generate instead." + return 1 +} +function taler-exchange-keyup () { + echo "Command disabled. Clease use taler-deployment-keyup instead." +} + +export PATH="$HOME/deployment/bin:$HOME/local/bin:\$PATH" +export TALER_CHECKDB="postgres:///talercheck-$USER" +export TALER_CONFIG_CURRENCY=$CURRENCY +export TALER_CONFIG_ENV=$ENVNAME +export TALER_CONFIG_STANDALONE=1 +EOL