From aae180e12890d449cd4fbe8ffbb2496bf0ce5d07 Mon Sep 17 00:00:00 2001 From: "tom4tomato@gmail.com" Date: Mon, 14 Oct 2019 23:19:46 +0300 Subject: [PATCH] change distribution target for assemblies --- Dockerfile | 1 + docker-compose.yml | 2 +- .../fuse.test.service.engine3.knowledge.xml | 4 -- .../scripts/standard/start-fuse-service.bat | 55 ------------------- .../scripts/standard/start-fuse-service.sh | 15 +++++ 5 files changed, 17 insertions(+), 60 deletions(-) delete mode 100644 fuse-domain/fuse-domain-knowledge/fuse-domain-knowledge-assembly/resources/scripts/standard/start-fuse-service.bat diff --git a/Dockerfile b/Dockerfile index 958e77bcc..abd96743f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ WORKDIR /opt/engine # this is a specific yang.db assembly used for knowledge based ontology - a general purpose RDF schema COPY distrib/knowledge-knowledge /opt/engine +COPY distrib/knowledge-fuse-source.zip /opt/engine RUN chmod 755 /opt/engine/start-fuse-service.sh # clean diff --git a/docker-compose.yml b/docker-compose.yml index 2a103d58e..0cf57ede4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.3' services: fuse: - image: yangdb/yang.db:Sep-2019-RC2 + image: yangdb/yang.db:latest ports: - 8888:8888 environment: diff --git a/fuse-domain/fuse-domain-knowledge/fuse-domain-knowledge-assembly/assembly/fuse.test.service.engine3.knowledge.xml b/fuse-domain/fuse-domain-knowledge/fuse-domain-knowledge-assembly/assembly/fuse.test.service.engine3.knowledge.xml index 4a9ff9a9b..39faa5218 100644 --- a/fuse-domain/fuse-domain-knowledge/fuse-domain-knowledge-assembly/assembly/fuse.test.service.engine3.knowledge.xml +++ b/fuse-domain/fuse-domain-knowledge/fuse-domain-knowledge-assembly/assembly/fuse.test.service.engine3.knowledge.xml @@ -36,10 +36,6 @@ ./ readme.txt - - ${project.basedir}/resources/scripts/standard/start-fuse-service.bat - ./ - ${project.basedir}/resources/scripts/standard/start-fuse-service.sh ./ diff --git a/fuse-domain/fuse-domain-knowledge/fuse-domain-knowledge-assembly/resources/scripts/standard/start-fuse-service.bat b/fuse-domain/fuse-domain-knowledge/fuse-domain-knowledge-assembly/resources/scripts/standard/start-fuse-service.bat deleted file mode 100644 index d9f6e2fb2..000000000 --- a/fuse-domain/fuse-domain-knowledge/fuse-domain-knowledge-assembly/resources/scripts/standard/start-fuse-service.bat +++ /dev/null @@ -1,55 +0,0 @@ -@echo off -setlocal enabledelayedexpansion - -set mainClass=com.yangdb.fuse.services.FuseRunner -set configFile=config/application.conf -set classPath=".;lib/*" -set activeProfile=activeProfile -set logbackConfigurationFilename=config/logback.xml -set heapSize=1g - -set argName= -for %%x in (%*) do ( - if [!argName!]==[] ( - if %%~x==--heapSize ( - set argName=heapSize - ) else if "%%~x"=="--elasticsearch.hosts" ( - set argName=elasticsearchHosts - ) else if "%%~x"=="--elasticsearch.cluster_name" ( - set argName=elasticsearchClusterName - ) else if "%%~x"=="--config" ( - set argName=configFile - ) else if "%%~x"=="--logConfig" ( - set argName=logbackConfigurationFilename - ) else if "%%~x"=="--activeProfile" ( - set argName=activeProfile - ) else if "%%~x"=="--debug" ( - set debugParams=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 - ) else if "%%~x"=="--jmx" ( - set jmxEnable=true - set jmxPort=6979 - ) - ) else if not "!argName!"=="" ( - set !argName!=%%~x - set argName= - ) -) - -set systemProperties= -if not "!jmxEnable!"=="" ( - set systemProperties=!systemProperties! -Dcom.sun.management.jmxremote=!jmxEnable! - set systemProperties=!systemProperties! -Dcom.sun.management.jmxremote.port=!jmxPort! - set systemProperties=!systemProperties! -Dcom.sun.management.jmxremote.authenticate=false - set systemProperties=!systemProperties! -Dcom.sun.management.jmxremote.ssl=false -) - -if not "!elasticsearchHosts!"=="" ( - set systemProperties=!systemProperties! -Delasticsearch.hosts=!elasticsearchHosts! -) - -if not "!elasticsearchClusterName!"=="" ( - set systemProperties=!systemProperties! -Delasticsearch.cluster_name=!elasticsearchClusterName! -) - -echo java -Xmx!heapSize! -Xms!heapSize! !systemProperties! !debugParams! -cp %classPath% %mainClass% !configFile! !activeProfile! !logbackConfigurationFilename! -java -Dconfig.override_with_env_vars=true -Xmx!heapSize! -Xms!heapSize! !systemProperties! !debugParams! -cp %classPath% %mainClass% !configFile! !activeProfile! !logbackConfigurationFilename! \ No newline at end of file diff --git a/fuse-domain/fuse-domain-knowledge/fuse-domain-knowledge-assembly/resources/scripts/standard/start-fuse-service.sh b/fuse-domain/fuse-domain-knowledge/fuse-domain-knowledge-assembly/resources/scripts/standard/start-fuse-service.sh index 8a1d7bd15..5a738dd86 100644 --- a/fuse-domain/fuse-domain-knowledge/fuse-domain-knowledge-assembly/resources/scripts/standard/start-fuse-service.sh +++ b/fuse-domain/fuse-domain-knowledge/fuse-domain-knowledge-assembly/resources/scripts/standard/start-fuse-service.sh @@ -7,8 +7,10 @@ activeProfile=activeProfile logbackConfigurationFilename=config/logback.xml heapSize=1g +elasticsearchEmbedded="${ELASTICSEARCH_EMBEDDED:-true}" elasticsearchHosts="${ELASTICSEARCH_HOST:-localhost}" elasticsearchClusterName="${ELASTICSEARCH_CLUSTER_NAME}" +elasticsearchTcpPort="${ELASTICSEARCH_TCP_PORT:-9300}" argName= for var in "$@" @@ -16,10 +18,14 @@ do if [ "${argName}" = "" ]; then if [ "${var}" = "--heapSize" ]; then argName=heapSize + elif [ "${var}" = "--elasticsearch.embedded" ]; then + argName=elasticsearchEmbedded elif [ "${var}" = "--elasticsearch.hosts" ]; then argName=elasticsearchHosts elif [ "${var}" = "--elasticsearch.cluster_name" ]; then argName=elasticsearchClusterName + elif [ "${var}" = "--elasticsearch.port" ]; then + argName=elasticsearchTcpPort elif [ "${var}" = "--config" ]; then argName=configFile elif [ "${var}" = "--logConfig" ]; then @@ -46,6 +52,10 @@ if [ "${jmxEnabled}" != "" ]; then systemProperties="${systemProperties} -Dcom.sun.management.jmxremote.ssl=false" fi +if [ "${elasticsearchEmbedded}" != "" ]; then + systemProperties="${systemProperties} -Delasticsearch.embedded=${elasticsearchEmbedded}" + echo ElasticSearch embedded param: -Delasticsearch.embedded=${elasticsearchEmbedded} +fi if [ "${elasticsearchHosts}" != "" ]; then systemProperties="${systemProperties} -Delasticsearch.hosts=${elasticsearchHosts}" echo ElasticSearch hosts param: -Delasticsearch.hosts=${elasticsearchHosts} @@ -56,6 +66,11 @@ if [ "${elasticsearchClusterName}" != "" ]; then echo ElasticSearch cluster param: -Delasticsearch.cluster_name=${elasticsearchClusterName} fi +if [ "${elasticsearchTcpPort}" != "" ]; then + systemProperties="${systemProperties} -Delasticsearch.port=${elasticsearchTcpPort}" + echo ElasticSearch TCP port param: -Delasticsearch.port=${elasticsearchTcpPort} +fi + #jolokia = -javaagent:lib/jolokia-jvm-1.6.2-agent.jar=port=8088,host=localhost echo java -Xmx${heapSize} -Xms${heapSize} ${systemProperties} ${debugParams} -cp ${classPath} ${mainClass} ${configFile} ${activeProfile} ${logbackConfigurationFilename}