Skip to content
7 changes: 7 additions & 0 deletions docker/docker-compose-3pd-3store-3server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ x-server-common: &server-common
STORE_REST: store0:8520
HG_SERVER_BACKEND: hstore
HG_SERVER_PD_PEERS: pd0:8686,pd1:8686,pd2:8686
STDOUT_MODE: "true"
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8080/versions >/dev/null || exit 1"]
interval: 10s
Expand All @@ -96,6 +97,7 @@ services:
HG_PD_INITIAL_STORE_LIST: store0:8500,store1:8500,store2:8500
HG_PD_DATA_PATH: /hugegraph-pd/pd_data
HG_PD_INITIAL_STORE_COUNT: 3
STDOUT_MODE: "true"
ports: ["8620:8620", "8686:8686"]
volumes:
- hg-pd0-data:/hugegraph-pd/pd_data
Expand All @@ -114,6 +116,7 @@ services:
HG_PD_INITIAL_STORE_LIST: store0:8500,store1:8500,store2:8500
HG_PD_DATA_PATH: /hugegraph-pd/pd_data
HG_PD_INITIAL_STORE_COUNT: 3
STDOUT_MODE: "true"
ports: ["8621:8620", "8687:8686"]
volumes:
- hg-pd1-data:/hugegraph-pd/pd_data
Expand All @@ -132,6 +135,7 @@ services:
HG_PD_INITIAL_STORE_LIST: store0:8500,store1:8500,store2:8500
HG_PD_DATA_PATH: /hugegraph-pd/pd_data
HG_PD_INITIAL_STORE_COUNT: 3
STDOUT_MODE: "true"
ports: ["8622:8620", "8688:8686"]
volumes:
- hg-pd2-data:/hugegraph-pd/pd_data
Expand All @@ -148,6 +152,7 @@ services:
HG_STORE_REST_PORT: "8520"
HG_STORE_RAFT_ADDRESS: store0:8510
HG_STORE_DATA_PATH: /hugegraph-store/storage
STDOUT_MODE: "true"
ports: ["8500:8500", "8510:8510", "8520:8520"]
volumes:
- hg-store0-data:/hugegraph-store/storage
Expand All @@ -163,6 +168,7 @@ services:
HG_STORE_REST_PORT: "8520"
HG_STORE_RAFT_ADDRESS: store1:8510
HG_STORE_DATA_PATH: /hugegraph-store/storage
STDOUT_MODE: "true"
ports: ["8501:8500", "8511:8510", "8521:8520"]
volumes:
- hg-store1-data:/hugegraph-store/storage
Expand All @@ -178,6 +184,7 @@ services:
HG_STORE_REST_PORT: "8520"
HG_STORE_RAFT_ADDRESS: store2:8510
HG_STORE_DATA_PATH: /hugegraph-store/storage
STDOUT_MODE: "true"
ports: ["8502:8500", "8512:8510", "8522:8520"]
volumes:
- hg-store2-data:/hugegraph-store/storage
Expand Down
3 changes: 3 additions & 0 deletions docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ services:
HG_PD_RAFT_PEERS_LIST: pd:8610
HG_PD_INITIAL_STORE_LIST: store:8500
HG_PD_DATA_PATH: /hugegraph-pd/pd_data
STDOUT_MODE: true
ports:
Comment thread
bitflicker64 marked this conversation as resolved.
- "8620:8620"
volumes:
Expand Down Expand Up @@ -71,6 +72,7 @@ services:
HG_STORE_REST_PORT: "8520"
HG_STORE_RAFT_ADDRESS: store:8510
HG_STORE_DATA_PATH: /hugegraph-store/storage
STDOUT_MODE: true
ports:
- "8520:8520"
volumes:
Expand All @@ -96,6 +98,7 @@ services:
environment:
HG_SERVER_BACKEND: hstore
HG_SERVER_PD_PEERS: pd:8686
STDOUT_MODE: true
ports:
- "8080:8080"
healthcheck:
Expand Down
3 changes: 3 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ services:
HG_PD_RAFT_PEERS_LIST: pd:8610
HG_PD_INITIAL_STORE_LIST: store:8500
HG_PD_DATA_PATH: /hugegraph-pd/pd_data
STDOUT_MODE: true
Comment thread
bitflicker64 marked this conversation as resolved.
Outdated
ports:
- "8620:8620"
volumes:
Expand Down Expand Up @@ -69,6 +70,7 @@ services:
HG_STORE_REST_PORT: "8520"
HG_STORE_RAFT_ADDRESS: store:8510
HG_STORE_DATA_PATH: /hugegraph-store/storage
STDOUT_MODE: true
ports:
- "8520:8520"
volumes:
Expand All @@ -93,6 +95,7 @@ services:
environment:
HG_SERVER_BACKEND: hstore
HG_SERVER_PD_PEERS: pd:8686
STDOUT_MODE: true
ports:
- "8080:8080"
healthcheck:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,13 @@ echo "Starting HugeGraphPDServer..."
JVM_OPTIONS="-Dlog4j.configurationFile=${CONF}/log4j2.xml -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"

# Turn on security check
exec ${JAVA} -Dname="HugeGraphPD" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml ${LIB}/hg-pd-service-*.jar >> ${OUTPUT} 2>&1 &
if [[ "${STDOUT_MODE:-false}" == "true" ]]; then
exec ${JAVA} -Dname="HugeGraphPD" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml ${LIB}/hg-pd-service-*.jar &
else
exec ${JAVA} -Dname="HugeGraphPD" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml ${LIB}/hg-pd-service-*.jar >> ${OUTPUT} 2>&1 &
fi

PID="$!"
# Write pid to file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@

<loggers>
<root level="INFO">
<appender-ref ref="console" />
<appender-ref ref="file" />
</root>
Comment thread
bitflicker64 marked this conversation as resolved.
Comment thread
bitflicker64 marked this conversation as resolved.
<logger name="com.alipay.sofa" level="INFO" additivity="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ if [ "${OPEN_TELEMETRY}" == "true" ]; then
fi

# Turn on security check
exec ${JAVA} -Dname="HugeGraphServer" ${JVM_OPTIONS} ${JAVA_OPTIONS} -cp ${CLASSPATH}: \
org.apache.hugegraph.dist.HugeGraphServer ${GREMLIN_SERVER_CONF} ${REST_SERVER_CONF} \
>> ${OUTPUT} 2>&1
if [[ "${STDOUT_MODE:-false}" == "true" ]]; then
exec ${JAVA} -Dname="HugeGraphServer" ${JVM_OPTIONS} ${JAVA_OPTIONS} -cp ${CLASSPATH}: \
org.apache.hugegraph.dist.HugeGraphServer ${GREMLIN_SERVER_CONF} ${REST_SERVER_CONF}
else
exec ${JAVA} -Dname="HugeGraphServer" ${JVM_OPTIONS} ${JAVA_OPTIONS} -cp ${CLASSPATH}: \
org.apache.hugegraph.dist.HugeGraphServer ${GREMLIN_SERVER_CONF} ${REST_SERVER_CONF} \
>> ${OUTPUT} 2>&1
Comment thread
bitflicker64 marked this conversation as resolved.
Outdated
fi
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,26 @@ if [[ $PRELOAD == "true" ]]; then
sed -i -e '/registerBackends/d; /serverStarted/d' "${SCRIPTS}/${EXAMPLE_SCRIPT}"
fi

# TODO: show the output message in hugegraph-server.sh when start the server
if [[ $DAEMON == "true" ]]; then
echo "Starting HugeGraphServer in daemon mode..."
Comment thread
bitflicker64 marked this conversation as resolved.
"${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \
"${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" \
>>"${LOGS}"/hugegraph-server.log 2>&1 &
if [[ "${STDOUT_MODE:-false}" == "true" ]]; then
"${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \
"${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" &
else
"${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \
"${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" \
>>"${LOGS}"/hugegraph-server.log 2>&1 &
fi
else
echo "Starting HugeGraphServer in foreground mode..."
"${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \
"${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" \
>>"${LOGS}"/hugegraph-server.log 2>&1
if [[ "${STDOUT_MODE:-false}" == "true" ]]; then
"${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \
"${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}"
else
"${BIN}"/hugegraph-server.sh "${CONF}/${GREMLIN_SERVER_CONF}" "${CONF}"/rest-server.properties \
"${OPEN_SECURITY_CHECK}" "${USER_OPTION}" "${GC_OPTION}" "${OPEN_TELEMETRY}" \
>>"${LOGS}"/hugegraph-server.log 2>&1
fi
fi

PID="$!"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@

<loggers>
<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="file"/>
</root>
Comment thread
bitflicker64 marked this conversation as resolved.
Comment thread
bitflicker64 marked this conversation as resolved.
<logger name="org.apache.cassandra" level="INFO" additivity="false">
Expand All @@ -129,6 +130,7 @@
</logger>
<!-- Use mixed async way to output logs -->
<AsyncLogger name="org.apache.hugegraph" level="INFO" additivity="false">
<appender-ref ref="console"/>
<appender-ref ref="file"/>
</AsyncLogger>
<AsyncLogger name="org.apache.hugegraph.auth" level="INFO" additivity="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,16 @@ fi

echo "Starting HG-StoreServer..."

exec ${JAVA} -Dname="HugeGraphStore" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml \
${LIB}/hg-store-node-*.jar >> ${OUTPUT} 2>&1 &
# Turn on security check
if [[ "${STDOUT_MODE:-false}" == "true" ]]; then
exec ${JAVA} -Dname="HugeGraphStore" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml \
${LIB}/hg-store-node-*.jar &
else
exec ${JAVA} -Dname="HugeGraphStore" ${JVM_OPTIONS} ${JAVA_OPTIONS} -jar \
-Dspring.config.location=${CONF}/application.yml \
${LIB}/hg-store-node-*.jar >> ${OUTPUT} 2>&1 &
fi

PID="$!"
# Write pid to file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@

<loggers>
<root level="INFO">
<appender-ref ref="console"/>
Comment thread
bitflicker64 marked this conversation as resolved.
<appender-ref ref="file"/>
</root>
Comment thread
bitflicker64 marked this conversation as resolved.
<logger name="com.alipay.sofa" level="INFO" additivity="false">
Expand Down
Loading