Use mariadb JDBC connector 77/13177/1
authorDan Timoney <dtimoney@att.com>
Mon, 18 Sep 2017 15:59:15 +0000 (11:59 -0400)
committerDan Timoney <dtimoney@att.com>
Mon, 18 Sep 2017 15:59:15 +0000 (11:59 -0400)
Update CCSDK container to use MariaDB JDBC connector instead of
mysql connector. This is needed to resolve licensing issue. Both connectors
are compatible with both MySQL and MariaDB back end databases, but
mysql JDBC connector is licensed under GPL 2.0, while MariaDB JDBC
is licensed under LGPL 2.0.

Change-Id: I919e8463c1e0ef162b9becc5023ebf623423df78
Issue-ID: CCSDK-95
Signed-off-by: Dan Timoney <dtimoney@att.com>
odlsli/src/main/properties/dblib.properties
opendaylight/pom.xml
opendaylight/src/main/docker/Dockerfile

index 6a8dc79..d6d9f34 100644 (file)
@@ -24,7 +24,7 @@ org.onap.ccsdk.sli.dbtype=jdbc
 
 org.onap.ccsdk.sli.jdbc.hosts=sdnctldb01
 org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://dbhost:3306/sdnctl
-org.openecomp.sdnc.sli.jdbc.driver=com.mysql.jdbc.Driver
+org.openecomp.sdnc.sli.jdbc.driver=org.mariadb.jdbc.Driver
 org.onap.ccsdk.sli.jdbc.database=sdnctl
 org.onap.ccsdk.sli.jdbc.user=sdnctl
 org.onap.ccsdk.sli.jdbc.password=gamma
index 5924cba..1061bbb 100644 (file)
@@ -20,7 +20,7 @@
         <image.name>onap/ccsdk-odl-image</image.name>
         <ccsdk.project.version>${project.version}</ccsdk.project.version>
         <ccsdk.opendaylight.version>0.6.1-Carbon</ccsdk.opendaylight.version>
-        <ccsdk.mysql-connector-java.version>5.1.39</ccsdk.mysql-connector-java.version>
+        <ccsdk.mariadb-connector-java.version>2.1.1</ccsdk.mariadb-connector-java.version>
         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
     </properties>
 
@@ -33,9 +33,9 @@
                 <type>tar.gz</type>
             </dependency>
             <dependency>
-                <groupId>mysql</groupId>
-                <artifactId>mysql-connector-java</artifactId>
-                <version>${ccsdk.mysql-connector-java.version}</version>
+                <groupId>org.mariadb.jdbc</groupId>
+                <artifactId>mariadb-java-client</artifactId>
+                <version>${ccsdk.mariadb-connector-java.version}</version>
                 <type>jar</type>
             </dependency>
         </dependencies>
                                 println project.properties['ccsdk.project.version'];
                                 def versionArray;
                                 if (project.properties['ccsdk.project.version'] != null ) {
-                                    versionArray = project.properties['ccsdk.project.version'].split('\\.');
+                                versionArray = project.properties['ccsdk.project.version'].split('\\.');
                                 }
 
                                 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
                                 {
-                                    project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
+                                project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
                                 } else {
-                                    project.properties['project.docker.latesttag.version']=versionArray[0]+ '.' + versionArray[1] +"-STAGING-latest";
+                                project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
                                 }
 
                                 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
                 <version>3.0.0</version>
                 <executions>
                     <execution>
-                        <id>get-mysql-connector-jar</id>
+                        <id>get-mariadb-connector-jar</id>
                         <phase>validate</phase>
                         <goals>
                             <goal>copy</goal>
                         <configuration>
                             <artifactItems>
                                 <artifactItem>
-                                    <groupId>mysql</groupId>
-                                    <artifactId>mysql-connector-java</artifactId>
-                                    <version>${ccsdk.mysql-connector-java.version}</version>
+                                    <groupId>org.mariadb.jdbc</groupId>
+                                    <artifactId>mariadb-java-client</artifactId>
+                                    <version>${ccsdk.mariadb-connector-java.version}</version>
                                     <type>jar</type>
-
                                     <overWrite>true</overWrite>
                                     <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
                                 </artifactItem>
index 35d1277..afa912b 100644 (file)
@@ -13,7 +13,7 @@ RUN mkdir /opt/opendaylight \
 
 
 # workaround till we get proxy working
-RUN mkdir -p /opt/opendaylight/current/system/mysql/mysql-connector-java/${ccsdk.mysql-connector-java.version}
-COPY mysql-connector-java-${ccsdk.mysql-connector-java.version}.jar /opt/opendaylight/current/system/mysql/mysql-connector-java/${ccsdk.mysql-connector-java.version}
+RUN mkdir -p /opt/opendaylight/current/system/org/mariadb/jdbc/mariadb-java-client/${ccsdk.mariadb-connector-java.version}
+COPY mariadb-java-client-${ccsdk.mysql-connector-java.version}.jar /opt/opendaylight/current/system/org/mariadb/jdbc/mariadb-java-client/${ccsdk.mariadb-connector-java.version}
 # ENTRYPOINT exec /opt/opendaylight/current/bin/karaf
 EXPOSE 8181

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use