Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
96fd956e
Commit
96fd956e
authored
Nov 30, 2016
by
张乐
Committed by
GitHub
Nov 30, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #468 from nobodyiam/refactor-scripts
refactor scripts to support changing logging file dir and server port
parents
4361aa7d
bd9bd26e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
startup.sh
apollo-adminservice/src/main/scripts/startup.sh
+5
-1
startup.sh
apollo-configservice/src/main/scripts/startup.sh
+5
-1
startup.sh
apollo-portal/src/main/scripts/startup.sh
+5
-1
build.sh
scripts/build.sh
+1
-1
No files found.
apollo-adminservice/src/main/scripts/startup.sh
View file @
96fd956e
#!/bin/bash
SERVICE_NAME
=
apollo-adminservice
## Adjust log dir if necessary
LOG_DIR
=
/opt/logs/100003172
## Adjust server port if necessary
SERVER_PORT
=
8090
## Adjust memory settings if necessary
export
JAVA_OPTS
=
"-server -Xms2560m -Xmx2560m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:SurvivorRatio=22"
########### The following is the same for configservice, adminservice, portal ###########
export
JAVA_OPTS
=
"
$JAVA_OPTS
-XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:-ReduceInitialCardMarks -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Xloggc:
$LOG_DIR
/heap_trace.txt -XX:HeapDumpPath=
$LOG_DIR
/HeapDumpOnOutOfMemoryError/ -Djava.security.egd=file:/dev/./urandom"
export
JAVA_OPTS
=
"
$JAVA_OPTS
-XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:-ReduceInitialCardMarks -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom"
export
JAVA_OPTS
=
"
$JAVA_OPTS
-Dserver.port=
$SERVER_PORT
-Dlogging.file=
$LOG_DIR
/
$SERVICE_NAME
.log -Xloggc:
$LOG_DIR
/heap_trace.txt -XX:HeapDumpPath=
$LOG_DIR
/HeapDumpOnOutOfMemoryError/"
PATH_TO_JAR
=
$SERVICE_NAME
".jar"
SERVER_URL
=
"http://localhost:
$SERVER_PORT
"
...
...
apollo-configservice/src/main/scripts/startup.sh
View file @
96fd956e
#!/bin/bash
SERVICE_NAME
=
apollo-configservice
## Adjust log dir if necessary
LOG_DIR
=
/opt/logs/100003171
## Adjust server port if necessary
SERVER_PORT
=
8080
## Adjust memory settings if necessary
export
JAVA_OPTS
=
"-server -Xms5632m -Xmx5632m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=2560m -XX:MaxNewSize=2560m -XX:SurvivorRatio=22"
########### The following is the same for configservice, adminservice, portal ###########
export
JAVA_OPTS
=
"
$JAVA_OPTS
-XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:-ReduceInitialCardMarks -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Xloggc:
$LOG_DIR
/heap_trace.txt -XX:HeapDumpPath=
$LOG_DIR
/HeapDumpOnOutOfMemoryError/ -Djava.security.egd=file:/dev/./urandom"
export
JAVA_OPTS
=
"
$JAVA_OPTS
-XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:-ReduceInitialCardMarks -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom"
export
JAVA_OPTS
=
"
$JAVA_OPTS
-Dserver.port=
$SERVER_PORT
-Dlogging.file=
$LOG_DIR
/
$SERVICE_NAME
.log -Xloggc:
$LOG_DIR
/heap_trace.txt -XX:HeapDumpPath=
$LOG_DIR
/HeapDumpOnOutOfMemoryError/"
PATH_TO_JAR
=
$SERVICE_NAME
".jar"
SERVER_URL
=
"http://localhost:
$SERVER_PORT
"
...
...
apollo-portal/src/main/scripts/startup.sh
View file @
96fd956e
#!/bin/bash
SERVICE_NAME
=
apollo-portal
## Adjust log dir if necessary
LOG_DIR
=
/opt/logs/100003173
## Adjust server port if necessary
SERVER_PORT
=
8080
## Adjust memory settings if necessary
export
JAVA_OPTS
=
"-server -Xms4096m -Xmx4096m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=22"
########### The following is the same for configservice, adminservice, portal ###########
export
JAVA_OPTS
=
"
$JAVA_OPTS
-XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:-ReduceInitialCardMarks -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Xloggc:
$LOG_DIR
/heap_trace.txt -XX:HeapDumpPath=
$LOG_DIR
/HeapDumpOnOutOfMemoryError/ -Djava.security.egd=file:/dev/./urandom"
export
JAVA_OPTS
=
"
$JAVA_OPTS
-XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:-ReduceInitialCardMarks -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom"
export
JAVA_OPTS
=
"
$JAVA_OPTS
-Dserver.port=
$SERVER_PORT
-Dlogging.file=
$LOG_DIR
/
$SERVICE_NAME
.log -Xloggc:
$LOG_DIR
/heap_trace.txt -XX:HeapDumpPath=
$LOG_DIR
/HeapDumpOnOutOfMemoryError/"
PATH_TO_JAR
=
$SERVICE_NAME
".jar"
SERVER_URL
=
"http://localhost:
$SERVER_PORT
"
...
...
scripts/build.sh
View file @
96fd956e
...
...
@@ -36,7 +36,7 @@ echo "==== building portal finished ===="
echo
"==== starting to build client ===="
mvn clean
install
-DskipTests
-pl
apollo-client
-am
-Pgithub
$META_SERVERS_OPTS
mvn clean
install
-DskipTests
-pl
apollo-client
-am
$META_SERVERS_OPTS
echo
"==== building client finished ===="
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment