You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2022/07/16 11:27:58 UTC

[incubator-linkis] branch dev-1.1.3 updated (4df834959 -> e7b10f7f3)

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

peacewong pushed a change to branch dev-1.1.3
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git


    from 4df834959 install.sh adjust wds.linkis.keytab.enable (#2421)
     new 6df54952b optimize prometheus configuration
     new 6c67f8140 optimize prometheus configuration
     new e7b10f7f3 shell log adjust

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../assembly-combined/conf/application-eureka.yml      |  8 ++++++++
 .../assembly-combined/conf/application-linkis.yml      |  6 +++++-
 .../assembly-combined/conf/linkis.properties           |  4 ++++
 .../assembly-combined/sbin/common.sh                   | 12 ++++++++++--
 .../assembly-combined/sbin/linkis-start-all.sh         |  2 +-
 assembly-combined-package/bin/install.sh               | 18 ++++++++----------
 6 files changed, 36 insertions(+), 14 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org


[incubator-linkis] 03/03: shell log adjust

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

peacewong pushed a commit to branch dev-1.1.3
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git

commit e7b10f7f336b3c98282e8d8a0a2d5e9e064c3ae9
Author: casionone <ca...@gmail.com>
AuthorDate: Wed Jul 13 10:07:30 2022 +0800

    shell log adjust
---
 assembly-combined-package/assembly-combined/sbin/linkis-start-all.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/assembly-combined-package/assembly-combined/sbin/linkis-start-all.sh b/assembly-combined-package/assembly-combined/sbin/linkis-start-all.sh
index f3881fd6a..f932f02ae 100644
--- a/assembly-combined-package/assembly-combined/sbin/linkis-start-all.sh
+++ b/assembly-combined-package/assembly-combined/sbin/linkis-start-all.sh
@@ -55,7 +55,7 @@ fi
 
 executeCMD $SERVER_IP "$SERVER_START_CMD"
 
-isSuccess "End to start $SERVER_NAME"
+isSuccess "start $SERVER_NAME"
 echo "<-------------------------------->"
 sleep 3
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org


[incubator-linkis] 01/03: optimize prometheus configuration

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

peacewong pushed a commit to branch dev-1.1.3
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git

commit 6df54952bc9a41a7f236c1548c0433c4679c4b47
Author: casionone <ca...@gmail.com>
AuthorDate: Tue Jul 12 10:37:00 2022 +0800

    optimize prometheus configuration
---
 assembly-combined-package/assembly-combined/conf/linkis.properties | 4 ++++
 assembly-combined-package/bin/install.sh                           | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/assembly-combined-package/assembly-combined/conf/linkis.properties b/assembly-combined-package/assembly-combined/conf/linkis.properties
index 7d78cb651..2714f0661 100644
--- a/assembly-combined-package/assembly-combined/conf/linkis.properties
+++ b/assembly-combined-package/assembly-combined/conf/linkis.properties
@@ -57,6 +57,10 @@ wds.linkis.home=/appcom/Install/LinkisInstall
 wds.linkis.governance.station.admin=hadoop
 wds.linkis.gateway.conf.publicservice.list=query,jobhistory,application,configuration,filesystem,udf,variable,microservice,errorcode,bml,datasource
 
+#wds.linkis.prometheus.enable=true
+wds.linkis.server.user.restful.uri.pass.auth=/api/rest_j/v1/actuator/prometheus
+
+
 spring.spring.servlet.multipart.max-file-size=500MB
 spring.spring.servlet.multipart.max-request-size=500MB
 
diff --git a/assembly-combined-package/bin/install.sh b/assembly-combined-package/bin/install.sh
index 9392ec1df..9d31c627a 100644
--- a/assembly-combined-package/bin/install.sh
+++ b/assembly-combined-package/bin/install.sh
@@ -427,8 +427,7 @@ fi
 if [ "true" == "$PROMETHEUS_ENABLE" ]
 then
   echo "prometheus is enabled"
-  sed -i ${txt} '$a \wds.linkis.prometheus.enable={{ PROMETHEUS_ENABLE }}' $LINKIS_HOME/conf/linkis.properties
-  sed -i ${txt} '$a \wds.linkis.server.user.restful.uri.pass.auth=/api/rest_j/v1/actuator/prometheus,' $LINKIS_HOME/conf/linkis.properties
+  sed -i ${txt}  "s#\#wds.linkis.prometheus.enable.*#wds.linkis.prometheus.enable=true#g" $common_conf
   sed -i ${txt}  '/eureka:/a \\  instance:\n    metadata-map:\n      prometheus.path: ${prometheus.path:${prometheus.endpoint}}' $LINKIS_HOME/conf/application-linkis.yml
   sed -i ${txt}  's#include: refresh,info#include: refresh,info,health,metrics,prometheus#g' $LINKIS_HOME/conf/application-linkis.yml
   sed -i ${txt} '/instance:/a \    metadata-map:\n      prometheus.path: ${prometheus.path:/actuator/prometheus}' $LINKIS_HOME/conf/application-eureka.yml


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org


[incubator-linkis] 02/03: optimize prometheus configuration

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

peacewong pushed a commit to branch dev-1.1.3
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git

commit 6c67f8140eb10e95dd48bfd47809b22f5f88f92d
Author: casionone <ca...@gmail.com>
AuthorDate: Wed Jul 13 01:13:50 2022 +0800

    optimize prometheus configuration
---
 .../assembly-combined/conf/application-eureka.yml         |  8 ++++++++
 .../assembly-combined/conf/application-linkis.yml         |  6 +++++-
 .../assembly-combined/sbin/common.sh                      | 12 ++++++++++--
 assembly-combined-package/bin/install.sh                  | 15 +++++++--------
 4 files changed, 30 insertions(+), 11 deletions(-)

diff --git a/assembly-combined-package/assembly-combined/conf/application-eureka.yml b/assembly-combined-package/assembly-combined/conf/application-eureka.yml
index d87970800..605d0bb4d 100644
--- a/assembly-combined-package/assembly-combined/conf/application-eureka.yml
+++ b/assembly-combined-package/assembly-combined/conf/application-eureka.yml
@@ -25,6 +25,8 @@ server:
   response-cache-update-interval-ms: 2000
 eureka:
   instance:
+    metadata-map:
+      prometheus.path: ${prometheus.path:/actuator/prometheus}
     hostname:
 #    preferIpAddress: true
   client:
@@ -32,3 +34,9 @@ eureka:
 #    fetch-registry: false
     serviceUrl:
       defaultZone: http://127.0.0.1:20303/eureka/
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: refresh,info,health,metrics
\ No newline at end of file
diff --git a/assembly-combined-package/assembly-combined/conf/application-linkis.yml b/assembly-combined-package/assembly-combined/conf/application-linkis.yml
index f886ad974..a39c9d999 100644
--- a/assembly-combined-package/assembly-combined/conf/application-linkis.yml
+++ b/assembly-combined-package/assembly-combined/conf/application-linkis.yml
@@ -14,6 +14,9 @@
 #
 
 eureka:
+  instance:
+    metadata-map:
+      prometheus.path: ${prometheus.path:${prometheus.endpoint}}
   client:
     serviceUrl:
       defaultZone: http://127.0.0.1:20303/eureka/
@@ -21,7 +24,8 @@ management:
   endpoints:
     web:
       exposure:
-        include: refresh,info
+        include: refresh,info,health,metrics
+
 logging:
   config: classpath:log4j2.xml
 
diff --git a/assembly-combined-package/assembly-combined/sbin/common.sh b/assembly-combined-package/assembly-combined/sbin/common.sh
index 9ed635698..4278507f9 100644
--- a/assembly-combined-package/assembly-combined/sbin/common.sh
+++ b/assembly-combined-package/assembly-combined/sbin/common.sh
@@ -21,6 +21,12 @@ export local_host="`hostname --fqdn`"
 
 ipaddr=$(ip addr | awk '/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}')
 
+## color
+RED='\033[0;31m'
+NC='\033[0m' # No Color
+GREEN='\033[0;32m'
+#used as: echo -e "Apache ${RED}Linkis ${NC} Test \n"
+
 function isLocal(){
     if [ "$1" == "127.0.0.1" ];then
         return 0
@@ -65,9 +71,11 @@ function copyFile(){
 
 function isSuccess(){
 if [ $? -ne 0 ]; then
-    echo "Failed to " + $1
+    echo -e "${RED}Failed${NC} to $1"
+    echo ""
     exit 1
 else
-    echo "Succeed to" + $1
+    echo -e "${GREEN}Succeed${NC} to $1"
+    echo ""
 fi
 }
\ No newline at end of file
diff --git a/assembly-combined-package/bin/install.sh b/assembly-combined-package/bin/install.sh
index 9d31c627a..ce0e5ce77 100644
--- a/assembly-combined-package/bin/install.sh
+++ b/assembly-combined-package/bin/install.sh
@@ -80,10 +80,11 @@ if [  -d $LINKIS_HOME ] && [ "$LINKIS_HOME" != "$workDir" ];then
 
    ## Every time, backup the old linkis home with timestamp and not clean them.
    ## If you want to clean them, please delete them manually.
-   curTs=`date +'%s'`
-   echo "mv  $LINKIS_HOME  $LINKIS_HOME-$curTs"
-   mv  $LINKIS_HOME  $LINKIS_HOME-$curTs
-   isSuccess "back up old LINKIS_HOME:$LINKIS_HOME to $LINKIS_HOME-$curTs"
+   backDir=$LINKIS_HOME-back-`date +'%s'`
+
+   echo "mv  $LINKIS_HOME  $backDir"
+   mv  $LINKIS_HOME  $backDir
+   isSuccess "back up old LINKIS_HOME:$LINKIS_HOME to $backDir"
 fi
 echo "try to create dir LINKIS_HOME: $LINKIS_HOME"
 sudo mkdir -p $LINKIS_HOME;sudo chown -R $deployUser:$deployUser $LINKIS_HOME
@@ -428,10 +429,8 @@ if [ "true" == "$PROMETHEUS_ENABLE" ]
 then
   echo "prometheus is enabled"
   sed -i ${txt}  "s#\#wds.linkis.prometheus.enable.*#wds.linkis.prometheus.enable=true#g" $common_conf
-  sed -i ${txt}  '/eureka:/a \\  instance:\n    metadata-map:\n      prometheus.path: ${prometheus.path:${prometheus.endpoint}}' $LINKIS_HOME/conf/application-linkis.yml
-  sed -i ${txt}  's#include: refresh,info#include: refresh,info,health,metrics,prometheus#g' $LINKIS_HOME/conf/application-linkis.yml
-  sed -i ${txt} '/instance:/a \    metadata-map:\n      prometheus.path: ${prometheus.path:/actuator/prometheus}' $LINKIS_HOME/conf/application-eureka.yml
-  sed -i ${txt} '$a \\nmanagement:\n  endpoints:\n    web:\n      exposure:\n        include: refresh,info,health,metrics,prometheus' $LINKIS_HOME/conf/application-eureka.yml
+  sed -i ${txt}  's#include: refresh,info.*#include: refresh,info,health,metrics,prometheus#g' $LINKIS_HOME/conf/application-linkis.yml
+  sed -i ${txt}  's#include: refresh,info.*#include: refresh,info,health,metrics,prometheus#g' $LINKIS_HOME/conf/application-eureka.yml
 fi
 
 echo "preveliges linkis command shells"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org