Change the DB from MySQL to PostgreSQL 21/10321/1
authorGuangrong Fu <fu.guangrong@zte.com.cn>
Tue, 5 Sep 2017 08:47:58 +0000 (16:47 +0800)
committerGuangrong Fu <fu.guangrong@zte.com.cn>
Tue, 5 Sep 2017 08:47:58 +0000 (16:47 +0800)
Change-Id: I654c872040b4c77f1abee1576bd3952a7ec56f79
Issue-ID: HOLMES-49
Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
engine-d-standalone/src/main/assembly/bin/run.sh
engine-d-standalone/src/main/assembly/conf/engine-d.yml
engine-d/pom.xml
pom.xml

index b33862d..59869ee 100644 (file)
@@ -35,13 +35,13 @@ sed -i "s/activemq.username=.*/activemq.username=activemq/" /home/activemq/apach
 sed -i "s/activemq.password=.*/activemq.password=v1/" /home/activemq/apache-activemq-5.9.0/conf/credentials.properties
 /home/activemq/apache-activemq-5.9.0/bin/activemq start
 
-sed -i "s|url:.*|url: jdbc:mysql://$URL_JDBC/holmes|" "$main_path/conf/engine-d.yml"
+sed -i "s|url:.*|url: jdbc:postgresql://$URL_JDBC/holmes|" "$main_path/conf/engine-d.yml"
 
 
 export SERVICE_IP=`hostname -i`
 echo SERVICE_IP=${SERVICE_IP}
 
-#ActiveMQ IP Configurtion
+#ActiveMQ IP Configurations
 sed -i "s|brokerIp:.*|brokerIp: $SERVICE_IP|" "$main_path/conf/engine-d.yml"
 
 cat "$main_path/conf/engine-d.yml"
index de129c4..06f1913 100644 (file)
@@ -49,10 +49,10 @@ logging:
 \r
 \r
 database:\r
-  driverClass: com.mysql.jdbc.Driver\r
+  driverClass: org.postgresql.Driver\r
   user: holmes\r
-  password: holmes\r
-  url: jdbc:mysql://10.74.156.206:3306/holmes\r
+  password: holmespwd\r
+  url: jdbc:postgresql://169.254.59.196:5432/holmes\r
   properties:\r
     charSet: UTF-8\r
   maxWaitForConnection: 1s\r
index 0a7c3eb..bc8cb20 100644 (file)
             <artifactId>lombok</artifactId>
         </dependency>
         <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
         </dependency>
         <dependency>
             <groupId>org.quartz-scheduler</groupId>
diff --git a/pom.xml b/pom.xml
index 74af517..522f479 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -47,7 +47,7 @@
 
 
         <stringtemplate.version>3.2.1</stringtemplate.version>
-        <mysql.connector.version>5.1.38</mysql.connector.version>
+        <postgres.jdbc.driver.version>42.1.1</postgres.jdbc.driver.version>
         <dropwizard.version>0.8.0</dropwizard.version>
         <swagger.version>1.5.3</swagger.version>
         <lombok.version>1.16.4</lombok.version>
 
     <dependencyManagement>
         <dependencies>
+            <dependency>
+                <groupId>org.postgresql</groupId>
+                <artifactId>postgresql</artifactId>
+                <version>${postgres.jdbc.driver.version}</version>
+            </dependency>
             <dependency>
                 <groupId>org.onap.msb.java-sdk</groupId>
                 <artifactId>msb-java-sdk</artifactId>
                 <version>${slf4j.version}</version>
             </dependency>
 
-            <dependency>
-                <groupId>mysql</groupId>
-                <artifactId>mysql-connector-java</artifactId>
-                <version>${mysql.connector.version}</version>
-            </dependency>
-
             <dependency>
                 <groupId>org.antlr</groupId>
                 <artifactId>stringtemplate</artifactId>