Skip to content

Commit

Permalink
adapt to go chassis 2.1.0 (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianxiaoliang authored Feb 18, 2021
1 parent bd2d50c commit 9e411a8
Show file tree
Hide file tree
Showing 8 changed files with 216 additions and 40 deletions.
17 changes: 7 additions & 10 deletions build/build_binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,23 @@ echo "build from ${GIT_COMMIT}"
writeConfig(){
echo "write chassis config..."
cat <<EOM > ${release_dir}/conf/chassis.yaml
cse:
service:
registry:
disabled: true
address: http://127.0.0.1:30100
servicecomb:
registry:
disabled: true
protocols:
rest:
listenAddress: 127.0.0.1:30108
rest-consul: #consul compatible API
listenAddress: 127.0.0.1:8500
handler:
chain:
Provider:
default: auth-handler,ratelimiter-provider
EOM
echo "write miroservice config..."
cat <<EOM > ${release_dir}/conf/microservice.yaml
service_description:
name: servicecomb-kie
version: ${version}
servicecomb:
service:
name: servicecomb-kie
version: ${version}
EOM

cat <<EOM > ${release_dir}/conf/kie-conf.yaml
Expand Down
3 changes: 2 additions & 1 deletion build/build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ cp ${PROJECT_DIR}/scripts/start.sh ./
cp ${PROJECT_DIR}/build/docker/server/Dockerfile ./

sudo docker version
sudo docker build -t servicecomb/kie:${version} .
sudo docker build -t servicecomb/kie:latest .
sudo docker tag servicecomb/kie:latest servicecomb/kie:${version}
5 changes: 1 addition & 4 deletions deployments/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ version: '3.1'
services:
mongo:
image: mongo:4.0
restart: always
ports:
- 27017:27017
environment:
Expand All @@ -29,16 +28,14 @@ services:
- ../db.js:/docker-entrypoint-initdb.d/db.js:ro
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: kie
ME_CONFIG_MONGODB_ADMINPASSWORD: 123
ME_CONFIG_MONGODB_SERVER: mongo
servicecomb-kie:
image: servicecomb/kie:latest
restart: always
image: servicecomb/kie
ports:
- 30110:30110
environment:
Expand Down
2 changes: 1 addition & 1 deletion examples/dev/conf/lager.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
log_level: DEBUG
logLevel: DEBUG
2 changes: 0 additions & 2 deletions examples/dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ version: '3.1'
services:
mongo:
image: mongo:4.0
restart: always
ports:
- 27017:27017
environment:
Expand All @@ -29,7 +28,6 @@ services:
- ../../deployments/db.js:/docker-entrypoint-initdb.d/db.js:ro
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
environment:
Expand Down
16 changes: 6 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
module github.com/apache/servicecomb-kie

require (
github.com/apache/servicecomb-service-center v0.0.0-20200817025835-7bb8c4eb9421
github.com/apache/servicecomb-service-center v1.4.1-0.20210209095158-03e61187ded4
github.com/emicklei/go-restful v2.12.0+incompatible
github.com/go-chassis/go-archaius v1.3.6-0.20201103103813-43dd1680ebfb
github.com/go-chassis/go-chassis/v2 v2.1.1-0.20201208062518-9c2e86bd7a6c

github.com/go-chassis/go-archaius v1.3.6-0.20201130023516-387922b408d0
github.com/go-chassis/go-chassis/v2 v2.1.1-0.20201208095114-93feb76fd997
github.com/go-chassis/openlog v1.1.2
github.com/go-chassis/paas-lager v1.1.1
github.com/go-chassis/seclog v1.3.0
github.com/go-playground/universal-translator v0.17.0
github.com/go-playground/validator v9.31.0+incompatible
github.com/hashicorp/serf v0.8.5
github.com/leodido/go-urn v1.2.0 // indirect
github.com/onsi/ginkgo v1.14.0 // indirect
github.com/hashicorp/serf v0.9.5
github.com/leodido/go-urn v1.2.1 // indirect
github.com/satori/go.uuid v1.2.0
github.com/stretchr/testify v1.6.1
github.com/urfave/cli v1.22.4
github.com/xdg/stringprep v1.0.0 // indirect
go.mongodb.org/mongo-driver v1.3.0
go.mongodb.org/mongo-driver v1.4.2
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
gopkg.in/yaml.v2 v2.3.0
)
Expand Down
190 changes: 190 additions & 0 deletions go.sum

Large diffs are not rendered by default.

21 changes: 9 additions & 12 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@ fi
writeConfig(){
echo "write template config..."
cat <<EOM > ${root_dir}/conf/chassis.yaml
cse:
service:
registry:
disabled: true
servicecomb:
registry:
disabled: true
protocols:
rest:
listenAddress: ${listen_addr}:30110
rest-consul: #consul compatible API
listenAddress: ${listen_addr}:8500
handler:
chain:
Provider:
Expand All @@ -45,19 +42,19 @@ servicecomb:
plugin: build-in
EOM
cat <<EOM > ${root_dir}/conf/lager.yaml
logger_level: ${LOG_LEVEL}
logLevel: ${LOG_LEVEL}
logger_file: log/chassis.log
logFile: log/chassis.log
log_format_text: false
logFormatText: false
rollingPolicy: size
log_rotate_date: 1
logRotateDate: 1
log_rotate_size: 10
logRotateSize: 10
log_backup_count: 7
logBackupCount: 7
EOM
cat <<EOM > /etc/servicecomb-kie/kie-conf.yaml
db:
Expand Down

0 comments on commit 9e411a8

Please sign in to comment.