From ff8f07bd16a34c4f96a7ec57685140037a2e8cd0 Mon Sep 17 00:00:00 2001 From: Scott Koranda Date: Mon, 1 May 2017 18:56:40 -0500 Subject: [PATCH] recipe for simple deployment for evaluating COmanage Registry --- README.md | 13 +++- simple-no-persistence/README.md | 103 ++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 simple-no-persistence/README.md diff --git a/README.md b/README.md index 9d5fd37..44839f9 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,20 @@ limitations under the License. # COmanage Registry Docker +## What it is Dockerfile templates and associated files to build images for -[COmanage Registry](https://spaces.internet2.edu/display/COmanage/Home). +[COmanage Registry](https://spaces.internet2.edu/display/COmanage/Home), as well as +documentation and recipes for both simple deployments to use for evaluating +COmanage Registry and deployments ready for production. + +## What is here + +* [Simple deployment for evaluation, no persistence](simple-no-persistence/README.md) +* [Dockerfile templates](#Dockerfile-templates) + + +## Dockerfile templates * [COmanage Registry](comanage-registry/README.md) (no authentication, primarily for developers) * [COmanage Registry with Basic Authentication](comanage-registry-basic-auth/README.md) diff --git a/simple-no-persistence/README.md b/simple-no-persistence/README.md new file mode 100644 index 0000000..62a4b33 --- /dev/null +++ b/simple-no-persistence/README.md @@ -0,0 +1,103 @@ + + +# COmanage Registry Docker Simple Evaluation No Persistence + +Follow this recipe to spin up an evaluation instance of COmanage Registry +that uses basic authentication with a pre-set login and password. Do *not* +use this recipe for any deployment with security requirements. + +This recipe will *not* persist data. All data will be lost when the containers +are removed. + +## Recipe + +Begin by creating an internal network for the containers to use: + +``` +docker network create --driver=bridge \ + --subnet=192.168.0.0/16 \ + --gateway=192.168.0.100 \ + comanage-registry-internal-network +``` + +Next build a PostgreSQL image to use as the database container: + +``` +pushd comanage-registry-postgres +docker build -t comanage-registry-postgres . +``` + +Start the database container: + +``` +docker run -d --name comanage-registry-database \ + --network comanage-registry-internal-network \ + comanage-registry-postgres +``` + +Next build the COmanage Registry image using basic authentication: + +``` +popd +pushd comanage-registry-basic-auth +export COMANAGE_REGISTRY_VERSION=hotfix-2.0.x +sed -e s/%%COMANAGE_REGISTRY_VERSION%%/${COMANAGE_REGISTRY_VERSION}/g \ + Dockerfile.template > Dockerfile +docker build \ + -t comanage-registry:${COMANAGE_REGISTRY_VERSION}-basic-auth . +``` + +Start the COmanage Registry container: + +``` +docker run -d --name comanage-registry \ + --network comanage-registry-internal-network \ + -p 80:80 -p 443:443 \ + comanage-registry:${COMANAGE_REGISTRY_VERSION}-basic-auth +``` + +The COmanage Registry service is now exposed on the host on which +Docker is running on ports 80 and 443. For example on your localhost + +``` +https://localhost/registry/ +``` + +You will need to click through browser warnings about self-signed +certificates for HTTPS. + +Click "Login" to login to the registry. For credentials use + +``` +login : registry.user +password : password +``` + +To stop the containers and destroy the network: + +``` +docker stop comanage-registry +docker stop comanage-registry-database +docker network rm comanage-registry-internal-network +``` + +