gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin-deployment] branch master updated: add basic compose sandbox c


From: gnunet
Subject: [libeufin-deployment] branch master updated: add basic compose sandbox cli test
Date: Sat, 30 Jan 2021 16:55:06 +0100

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

lukas-grossberger pushed a commit to branch master
in repository libeufin-deployment.

The following commit(s) were added to refs/heads/master by this push:
     new e2b4140  add basic compose sandbox cli test
e2b4140 is described below

commit e2b4140e4106eb15a139157639c428219036e5e8
Author: Lukas Grossberger <code@grossberger.xyz>
AuthorDate: Sat Jan 30 16:54:52 2021 +0100

    add basic compose sandbox cli test
---
 docker/README.md                                   | 24 ++++++----------------
 docker/{ => assets}/apt_preferences                |  0
 docker/assets/sandbox-cli-test.sh                  |  6 ++++++
 docker/cli.Dockerfile                              |  5 -----
 docker/compose.libeufin.yml                        |  6 ++++++
 docker/{docker-compose.yml => compose.sandbox.yml} | 14 ++++++-------
 docker/libeufin.Dockerfile                         |  2 +-
 docker/sandbox-cli.Dockerfile                      | 10 +++++++++
 8 files changed, 35 insertions(+), 32 deletions(-)

diff --git a/docker/README.md b/docker/README.md
index de76b23..985517b 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -3,38 +3,26 @@
 This is meant as instructions for humans to run the different LibEuFin 
components
 and examples from the documentation locally in Docker containers.
 
-This could become the bassis for an integration test style `docker-compose` 
setup.
 
-
-## Build Docker images
+## Build LibEuFin base image
 
 ```
-docker-compose build
+docker-compose -f compose.libeufin.yml build
 ```
 
+
 ## Scenario 1: Sandbox & CLI
 
 In this scenario, the sandbox version is started fully self contained with its 
own
 internal database to respond to interactions via the commandline interface 
even without
 an EBICS compatible bank account.
 
-Start the sandbox image with
 ```
-docker run -d --name libeufin-sandbox -p 5000:5000 libeufin-sandbox:dev
+docker-compose -f compose.libeufin.yml -f compose.sandbox.yml build
+docker-compose -f compose.libeufin.yml -f compose.sandbox.yml up 
--abort-on-container-exit libeufin-sandbox-cli
 ```
 
-Start the base image for access to the CLI
-```
-docker run -it libeufin:dev /bin/bash
-```
-
-And run the command as specified in the
-[documentation](https://docs.taler.net/libeufin/nexus-tutorial.html#optional-configuring-the-sandbox)
-(use the IP of the docker sandbox image i.e. the docker network adapter)
-```
-export LIBEUFIN_SANDBOX_URL=http://172.17.0.1:5000/
-libeufin-cli sandbox check
-```
+This should exit with a success and at least print a version response from the 
sandbox.
 
 
 ## [WIP] Scenario 2: Nexus
diff --git a/docker/apt_preferences b/docker/assets/apt_preferences
similarity index 100%
rename from docker/apt_preferences
rename to docker/assets/apt_preferences
diff --git a/docker/assets/sandbox-cli-test.sh 
b/docker/assets/sandbox-cli-test.sh
new file mode 100644
index 0000000..a9721fd
--- /dev/null
+++ b/docker/assets/sandbox-cli-test.sh
@@ -0,0 +1,6 @@
+#/bin/bash
+
+# Wait for the sandbox to start
+sleep 5
+
+libeufin-cli sandbox check
diff --git a/docker/cli.Dockerfile b/docker/cli.Dockerfile
deleted file mode 100644
index e48e860..0000000
--- a/docker/cli.Dockerfile
+++ /dev/null
@@ -1,5 +0,0 @@
-FROM libeufin:dev
-
-ENV LIBEUFIN_SANDBOX_URL "http://localhost:5000/";
-
-CMD ["libeufin-cli","sandbox","check"]
diff --git a/docker/compose.libeufin.yml b/docker/compose.libeufin.yml
new file mode 100644
index 0000000..8f49250
--- /dev/null
+++ b/docker/compose.libeufin.yml
@@ -0,0 +1,6 @@
+services:
+  libeufin:
+    build:
+      context: ./
+      dockerfile: libeufin.Dockerfile
+    image: libeufin:dev
\ No newline at end of file
diff --git a/docker/docker-compose.yml b/docker/compose.sandbox.yml
similarity index 54%
rename from docker/docker-compose.yml
rename to docker/compose.sandbox.yml
index 1fc5aed..1fa62a1 100644
--- a/docker/docker-compose.yml
+++ b/docker/compose.sandbox.yml
@@ -1,9 +1,4 @@
 services:
-  libeufin:
-    build:
-      context: ./
-      dockerfile: libeufin.Dockerfile
-    image: libeufin:dev
   libeufin-sandbox:
     depends_on:
       - libeufin
@@ -11,10 +6,13 @@ services:
       context: ./
       dockerfile: sandbox.Dockerfile
     image: libeufin-sandbox:dev
-  libeufin-nexus:
+    ports:
+      - 5000:5000
+  libeufin-sandbox-cli:
     depends_on:
       - libeufin
+      - libeufin-sandbox
     build:
       context: ./
-      dockerfile: nexus.Dockerfile
-    image: libeufin-nexus:dev
\ No newline at end of file
+      dockerfile: sandbox-cli.Dockerfile
+    image: libeufin-sandbox-cli:dev
\ No newline at end of file
diff --git a/docker/libeufin.Dockerfile b/docker/libeufin.Dockerfile
index 3aeaeb5..a2d5546 100644
--- a/docker/libeufin.Dockerfile
+++ b/docker/libeufin.Dockerfile
@@ -6,7 +6,7 @@ RUN apt-get -y upgrade
 RUN apt-get install -y gnupg2 wget
 
 # LibEuFin setup
-COPY ./apt_preferences /etc/apt/preferences
+COPY ./assets/apt_preferences /etc/apt/preferences
 RUN echo "deb https://deb.taler.net/apt/debian sid main" >> 
/etc/apt/sources.list
 RUN wget -O - https://taler.net/static/taler-systems.gpg.key | apt-key add -
 RUN apt-get update
diff --git a/docker/sandbox-cli.Dockerfile b/docker/sandbox-cli.Dockerfile
new file mode 100644
index 0000000..7e15a60
--- /dev/null
+++ b/docker/sandbox-cli.Dockerfile
@@ -0,0 +1,10 @@
+# Testing the sandbox with the CLI
+FROM libeufin:dev
+
+ENV SANDBOX_PORT 5000
+ENV LIBEUFIN_SANDBOX_URL "http://libeufin-sandbox:${SANDBOX_PORT}/";
+
+COPY ./assets/sandbox-cli-test.sh /sandbox-cli-test.sh
+RUN chmod +x /sandbox-cli-test.sh
+
+CMD /sandbox-cli-test.sh

-- 
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]