gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-deployment] branch master updated: NLnet task 5.


From: gnunet
Subject: [taler-deployment] branch master updated: NLnet task 5.
Date: Thu, 27 Jul 2023 17:06:50 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new ea065a3  NLnet task 5.
ea065a3 is described below

commit ea065a3984baf58826c91b1c54b1283c0f729cea
Author: MS <ms@taler.net>
AuthorDate: Thu Jul 27 17:05:48 2023 +0200

    NLnet task 5.
    
    Getting to create one x-libeufin-bank and one ebics connection.
---
 nlnet/task5/date-range/.start.sh.swp     | Bin 0 -> 12288 bytes
 nlnet/task5/date-range/Dockerfile        |   6 ++-
 nlnet/task5/date-range/start-libeufin.sh |  35 +++++++++++++
 nlnet/task5/date-range/start.sh          |  81 ++++++++++++++++++++++++++++++-
 nlnet/task5/long-poll/Dockerfile         |   2 +-
 nlnet/task5/performance/Dockerfile       |   2 +-
 6 files changed, 121 insertions(+), 5 deletions(-)

diff --git a/nlnet/task5/date-range/.start.sh.swp 
b/nlnet/task5/date-range/.start.sh.swp
new file mode 100644
index 0000000..fd25930
Binary files /dev/null and b/nlnet/task5/date-range/.start.sh.swp differ
diff --git a/nlnet/task5/date-range/Dockerfile 
b/nlnet/task5/date-range/Dockerfile
index c2a7353..2c288a4 100644
--- a/nlnet/task5/date-range/Dockerfile
+++ b/nlnet/task5/date-range/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian:stable
+FROM debian:bookworm
 
 RUN apt-get update
 RUN apt-get install -y openjdk-17-jre git python3-pip curl jq sqlite3 
postgresql python3-requests python3-click sudo
@@ -6,8 +6,10 @@ RUN apt-get install -y openjdk-17-jre git python3-pip curl jq 
sqlite3 postgresql
 # Installation
 RUN git clone git://git.taler.net/libeufin
 WORKDIR /libeufin
-RUN git fetch && git checkout 4bc5f38f571a45d427f73813ec3846bf59413afa
+RUN git fetch && git checkout 934a73b09b9e9abba348e15ddc058df5bb9cd6a3
 RUN ./bootstrap
 RUN ./configure --prefix=/usr/local
 RUN make install
+COPY start-libeufin.sh /
+COPY start.sh /
 ENTRYPOINT ["/start.sh"]
diff --git a/nlnet/task5/date-range/start-libeufin.sh 
b/nlnet/task5/date-range/start-libeufin.sh
new file mode 100644
index 0000000..8f000a4
--- /dev/null
+++ b/nlnet/task5/date-range/start-libeufin.sh
@@ -0,0 +1,35 @@
+DB_CONN="postgresql:///libeufincheck"
+export LIBEUFIN_SANDBOX_DB_CONNECTION=$DB_CONN
+export LIBEUFIN_NEXUS_DB_CONNECTION=$DB_CONN
+
+echo -n Delete previous data...
+libeufin-sandbox reset-tables
+libeufin-nexus reset-tables
+echo DONE
+echo -n Configure the default demobank with MANA...
+libeufin-sandbox config --with-signup-bonus --currency MANA default
+echo DONE
+echo -n Setting the default exchange at Sandbox...
+libeufin-sandbox \
+  default-exchange \
+  "https://exchange.example.com/"; \
+  "payto://iban/NOTUSED"
+echo DONE
+echo -n Start the bank...
+export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=foo
+libeufin-sandbox serve > sandbox.log 2>&1 &
+SANDBOX_PID=$!
+echo DONE
+echo -n Wait for the bank...
+curl --max-time 4 --retry-all-errors --retry-connrefused --retry-delay 1 
--retry 10 http://localhost:5000/ &> /dev/null
+echo DONE
+echo -n Make one superuser at Nexus...
+libeufin-nexus superuser test-user --password x
+echo DONE
+echo -n Launching Nexus...
+libeufin-nexus serve &> nexus.log &
+NEXUS_PID=$!
+echo DONE
+echo -n Waiting for Nexus...
+curl --max-time 4 --retry-all-errors --retry-connrefused --retry-delay 1 
--retry 10 http://localhost:5001/ &> /dev/null
+echo DONE
diff --git a/nlnet/task5/date-range/start.sh b/nlnet/task5/date-range/start.sh
old mode 100644
new mode 100755
index c7018ea..2d41c8a
--- a/nlnet/task5/date-range/start.sh
+++ b/nlnet/task5/date-range/start.sh
@@ -2,8 +2,87 @@
 
 # Draft.
 
+service postgresql start
+sudo -u postgres createuser -s root
+createdb libeufincheck
+
+source /start-libeufin.sh
+echo -n "Register the Sandbox account..."
+export LIBEUFIN_SANDBOX_USERNAME=sandbox-user
+export LIBEUFIN_SANDBOX_PASSWORD=foo
+libeufin-cli \
+  sandbox --sandbox-url http://localhost:5000/ \
+  demobank \
+  register
+echo DONE
+
+# x-libeufin-bank connection.
+echo -n Creating the x-libeufin-bank connection at Nexus...
+export LIBEUFIN_NEXUS_USERNAME=test-user
+export LIBEUFIN_NEXUS_PASSWORD=x
+export LIBEUFIN_NEXUS_URL=http://localhost:5001
+# echoing the password to STDIN, as that is a "prompt" option.
+libeufin-cli connections new-xlibeufinbank-connection \
+  --bank-url "http://localhost:5000/demobanks/default/access-api"; \
+  --username sandbox-user \
+  --password foo \
+  xlibeufinbankconn
+echo DONE
+echo -n Connecting the x-libeufin-bank connection...
+libeufin-cli connections connect xlibeufinbankconn
+echo DONE
+# Importing the bank account under a local name at Nexus.
+echo -n Importing the x-libeufin-bank account locally..
+libeufin-cli connections import-bank-account \
+  --offered-account-id sandbox-user \
+  --nexus-bank-account-id foo-at-nexus xlibeufinbankconn
+echo DONE
+
+# EBICS connection.
+## Sandbox side.
+export LIBEUFIN_SANDBOX_USERNAME=admin
+echo -n "Create EBICS host at Sandbox..."
+libeufin-cli sandbox \
+  --sandbox-url http://localhost:5000 \
+  ebicshost create --host-id wwwebics
+echo OK
+echo -n "Create nlnet EBICS subscriber at Sandbox..."
+libeufin-cli sandbox \
+  --sandbox-url http://localhost:5000 \
+  demobank new-ebicssubscriber --host-id wwwebics \
+  --user-id nlnet --partner-id nlnet \
+  --bank-account sandbox-user # that's a username _and_ a bank account name
+echo OK
+## Nexus side.
+export LIBEUFIN_NEXUS_USERNAME=test-user
+export LIBEUFIN_NEXUS_PASSWORD=x
+export LIBEUFIN_NEXUS_URL=http://localhost:5001
+echo -n Creating the EBICS connection at Nexus...
+libeufin-cli connections new-ebics-connection \
+  --ebics-url "http://localhost:5000/ebicsweb"; \
+  --host-id wwwebics \
+  --partner-id nlnet \
+  --ebics-user-id nlnet \
+  ebicsconn
+echo DONE
+echo -n Setup EBICS keying...
+libeufin-cli connections connect ebicsconn > /dev/null
+echo OK
+echo -n Download bank account name from Sandbox...
+libeufin-cli connections download-bank-accounts ebicsconn
+echo OK
+echo -n Importing bank account info into Nexus...
+libeufin-cli connections import-bank-account \
+  --offered-account-id sandbox-user \
+  --nexus-bank-account-id bar-at-nexus ebicsconn
+echo OK
+
+exit
 # 0, setup and start services.
-libeufin-sandbox make-transaction $PARAMS
+libeufin-sandbox make-transaction \
+  --credit-account=admin \
+  --debit-account=sandbox-user MANA:2 \
+
 # 1, set artificial time for the transaction at $PAST.
 # 2, retrieve the $PAST transaction via Nexus.
 libeufin-cli \
diff --git a/nlnet/task5/long-poll/Dockerfile b/nlnet/task5/long-poll/Dockerfile
index 713e47e..e0397be 100644
--- a/nlnet/task5/long-poll/Dockerfile
+++ b/nlnet/task5/long-poll/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian:stable
+FROM debian:bookworm
 
 RUN apt-get update
 RUN apt-get install -y openjdk-17-jre git python3-pip curl jq sqlite3 
postgresql python3-requests python3-click sudo libgnunet0.19
diff --git a/nlnet/task5/performance/Dockerfile 
b/nlnet/task5/performance/Dockerfile
index 4daeaf0..3861dad 100644
--- a/nlnet/task5/performance/Dockerfile
+++ b/nlnet/task5/performance/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian:stable
+FROM debian:bookworm
 
 RUN apt-get update
 RUN apt-get install -y \

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]