You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/01/29 14:57:25 UTC

[GitHub] asifdxtreme closed pull request #262: SCB-317 Add Linux Release scripts

asifdxtreme closed pull request #262: SCB-317 Add Linux Release scripts 
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/262
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/scripts/release/README.md b/scripts/release/README.md
new file mode 100644
index 00000000..538765bb
--- /dev/null
+++ b/scripts/release/README.md
@@ -0,0 +1,48 @@
+### Service-Center Release
+
+#### Making Linux Release
+
+To make a linux release of Service-center please follow the below steps
+
+```
+## Clone the code in a proper GOPATH
+
+git clone https://github.com/apache/incubator-servicecomb-service-center.git $GOPATH/src/github.com/apache/incubator-servicecomb-service-center
+cd $GOPATH/src/github.com/apache/incubator-servicecomb-service-center
+
+## Donwload all the dependency
+go get github.com/FiloSottile/gvt
+gvt restore
+
+## Run the release script
+bash -x scripts/release/make_linux_release.sh
+
+## Your release is ready
+root@SZX1000272432:/home/asif/go/src/github.com/apache/incubator-servicecomb-service-center# ll
+total 11848
+drwxr-xr-x 15 root root     4096 Jan 29 13:45 ./
+drwxr-xr-x  5 root root     4096 Jan 29 13:03 ../
+-rw-r--r--  1 root root      564 Jan 29 13:03 DISCLAIMER
+drwxr-xr-x  2 root root     4096 Jan 29 13:03 docs/
+drwxr-xr-x  3 root root     4096 Jan 29 13:03 etc/
+drwxr-xr-x  3 root root     4096 Jan 29 13:03 examples/
+drwxr-xr-x  5 root root     4096 Jan 29 13:03 frontend/
+drwxr-xr-x  8 root root     4096 Jan 29 13:16 .git/
+drwxr-xr-x  2 root root     4096 Jan 29 13:03 .github/
+-rw-r--r--  1 root root      414 Jan 29 13:03 .gitignore
+-rw-r--r--  1 root root       96 Jan 29 13:03 .gitmodules
+drwxr-xr-x  2 root root     4096 Jan 29 13:03 integration/
+-rw-r--r--  1 root root    11357 Jan 29 13:03 LICENSE
+-rw-r--r--  1 root root     1012 Jan 29 13:03 main.go
+-rw-r--r--  1 root root      353 Jan 29 13:03 .mention-bot
+-rw-r--r--  1 root root     2590 Jan 29 13:03 NOTICE
+drwxr-xr-x 19 root root     4096 Jan 29 13:03 pkg/
+-rw-r--r--  1 root root     4358 Jan 29 13:03 README.md
+drwxr-xr-x  5 root root     4096 Jan 29 13:03 scripts/
+drwxr-xr-x 15 root root     4096 Jan 29 13:03 server/
+-rw-r--r--  1 root root 12021226 Jan 29 13:45 servicecomb-service-center-1.0.0-m1-linux-amd64.tar.gz
+-rw-r--r--  1 root root     1322 Jan 29 13:03 .travis.yml
+drwxr-xr-x  6 root root     4096 Jan 29 13:06 vendor/
+drwxr-xr-x  2 root root     4096 Jan 29 13:03 version/
+
+```
diff --git a/scripts/release/conf/conf/app.conf b/scripts/release/conf/conf/app.conf
new file mode 100644
index 00000000..d0ae155e
--- /dev/null
+++ b/scripts/release/conf/conf/app.conf
@@ -0,0 +1,99 @@
+component_name = service_center
+#run mode could be many options to specify the env like prod,dev
+runmode = dev
+
+###################################################################
+# sever options
+###################################################################
+httpaddr = 0.0.0.0
+httpport = 30100
+
+read_header_timeout = 60s
+read_timeout = 60s
+idle_timeout = 60s
+write_timeout = 60s
+max_header_bytes = 32768 # 32K
+max_body_bytes = 2097152 # 2M
+
+###################################################################
+# plugin options
+###################################################################
+plugins_dir = ./plugins
+
+# pluggable registry service
+# 'etcd' means app running as an etcd agent
+# 'embeded_etcd' means app running as an etcd server
+registry_plugin = embeded_etcd
+
+# registry address
+# registry_plugin equals to 'embeded_etcd', example:
+manager_name = "sc-0"
+manager_addr = "http://127.0.0.1:2380"
+manager_cluster = "sc-0=http://127.0.0.1:2380"
+# registry_plugin equals to 'etcd'
+# manager_cluster = "127.0.0.1:2379"
+
+#heartbeat that sync synchronizes client's endpoints with the known endpoints from the etcd membership,unit is second.
+#<=0, use default 30s
+auto_sync_interval = 30s
+
+#indicate how many revision you want to keep in etcd
+compact_index_delta = 100
+compact_interval = 12h
+
+cipher_plugin = ""
+
+#suppot buildin, unlimit
+quota_plugin = ""
+
+# access control plugin
+auth_plugin = ""
+
+#support om, manage
+auditlog_plugin = ""
+
+###################################################################
+# rate limit options
+###################################################################
+#ttl=m, s, ms
+limit_ttl = "s"
+#set 0 to disable rate limit
+limit_conns = 0
+#list of places to look for IP address
+limit_iplookups = "RemoteAddr,X-Forwarded-For,X-Real-IP"
+
+###################################################################
+# ssl/tls options
+###################################################################
+# 0=Non-SSL mode, 1==SSL mode
+ssl_mode = 0
+ssl_verify_client = 1
+# minimal tls protocol, [TLSv1.0, TLSv1.1, TLSv1.2]
+ssl_protocols = TLSv1.2
+ssl_ciphers = TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256
+ssl_client_ciphers = TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256
+
+###################################################################
+# log options
+###################################################################
+# MaxSize of a log file before rotate. By M Bytes.
+log_rotate_size = 20
+# Max counts to keep of a log's backup files.
+log_backup_count = 50
+# log format(text or json type)
+log_format = text
+# whether enable record syslog
+log_sys = false
+
+###################################################################
+# above is the global configurations
+# you can overide above configuration in specific env
+###################################################################
+[prod]
+#DEBUG, INFO, WARN, ERROR, FATAL
+loglevel = INFO
+logfile = ./service-center.log
+##dev env, if you are a operator,ignore this env
+[dev]
+loglevel = DEBUG
+logfile = ""
diff --git a/scripts/release/conf/start.sh b/scripts/release/conf/start.sh
new file mode 100755
index 00000000..f8c7c9ca
--- /dev/null
+++ b/scripts/release/conf/start.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+./incubator-servicecomb-service-center > start-sc.log 2>&1 &
+
diff --git a/scripts/release/conf/stop.sh b/scripts/release/conf/stop.sh
new file mode 100755
index 00000000..d4cb405b
--- /dev/null
+++ b/scripts/release/conf/stop.sh
@@ -0,0 +1,2 @@
+kill -9 $(ps aux | grep 'incubator-servicecomb-service-center' | awk '{print $2}')
+
diff --git a/scripts/release/make_linux_release.sh b/scripts/release/make_linux_release.sh
new file mode 100755
index 00000000..c0eb6d69
--- /dev/null
+++ b/scripts/release/make_linux_release.sh
@@ -0,0 +1,29 @@
+set +e
+rm -rf servicecomb-service-center-1.0.0-m1-linux-amd64
+rm -rf servicecomb-service-center-1.0.0-m1-linux-amd64.tar.gz
+set -e
+mkdir -p servicecomb-service-center-1.0.0-m1-linux-amd64
+
+## Make the Binary
+export GIT_COMMIT=$(git log  --pretty=format:'%h' -n 1)
+export BUILD_NUMBER=$BUILD_NUMBER
+GO_LDFLAGS="${GO_LDFLAGS} -X 'github.com/apache/incubator-servicecomb-service-center/version.BUILD_TAG=$(date +%Y%m%d%H%M%S).$BUILD_NUMBER.$GIT_COMMIT'"
+GO_LDFLAGS="${GO_LDFLAGS} -X 'github.com/apache/incubator-servicecomb-service-center/version.VERSION=$BUILD_NUMBER'"
+go build --ldflags "${GO_LDFLAGS}"
+
+## Copy the necessary file
+cp -r incubator-servicecomb-service-center servicecomb-service-center-1.0.0-m1-linux-amd64
+cp -r scripts/release/conf/* servicecomb-service-center-1.0.0-m1-linux-amd64/
+cp -r LICENSE servicecomb-service-center-1.0.0-m1-linux-amd64/
+cp -r NOTICE servicecomb-service-center-1.0.0-m1-linux-amd64/
+cp -r DISCLAIMER servicecomb-service-center-1.0.0-m1-linux-amd64/
+cp -r README.md servicecomb-service-center-1.0.0-m1-linux-amd64/
+
+## Tar the release
+tar -czvf servicecomb-service-center-1.0.0-m1-linux-amd64.tar.gz servicecomb-service-center-1.0.0-m1-linux-amd64
+set +e
+rm -rf servicecomb-service-center-1.0.0-m1-linux-amd64
+rm -rf incubator-servicecomb-service-center
+
+##DONE
+


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services