summaryrefslogtreecommitdiff
path: root/buildbot
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-04-14 12:11:01 +0200
committerFlorian Dold <florian@dold.me>2021-04-14 12:11:01 +0200
commit38f4e5eb5ad2e433758b9a7a758413112240bbc3 (patch)
tree2eca466dbd6bbd681da237fd4efdf3e3338333dc /buildbot
parent28b0ccfca5d0cf2de31548d8051207583a20c3b4 (diff)
downloaddeployment-38f4e5eb5ad2e433758b9a7a758413112240bbc3.tar.gz
deployment-38f4e5eb5ad2e433758b9a7a758413112240bbc3.tar.bz2
deployment-38f4e5eb5ad2e433758b9a7a758413112240bbc3.zip
move undocumented bootstrap scripts out of the way
Diffstat (limited to 'buildbot')
-rwxr-xr-xbuildbot/bootstrap-scripts/bootstrap-codespell51
-rwxr-xr-xbuildbot/bootstrap-scripts/bootstrap-docbuilder37
-rwxr-xr-xbuildbot/bootstrap-scripts/bootstrap-integration18
-rw-r--r--buildbot/bootstrap-scripts/bootstrap-linkchecker37
-rwxr-xr-xbuildbot/bootstrap-scripts/bootstrap-reservetopper110
-rwxr-xr-xbuildbot/bootstrap-scripts/bootstrap-sitesbuilder44
-rwxr-xr-xbuildbot/bootstrap-scripts/bootstrap-walletbuilder38
-rwxr-xr-xbuildbot/bootstrap-scripts/prepare-auditorreporter7
8 files changed, 342 insertions, 0 deletions
diff --git a/buildbot/bootstrap-scripts/bootstrap-codespell b/buildbot/bootstrap-scripts/bootstrap-codespell
new file mode 100755
index 0000000..44d4db3
--- /dev/null
+++ b/buildbot/bootstrap-scripts/bootstrap-codespell
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+# Bootstrap the Taler setup for the user account that
+# is currently logged in.
+
+# Generates a setup for a single user,
+# including a postgresql DB.
+
+set -eu
+
+BRANCH=master
+REPOS="libmicrohttpd gnunet"
+
+cd $HOME
+
+pip3 install --user codespell
+
+for component in $REPOS; do
+ if ! test -d $HOME/$component; then
+ git clone git://git.gnunet.org/$component.git
+ fi
+done
+for component in $REPOS; do
+ echo "Checking out $component to $BRANCH"
+ git -C $HOME/$component checkout $BRANCH
+done
+
+REPOS="exchange merchant wallet-core sync anastasis bank twister"
+
+for component in $REPOS; do
+ if ! test -d $HOME/$component; then
+ git clone git://git.taler.net/$component.git
+ fi
+done
+
+for component in $REPOS; do
+ echo "Checking out $component to $BRANCH"
+ git -C $HOME/$component checkout $BRANCH
+done
+
+if [[ ! -d worker ]]; then
+ buildbot-worker create-worker --umask=0o22 ~/worker localhost:9989 codespell-worker codespell-pass
+fi
+
+mkdir -p ~/.config/systemd/user/
+cp systemd-services/buildbot-worker-doc.service ~/.config/systemd/user/
+
+systemctl --user daemon-reload || echo "Please use 'machinectl shell codespell@.host' to log in to use this script"
+
+systemctl --user enable buildbot-worker-doc.service
+systemctl --user start buildbot-worker-doc.service
diff --git a/buildbot/bootstrap-scripts/bootstrap-docbuilder b/buildbot/bootstrap-scripts/bootstrap-docbuilder
new file mode 100755
index 0000000..bdbd95f
--- /dev/null
+++ b/buildbot/bootstrap-scripts/bootstrap-docbuilder
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# Bootstrap the Taler setup for the user account that
+# is currently logged in.
+
+# Generates a setup for a single user,
+# including a postgresql DB.
+
+set -eu
+
+BRANCH=master
+REPOS="docs"
+
+cd $HOME
+
+for component in $REPOS; do
+ if ! test -d $HOME/$component; then
+ git clone git://git.taler.net/$component.git
+ fi
+done
+
+for component in $REPOS; do
+ echo "Checking out $component to $BRANCH"
+ git -C $HOME/$component checkout $BRANCH
+done
+
+if [[ ! -d worker ]]; then
+ buildbot-worker create-worker --umask=0o22 ~/worker localhost:9989 doc-worker doc-pass
+fi
+
+mkdir -p ~/.config/systemd/user/
+cp systemd-services/buildbot-worker-doc.service ~/.config/systemd/user/
+
+systemctl --user daemon-reload || echo "Please use 'machinectl shell docbuilder@.host' to log in to use this script"
+
+systemctl --user enable buildbot-worker-doc.service
+systemctl --user start buildbot-worker-doc.service
diff --git a/buildbot/bootstrap-scripts/bootstrap-integration b/buildbot/bootstrap-scripts/bootstrap-integration
new file mode 100755
index 0000000..c9b0bd1
--- /dev/null
+++ b/buildbot/bootstrap-scripts/bootstrap-integration
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Bootstrap the Taler setup for the integration test ("CHECKER_FACTORY")
+
+
+set -eu
+
+if [[ ! -d worker ]]; then
+ buildbot-worker create-worker --umask=0o22 ~/worker localhost:9989 checker-worker checker-pass
+fi
+
+mkdir -p ~/.config/systemd/user/
+cp systemd-services/buildbot-worker-checker.service ~/.config/systemd/user/
+
+systemctl --user daemon-reload || echo "Please use 'machinectl shell checker@.host' to log in to use this script"
+
+systemctl --user enable buildbot-worker-checker.service
+systemctl --user start buildbot-worker-checker.service
diff --git a/buildbot/bootstrap-scripts/bootstrap-linkchecker b/buildbot/bootstrap-scripts/bootstrap-linkchecker
new file mode 100644
index 0000000..b7b61d0
--- /dev/null
+++ b/buildbot/bootstrap-scripts/bootstrap-linkchecker
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# Bootstrap the Taler setup for the user account that
+# is currently logged in.
+
+# Generates a setup for a single user,
+# including a postgresql DB.
+
+set -eu
+
+BRANCH=master
+REPOS="deployment"
+
+cd $HOME
+
+for component in $REPOS; do
+ if ! test -d $HOME/$component; then
+ git clone git://git.taler.net/$component.git
+ fi
+done
+
+for component in $REPOS; do
+ echo "Checking out $component to $BRANCH"
+ git -C $HOME/$component checkout $BRANCH
+done
+
+if [[ ! -d worker ]]; then
+ buildbot-worker create-worker --umask=0o22 ~/worker 127.0.0.1 linkchecker-worker linkchecker-pass
+fi
+
+#mkdir -p ~/.config/systemd/user/
+#cp systemd-services/buildbot-worker-doc.service ~/.config/systemd/user/
+
+#systemctl --user daemon-reload || echo "Please use 'machinectl shell docbuilder@.host' to log in to use this script"
+
+#systemctl --user enable buildbot-worker-linkchecker.service
+#systemctl --user start buildbot-worker-linkchecker.service
diff --git a/buildbot/bootstrap-scripts/bootstrap-reservetopper b/buildbot/bootstrap-scripts/bootstrap-reservetopper
new file mode 100755
index 0000000..15d7a0b
--- /dev/null
+++ b/buildbot/bootstrap-scripts/bootstrap-reservetopper
@@ -0,0 +1,110 @@
+#!/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
+
+# NOTE: ENVNAME is also the name of the user who keeps
+# shared data in its home directory, so it must exist!
+# For demo/test ENVNAMEs, see {demo,test}.sh
+
+set -eu
+
+usage() {
+ echo "Usage: $0 ENVNAME, test or demo"
+}
+
+if [ -z ${1+x} ]; then
+ usage
+ exit 1
+fi
+
+ENVNAME=$1
+source ~/envconfig
+
+case $ENVNAME in
+
+ test)
+ CURRENCY=TESTKUDOS
+ ;;
+ demo)
+ CURRENCY=KUDOS
+ ;;
+ *)
+ echo Invalid envname, only 'test' and 'demo'.
+ exit 1
+ ;;
+esac
+
+cd $HOME
+
+if ! test -d $HOME/gnunet; then
+ git clone git://gnunet.org/gnunet.git
+fi
+
+if ! test -d $HOME/libmicrohttpd; then
+ git clone git://gnunet.org/libmicrohttpd.git
+fi
+
+for component in exchange bank gnurl; do
+ if ! test -d $HOME/$component; then
+ git clone git://git.taler.net/$component
+ fi
+done
+
+cat >$HOME/activate <<EOL
+#!/bin/bash
+
+function taler-config-generate () {
+ echo "Command disabled. Please use taler-deployment-config-generate instead."
+ return 1
+}
+function taler-exchange-keyup () {
+ echo "Command disabled. Please use taler-deployment-keyup instead."
+}
+
+
+export PATH="$HOME/deployment/bin:$HOME/local/bin:\$PATH"
+export PYTHONPATH="$HOME/local/lib/python3.5/site-packages"
+export TALER_CONFIG_CURRENCY=$CURRENCY
+
+# DEPRECATED ALIAS!
+export TALER_CONFIG_ENV=$ENVNAME
+
+export TALER_ENV_NAME=$ENVNAME
+export TALER_ENV_URL_INTRO="https://$ENVNAME.taler.net/"
+export TALER_ENV_URL_BANK="https://bank.$ENVNAME.taler.net/"
+export TALER_ENV_URL_MERCHANT_BLOG="https://shop.$ENVNAME.taler.net/"
+export TALER_ENV_URL_MERCHANT_DONATIONS="https://donations.$ENVNAME.taler.net/"
+export TALER_ENV_URL_MERCHANT_SURVEY="https://survey.$ENVNAME.taler.net/"
+export TALER_ENV_URL_AUDITOR="https://auditor.$ENVNAME.taler.net/"
+export TALER_ENV_URL_BACKOFFICE="https://backoffice.$ENVNAME.taler.net/"
+EOL
+
+mkdir -p "$HOME/sockets"
+mkdir -p "$HOME/stamps"
+mkdir -p "$HOME/taler-data"
+
+ln -sf ../deployment/taler-build/Makefile stamps/
+ln -sf ../deployment/taler-build/invalidate.sh stamps/
+
+if [[ ! -d "worker" ]]; then
+buildbot-worker create-worker $HOME/worker localhost:9989 "$ENVNAME-topper-worker" "$ENVNAME-topper-pass"
+fi
+
+
+mkdir -p ~/.config/systemd/user/
+cp systemd-services/buildbot-worker-demo-topper.service ~/.config/systemd/user/
+
+systemctl --user daemon-reload || echo "Please use 'machinectl shell demo-reserve-topper@.host' to log in to use this script"
+
+systemctl --user enable buildbot-worker-demo-topper.service
+systemctl --user start buildbot-worker-demo-topper.service
diff --git a/buildbot/bootstrap-scripts/bootstrap-sitesbuilder b/buildbot/bootstrap-scripts/bootstrap-sitesbuilder
new file mode 100755
index 0000000..9bc62da
--- /dev/null
+++ b/buildbot/bootstrap-scripts/bootstrap-sitesbuilder
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# Bootstrap the Taler setup for the user account that
+# is currently logged in.
+
+# Generates a setup for a single user,
+# including a postgresql DB.
+
+set -eu
+
+BRANCH=master
+REPOS="www twister buywith"
+
+cd $HOME
+
+for component in $REPOS; do
+ if ! test -d $HOME/$component; then
+ git clone git://git.taler.net/$component.git
+ fi
+done
+
+for component in $REPOS; do
+ echo "Checking out $component to $BRANCH"
+ git -C $HOME/$component checkout $BRANCH
+done
+
+mkdir -p ./stamps
+
+ln -sf ../deployment/taler-sitesbuild/Makefile stamps/
+ln -sf ../deployment/taler-sitesbuild/invalidate.sh stamps/
+
+if [[ ! -d worker ]]; then
+ buildbot-worker create-worker --umask=0o22 ~/worker localhost:9989 sites-worker sites-pass
+fi
+
+
+
+mkdir -p ~/.config/systemd/user/
+cp systemd-services/buildbot-worker-sites.service ~/.config/systemd/user/
+
+systemctl --user daemon-reload || echo "Please use 'machinectl shell taler-websites@.host' to log in to use this script"
+
+systemctl --user enable buildbot-worker-sites.service
+systemctl --user start buildbot-worker-sites.service
diff --git a/buildbot/bootstrap-scripts/bootstrap-walletbuilder b/buildbot/bootstrap-scripts/bootstrap-walletbuilder
new file mode 100755
index 0000000..8a5304c
--- /dev/null
+++ b/buildbot/bootstrap-scripts/bootstrap-walletbuilder
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# Bootstrap the Taler setup for the user account that
+# is currently logged in.
+
+# Generates a setup for a single user,
+# including a postgresql DB.
+
+set -eu
+
+BRANCH=master
+REPOS="wallet-core"
+
+cd $HOME
+
+for component in $REPOS; do
+ if ! test -d $HOME/$component; then
+ git clone git://localhost/$component.git
+ fi
+done
+
+for component in $REPOS; do
+ echo "Checking out $component to $BRANCH"
+ git -C $HOME/$component checkout $BRANCH
+done
+
+if test ! -d worker ; then
+ buildbot-worker create-worker --umask=0o22 ~/worker localhost:9989 wallet-worker wallet-pass
+fi
+
+
+mkdir -p ~/.config/systemd/user/
+cp systemd-services/buildbot-worker-wallet.service ~/.config/systemd/user/
+
+systemctl --user daemon-reload || echo "Please use 'machinectl shell walletbuilder@.host' to log in to use this script"
+
+systemctl --user enable buildbot-worker-wallet.service
+systemctl --user start buildbot-worker-wallet.service
diff --git a/buildbot/bootstrap-scripts/prepare-auditorreporter b/buildbot/bootstrap-scripts/prepare-auditorreporter
new file mode 100755
index 0000000..ee91aa7
--- /dev/null
+++ b/buildbot/bootstrap-scripts/prepare-auditorreporter
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -eu
+
+$HOME/deployment/bootstrap-auditorreporter $1
+$HOME/deployment/build-auditorreporter
+$HOME/deployment/bin/taler-deployment-config-generate