Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qg-dockerfiles
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QA
qg-dockerfiles
Commits
e47a43d3
Commit
e47a43d3
authored
Apr 10, 2018
by
wentao.suo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fffff
parent
dadaf0ab
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
0 additions
and
409 deletions
+0
-409
Dockerfile
templates_new/java/Dockerfile
+0
-20
docker-entrypoint.sh
templates_new/java/docker-entrypoint.sh
+0
-65
logback-dev.xml
templates_new/java/logback-dev.xml
+0
-24
logback-pro.xml
templates_new/java/logback-pro.xml
+0
-27
server.properties
templates_new/java/server.properties
+0
-2
Dockerfile
templates_new/lua-ui/Dockerfile
+0
-29
docker-entrypoint.sh
templates_new/lua-ui/docker-entrypoint.sh
+0
-57
nginx.conf
templates_new/lua-ui/nginx.conf
+0
-24
Dockerfile
templates_new/nodejs/Dockerfile
+0
-24
docker-entrypoint.sh
templates_new/nodejs/docker-entrypoint.sh
+0
-43
Dockerfile
templates_new/python/Dockerfile
+0
-29
docker-entrypoint.sh
templates_new/python/docker-entrypoint.sh
+0
-15
Dockerfile
templates_new/tools/eos/Dockerfile
+0
-14
docker-entrypoint.sh
templates_new/tools/eos/docker-entrypoint.sh
+0
-20
Dockerfile
templates_new/tools/hitchhiker/Dockerfile
+0
-16
No files found.
templates_new/java/Dockerfile
deleted
100644 → 0
View file @
dadaf0ab
FROM
192.168.4.36/baseimg/jdk8:201803291115
USER
root
WORKDIR
/home/quant_group
RUN
mkdir
project/
;
mkdir
logs/
;
mkdir
project/config/
;
mkdir
-p
/opt/settings/
ARG
BUILD_SCHEMA
ENV
BUILD_SCHEMA=$BUILD_SCHEMA
RUN
echo
-e
"
${
BUILD_SCHEMA
//@/\n
}
"
>>
./build_info
COPY
docker-entrypoint.sh .
COPY
./*.jar /home/quant_group/project/app.jar
COPY
./application.properties /home/quant_group/project/
COPY
./server.properties /opt/settings/
COPY
./*.xml /home/quant_group/project/
RUN
chmod
+x ./docker-entrypoint.sh
CMD
./docker-entrypoint.sh
\ No newline at end of file
templates_new/java/docker-entrypoint.sh
deleted
100755 → 0
View file @
dadaf0ab
#!/bin/bash
echo
"java_start java"
module_name
=
project
package_path
=
"
`
pwd
`
/
${
module_name
}
/app.jar"
config_path
=
"
`
pwd
`
/
${
module_name
}
/application.properties"
export
NAMESPACE
=
`
cat
/var/run/secrets/kubernetes.io/serviceaccount/namespace
`
echo
"NAMESPACE is
$NAMESPACE
"
echo
"NAMESPACE:
${
NAMESPACE
}
"
>>
build_info
echo
192.168.6.13 eos.quantgroups.com
>>
/etc/hosts
echo
192.168.4.117 apollo-dev.quantgroups.com
>>
/etc/hosts
source
~/.bash_profile
sed
-i
"s#.xyqb.com#-
$NAMESPACE
.q-gp.com#g"
${
config_path
}
sed
-i
"s#.domain.com#-
$NAMESPACE
.q-gp.com#g"
${
config_path
}
sed
-i
"s#.quantgroup.cn#-
$NAMESPACE
.q-gp.com#g"
${
config_path
}
sed
-i
"s#xterm.js demo#
${
SYSTEM_NAME
}
@
${
NAMESPACE
}
#"
/home/qg-xterm/demo/index.html
if
[[
$CLUSTER
==
"pro"
]]
;
then
#初始化变量
export
DB_SERVICE_HOST
=
"192.168.4.15"
export
RABBIT_SERVICE_HOST
=
"192.168.4.15"
export
REDIS_SERVICE_HOST
=
"192.168.4.15"
export
ZOOKEEPER_SERVICE_HOST
=
"192.168.4.15"
echo
"nohup java -Xmx512m -Xloggc:/tmp/
${
module_name
}
_gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Denv=pro -Didc=k8s -Dtest=true -jar
${
package_path
}
--worker 1 --currentWorker 1 -t --server.port=80 --spring.config.location=
${
config_path
}
& "
>
java_command
nohup
java
-Xmx512m
-Xloggc
:/tmp/
${
module_name
}
_gc.log
-XX
:+PrintGCDetails
-XX
:+PrintGCTimeStamps
-Denv
=
pro
-Didc
=
k8s
-Dtest
=
true
-jar
${
package_path
}
--worker
1
--currentWorker
1
-t
--server
.port
=
80
--spring
.config.location
=
${
config_path
}
>
/dev/null 2>&1 &
else
echo
"nohup java -Xmx512m -Xloggc:/tmp/
${
module_name
}
_gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Denv=dev -Didc=k8s -Dtest=true -jar
${
package_path
}
--worker 1 --currentWorker 1 -t --server.port=80 --spring.config.location=
${
config_path
}
& "
>
java_command
nohup
java
-Xmx512m
-Xloggc
:/tmp/
${
module_name
}
_gc.log
-XX
:+PrintGCDetails
-XX
:+PrintGCTimeStamps
-Denv
=
dev
-Didc
=
k8s
-Dtest
=
true
-jar
${
package_path
}
--worker
1
--currentWorker
1
-t
--server
.port
=
80
--spring
.config.location
=
${
config_path
}
>
/dev/null 2>&1 &
fi
# waiting for log
count
=
0
log_exist
=
0
log_path
=
"/home/quant_group/logs"
until
[[
$count
-eq
60
]]
||
[[
$log_exist
-eq
1
]]
do
let
count+
=
1
echo
"count is
$count
"
if
find
"
$log_path
"
-mindepth
1
-print
-quit
|
grep
-q
.
;
then
echo
"log is exist!"
log_exist
=
1
else
echo
"log is not exist! waiting for server start."
touch
./logs/tmp.log
fi
sleep
1
done
echo
"cd /home/qg-xterm/;git pull;cd -"
cd
/home/qg-xterm/
;
git pull
;
cd
-
echo
"node /home/qg-xterm/demo/app.js"
nohup
node /home/qg-xterm/demo/app.js &
echo
"frontail ./logs/*log -n 500 -d "
frontail ./logs/
*
log
-n
500
-d
echo
"tail -f ./logs/*log"
tail
-f
./logs/
*
log
\ No newline at end of file
templates_new/java/logback-dev.xml
deleted
100644 → 0
View file @
dadaf0ab
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<springProperty
name=
"spring.application.name"
source=
"spring.application.name"
/>
<property
name=
"LOG_LEVEL_PATTERN"
value=
"%clr(%5p) %clr([${spring.application.name:-},%X{X-B3-TraceId:-},%X{X-B3-SpanId:-},%X{X-Span-Export:-}]){yellow}"
/>
<property
name=
"CONSOLE_LOG_PATTERN"
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%10.10t]){faint} [%40.40file:%4.4line] %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"
/>
<!-- 这里面定义了 CONSOLE_LOG_PATTERN, FILE_LOG_PATTERN 等日志格式, 还定义了一些日志级别 -->
<include
resource=
"org/springframework/boot/logging/logback/defaults.xml"
/>
<include
resource=
"org/springframework/boot/logging/logback/console-appender.xml"
/>
<logger
name=
"cn.quantgroup"
level=
"DEBUG"
/>
<logger
name=
"org.springframework"
level=
"INFO"
/>
<!--<logger name="java.sql.Connection" level="DEBUG"/>-->
<!--<logger name="java.sql.Statement" level="DEBUG"/>-->
<!--<logger name="java.sql.PreparedStatement" level="DEBUG"/>-->
<logger
name=
"org.hibernate"
level=
"warn"
/>
<logger
name=
"org.apache"
level=
"warn"
/>
<logger
name=
"ch.qos.logback"
level=
"warn"
/>
<root
level=
"INFO"
>
<appender-ref
ref=
"CONSOLE"
/>
</root>
</configuration>
\ No newline at end of file
templates_new/java/logback-pro.xml
deleted
100644 → 0
View file @
dadaf0ab
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<springProperty
name=
"spring.application.name"
source=
"spring.application.name"
/>
<property
name=
"LOG_LEVEL_PATTERN"
value=
"%5p [${spring.application.name:-},%X{X-B3-TraceId:-},%X{X-B3-SpanId:-},%X{X-Span-Export:-}]"
/>
<property
name=
"FILE_LOG_PATTERN"
value=
"${FILE_LOG_PATTERN:-%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} --- [%thread] [%file:%line] %logger - %msg%n}"
/>
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
/home/quant_group/logs/${spring.application.name:-application}.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
/home/quant_group/logs/${spring.application.name:-application}.log.%d{yyyy-MM-dd}
</fileNamePattern>
<maxHistory>
30
</maxHistory>
</rollingPolicy>
<encoder>
<pattern>
${FILE_LOG_PATTERN}
</pattern>
</encoder>
</appender>
<logger
name=
"org.springframework"
level=
"warn"
/>
<logger
name=
"org.hibernate"
level=
"warn"
/>
<logger
name=
"org.apache"
level=
"warn"
/>
<logger
name=
"ch.qos.logback"
level=
"warn"
/>
<root
level=
"info"
>
<appender-ref
ref=
"FILE"
/>
</root>
</configuration>
\ No newline at end of file
templates_new/java/server.properties
deleted
100644 → 0
View file @
dadaf0ab
env
=
dev
idc
=
k8s
\ No newline at end of file
templates_new/lua-ui/Dockerfile
deleted
100644 → 0
View file @
dadaf0ab
FROM
192.168.4.36/baseimg/openresty:201803291115
USER
root
WORKDIR
/home/quant_group
RUN
mkdir
-p
/usr/local/openresty/nginx/conf/conf.d/
;
mkdir
-p
/usr/local/openresty/nginx/lua
ENV
NODE_ENV=test
ARG
BUILD_NUMBER
ARG
SYSTEM_NAME
ARG
BRANCH_NAME
ARG
BUILD_TIME
ENV
BUILD_NUMBER=$BUILD_NUMBER
ENV
SYSTEM_NAME=$SYSTEM_NAME
ENV
BRANCH_NAME=$BRANCH_NAME
ENV
BUILD_TIME=$BUILD_TIME
RUN
echo
"BUILD_TIME:
${
BUILD_TIME
}
,BUILD_NUMBER:
${
BUILD_NUMBER
}
,SYSTEM_NAME:
${
SYSTEM_NAME
}
,BRANCH_NAME:
${
BRANCH_NAME
}
"
>>
./build_info
COPY
nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
COPY
*.vh.conf /usr/local/openresty/nginx/conf/conf.d/
COPY
*.lua /usr/local/openresty/nginx/lua/
COPY
docker-entrypoint.sh .
COPY
*tgz ./
RUN
chmod
+x ./docker-entrypoint.sh
CMD
./docker-entrypoint.sh
\ No newline at end of file
templates_new/lua-ui/docker-entrypoint.sh
deleted
100755 → 0
View file @
dadaf0ab
#!/bin/sh
echo
"deploy openresty"
package_path
=
"/home/quant_group"
echo
"cd
${
package_path
}
"
cd
${
package_path
}
export
NAMESPACE
=
`
cat
/var/run/secrets/kubernetes.io/serviceaccount/namespace
`
echo
"NAMESPACE is
$NAMESPACE
"
for
entry
in
./
*
tgz
do
with_ext
=
$(
basename
"
$entry
"
)
fname
=
"
${
with_ext
%.*
}
"
echo
"mkdir -p /home/quant_group/
$fname
"
mkdir
-p
/home/quant_group/
$fname
echo
"tar zxf
${
package_path
}
/
$with_ext
-C
${
package_path
}
/
$fname
"
tar
zxf
${
package_path
}
/
$with_ext
-C
${
package_path
}
/
$fname
echo
"rm -rf
${
package_path
}
/
$with_ext
"
rm
-rf
${
package_path
}
/
$with_ext
done
echo
"cd /home/qg-xterm/;git pull;cd -"
cd
/home/qg-xterm/
;
git pull
;
cd
-
echo
"sed xyqb.com to q-gp.com"
# find ${package_path}/ -name "*.js" | xargs sed -i "s/.xyqb.com/-$NAMESPACE.q-gp.com/g"
find
${
package_path
}
/
-name
"*.js"
| xargs
sed
-i
"s#.domain.com#-
$NAMESPACE
.q-gp.com#g"
sed
-i
"s/xterm.js demo/
${
SYSTEM_NAME
}
@
${
NAMESPACE
}
/"
/home/qg-xterm/demo/index.html
default_conf_file
=
"/usr/local/openresty/nginx/conf/conf.d/default.vh.conf"
if
[
-f
"
$default_conf_file
"
]
then
sed
-i
"s/SYSTEM_NAME/
${
SYSTEM_NAME
}
/"
$default_conf_file
fi
echo
"mkdir -p /var/log/nginx"
mkdir
-p
/var/log/nginx
echo
"touch /var/log/nginx/error.log"
touch
/var/log/nginx/error.log
echo
"touch /var/log/nginx/access.log"
touch
/var/log/nginx/access.log
echo
"/usr/bin/openresty -g 'daemon off;'"
nohup
/usr/bin/openresty
-g
'daemon off;'
&
echo
"node /home/qg-xterm/demo/app.js"
nohup
node /home/qg-xterm/demo/app.js &
echo
"frontail logs/*.log -d -n 1000"
frontail /var/log/nginx/
*
log
-n
1000
\ No newline at end of file
templates_new/lua-ui/nginx.conf
deleted
100644 → 0
View file @
dadaf0ab
worker_processes
1
;
events
{
worker_connections
1024
;
}
http
{
include
/usr/local/openresty/nginx/conf/mime.types
;
default_type
application/octet-stream
;
log_format
access
'
$remote_addr
-
$remote_user
[
$time_local
]
"
$request
"
'
'
$status
$body_bytes_sent
"
$http_referer
"
'
'"
$http_user_agent
"
$http_x_forwarded_for
'
'"
$upstream_addr
"
"
$upstream_status
"
"
$upstream_response_time
"
"
$request_time
"
"
$http_cookie
"'
;
error_log
/var/log/nginx/error.log
warn
;
access_log
/var/log/nginx/access.log
;
server_names_hash_bucket_size
64
;
sendfile
on
;
keepalive_timeout
65
;
include
/usr/local/openresty/nginx/conf/conf.d/*.conf
;
}
\ No newline at end of file
templates_new/nodejs/Dockerfile
deleted
100644 → 0
View file @
dadaf0ab
FROM
192.168.4.36/baseimg/nodejs:201803291115
USER
root
WORKDIR
/home/quant_group
RUN
mkdir
project
;
mkdir
logs
ENV
NODE_ENV=test
ARG
BUILD_NUMBER
ARG
SYSTEM_NAME
ARG
BRANCH_NAME
ARG
BUILD_TIME
ENV
BUILD_NUMBER=$BUILD_NUMBER
ENV
SYSTEM_NAME=$SYSTEM_NAME
ENV
BRANCH_NAME=$BRANCH_NAME
ENV
BUILD_TIME=$BUILD_TIME
RUN
echo
"BUILD_TIME:
${
BUILD_TIME
}
,BUILD_NUMBER:
${
BUILD_NUMBER
}
,SYSTEM_NAME:
${
SYSTEM_NAME
}
,BRANCH_NAME:
${
BRANCH_NAME
}
"
>>
./build_info
COPY
docker-entrypoint.sh .
COPY
*.tgz ./project/dist.tgz
RUN
chmod
+x ./docker-entrypoint.sh
CMD
["./docker-entrypoint.sh"]
\ No newline at end of file
templates_new/nodejs/docker-entrypoint.sh
deleted
100755 → 0
View file @
dadaf0ab
#!/bin/sh
echo
"deploy node"
package_path
=
"/home/quant_group/project"
echo
"cd
${
package_path
}
"
cd
${
package_path
}
echo
"tar zxf dist.tgz -C
${
package_path
}
"
tar
zxf
${
package_path
}
/dist.tgz
-C
${
package_path
}
/
echo
"sed sed xyqb.com to q-gp.com"
namespace
=
`
cat
/var/run/secrets/kubernetes.io/serviceaccount/namespace
`
echo
"namespace is
$namespace
"
# find ${package_path}/ -type f -name "*.js" | xargs sed -i "s/.xyqb.com/-$namespace.q-gp.com/g"
find
${
package_path
}
/
-type
f
-name
"*.js"
| xargs
sed
-i
"s#.domain.com#-
$namespace
.q-gp.com#g"
sed
-i
"s#xterm.js demo#
${
SYSTEM_NAME
}
@
${
namespace
}
#"
/home/qg-xterm/demo/index.html
echo
"rm dist.tgz public/dist -rf"
rm
-rf
${
package_path
}
/dist.tgz
echo
"sh start.sh"
sh start.sh
echo
"sleep 3"
sleep
3
if
ls
./
*
log 1> /dev/null 2>&1
;
then
echo
"ls -l ./logs"
ls
-l
./logs
else
echo
"files do not exist"
touch
./logs/tmp.log
fi
echo
"cd /home/qg-xterm/;git pull;cd -"
cd
/home/qg-xterm/
;
git pull
;
cd
-
echo
"node /home/qg-xterm/demo/app.js"
nohup
node /home/qg-xterm/demo/app.js &
echo
"frontail logs/*.log -d -n 1000"
frontail ./logs/
*
log
-n
1000
\ No newline at end of file
templates_new/python/Dockerfile
deleted
100644 → 0
View file @
dadaf0ab
FROM
192.168.4.36/baseimg/python:201803291115
ARG
BUILD_NUMBER
ARG
SYSTEM_NAME
ARG
BUILD_TIME
USER
root
WORKDIR
/home/quant_group
RUN
mkdir
project
RUN
mkdir
logs
ARG
BUILD_NUMBER
ARG
SYSTEM_NAME
ARG
BRANCH_NAME
ENV
BUILD_NUMBER=$BUILD_NUMBER
ENV
SYSTEM_NAME=$SYSTEM_NAME
ENV
BRANCH_NAME=$BRANCH_NAME
RUN
echo
"BUILD_NUMBER:
${
BUILD_NUMBER
}
,SYSTEM_NAME:
${
SYSTEM_NAME
}
,BRANCH_NAME:
${
BRANCH_NAME
}
"
>>
./build_info
RUN
pip
install
-i
http://pypi.douban.com/simple
--default-timeout
6000 tornado MySQL-python DBUtils synthesis executor futures
--trusted-host
pypi.douban.com
#RUN apt-get remove python-pip -y && apt-get autoremove -y
COPY
docker-entrypoint.sh .
COPY
dist.tgz ./project/dist.tgz
RUN
chmod
+x ./docker-entrypoint.sh
CMD
["./docker-entrypoint.sh"]
\ No newline at end of file
templates_new/python/docker-entrypoint.sh
deleted
100755 → 0
View file @
dadaf0ab
#!/bin/sh
echo
"deploy xyqp-query"
package_path
=
"/home/quant_group/project"
echo
"cd
${
package_path
}
"
cd
${
package_path
}
echo
"tar zxf dist.tgz -C
${
package_path
}
"
tar
zxf
${
package_path
}
/dist.tgz
-C
${
package_path
}
/
echo
"rm dist.tgz public/dist -rf"
rm
-rf
${
package_path
}
/dist.tgz
echo
"python run.py --mode=beta --port=80"
python
${
package_path
}
/server/run.py
--mode
=
beta
--port
=
80
\ No newline at end of file
templates_new/tools/eos/Dockerfile
deleted
100644 → 0
View file @
dadaf0ab
FROM
192.168.4.36/baseimg/python:201803291115
USER
root
WORKDIR
/home/quant_group
RUN
mkdir
project
COPY
docker-entrypoint.sh .
COPY
dist.tgz ./project/dist.tgz
COPY
run.py ./project/run.py
COPY
requirements.txt ./project/requirements.txt
RUN
chmod
+x ./docker-entrypoint.sh
CMD
["./docker-entrypoint.sh"]
\ No newline at end of file
templates_new/tools/eos/docker-entrypoint.sh
deleted
100755 → 0
View file @
dadaf0ab
#!/bin/sh
echo
"deploy eos"
package_path
=
"/home/quant_group/project"
echo
"cd
${
package_path
}
"
cd
${
package_path
}
echo
"192.168.6.4 kubernetes"
>>
/etc/hosts
echo
"tar zxf
${
package_path
}
/dist.tgz -C
${
package_path
}
"
tar
zxf
${
package_path
}
/dist.tgz
-C
${
package_path
}
/
echo
"rm dist.tgz public/dist -rf"
rm
-rf
${
package_path
}
/dist.tgz
echo
"pip intall requirements"
pip
install
-r
${
package_path
}
/requirements.txt
echo
"python run.py"
python
${
package_path
}
/run.py 3APro
\ No newline at end of file
templates_new/tools/hitchhiker/Dockerfile
deleted
100644 → 0
View file @
dadaf0ab
FROM
192.168.4.36/tools/hitchhiker:v0.9
USER
root
WORKDIR
/home/quant_group
RUN
mkdir
project
RUN
mkdir
/root/.kube
COPY
docker-entrypoint.sh .
COPY
dist.tgz ./project/dist.tgz
COPY
run.py ./project/run.py
COPY
requirements.txt ./project/requirements.txt
COPY
kube_config /root/.kube/config
RUN
chmod
+x ./docker-entrypoint.sh
CMD
["./docker-entrypoint.sh"]
\ No newline at end of file
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