-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SCB-1518 upgrade go chassis, new image for out of box edge service (#76)
* upgrade go chassis * add license header
- Loading branch information
1 parent
ab3773a
commit 2c94b41
Showing
36 changed files
with
621 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
## --------------------------------------------------------------------------- | ||
## Licensed to the Apache Software Foundation (ASF) under one or more | ||
## contributor license agreements. See the NOTICE file distributed with | ||
## this work for additional information regarding copyright ownership. | ||
## The ASF licenses this file to You under the Apache License, Version 2.0 | ||
## (the "License"); you may not use this file except in compliance with | ||
## the License. You may obtain a copy of the License at | ||
## | ||
## http://www.apache.org/licenses/LICENSE-2.0 | ||
## | ||
## Unless required by applicable law or agreed to in writing, software | ||
## distributed under the License is distributed on an "AS IS" BASIS, | ||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
## See the License for the specific language governing permissions and | ||
## limitations under the License. | ||
## --------------------------------------------------------------------------- | ||
version: '3.1' | ||
services: | ||
mongo: | ||
image: mongo:3.4 | ||
restart: always | ||
ports: | ||
- 27017:27017 | ||
environment: | ||
MONGO_INITDB_DATABASE: kie | ||
MONGO_INITDB_ROOT_USERNAME: kie | ||
MONGO_INITDB_ROOT_PASSWORD: 123 | ||
volumes: | ||
- ./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 | ||
kie: | ||
image: servicecomb/kie:latest | ||
restart: always | ||
ports: | ||
- 30110:30110 | ||
environment: | ||
MONGODB_USER: kie | ||
MONGODB_PWD: 123 | ||
MONGODB_ADDR: mongo | ||
etcd: | ||
image: 'quay.io/coreos/etcd:latest' | ||
# restart: always | ||
environment: | ||
ETCD_ADVERTISE_CLIENT_URLS: http://etcd:2379 | ||
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379 | ||
ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd:2380 | ||
ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380 | ||
ETCD_INITIAL_CLUSTER: default=http://etcd:2380 | ||
|
||
service-center: | ||
depends_on: | ||
- etcd | ||
image: 'servicecomb/service-center:latest' | ||
ports: | ||
- "30100:30100" | ||
environment: | ||
BACKEND_ADDRESS: etcd:2379 | ||
|
||
scfrontend: | ||
depends_on: | ||
- service-center | ||
image: 'servicecomb/scfrontend:latest' | ||
ports: | ||
- "30103:30103" | ||
environment: | ||
SC_ADDRESS: http://service-center:30100 | ||
mesher-edge: | ||
depends_on: | ||
- service-center | ||
- kie | ||
image: 'servicecomb/mesher-edge:latest' | ||
ports: | ||
- "80:30101" | ||
environment: | ||
PAAS_CSE_SC_ENDPOINT: service-center:30100 | ||
PAAS_CSE_CC_ENDPOINT: kie:30110 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM golang:1.12.10 as builder | ||
|
||
COPY . /servicecomb-mesher/ | ||
WORKDIR /servicecomb-mesher/ | ||
ENV GOPROXY=https://goproxy.io | ||
RUN go build -a github.com/apache/servicecomb-mesher/cmd/mesher | ||
|
||
|
||
FROM frolvlad/alpine-glibc:latest | ||
RUN mkdir -p /opt/mesher && \ | ||
mkdir -p /etc/mesher/conf && \ | ||
mkdir -p /etc/ssl/mesher/ | ||
# To upload schemas using env enable SCHEMA_ROOT as environment variable using dockerfile or pass while running container | ||
#ENV SCHEMA_ROOT=/etc/chassis-go/schemas umcomment in future | ||
|
||
ENV CHASSIS_HOME=/opt/mesher/ | ||
|
||
COPY --from=builder /servicecomb-mesher/mesher $CHASSIS_HOME | ||
COPY docker/edge/microservice.yaml docker/edge/chassis.yaml docker/edge/lager.yaml $CHASSIS_HOME/conf/ | ||
COPY docker/edge/mesher.yaml /etc/mesher/conf/ | ||
COPY docker/edge/start.sh $CHASSIS_HOME | ||
WORKDIR $CHASSIS_HOME | ||
ENTRYPOINT ["sh", "/opt/mesher/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
--- | ||
cse: | ||
protocols: | ||
http: | ||
listenAddress: 127.0.0.1:30101 | ||
rest-admin: | ||
listenAddress: 127.0.0.1:30102 # listen addr use to adminAPI | ||
service: | ||
registry: | ||
address: http://127.0.0.1:30100 # uri of service center | ||
scope: full #set full to be able to discover other app's service | ||
config: | ||
client: | ||
serverUri: https://127.0.0.1:30110 #uri of config center | ||
type: servicecomb-kie | ||
refreshMode: 1 # 1: only pull config. | ||
refreshInterval: 30 # unit is second | ||
handler: | ||
chain: | ||
Consumer: | ||
outgoing: router,bizkeeper-consumer,loadbalance,tracing-consumer,transport #consumer handlers | ||
Provider: | ||
incoming: tracing-provider #provider handlers | ||
|
||
## Mesher TLS is base on Go Chassis TLS config, https://docs.go-chassis.com/user-guides/tls.html | ||
ssl: | ||
# mesher-edge.rest.Provider.cipherPlugin: default | ||
# mesher-edge.rest.Provider.verifyPeer: false | ||
# mesher-edge.rest.Provider.cipherSuits: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 | ||
# mesher-edge.rest.Provider.protocol: TLSv1.2 | ||
# mesher-edge.rest.Provider.caFile: | ||
# mesher-edge.rest.Provider.certFile: server.crt | ||
# mesher-edge.rest.Provider.keyFile: server.key | ||
# mesher-edge.rest.Provider.certPwdFile: | ||
|
||
#tracing: | ||
# enabled: true #enable distribution tracing | ||
# collectorType: zipkin #zipkin: Send tracing info to zipkin server | ||
# #namedPipe: Write tracing info to linux named pipe. | ||
# collectorTarget: http://localhost:9411/api/v1/spans #If the collectorType is "zipkin", the target is a zipkin server url, if the collecterType is "file" or "namedPipe", the target is a file path. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
--- | ||
# LoggerLevel: |DEBUG|INFO|WARN|ERROR|FATAL | ||
logger_level: DEBUG | ||
|
||
# LoggerFile: used to output the name of log.可配置绝对路径,也可以配置用于拼接CHASSIS_HOME的相对路径。 | ||
logger_file: log/mesher.log | ||
|
||
# LogFormatText:设定日志的输出格式是 json 还是 plaintext (类似于log4j),默认为 false,不建议修改,如果开发过程中想本地查看日志的话, | ||
# 可以设定 LoggerFile 和 LogFormatText 为 true,这样会输出类似于 log4j 格式的本地日志。 | ||
log_format_text: false | ||
|
||
#rollingPolicy daily/size;用于配置根据时间,还是根据大小进行日志rotate操作。 | ||
rollingPolicy: size | ||
|
||
# MaxDaily of a log file before rotate. By D Days.;日志rotate时间配置,单位"day"。 | ||
log_rotate_date: 1 | ||
|
||
# MaxSize of a log file before rotate. By M Bytes.;日志rotate文件大小配置,单位"MB"。 | ||
log_rotate_size: 10 | ||
|
||
# Max counts to keep of a log's backup files.日志最大存储数量,单位“个”。 | ||
log_backup_count: 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
## Router rules and fault injection rules are moved to router.yaml | ||
#plugin: | ||
# destinationResolver: | ||
# http: host # how to turn host to destination name. default to service name, | ||
|
||
admin: #admin API | ||
goRuntimeMetrics : true # enable metrics | ||
enable: true | ||
|
||
## enable pprof to profile mesher runtime | ||
#pprof: | ||
# enable: false | ||
|
||
#mesher: | ||
# ingress: | ||
# type: servicecomb | ||
# rule: | ||
# http: | | ||
# - host: example.com | ||
# limit: 30 | ||
# apiPath: /some/api | ||
# service: | ||
# name: example | ||
# redirectPath: /another/api | ||
# port: | ||
# name: http-legacy | ||
# value: 8080 | ||
# - apiPath: /sayerror/api | ||
# service: | ||
# name: Server | ||
# redirectPath: /sayerror | ||
# port: | ||
# name: http | ||
# value: 8080 | ||
# - apiPath: /some/api | ||
# service: | ||
# name: Server | ||
# port: | ||
# name: http | ||
# value: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
service_description: | ||
name: mesher-edge | ||
version: 1.7.0 |
Oops, something went wrong.