Skip to content

Commit 735c8ce

Browse files
authored
Merge pull request #240 from scouter-contrib/development
Development
2 parents 8e10cfe + 619d42c commit 735c8ce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3527
-946
lines changed

.deploy.enc

1.64 KB
Binary file not shown.

.travis.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
addons:
2+
ssh_known_hosts:
3+
- demo.scouterapm.com
4+
dist: xenial
5+
language: node_js
6+
node_js:
7+
- "stable"
8+
before_install:
9+
- echo -e "Host $DEMO_SERVER_NODE\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
10+
- openssl aes-256-cbc -K $encrypted_d662ab6492f2_key -iv $encrypted_d662ab6492f2_iv -in .deploy.enc -out $DEMO_DELOY_FILE -d
11+
- chmod 600 $DEMO_DELOY_FILE
12+
- npm install
13+
script :
14+
- npm run-script build
15+
after_success:
16+
- tar cvf $SCOUTER_PAPER_COMPRESS_NAME build/
17+
- echo "scp -i $DEMO_DELOY_FILE $SCOUTER_PAPER_COMPRESS_NAME $DEMO_SERVER_USER@$DEMO_SERVER_NODE:/home/$DEMO_SERVER_USER"
18+
- scp -i $DEMO_DELOY_FILE $SCOUTER_PAPER_COMPRESS_NAME $DEMO_SERVER_USER@$DEMO_SERVER_NODE:/home/$DEMO_SERVER_USER
19+
- ssh -i $DEMO_DELOY_FILE -T $DEMO_SERVER_USER@$DEMO_SERVER_NODE "/home/ec2-user/deploy.sh $SCOUTER_PAPER_COMPRESS_NAME"
20+
cache:
21+
directories:
22+
- "node_modules"
23+
branches:
24+
only:
25+
- development
26+
notifications:
27+
slack: scouterapm:fJndRYgbQA0uTLXiEqxZJhUU
28+
29+
#: construction_worker:
30+
# job life cycle explain : https://docs.travis-ci.com/user/job-lifecycle/
31+
# https://docs.travis-ci.com/user/encrypting-files

docker/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PAPER_VERSION=2.5.0

docker/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM nginx:1.17.0-alpine
2+
## url setting
3+
LABEL maintainer="[email protected]"
4+
ARG INSTALL_URL=https://github.com/scouter-contrib/scouter-paper/releases/download/${PAPER_VERSION:-2.5.0}/scouter-paper-v${PAPER_VERSION:-2.5.0}.zip
5+
RUN mkdir -p /var/www;
6+
COPY default.conf /etc/nginx/conf.d/default.conf
7+
## install
8+
WORKDIR /var/www
9+
RUN apk add -U tzdata wget unzip;cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime; wget ${INSTALL_URL};unzip scouter-paper-v${PAPER_VERSION:-2.5.0}.zip

docker/HOWTO-Build.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## 1. 빌드 요구 사항
2+
- docker version
3+
- Docker version 18.09.6 이상
4+
### 1.2 빌드
5+
- .env 파일에 Scouter Paper 릴리스 버전 변경 후
6+
```
7+
$./build.sh
8+
```
9+
### 1.3 dockerhub 저장소에 Push
10+
11+
```
12+
$./push.sh
13+
```

docker/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
source .env
3+
4+
echo ">>> build paper version $PAPER_VERSION"
5+
export $PAPER_VERSION
6+
docker build -t scouterapm/scouter-paper:$PAPER_VERSION .

docker/default.conf

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
server {
2+
listen 80;
3+
server_name localhost;
4+
charset utf-8;
5+
6+
#charset koi8-r;
7+
#access_log /var/log/nginx/host.access.log main;
8+
9+
location / {
10+
root /var/www;
11+
index index.html index.htm;
12+
}
13+
14+
#error_page 404 /404.html;
15+
16+
# redirect server error pages to the static page /50x.html
17+
#
18+
error_page 500 502 503 504 /50x.html;
19+
location = /50x.html {
20+
root /usr/share/nginx/html;
21+
}
22+
23+
24+
location ~* /\.(?!well-known\/)
25+
{
26+
deny all;
27+
}
28+
29+
# Prevent clients from accessing to backup/config/source files
30+
location ~* (?:\.(?:bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$
31+
{
32+
deny all;
33+
}
34+
35+
#Prevent to log favicon.ico
36+
location = /favicon.ico
37+
{
38+
access_log off;
39+
log_not_found off;
40+
}
41+
42+
#Prevent to log robots.txt
43+
location = /robots.txt
44+
{
45+
access_log off;
46+
log_not_found off;
47+
}
48+
49+
}
50+

docker/docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: '3.2'
2+
services:
3+
scouter-paper:
4+
image : scouterapm/scouter-paper:2.5.0
5+
restart : always
6+
ports:
7+
- 8080:80

docker/push.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
source .env
3+
echo ">>> build paper version $PAPER_VERSION"
4+
docker push scouterapm/scouter-paper:$PAPER_VERSION

http/serviceMap.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"-2608246922300427269" : {
3+
"name" : "/traceability/cross-service/complex<GET>\n(/sc-api-demo-m01.localdomain/sampleweb)",
4+
"error" : "",
5+
"xtype" : "WEB_SERVICE",
6+
"elapsed" : "485",
7+
"threadName" : "http-nio-8080-exec-5",
8+
"tag" : {
9+
"caller" : "-2608246922300427269",
10+
"ip": "172.31.31.84",
11+
"serverId" : "scouter-demo-collector"
12+
}
13+
},
14+
"-1561743063494029368" : {
15+
"name" : "/traceability/cross-service/simple2<GET>\n(/sc-api-demo-m01.localdomain/sampleweb)",
16+
"error" : "",
17+
"xtype" : "WEB_SERVICE",
18+
"threadName" : "http-nio-8080-exec-5",
19+
"tag" : {
20+
"caller" : "-2608246922300427269",
21+
"ip": "172.31.31.84",
22+
"serverId" : "scouter-demo-collector"
23+
},
24+
"childMap" : {
25+
"210230" : {
26+
"name" :"",
27+
"error" :"",
28+
"xtype" :"",
29+
"threadName" :""
30+
},
31+
"210231" : {
32+
"name" :"",
33+
"error" :"",
34+
"xtype" :"",
35+
"address":"",
36+
"threadName" :"",
37+
"tag" :{
38+
"serverId" : "scouter-demo-collector"
39+
}
40+
}
41+
}
42+
}
43+
}
44+
45+

0 commit comments

Comments
 (0)