Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use standard tier/mariadb instead of custom one
It was not easy to build two Docker images in TIER Jenkinsfile
(using docker/util). It seems that tier/mariadb:mariadb10 is OK to be
used with midPoint without any customizations, so we use it.
mederly committed Sep 26, 2018
1 parent bed5f72 commit 91fd1bd
Showing 14 changed files with 17 additions and 87 deletions.
23 changes: 4 additions & 19 deletions Jenkinsfile
@@ -3,7 +3,6 @@ pipeline {
environment {
maintainer = "t"
imagename = 'm'
imagename_data = 'md'
tag = 'l'
}
stages {
@@ -12,14 +11,13 @@ pipeline {
script {
maintainer = maintain()
imagename = imagename()
imagename_data = imagename_data()
if(env.BRANCH_NAME == "master") {
tag = "latest"
} else {
tag = env.BRANCH_NAME
}
if(!imagename || !imagename_data){
echo "You must define imagename and imagename_data in common.bash"
if(!imagename){
echo "You must define imagename in common.bash"
currentBuild.result = 'FAILURE'
}
sh 'mkdir -p bin'
@@ -58,21 +56,13 @@ pipeline {
// sh 'cd test-compose && docker-compose down'
baseImg.push("$tag")
}
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") {
def baseImg = docker.build("$maintainer/$imagename_data", "--no-cache midpoint/midpoint-data")
// test the environment
// sh 'cd test-compose && ./compose.sh'
// bring down after testing
// sh 'cd test-compose && docker-compose down'
baseImg.push("$tag")
}
}
}
}
stage('Notify') {
steps {
echo "$maintainer"
slackSend color: 'good', message: "$maintainer/$imagename:$tag and $maintainer/$imagename_data:$tag pushed to DockerHub"
slackSend color: 'good', message: "$maintainer/$imagename:$tag pushed to DockerHub"
}
}
}
@@ -82,7 +72,7 @@ pipeline {
}
failure {
// slackSend color: 'good', message: "Build failed"
handleError("BUILD ERROR: There was a problem building ${maintainer}/${imagename}:${tag} or ${maintainer}/${imagename_data}:${tag}.")
handleError("BUILD ERROR: There was a problem building ${maintainer}/${imagename}:${tag}.")
}
}
}
@@ -98,11 +88,6 @@ def imagename() {
matcher ? matcher[0][1] : null
}

def imagename_data() {
def matcher = readFile('common.bash') =~ 'imagename_data="(.+)"'
matcher ? matcher[0][1] : null
}

def handleError(String message){
echo "${message}"
currentBuild.setResult("FAILED")
11 changes: 4 additions & 7 deletions README.md
@@ -1,18 +1,15 @@
[![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/)

This repository contains sources for TIER-supported images related to [Evolveum midPoint](http://midpoint.evolveum.com).
This repository contains sources for TIER-supported [midPoint](http://midpoint.evolveum.com) image.

# 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.
The image contains the midPoint application along with some TIER-specific components: Apache reverse proxy with optional Shibboleth filter and TIER Beacon.

# 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`),
- `midpoint` directory contains build instructions for the `midpoint` image along with `docker-compose.yml` showing its basic use,
- `demo` directory contains three demonstration scenarios:
- `shibboleth` to show integration with Shibboleth IdP,
- `postgresql` to show how to change the repository implementation,
@@ -22,7 +19,7 @@ These tags apply to both containers:
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 `midpoint` image and container 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).
1 change: 0 additions & 1 deletion common.bash
@@ -1,3 +1,2 @@
maintainer="tier"
imagename="midpoint"
imagename_data="midpoint-mariadb"
4 changes: 2 additions & 2 deletions demo/complex/.env
@@ -5,8 +5,8 @@ REPO_DATABASE_TYPE=mariadb
REPO_JDBC_URL=default
REPO_HOST=midpoint-data
REPO_PORT=default
REPO_DATABASE=midpoint
REPO_USER=root
REPO_DATABASE=registry
REPO_USER=registry_user
REPO_PASSWORD_FILE=/run/secrets/m_database_password.txt
KEYSTORE_PASSWORD_FILE=/run/secrets/m_keystore_password.txt
MEM=2048m
@@ -1 +1 @@
456654
WJzesbe3poNZ91qIbmR7
2 changes: 1 addition & 1 deletion demo/complex/docker-compose.yml
@@ -190,7 +190,7 @@ services:
- target_data:/var/lib/mysql

midpoint-data:
image: tier/midpoint-mariadb:latest
image: tier/mariadb:mariadb10
ports:
- "33306:3306"
networks:
4 changes: 2 additions & 2 deletions midpoint/.env
@@ -5,8 +5,8 @@ REPO_DATABASE_TYPE=mariadb
REPO_JDBC_URL=default
REPO_HOST=midpoint-data
REPO_PORT=default
REPO_DATABASE=midpoint
REPO_USER=root
REPO_DATABASE=registry
REPO_USER=registry_user
REPO_PASSWORD_FILE=/run/secrets/m_database_password.txt
KEYSTORE_PASSWORD_FILE=/run/secrets/m_keystore_password.txt
MEM=2048m
6 changes: 1 addition & 5 deletions midpoint/build.sh
@@ -15,11 +15,7 @@ function normalize_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 ..
docker build --tag tier/midpoint:latest midpoint-server
echo "---------------------------------------------------------------------------------------"
echo "The midPoint containers were successfully built. To start them, execute the following:"
echo ""
@@ -1 +1 @@
456654
WJzesbe3poNZ91qIbmR7
6 changes: 1 addition & 5 deletions midpoint/docker-compose.yml
@@ -9,9 +9,7 @@ version: "3.3"

services:
midpoint-data:
build: ./midpoint-data/
expose:
- 3306
image: tier/mariadb:mariadb10
ports:
- 3306:3306
networks:
@@ -21,8 +19,6 @@ services:

midpoint-server:
build: ./midpoint-server/
expose:
- 443
ports:
- 8443:443
environment:
35 changes: 0 additions & 35 deletions midpoint/midpoint-data/Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions midpoint/midpoint-data/conf/mariadb.repo

This file was deleted.

1 change: 0 additions & 1 deletion midpoint/midpoint-data/database_password.txt

This file was deleted.

1 change: 0 additions & 1 deletion midpoint/midpoint-data/readme.txt

This file was deleted.

0 comments on commit 91fd1bd

Please sign in to comment.