diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2016-11-14 19:50:28 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2016-11-14 19:50:28 +0100 |
commit | f9a7134a5c4a9fa3de5ece4966dc5e1f208f2b86 (patch) | |
tree | e23e6efa0d41120673023fb60f5fb079ad93442a | |
parent | 0a4eaa82b0f8670ac327d0177800948849c4ce72 (diff) | |
parent | 66cdd18ca62f79af1ae1e0b2beb40ef667818b2d (diff) | |
download | deployment-f9a7134a5c4a9fa3de5ece4966dc5e1f208f2b86.tar.gz deployment-f9a7134a5c4a9fa3de5ece4966dc5e1f208f2b86.tar.bz2 deployment-f9a7134a5c4a9fa3de5ece4966dc5e1f208f2b86.zip |
Merge branch 'master' of taler.net:deployment
-rwxr-xr-x | bin/taler-deployment-bbstart | 2 | ||||
-rwxr-xr-x | bin/taler-deployment-bbstop | 2 | ||||
-rw-r--r-- | buildbot/master-lonelyslave.cfg | 4 | ||||
-rw-r--r-- | docker/TODO | 22 | ||||
-rw-r--r-- | docker/base/Dockerfile | 34 | ||||
-rw-r--r-- | docker/base/README | 7 | ||||
-rw-r--r-- | docker/exchange/Dockerfile | 13 | ||||
-rw-r--r-- | docker/merchant/Dockerfile | 13 | ||||
-rw-r--r-- | docker/postgres/README | 1 | ||||
-rwxr-xr-x | docker/selenium/crxmake.sh | 43 | ||||
-rwxr-xr-x | docker/selenium/launch_chrome_container | 3 | ||||
-rwxr-xr-x | docker/selenium/launch_selenium_test | 27 | ||||
-rw-r--r-- | docker/taler-full/README | 17 | ||||
-rwxr-xr-x | selenium/launch_chrome_container | 4 | ||||
-rwxr-xr-x | selenium/launch_selenium_test | 23 | ||||
-rwxr-xr-x | taler-build/update_gnunet.sh | 2 |
16 files changed, 124 insertions, 93 deletions
diff --git a/bin/taler-deployment-bbstart b/bin/taler-deployment-bbstart index 1f13061..2b8795c 100755 --- a/bin/taler-deployment-bbstart +++ b/bin/taler-deployment-bbstart @@ -2,5 +2,5 @@ cd ~/buildbot source venv/bin/activate -buildslave start slave/ +buildbot-worker start slave/ deactivate diff --git a/bin/taler-deployment-bbstop b/bin/taler-deployment-bbstop index 8fcc724..e46f3c0 100755 --- a/bin/taler-deployment-bbstop +++ b/bin/taler-deployment-bbstop @@ -2,5 +2,5 @@ cd ~/buildbot source venv/bin/activate -buildslave stop slave/ +buildbot-worker stop slave/ deactivate diff --git a/buildbot/master-lonelyslave.cfg b/buildbot/master-lonelyslave.cfg index 7c81951..f9e1894 100644 --- a/buildbot/master-lonelyslave.cfg +++ b/buildbot/master-lonelyslave.cfg @@ -60,7 +60,7 @@ gitMaster = SingleBranchScheduler( builderNames=["lone-builder", "lcov-build"]) force = ForceScheduler(name="force-build", - builderNames=["lone-builder"]) + builderNames=["lone-builder", "lcov-build"]) # For now, the whole withdraw/pay cliking is started manually # (as the blue-green infrastructure needs some upgrading) @@ -90,7 +90,7 @@ lonelyness.addStep(Git(repourl='git://git.taler.net/deployment.git', alwaysUseLatest=True, haltOnFailure=True, branch='master')) -lonelyness.addStep(ShellCommand(name="switcher", +lonelyness.addStep(ShellCommand(name="builder", description="Lone compilation..", descriptionDone="Compilation passed", command=["make"], diff --git a/docker/TODO b/docker/TODO new file mode 100644 index 0000000..9fdaf00 --- /dev/null +++ b/docker/TODO @@ -0,0 +1,22 @@ +Missing containers: + +- "standalone" ones: they actually *run* the + service and may also link to configuration on + the host machine when they are launched. + +- frontends +- bank +- postgres (as a running service) + +Missing compositions: + +Ideally, the Docker setting should instantiate two +Taler flavours: + +- Self-contained testing: all components ready to be + tested by the automated clicker, AKA they are a replacement + for what runs at *.{test,demo}.taler.net + +- Ready-to-ship: a composition that instantiates a fully + operational exchange or merchant, according to the customer + needs. diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile new file mode 100644 index 0000000..a067cfe --- /dev/null +++ b/docker/base/Dockerfile @@ -0,0 +1,34 @@ +FROM debian:unstable + +RUN apt-get update && apt-get install -qqy \ + git \ + build-essential \ + autoconf \ + autopoint \ + libtool \ + libgcrypt20 \ + libgcrypt20-dev \ + libidn11-dev \ + zlib1g-dev \ + libunistring-dev \ + libjansson-dev \ + libpq-dev \ + libmicrohttpd-dev \ + libcurl4-gnutls-dev + +RUN git clone https://gnunet.org/git/gnunet/ \ + && git clone https://gnunet.org/git/libmicrohttpd/ + +WORKDIR /gnunet + +RUN ./bootstrap \ + && ./configure --with-libgnurl=/usr/local/ \ + && make \ + && make install + +WORKDIR /libmicrohttpd + +RUN ./bootstrap \ + && ./configure --disable-doc \ + && make \ + && make install diff --git a/docker/base/README b/docker/base/README new file mode 100644 index 0000000..573f4ef --- /dev/null +++ b/docker/base/README @@ -0,0 +1,7 @@ +This image serves as a basis to build exchange and merchant +backend. It is responsible for installing the following packages: + +- GNUnet +- Libjansson +- Postgres +- ... diff --git a/docker/exchange/Dockerfile b/docker/exchange/Dockerfile new file mode 100644 index 0000000..471ebbe --- /dev/null +++ b/docker/exchange/Dockerfile @@ -0,0 +1,13 @@ +FROM taler/base + +RUN git clone git://taler.net/exchange + +WORKDIR exchange + +RUN ./bootstrap \ + && ./configure CFLAGS='-ggdb -O0' \ + --with-libgnurl=/usr/local \ + --with-microhttpd=/usr/local \ + --with-gnunet=/usr/local \ + && make \ + && make install diff --git a/docker/merchant/Dockerfile b/docker/merchant/Dockerfile new file mode 100644 index 0000000..6385c96 --- /dev/null +++ b/docker/merchant/Dockerfile @@ -0,0 +1,13 @@ +FROM taler/exchange + +RUN git clone git://taler.net/merchant /merchant + +WORKDIR /merchant + +RUN ./bootstrap \ + && ./configure CFLAGS='-ggdb -O0' \ + --with-gnunet=/usr/local \ + --with-exchange=/usr/local \ + --with-microhttpd=/usr/local \ + && make \ + && make install diff --git a/docker/postgres/README b/docker/postgres/README new file mode 100644 index 0000000..0f332a6 --- /dev/null +++ b/docker/postgres/README @@ -0,0 +1 @@ +This container is to run Postgres service diff --git a/docker/selenium/crxmake.sh b/docker/selenium/crxmake.sh deleted file mode 100755 index 539dbfc..0000000 --- a/docker/selenium/crxmake.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -e -# -# Purpose: Pack a Chromium extension directory into crx format -# Downloaded from https://developer.chrome.com/extensions/crx - -if test $# -ne 2; then - echo "Usage: crxmake.sh <extension dir> <pem path>" - exit 1 -fi - -dir=$1 -key=$2 -name=$(basename "$dir") -crx="$name.crx" -pub="$name.pub" -sig="$name.sig" -zip="$name.zip" -trap 'rm -f "$pub" "$sig" "$zip"' EXIT - -# zip up the crx dir -cwd=$(pwd -P) -(cd "$dir" && zip -qr -9 -X "$cwd/$zip" .) - -# signature -openssl sha1 -sha1 -binary -sign "$key" < "$zip" > "$sig" - -# public key -openssl rsa -pubout -outform DER < "$key" > "$pub" 2>/dev/null - -byte_swap () { - # Take "abcdefgh" and return it as "ghefcdab" - echo "${1:6:2}${1:4:2}${1:2:2}${1:0:2}" -} - -crmagic_hex="4372 3234" # Cr24 -version_hex="0200 0000" # 2 -pub_len_hex=$(byte_swap $(printf '%08x\n' $(ls -l "$pub" | awk '{print $5}'))) -sig_len_hex=$(byte_swap $(printf '%08x\n' $(ls -l "$sig" | awk '{print $5}'))) -( - echo "$crmagic_hex $version_hex $pub_len_hex $sig_len_hex" | xxd -r -p - cat "$pub" "$sig" "$zip" -) > "$crx" -echo "Wrote $crx" diff --git a/docker/selenium/launch_chrome_container b/docker/selenium/launch_chrome_container deleted file mode 100755 index b24612a..0000000 --- a/docker/selenium/launch_chrome_container +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -docker run --name big_heap -e JAVA_OPTS=-Xmx1g -d -p 4444:4444 selenium/standalone-chrome-debug diff --git a/docker/selenium/launch_selenium_test b/docker/selenium/launch_selenium_test deleted file mode 100755 index 0ae6709..0000000 --- a/docker/selenium/launch_selenium_test +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# Takes only the docker-machine's IP address, assuming that the -# chrome-docker service runs on port 4444 - -# FIXME use getopt -TEMP=`getopt -o r: --long docker-ip: -n 'launch_selenium_test.sh' -- "$@"` -eval set -- "$TEMP" - -if test "$1" != '--docker-ip'; then - IP=$(docker-machine ip) -else - IP=$2 -fi - - -# update wallet -(cd $HOME/wallet-webex && git pull && ./configure && make) - -eval $(docker-machine env) -# Yes, assume it's already running.. -docker restart big_heap - -# call python3 selenium script -python3 $HOME/wallet-webex/selenium/test.py \ - --ext-unpacked $HOME/wallet-webex \ - --remote http://$IP:4444/wd/hub diff --git a/docker/taler-full/README b/docker/taler-full/README index 77c66db..d5316aa 100644 --- a/docker/taler-full/README +++ b/docker/taler-full/README @@ -1,15 +1,2 @@ -Build the image corresponding to the Dockerfile in this directory -by issuing (from this directory): - -$ docker build -t taler . - -Then instantiate the exchange's container with the following command: - -$ docker run taler launch_exchange - -and the merchant container with the following command: - -$ docker run taler launch_merchant - -Please note that the communication between containers is still to be -configured +OBSOLETE. Kept around for the sole purpose of grasping +commands from it. diff --git a/selenium/launch_chrome_container b/selenium/launch_chrome_container new file mode 100755 index 0000000..42935f2 --- /dev/null +++ b/selenium/launch_chrome_container @@ -0,0 +1,4 @@ +#!/bin/bash + +# If container runs out of heap space, add '-e JAVA_OPTS=-Xmx2g' +docker run --name container_chrome -d -p 4444:4444 selenium/standalone-chrome-debug diff --git a/selenium/launch_selenium_test b/selenium/launch_selenium_test new file mode 100755 index 0000000..750505e --- /dev/null +++ b/selenium/launch_selenium_test @@ -0,0 +1,23 @@ +#!/bin/bash + +# update wallet and pack extension +(cd $HOME/wallet-webex \ + && git pull \ + && ./configure \ + && make \ + && xvfb-run chromium --pack-extension $HOME/wallet-webex) + +eval $(docker-machine env) + +# Get fresh image +if docker restart container_chrome > /dev/null; +then echo "Chrome container succesfully restarted"; +fi + +# Give time to container to get fully operational +sleep 2 + +# call python3 selenium script +python3 $HOME/wallet-webex/selenium/withdraw_buy.py \ + --ext=$HOME/ext.crx \ + --remote=http://$(docker-machine ip):4444/wd/hub diff --git a/taler-build/update_gnunet.sh b/taler-build/update_gnunet.sh index c2201ba..c1a013e 100755 --- a/taler-build/update_gnunet.sh +++ b/taler-build/update_gnunet.sh @@ -6,6 +6,6 @@ cd $HOME/gnunet/ svn revert -R . svn update ./bootstrap -./configure --prefix=$HOME/local --enable-logging=verbose --with-libgnurl=$HOME/local --with-microhttps=$HOME/local +./configure --prefix=$HOME/local --enable-logging=verbose --with-libgnurl=$HOME/local --with-microhttpd=$HOME/local make make install |