Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ jobs:
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
Expand All @@ -61,7 +61,7 @@ jobs:
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mvn-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
server-password: MAVEN_PASSWORD

- name: Publish to OSS and Docker hub
run: mvn deploy -Pintegration -Pcoverage -Pdeploy -Pdocker --batch-mode --errors --fail-at-end --show-version --file pom.xml
run: mvn deploy -Pintegration -Pcoverage -Pdeploy -Pdocker -pl !e2e --batch-mode --errors --fail-at-end --show-version --file pom.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mvn-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: E2E Test
if: success()
run: mvn verify -pl e2e
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 6 additions & 0 deletions e2e/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
</build>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
Expand Down
32 changes: 15 additions & 17 deletions e2e/src/test/java/com/arcadedb/e2e/ArcadeContainerTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,21 @@
import java.time.*;

public abstract class ArcadeContainerTemplate {
static final GenericContainer ARCADE;
static final GenericContainer ARCADE;

static {
ARCADE = new GenericContainer("arcadedata/arcadedb:latest").withExposedPorts(2480, 6379, 5432, 8182)//
.withStartupTimeout(Duration.ofSeconds(90))//
.withEnv("arcadedb.server.rootPassword", "playwithdata")
.withEnv("arcadedb.server.defaultDatabases", "beer[root]{import:https://github.com/ArcadeData/arcadedb-datasets/raw/main/orientdb/OpenBeer.gz}")
.withEnv("arcadedb.server.plugins", "Redis:com.arcadedb.redis.RedisProtocolPlugin, " +//
"MongoDB:com.arcadedb.mongo.MongoDBProtocolPlugin, " +//
"Postgres:com.arcadedb.postgres.PostgresProtocolPlugin, " +//
"GremlinServer:com.arcadedb.server.gremlin.GremlinServerPlugin").waitingFor(Wait.forListeningPort());
ARCADE.start();
}
static {
ARCADE = new GenericContainer("arcadedata/arcadedb:latest").withExposedPorts(2480, 6379, 5432, 8182)//
.withStartupTimeout(Duration.ofSeconds(90))
.withEnv("JAVA_OPTS", "-Darcadedb.server.rootPassword=playwithdata " +
"-Darcadedb.server.defaultDatabases=beer[root]{import:https://github.com/ArcadeData/arcadedb-datasets/raw/main/orientdb/OpenBeer.gz} " +
"-Darcadedb.server.plugins=Redis:com.arcadedb.redis.RedisProtocolPlugin,MongoDB:com.arcadedb.mongo.MongoDBProtocolPlugin,Postgres:com.arcadedb.postgres.PostgresProtocolPlugin,GremlinServer:com.arcadedb.server.gremlin.GremlinServerPlugin")
.waitingFor(Wait.forListeningPort());
ARCADE.start();
}

protected String host = ARCADE.getHost();
protected int httpPort = ARCADE.getMappedPort(2480);
protected int redisPort = ARCADE.getMappedPort(6379);
protected int pgsqlPort = ARCADE.getMappedPort(5432);
protected int gremlinPort = ARCADE.getMappedPort(8182);
protected String host = ARCADE.getHost();
protected int httpPort = ARCADE.getMappedPort(2480);
protected int redisPort = ARCADE.getMappedPort(6379);
protected int pgsqlPort = ARCADE.getMappedPort(5432);
protected int gremlinPort = ARCADE.getMappedPort(8182);
}
3 changes: 2 additions & 1 deletion engine/src/main/java/com/arcadedb/log/LogManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@
public class LogManager {
private static final LogManager instance = new LogManager();
private boolean debug = false;
private Logger logger = new DefaultLogger();
private Logger logger;

static class LogContext extends ThreadLocal<String> {
}

public static final LogContext CONTEXT_INSTANCE = new LogContext();

protected LogManager() {
logger = new DefaultLogger();
}

public static LogManager instance() {
Expand Down
2 changes: 1 addition & 1 deletion engine/src/main/resources/arcadedb-log.properties
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ java.util.logging.ConsoleHandler.formatter = com.arcadedb.utility.AnsiLogFormatt
# Set the default logging level for new FileHandler instances
java.util.logging.FileHandler.level = INFO
# Naming style for the output file
java.util.logging.FileHandler.pattern=log/arcadedb.log
java.util.logging.FileHandler.pattern=./log/arcadedb.log
# Set the default formatter for new FileHandler instances
java.util.logging.FileHandler.formatter = com.arcadedb.log.LogFormatter
# Limiting size of output file in bytes:
Expand Down
95 changes: 34 additions & 61 deletions package/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
<artifactId>arcadedb-package</artifactId>
<packaging>pom</packaging>

<properties>
<kubernetes-maven-plugin.version>1.8.0</kubernetes-maven-plugin.version>
</properties>

<parent>
<groupId>com.arcadedb</groupId>
<artifactId>arcadedb-parent</artifactId>
Expand Down Expand Up @@ -143,73 +147,42 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<version>${kubernetes-maven-plugin.version}</version>
<executions>
<execution>
<id>docker-resources</id>
<phase>validate</phase>
<id>default</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>copy-resources</goal>
<goal>push</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/docker/</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/*.yml</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>${dockerfile-maven-version}</version>
<executions>
<execution>
<id>default</id>
<phase>package</phase>
<goals>
<goal>build</goal>
<goal>tag</goal>
</goals>
<configuration>
<tag>latest</tag>
</configuration>
</execution>
<execution>
<id>tag-version</id>
<phase>package</phase>
<goals>
<goal>tag</goal>
</goals>
<configuration>
<tag>${project.version}</tag>
</configuration>
</execution>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>push</goal>
</goals>
</execution>
</executions>
<configuration>
<buildArgs>
<ARCADEDB_VERSION>${project.version}</ARCADEDB_VERSION>
</buildArgs>
<repository>arcadedata/arcadedb</repository>
<contextDirectory>${project.build.directory}</contextDirectory>
</configuration>
<configuration>
<verbose>true</verbose>
<images>
<image>
<name>arcadedata/arcadedb</name>
<build>
<dockerFile>${project.basedir}/src/main/docker/Dockerfile</dockerFile>
<contextDir>${project.build.directory}/arcadedb-${project.version}.dir
</contextDir>
<tags>
<tag>latest</tag>
<tag>${project.version}</tag>
</tags>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
4 changes: 2 additions & 2 deletions package/src/main/assembly/archive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@
<files>
<file>
<source>${basedir}/../README.md</source>
<fileMode>444</fileMode>
<fileMode>666</fileMode>
</file>
<file>
<source>${basedir}/../LICENSE</source>
<fileMode>444</fileMode>
<fileMode>666</fileMode>
</file>
</files>
<!--
Expand Down
2 changes: 1 addition & 1 deletion package/src/main/config/gremlin-server.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
#

gremlin.graph=org.apache.tinkerpop.gremlin.arcadedb.structure.ArcadeGraph
gremlin.arcadedb.directory=../databases/graph
gremlin.arcadedb.directory=./databases/graph
4 changes: 2 additions & 2 deletions package/src/main/config/gremlin-server.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
host: 0.0.0.0
graphs:
graph: ../config/gremlin-server.properties
graph: ./config/gremlin-server.properties
scriptEngines:
gremlin-groovy:
plugins:
Expand All @@ -12,7 +12,7 @@ scriptEngines:
- 'java.lang.Math#*'
org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin:
files:
- ../config/gremlin-server.groovy
- ./config/gremlin-server.groovy
serializers:
- className: org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1
config:
Expand Down
19 changes: 11 additions & 8 deletions package/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,32 @@
# limitations under the License.
#

FROM eclipse-temurin:11.0.13_8-jdk-alpine

ARG ARCADEDB_VERSION
FROM eclipse-temurin:11

LABEL maintainer="Arcade Data LTD (info@arcadedb.com)"

ENV JAVA_OPTS=" -XX:+UnlockExperimentalVMOptions -XX:+UseZGC "
ENV JAVA_OPTS=" "

ENV JAVA_OPTS_SCRIPT="-Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF8"

ENV ARCADEDB_OPTS_MEMORY="-Xms2G -Xmx2G"

ENV ARCADEDB_JMX="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.rmi.port=9998"

RUN adduser -D -s /bin/sh arcadedb
RUN useradd -ms /bin/bash arcadedb

WORKDIR /home/arcadedb

COPY arcadedb-${ARCADEDB_VERSION}.dir/arcadedb-${ARCADEDB_VERSION} ./
COPY --chown=arcadedb:arcadedb ./maven/arcadedb-* ./
RUN chmod +x ./bin/*.sh

# Volumes available
VOLUME [ "/home/arcadedb/databases"]

VOLUME [ "/home/arcadedb/log"]

VOLUME [ "/home/arcadedb/config"]

# ArcadeDB HTTP API & STUDIO
EXPOSE 2480

Expand All @@ -58,5 +62,4 @@ EXPOSE 27017
EXPOSE 9999
EXPOSE 9998

WORKDIR "/home/arcadedb/bin"
CMD ["./server.sh"]
CMD ["./bin/server.sh"]