From 307071e1b0d536abbec277764b427d145d4f42b7 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Tue, 24 Feb 2015 19:26:21 +0100 Subject: Add packaging and examples. --- examples/docker-minimal/README | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 examples/docker-minimal/README (limited to 'examples/docker-minimal/README') diff --git a/examples/docker-minimal/README b/examples/docker-minimal/README new file mode 100644 index 0000000..1bb2287 --- /dev/null +++ b/examples/docker-minimal/README @@ -0,0 +1,25 @@ +Given a docker image 'catlfish' as defined in +catlfish/packaging/docker, here is an example of a minimal catlfish +log using one docker container to run one single Erlang beam instance +for both a frontend and a storage node and an example of how to start +a shell script in the host system performing merge periodically. + +Create the docker image + + $ docker build -t my-single-image-catlfish docker + +Run the newly created image in a docker container + + $ docker run --name=my-catlfish --detach=true --publish 127.0.0.1:8080-8082:8080-8082/tcp my-single-image-catlfish + +This will create and start one container listening for cert chain +submissions on https://127.0.0.1:8080/. + +FIXME FIXME start shell script doing merge (i.e. generate a new STH) +with an interval of 20 minutes, with the first merge occuring five +minutes after startup. + +To submit a cert chain and verify the resulting SCT, try the +submitcert tool: + + $ tools/submitcert.py --store tools/testcerts/cert1.txt --check-sct --sct-file=/tmp/cert1-sct https://127.0.0.1:8080/ -- cgit v1.1 From 1e37341a24644e6b3957521c42ca8cc33cbed2a0 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 27 Feb 2015 02:27:06 +0100 Subject: Update README and finish merge.sh in the minimal docker example. --- examples/docker-minimal/README | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'examples/docker-minimal/README') diff --git a/examples/docker-minimal/README b/examples/docker-minimal/README index 1bb2287..e0c5235 100644 --- a/examples/docker-minimal/README +++ b/examples/docker-minimal/README @@ -15,11 +15,14 @@ Run the newly created image in a docker container This will create and start one container listening for cert chain submissions on https://127.0.0.1:8080/. -FIXME FIXME start shell script doing merge (i.e. generate a new STH) -with an interval of 20 minutes, with the first merge occuring five -minutes after startup. + +In order to start a shell script doing merge (i.e. generate new STH's) +with an interval of 20 minutes (with the first merge occuring five +minutes after startup) in the host system, cd into the catlfish +directory and run catlfish/examples/docker-minimal/docker/merge.sh. + To submit a cert chain and verify the resulting SCT, try the submitcert tool: - $ tools/submitcert.py --store tools/testcerts/cert1.txt --check-sct --sct-file=/tmp/cert1-sct https://127.0.0.1:8080/ + $ tools/submitcert.py --store=tools/testcerts/cert1.txt --check-sct --sct-file=/tmp/cert1-sct https://127.0.0.1:8080/ -- cgit v1.1 From 2803956ca1e4862d991e4112234b90c2cb79a36c Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 27 Feb 2015 02:51:42 +0100 Subject: chmod +x merge.sh Also fix path in README. --- examples/docker-minimal/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/docker-minimal/README') diff --git a/examples/docker-minimal/README b/examples/docker-minimal/README index e0c5235..5c2606d 100644 --- a/examples/docker-minimal/README +++ b/examples/docker-minimal/README @@ -19,7 +19,7 @@ submissions on https://127.0.0.1:8080/. In order to start a shell script doing merge (i.e. generate new STH's) with an interval of 20 minutes (with the first merge occuring five minutes after startup) in the host system, cd into the catlfish -directory and run catlfish/examples/docker-minimal/docker/merge.sh. +directory and run examples/docker-minimal/docker/merge.sh. To submit a cert chain and verify the resulting SCT, try the -- cgit v1.1 From 6aefb4c34f49ee44ed65b961e941fea705344458 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 27 Feb 2015 03:19:34 +0100 Subject: Add some debugging help to README. --- examples/docker-minimal/README | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'examples/docker-minimal/README') diff --git a/examples/docker-minimal/README b/examples/docker-minimal/README index 5c2606d..9334909 100644 --- a/examples/docker-minimal/README +++ b/examples/docker-minimal/README @@ -26,3 +26,9 @@ To submit a cert chain and verify the resulting SCT, try the submitcert tool: $ tools/submitcert.py --store=tools/testcerts/cert1.txt --check-sct --sct-file=/tmp/cert1-sct https://127.0.0.1:8080/ + + +Where are the log files? Try running a shell in the container and poke +around in the /opt/catlfish/log directory. Here's how to start one: + + $ docker exec -it my-catlfish /bin/bash -- cgit v1.1