Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update README.md, add build.sh, set Central TZ
Building is now more straightforward and better documented.
To quickly see timezone problems we have set Central timezone
for various containers.
mederly committed Sep 25, 2018
1 parent 70fa13e commit dbd2056
Showing 10 changed files with 99 additions and 17 deletions.
29 changes: 25 additions & 4 deletions README.md
@@ -1,7 +1,28 @@
# midPoint_container
[![Build Status](https://jenkins.testbed.tier.internet2.edu/job/docker/job/midPoint_container/job/master/badge/icon)](https://jenkins.testbed.tier.internet2.edu/job/docker/job/midPoint_container/job/master/)

In the [grouper-midpoint](grouper-midpoint) directory there is a [midPoint <-> Grouper integration demo](https://spaces.at.internet2.edu/display/TIERENTREG/midPoint+-+Grouper+integration+demo).
This repository contains sources for TIER-supported images related to [Evolveum midPoint](http://midpoint.evolveum.com).

In the [midpoint](midpoint) directory there is a dockerized version of midPoint suitable for the use within TIER environment.
# Images
- `midpoint` contains the midPoint application along with some TIER-specific components: Apache reverse proxy with optional Shibboleth filter and TIER Beacon.
- `midpoint-mariadb` hosts the default MariaDB database tailored to meet midPoint needs. It can be exchanged for another repository implementation.

Both are in progress.
# Supported tags
These tags apply to both containers:
- latest
- midPoint version-specific tags, e.g. 3.9, 3.9.1, 4.0, etc.

# Content
- `midpoint` directory contains build instructions for both containers (`midpoint` and `midpoint-mariadb`),
- `demo` directory contains three demonstration scenarios:
-- `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).

# Documentation
- For the `midpoint` and `midpoint-mariadb` containers themselves please see [Dockerized midPoint](https://spaces.at.internet2.edu/display/MID/Dockerized+midPoint) wiki page.
- For the complex demo please see [midPoint - Grouper integration demo](https://spaces.at.internet2.edu/display/MID/midPoint+-+Grouper+integration+demo) wiki page.

This is a work in progress. For its current status please see [Status of the work](https://spaces.at.internet2.edu/display/MID/Status+of+the+work).
9 changes: 9 additions & 0 deletions demo/complex/README.md
@@ -0,0 +1,9 @@
This is a demonstration of using midPoint dockerization for TIER environment in a broader context. It is a work in progress.

# Building and execution
```
$ ../../midpoint/build.sh
$ docker-compose up --build
```

Please see a detailed description [here](https://spaces.at.internet2.edu/display/MID/midPoint+-+Grouper+integration+demo).
5 changes: 5 additions & 0 deletions demo/complex/grouper-daemon/Dockerfile
@@ -2,4 +2,9 @@ FROM tier/grouper:latest

LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>"

# JUST FOR TESTING - REMOVE BEFORE RELEASE
RUN rm /etc/localtime \
&& ln -s /usr/share/zoneinfo/US/Central /etc/localtime \
&& date

CMD ["daemon"]
5 changes: 5 additions & 0 deletions demo/complex/grouper-data/Dockerfile
@@ -37,4 +37,9 @@ RUN (mysqld_safe & ) \

EXPOSE 3306

# JUST FOR TESTING - REMOVE BEFORE RELEASE
RUN rm /etc/localtime \
&& ln -s /usr/share/zoneinfo/US/Central /etc/localtime \
&& date

CMD mysqld_safe
5 changes: 5 additions & 0 deletions demo/complex/grouper-ui/Dockerfile
@@ -4,4 +4,9 @@ LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>"

#COPY in custom css, images, etc

# JUST FOR TESTING - REMOVE BEFORE RELEASE
RUN rm /etc/localtime \
&& ln -s /usr/share/zoneinfo/US/Central /etc/localtime \
&& date

CMD ["ui"]
5 changes: 5 additions & 0 deletions demo/complex/idp/Dockerfile
@@ -2,4 +2,9 @@ FROM unicon/shibboleth-idp:latest

LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>"

# JUST FOR TESTING - REMOVE BEFORE RELEASE
RUN rm /etc/localtime \
&& ln -s /usr/share/zoneinfo/US/Central /etc/localtime \
&& date

COPY shibboleth-idp/ /opt/shibboleth-idp/
10 changes: 7 additions & 3 deletions midpoint/README.md
@@ -1,5 +1,9 @@
# Overview

This is a midPoint dockerization for TIER environment. It is a work in progress.

Please see a detailed description, including installation instructions [here](https://spaces.at.internet2.edu/display/MID/Dockerized+midPoint).
# Building and execution
```
$ ./build.sh
$ docker-compose up
```

Please see a detailed description [here](https://spaces.at.internet2.edu/display/MID/Dockerized+midPoint).
34 changes: 34 additions & 0 deletions midpoint/build.sh
@@ -0,0 +1,34 @@
#!/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
cd midpoint-data
docker build --tag tier/midpoint-mariadb:latest .
cd ../midpoint-server
docker build --tag tier/midpoint:latest .
cd ..
echo "---------------------------------------------------------------------------------------"
echo "The midPoint containers were successfully built. To start them, execute the following:"
echo ""
echo "(for standalone execution)"
echo ""
echo "$ cd" `pwd`
echo "$ docker-compose up"
echo ""
echo "(for complex demo)"
echo ""
echo "$ cd" $(normalize_path `pwd`/../demo/complex)
echo "$ docker-compose up --build"
6 changes: 4 additions & 2 deletions midpoint/midpoint-server/Dockerfile
@@ -98,8 +98,10 @@ ENV TIER_MAINTAINER=tier

# requires MP_VERSION and TIER_xyz variables so we have to execute it here

# TODO JUST FOR TESTING -- REMOVE BEFORE RELEASE
RUN /usr/local/bin/set-timezone.sh
# JUST FOR TESTING - REMOVE BEFORE RELEASE
RUN rm /etc/localtime \
&& ln -s /usr/share/zoneinfo/US/Central /etc/localtime \
&& date

RUN /opt/tier/setenv.sh

This file was deleted.

0 comments on commit dbd2056

Please sign in to comment.