Merge branch 'master' of https://awittek@git.eclipse.org/r/a/mdmbl/org.eclipse.mdmbl.git
diff --git a/Setup Tools/docker-avalon/Dockerfile b/Setup Tools/docker-avalon/Dockerfile
new file mode 100755
index 0000000..acf38ae
--- /dev/null
+++ b/Setup Tools/docker-avalon/Dockerfile
@@ -0,0 +1,43 @@
+from centos:7
+
+RUN yum -y update && yum -y install libaio java-1.8.0-openjdk-devel ant less net-tools patch
+
+ADD oracle /tmp/oracle
+
+RUN yum -y localinstall /tmp/oracle/oracle-instantclient*basic*.rpm /tmp/oracle/oracle-instantclient*sqlplus*.rpm
+
+ENV ORACLE_HOME=/usr/lib/oracle/12.2/client64
+
+ENV PATH=$PATH:$ORACLE_HOME/bin
+
+ADD avalon /tmp/avalon
+
+RUN mkdir -p /opt
+WORKDIR /opt
+RUN tar -xvzf /tmp/avalon/serversuite-jacorb*.tgz
+
+RUN echo export JACORB_HOME=`ls -d /opt/jacorb*` >> ~/.bashrc
+RUN echo export PATH=\$PATH:\$JACORB_HOME/bin >> ~/.bashrc
+
+ADD config /tmp/config
+
+COPY config/tnsnames.ora $ORACLE_HOME/network/admin/tnsnames.ora
+
+RUN bash -c '. ~/.bashrc ; cd $JACORB_HOME ; ant scripts ; cd $JACORB_HOME/etc ; patch -p1 < /tmp/config/jacorb_properties.diff'
+
+RUN echo export ATHOS_ROOT=`ls -d /opt/avalon*` >> ~/.bashrc
+RUN echo export PATH=\$PATH:\$ATHOS_ROOT/bin/Linux >> ~/.bashrc
+RUN echo export ATHOS_INI=\$ATHOS_ROOT/etc/athos.ini >> ~/.bashrc
+RUN echo function startns \(\) \{ ns -DOAHost=0.0.0.0 -DOAPort=2809 \; \} >> ~/.bashrc
+RUN echo function startavalon \(\) \{ jaco -Djacorb.net.server_socket_factory=org.jacorb.orb.factory.PortRangeServerSocketFactory -Djacorb.net.server_socket_factory.port.min=43333 -Djacorb.net.server_socket_factory.port.max=43333 -jar \$ATHOS_ROOT/jar/Avalon.jar -NameServiceHost localhost -NameServicePort 2809 -ServiceName avods \; \} >> ~/.bashrc
+
+RUN bash -c '. ~/.bashrc ; cd $ATHOS_ROOT/etc ; patch -p1 < /tmp/config/athos_ini.diff'
+
+RUN echo export LD_LIBRARY_PATH=\$ATHOS_ROOT/bin/Linux:\$ORACLE_HOME/lib:\$ORACLE_HOME/bin >> ~/.bashrc
+
+EXPOSE 2809
+EXPOSE 43333
+
+CMD bash -c '. ~/.bashrc ; startns & startavalon'
+
+
diff --git a/Setup Tools/docker-avalon/README.md b/Setup Tools/docker-avalon/README.md
new file mode 100755
index 0000000..3414d02
--- /dev/null
+++ b/Setup Tools/docker-avalon/README.md
@@ -0,0 +1,43 @@
+## Introduction

+

+This dockerfile should facilitate installation and allow us to have a common base for tests

+

+## Prerequisites

+

+You need to have a license server for avalon running (if you setup the server for the first time, please

+keep in mind that the standard license key for avalon will not work on virtual machines, so double check if

+you have a real machine as license server, before you request the licence file).

+

+You also need to have an Oracle server installation running, which is compatible to the 

+Oracle 12.2 instant client. You should have an openMDM 5 compatible database schema installed on 

+the oracle server.

+

+## Installation

+

+you need to do the following steps:

+1. download oracle instant client rpms from here: http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

+   You need the base-rpm and the sqlplus rpm. We recommend using the oracle 12.2 client.

+2. put the oracle rpms in the oracle subdir

+3. download the avalon linux binary from here: https://www.highqsoft.com/downloads

+   You need the linux archive. We recommend avalon 4.6a with jacorb.

+4. put the avalon archive into the avalon directory

+5. edit or replace config/tnsnames.ora so that it contains the connection parameters for your 

+oracle database.

+6. edit config/athos_ini.diff . Just change the lines marked by "MINIMAL SETUP" to the settings necessary

+   for your environment.

+7. run "docker build --tag avalon docker-avalon"

+

+## Running

+Just run "docker run --net=host -ti avalon".

+This will use port 2809 for the corba nameservice and port 43333 for the communication

+with avalon. The ip adress used will be the address of the host docker is running on.

+The name of the service will be "avods".

+

+So an appropriate entry in your glassfish/domains/domain1/config/org.eclipse.mdm.connector/service.xml

+would look like this (replace the IP by the one of your docker host):

+<service entityManagerFactoryClass="org.eclipse.mdm.api.odsadapter.ODSEntityManagerFactory">

+	<param name="nameservice">corbaloc::1.2@192.168.1.234:2809/NameService</param>

+	<param name="servicename">avods.ASAM-ODS</param>

+</service>

+

+

diff --git a/Setup Tools/docker-avalon/avalon/.gitignore b/Setup Tools/docker-avalon/avalon/.gitignore
new file mode 100644
index 0000000..aa1ec1e
--- /dev/null
+++ b/Setup Tools/docker-avalon/avalon/.gitignore
@@ -0,0 +1 @@
+*.tgz
diff --git a/Setup Tools/docker-avalon/config/athos_ini.diff b/Setup Tools/docker-avalon/config/athos_ini.diff
new file mode 100755
index 0000000..88dd46e
--- /dev/null
+++ b/Setup Tools/docker-avalon/config/athos_ini.diff
@@ -0,0 +1,67 @@
+--- config.orig/athos.ini	2017-08-10 15:07:09.884888611 +0200
++++ config/athos.ini	2017-08-10 09:47:42.485726402 +0200
+@@ -23,16 +23,17 @@
+ ;    1          Entry calls and error messages.
+ ;    2          Like 1 and in and out parameter.
+ ;    3          Like 2 and all information.
+-DEBUGLEVEL     = 0
++DEBUGLEVEL     = 10
++LOG_EVENTS     = 10
+ 
+ 
+-[SERVICE "$AvalonIniPanel.servicename"]
++[SERVICE avods]
+ 
+ 
+ ;
+ ; GENERIC SETTINGS
+ ;
+-DIRECTORY = "///$(ATHOS_ROOT)/bin/win64/"
++DIRECTORY = "///$(ATHOS_ROOT)/bin/Linux/"
+ USE_UNIQUE_REFNAME = NO
+ FILTER_VARIABLES = DB_LIST
+ CHECKDATEFORMAT = YES
+@@ -40,9 +41,9 @@
+ FILE_MODE = MULTI_VOLUME
+ FILE_SYMBOLS = BIN_PATH
+ FILE_ROOT = $(BIN_PATH)
+-FILE_ROOT_EXTREF = $AvalonIniPanel.file.root.extref
+-FILE_ROOT_MANAGED = $AvalonIniPanel.file.root.managed
+-BIN_PATH = "$AvalonIniPanel.file.root"
++FILE_ROOT_EXTREF = /tmp/bin/extref
++FILE_ROOT_MANAGED = /tmp/bin/managed
++BIN_PATH = "/tmp/bin"
+ BIN_SUBDIR = AYYYYMMDDHHIISS
+ USE_RELATION_SVCACLI = YES
+ COMPARE_CASE_SENSITIVE = YES
+@@ -62,16 +63,25 @@
+ REOPEN_ALWAYS = YES
+ USE_STRICT_INV_RELNAME = YES
+ NOTIFICATION_DEVICE="///$(ATHOS_ROOT)/log/notification_device.log"
+-LICENSE_LOCATION=$AvalonIniPanel.licence.location
++
++;;;;;;;;;;;; MINIMAL SETUP: set license server here ;;;;;;;;;;;;;;;;
++LICENSE_LOCATION=5053@10.108.245.125
+ 
+ 
+ ;
+ ; DATABASE SETTINGS
+ ;
+-DRIVER = $oracle.version
+-DB_PASSWORD = $oracle.password
+-DB_NAME = $oracle.dbname
+-DB_USERNAME = $oracle.username
++DRIVER = mme121
++
++;;;;;;;;;;;; MINIMAL SETUP: set password of database schema user here ;;;;;;;;;;;;;;;;
++DB_PASSWORD = XXXXXXX
++
++;;;;;;;;;;;; MINIMAL SETUP: set name of database here ;;;;;;;;;;;;;;;;
++DB_NAME = testdb
++
++;;;;;;;;;;;; MINIMAL SETUP: set name of database schema user here ;;;;;;;;;;;;;;;;
++DB_USERNAME = openmdm5
++
+ SEARCH_FOR_BASE_REF = NO
+ CHECK_DB_TABLES = YES
+ SQL_MAX_ROWS = 20000
diff --git a/Setup Tools/docker-avalon/config/jacorb_properties.diff b/Setup Tools/docker-avalon/config/jacorb_properties.diff
new file mode 100755
index 0000000..4bad3e0
--- /dev/null
+++ b/Setup Tools/docker-avalon/config/jacorb_properties.diff
@@ -0,0 +1,26 @@
+--- config.orig/jacorb.properties	2017-08-10 15:56:43.473379450 +0200
++++ config/jacorb.properties	2017-07-27 14:19:55.352094093 +0200
+@@ -18,11 +18,11 @@
+ # displayed (because the services aren't up yet). These exceptions
+ # are handled properly and cause no harm!
+ 
+-#ORBInitRef.NameService=corbaloc::160.45.110.41:38693/StandardNS/NameServer-POA/_root
++#ORBInitRef.NameService=corbaloc::160.45.110.41:38693/StandardNS/NameServer-POA/_root
+ #ORBInitRef.NameService=file:/c:/NS_Ref
+-ORBInitRef.NameService=http://www.x.y.z/~user/NS_Ref
++#ORBInitRef.NameService=http://www.x.y.z/~user/NS_Ref
+ #ORBInitRef.TradingService=http://www.x.y.z/~user/TraderRef
+-ORBInitRef.InterfaceRepository=file:/c:/IR_Ref
++ORBInitRef.InterfaceRepository=file:/tmp/IR_Ref
+ 
+ ########################################
+ #                                      #
+@@ -715,7 +722,7 @@
+ jacorb.naming.noping=on
+ 
+ # The file where the name server drops its IOR
+-jacorb.naming.ior_filename=c:/NS_Ref
++jacorb.naming.ior_filename=/tmp/NS_Ref
+ 
+ 
+ ########################################################
diff --git a/Setup Tools/docker-avalon/config/tnsnames.ora b/Setup Tools/docker-avalon/config/tnsnames.ora
new file mode 100755
index 0000000..fec5ef6
--- /dev/null
+++ b/Setup Tools/docker-avalon/config/tnsnames.ora
@@ -0,0 +1,11 @@
+# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
+# Generated by Oracle configuration tools.
+
+TESTDB =
+  (DESCRIPTION =
+    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.2.40)(PORT = 1521))
+    (CONNECT_DATA =
+      (SERVER = DEDICATED)
+      (SERVICE_NAME = utf8)
+    )
+  )
\ No newline at end of file
diff --git a/Setup Tools/docker-avalon/oracle/.gitignore b/Setup Tools/docker-avalon/oracle/.gitignore
new file mode 100644
index 0000000..e7a9c13
--- /dev/null
+++ b/Setup Tools/docker-avalon/oracle/.gitignore
@@ -0,0 +1 @@
+*.rpm