This is an automated email from the ASF dual-hosted git repository.

lahirujayathilake pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git

commit 4678809e95851e0790b62c4376633701fac10ba5
Author: lahiruj <[email protected]>
AuthorDate: Tue Oct 7 21:59:12 2025 -0400

    Changed the db to MariaDB
---
 README.md                                                    |  2 +-
 amie-decoder/pom.xml                                         |  4 ++--
 amie-decoder/src/main/resources/application.yml              |  6 +++---
 .../src/main/resources/distribution/conf/application.yml     |  6 +++---
 application/pom.xml                                          |  4 ++--
 application/src/main/resources/application.yml               |  6 +++---
 .../src/main/resources/distribution/conf/application.yml     |  6 +++---
 compose/dbinit/init-db.sh                                    |  4 +++-
 compose/docker-compose.yml                                   | 12 ++++++------
 pom.xml                                                      |  8 ++++----
 10 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/README.md b/README.md
index bca87e246..4f23e835c 100644
--- a/README.md
+++ b/README.md
@@ -55,7 +55,7 @@ git clone https://github.com/apache/airavata-custos.git
 #### Start Docker Containers (to run a development environment)
 Navigate to `/compose`, and start the following containers:
 - Keycloack (http://localhost:8080)
-- Custos DB (MySQL, http://localhost:3306)
+- Custos DB (MariDB, http://localhost:3306)
 - Vault (http://localhost:8200)
 - Adminer (http://localhost:18080)
 
diff --git a/amie-decoder/pom.xml b/amie-decoder/pom.xml
index 42446c6d7..b186a8d13 100644
--- a/amie-decoder/pom.xml
+++ b/amie-decoder/pom.xml
@@ -59,8 +59,8 @@
             <artifactId>jul-to-slf4j</artifactId>
         </dependency>
         <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
+            <groupId>org.mariadb.jdbc</groupId>
+            <artifactId>mariadb-java-client</artifactId>
         </dependency>
         <dependency>
             <groupId>org.flywaydb</groupId>
diff --git a/amie-decoder/src/main/resources/application.yml 
b/amie-decoder/src/main/resources/application.yml
index 3add2af62..5accb8388 100644
--- a/amie-decoder/src/main/resources/application.yml
+++ b/amie-decoder/src/main/resources/application.yml
@@ -21,17 +21,17 @@ spring:
   application:
     name: amie-decoder-service
   datasource:
-    url: "jdbc:mysql://localhost:3306/amie_decoder"
+    url: "jdbc:mariadb://localhost:3306/access_ci"
     username: admin
     password: admin
-    driver-class-name: com.mysql.cj.jdbc.Driver
+    driver-class-name: org.mariadb.jdbc.Driver
   jpa:
     hibernate:
       ddl-auto: update
     properties:
       hibernate.jdbc.time_zone: UTC
     show-sql: false
-    database-platform: org.hibernate.dialect.MySQL8Dialect
+    database-platform: org.hibernate.dialect.MariaDBDialect
   flyway:
     locations: classpath:db/migration
 
diff --git a/amie-decoder/src/main/resources/distribution/conf/application.yml 
b/amie-decoder/src/main/resources/distribution/conf/application.yml
index 3add2af62..396f36ad4 100644
--- a/amie-decoder/src/main/resources/distribution/conf/application.yml
+++ b/amie-decoder/src/main/resources/distribution/conf/application.yml
@@ -21,17 +21,17 @@ spring:
   application:
     name: amie-decoder-service
   datasource:
-    url: "jdbc:mysql://localhost:3306/amie_decoder"
+    url: "jdbc:mariadb://localhost:3306/amie_decoder"
     username: admin
     password: admin
-    driver-class-name: com.mysql.cj.jdbc.Driver
+    driver-class-name: org.mariadb.jdbc.Driver
   jpa:
     hibernate:
       ddl-auto: update
     properties:
       hibernate.jdbc.time_zone: UTC
     show-sql: false
-    database-platform: org.hibernate.dialect.MySQL8Dialect
+    database-platform: org.hibernate.dialect.MariaDBDialect
   flyway:
     locations: classpath:db/migration
 
diff --git a/application/pom.xml b/application/pom.xml
index 85587ba38..7459de5d9 100644
--- a/application/pom.xml
+++ b/application/pom.xml
@@ -54,8 +54,8 @@
             <artifactId>jul-to-slf4j</artifactId>
         </dependency>
         <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
+            <groupId>org.mariadb.jdbc</groupId>
+            <artifactId>mariadb-java-client</artifactId>
         </dependency>
         <dependency>
             <groupId>com.google.protobuf</groupId>
diff --git a/application/src/main/resources/application.yml 
b/application/src/main/resources/application.yml
index f3e563e29..93720c824 100644
--- a/application/src/main/resources/application.yml
+++ b/application/src/main/resources/application.yml
@@ -36,15 +36,15 @@ spring:
   application:
     name: custos-playground
   datasource:
-    url: "jdbc:mysql://localhost:3306/custos"
+    url: "jdbc:mariadb://localhost:3306/custos"
     username: admin
     password: admin
-    driver-class-name: com.mysql.cj.jdbc.Driver
+    driver-class-name: org.mariadb.jdbc.Driver
   jpa:
     hibernate:
       ddl-auto: update
     show-sql: false
-    database-platform: org.hibernate.dialect.MySQL8Dialect
+    database-platform: org.hibernate.dialect.MariaDBDialect
   cloud:
     vault:
       token: 00000000-0000-0000-0000-000000000000 # Update this with your token
diff --git a/application/src/main/resources/distribution/conf/application.yml 
b/application/src/main/resources/distribution/conf/application.yml
index f3e563e29..93720c824 100644
--- a/application/src/main/resources/distribution/conf/application.yml
+++ b/application/src/main/resources/distribution/conf/application.yml
@@ -36,15 +36,15 @@ spring:
   application:
     name: custos-playground
   datasource:
-    url: "jdbc:mysql://localhost:3306/custos"
+    url: "jdbc:mariadb://localhost:3306/custos"
     username: admin
     password: admin
-    driver-class-name: com.mysql.cj.jdbc.Driver
+    driver-class-name: org.mariadb.jdbc.Driver
   jpa:
     hibernate:
       ddl-auto: update
     show-sql: false
-    database-platform: org.hibernate.dialect.MySQL8Dialect
+    database-platform: org.hibernate.dialect.MariaDBDialect
   cloud:
     vault:
       token: 00000000-0000-0000-0000-000000000000 # Update this with your token
diff --git a/compose/dbinit/init-db.sh b/compose/dbinit/init-db.sh
index 9b1107c34..c253a1bd9 100755
--- a/compose/dbinit/init-db.sh
+++ b/compose/dbinit/init-db.sh
@@ -19,12 +19,14 @@
 
 echo "Creating databases and users..."
 
-mysql -u root -p"$MYSQL_ROOT_PASSWORD" <<-EOSQL
+mariadb -u root -p"${MARIADB_ROOT_PASSWORD}" <<-EOSQL
     CREATE DATABASE IF NOT EXISTS custos;
     CREATE DATABASE IF NOT EXISTS keycloak;
+    CREATE DATABASE IF NOT EXISTS access_ci;
     CREATE USER IF NOT EXISTS 'admin'@'%' IDENTIFIED BY 'admin';
     GRANT ALL PRIVILEGES ON custos.* TO 'admin'@'%';
     GRANT ALL PRIVILEGES ON keycloak.* TO 'admin'@'%';
+    GRANT ALL PRIVILEGES ON access_ci.* TO 'admin'@'%';
     FLUSH PRIVILEGES;
 EOSQL
 
diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml
index 5f7b1602d..66cbe537b 100644
--- a/compose/docker-compose.yml
+++ b/compose/docker-compose.yml
@@ -24,8 +24,8 @@ services:
       KC_HOSTNAME: localhost
       KC_HOSTNAME_PORT: 8080
       KC_HOSTNAME_STRICT_BACKCHANNEL: "true"
-      KC_DB: mysql
-      KC_DB_URL: jdbc:mysql://db:3306/keycloak?characterEncoding=UTF-8
+      KC_DB: mariadb
+      KC_DB_URL: jdbc:mariadb://db:3306/keycloak?characterEncoding=UTF-8
       KC_DB_USERNAME: admin
       KC_DB_PASSWORD: admin
       KEYCLOAK_ADMIN: admin
@@ -38,15 +38,15 @@ services:
 
   db:
     container_name: custos_db
-    image: mysql:8.0.31
+    image: mariadb:11.2
     restart: always
     command: --character-set-server=utf8 --collation-server=utf8_general_ci
     ports:
       - "3306:3306"
     environment:
-      MYSQL_ROOT_PASSWORD: root
-      MYSQL_USER: admin
-      MYSQL_PASSWORD: admin
+      MARIADB_ROOT_PASSWORD: root
+      MARIADB_USER: admin
+      MARIADB_PASSWORD: admin
       MAX_ALLOWED_PACKET: 1073741824
     volumes:
       - ./dbinit:/docker-entrypoint-initdb.d
diff --git a/pom.xml b/pom.xml
index a46cb3790..b50630332 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,9 +76,9 @@
 
 
             <dependency>
-                <groupId>mysql</groupId>
-                <artifactId>mysql-connector-java</artifactId>
-                <version>${mysql.connector.java}</version>
+                <groupId>org.mariadb.jdbc</groupId>
+                <artifactId>mariadb-java-client</artifactId>
+                <version>${mariadb.client.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.keycloak</groupId>
@@ -196,7 +196,7 @@
         <io.grpc.version>1.58.0</io.grpc.version>
         <com.google.protobuf.util>3.21.11</com.google.protobuf.util>
 
-        <mysql.connector.java>8.0.31</mysql.connector.java>
+        <mariadb.client.version>3.5.6</mariadb.client.version>
         <keycloak.admin.version>24.0.5</keycloak.admin.version>
         <testng.version>6.8</testng.version>
         <org.json.version>20240303</org.json.version>

Reply via email to