diff --git a/Jenkinsfile b/Jenkinsfile index eb06066..801552a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -50,6 +50,7 @@ pipeline { script { try { sh 'bin/test.sh &> debug' + sh 'echo Test output ; cat debug' } catch (error) { def error_details = readFile('./debug') def message = "BUILD ERROR: There was a problem testing ${imagename}:${tag}. \n\n ${error_details}" diff --git a/README.md b/README.md index e3bd121..a1813e9 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,18 @@ The image contains the midPoint application along with some TIER-specific compon - midPoint version-specific tags, e.g. 3.9, 3.9.1, 4.0, etc. # Content -- `midpoint` directory contains build instructions for the `midpoint` image along with `docker-compose.yml` showing its basic use, -- `demo` directory contains three demonstration scenarios: +- the root directory contains build instructions for the `midpoint` image +- `demo` directory contains a couple of demonstration scenarios: + - `simple` to show simple composition of midPoint with the repository, - `shibboleth` to show integration with Shibboleth IdP, - `postgresql` to show how to change the repository implementation, - `complex` to demonstrate more complex deployment of midPoint in a sample university environment, featuring midPoint along with Grouper, LDAP directory, RabbitMQ, Shibboleth IdP, source and target systems. # Build instructions -Please see specific subdirectories: [midpoint](midpoint) and [demo/complex](demo/complex). +``` +$ ./build.sh +``` +You can then continue with one of demo composition, e.g. simple or complex one. # Documentation - For the `midpoint` image and container themselves please see [Dockerized midPoint](https://spaces.at.internet2.edu/display/MID/Dockerized+midPoint) wiki page. diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..37397bc --- /dev/null +++ b/build.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +function normalize_path() +{ + # Remove all /./ sequences. + local path=${1//\/.\//\/} + + # Remove dir/.. sequences. + while [[ $path =~ ([^/][^/]*/\.\./) ]] + do + path=${path/${BASH_REMATCH[0]}/} + done + echo $path +} + +cd "$(dirname "$0")" +./download-midpoint +docker build --tag tier/midpoint:latest midpoint-server +echo "---------------------------------------------------------------------------------------" +echo "The midPoint containers were successfully built. To start them, execute the following:" +echo "" +echo "(for simple demo)" +echo "" +echo "$ cd" $(normalize_path `pwd`/../demo/simple) +echo "$ docker-compose up --build" +echo "" +echo "(for complex demo)" +echo "" +echo "$ cd" $(normalize_path `pwd`/../demo/complex) +echo "$ docker-compose up --build" diff --git a/cleanup.sh b/cleanup.sh deleted file mode 100755 index 649bafd..0000000 --- a/cleanup.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -midpoint/cleanup.sh diff --git a/demo/plain/.env b/demo/simple/.env similarity index 100% rename from demo/plain/.env rename to demo/simple/.env diff --git a/demo/plain/configs-and-secrets/midpoint/application/database_password.txt b/demo/simple/configs-and-secrets/midpoint/application/database_password.txt similarity index 100% rename from demo/plain/configs-and-secrets/midpoint/application/database_password.txt rename to demo/simple/configs-and-secrets/midpoint/application/database_password.txt diff --git a/demo/plain/configs-and-secrets/midpoint/application/keystore_password.txt b/demo/simple/configs-and-secrets/midpoint/application/keystore_password.txt similarity index 100% rename from demo/plain/configs-and-secrets/midpoint/application/keystore_password.txt rename to demo/simple/configs-and-secrets/midpoint/application/keystore_password.txt diff --git a/demo/plain/configs-and-secrets/midpoint/httpd/host-cert.pem b/demo/simple/configs-and-secrets/midpoint/httpd/host-cert.pem similarity index 100% rename from demo/plain/configs-and-secrets/midpoint/httpd/host-cert.pem rename to demo/simple/configs-and-secrets/midpoint/httpd/host-cert.pem diff --git a/demo/plain/configs-and-secrets/midpoint/httpd/host-key.pem b/demo/simple/configs-and-secrets/midpoint/httpd/host-key.pem similarity index 100% rename from demo/plain/configs-and-secrets/midpoint/httpd/host-key.pem rename to demo/simple/configs-and-secrets/midpoint/httpd/host-key.pem diff --git a/demo/plain/configs-and-secrets/midpoint/shibboleth/idp-metadata.xml b/demo/simple/configs-and-secrets/midpoint/shibboleth/idp-metadata.xml similarity index 100% rename from demo/plain/configs-and-secrets/midpoint/shibboleth/idp-metadata.xml rename to demo/simple/configs-and-secrets/midpoint/shibboleth/idp-metadata.xml diff --git a/demo/plain/configs-and-secrets/midpoint/shibboleth/shibboleth2.xml b/demo/simple/configs-and-secrets/midpoint/shibboleth/shibboleth2.xml similarity index 100% rename from demo/plain/configs-and-secrets/midpoint/shibboleth/shibboleth2.xml rename to demo/simple/configs-and-secrets/midpoint/shibboleth/shibboleth2.xml diff --git a/demo/plain/configs-and-secrets/midpoint/shibboleth/sp-cert.pem b/demo/simple/configs-and-secrets/midpoint/shibboleth/sp-cert.pem similarity index 100% rename from demo/plain/configs-and-secrets/midpoint/shibboleth/sp-cert.pem rename to demo/simple/configs-and-secrets/midpoint/shibboleth/sp-cert.pem diff --git a/demo/plain/configs-and-secrets/midpoint/shibboleth/sp-key.pem b/demo/simple/configs-and-secrets/midpoint/shibboleth/sp-key.pem similarity index 100% rename from demo/plain/configs-and-secrets/midpoint/shibboleth/sp-key.pem rename to demo/simple/configs-and-secrets/midpoint/shibboleth/sp-key.pem diff --git a/demo/plain/docker-compose.yml b/demo/simple/docker-compose.yml similarity index 100% rename from demo/plain/docker-compose.yml rename to demo/simple/docker-compose.yml diff --git a/test.sh b/midpoint-obsolete/test-root.sh similarity index 100% rename from test.sh rename to midpoint-obsolete/test-root.sh diff --git a/test/common.sh b/midpoint-obsolete/test/common.sh similarity index 100% rename from test/common.sh rename to midpoint-obsolete/test/common.sh