Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge apache latest code #1

Merged
merged 6 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
env:
GO111MODULE: on
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.16
id: go
- name: Checkout Source
uses: actions/checkout@v2
- name: Fmt
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/mongo_storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ jobs:
uses: actions/checkout@v1
- name: UT
run: |
cd build
time bash build_docker.sh
cd ../
sudo docker-compose -f ./deployments/docker/docker-compose.yaml up -d
sudo docker-compose -f ./examples/dev/docker-compose.yaml up -d
sleep 20
export TEST_DB_KIND=mongo
export TEST_DB_URI=mongodb://kie:[email protected]:27017/kie
time go test -v $(go list ./... | grep -v etcd | grep -v third_party | grep -v examples)
export TEST_DB_URI=mongodb://kie:[email protected]:27017/servicecomb
time go test -v $(go list ./... | grep -v etcd | grep -v third_party | grep -v examples)
- name: Build kie images
run: |
cd build
time bash build_docker.sh
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ etc/ssl/
tmp/
conf/
glide.lock

main
kieserver
examples/dev/data/
2 changes: 1 addition & 1 deletion build/build_binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ EOM

cat <<EOM > ${release_dir}/conf/kie-conf.yaml
db:
uri: mongodb://root:[email protected]:27017/kie
uri: mongodb://root:[email protected]:27017/servicecomb
type: mongodb
poolSize: 10
ssl: false
Expand Down
2 changes: 1 addition & 1 deletion deployments/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
ports:
- 27017:27017
environment:
MONGO_INITDB_DATABASE: kie
MONGO_INITDB_DATABASE: servicecomb
MONGO_INITDB_ROOT_USERNAME: kie
MONGO_INITDB_ROOT_PASSWORD: 123
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docs/configurations/rbac.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ follow steps to enable service center [RBAC](https://service-center.readthedocs.
2.edit kie-conf.yaml
```ini
db:
uri: mongodb://kie:[email protected]:27017/kie
uri: mongodb://kie:[email protected]:27017/servicecomb
type: mongodb
rbac:
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion docs/configurations/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ you can use mongo db as kie server storage to save configuration
### Example
```yaml
db:
uri: mongodb://kie:[email protected]:27017/kie
uri: mongodb://kie:[email protected]:27017/servicecomb
poolSize: 10
timeout: 5s
sslEnabled: true
Expand Down
10 changes: 5 additions & 5 deletions docs/getstarted/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use the [db init script](https://github.com/apache/servicecomb-kie/blob/master/d

```shell script
sudo docker run --name mongo -d \
-e "MONGO_INITDB_DATABASE=kie" \
-e "MONGO_INITDB_ROOT_USERNAME=root" \
-e "MONGO_INITDB_ROOT_PASSWORD=root" \
-e "MONGO_INITDB_DATABASE=servicecomb" \
-e "MONGO_INITDB_ROOT_USERNAME=kie" \
-e "MONGO_INITDB_ROOT_PASSWORD=123" \
-p 27017:27017 \
-v ./deployments/db.js:/docker-entrypoint-initdb.d/db.js:ro \
mongo:4.0
Expand All @@ -21,8 +21,8 @@ Run kie server
```shell script
sudo docker run --name kie-server -d \
-e "MONGODB_ADDR=${MONGO_IP}:27017" \
-e "MONGODB_USER=root" \
-e "MONGODB_PWD=root" \
-e "MONGODB_USER=kie" \
-e "MONGODB_PWD=123" \
-p 30110:30110 \
servicecomb/kie
```
Expand Down
29 changes: 29 additions & 0 deletions examples/dev/db.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* 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.
*/

db.createUser(
{
user: "kie",
pwd: "123",
roles: [
{
role: "readWrite",
db: "servicecomb"
}
]
}
);
19 changes: 8 additions & 11 deletions examples/dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,19 @@
## See the License for the specific language governing permissions and
## limitations under the License.
## ---------------------------------------------------------------------------
version: '3.1'
version: '3.3'
services:
mongo:
image: mongo:4.0
image: mongo:4.2
command: mongod --replSet my-replica-set --port 27017 --bind_ip_all
ports:
- 27017:27017
environment:
MONGO_INITDB_DATABASE: servicecomb
MONGO_INITDB_ROOT_USERNAME: kie
MONGO_INITDB_ROOT_PASSWORD: 123
MONGO_INITDB_DATABASE: kie
volumes:
- ../../deployments/db.js:/docker-entrypoint-initdb.d/db.js:ro
mongo-express:
image: mongo-express
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: kie
ME_CONFIG_MONGODB_ADMINPASSWORD: 123
- ./db.js:/docker-entrypoint-initdb.d/db.js:ro
healthcheck:
test: test $$(echo "rs.initiate({_id:'my-replica-set',members:[{_id:0,host:\"127.0.0.1:27017\"}]}).ok || rs.status().ok" | mongo -u $${MONGO_INITDB_ROOT_USERNAME} -p $${MONGO_INITDB_ROOT_PASSWORD} --port 27017 --quiet) -eq 1
interval: 10s
3 changes: 3 additions & 0 deletions examples/dev/kie-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ db:
# kind=embedded_etcd, then is the embedded etcd server's advertise-peer-urls, e.g. default=http://127.0.0.1:2380
#uri: mongodb://kie:[email protected]:27017/kie
uri: http://127.0.0.1:2379
sync:
# turn on the synchronization switch related operations will be written to the task in the db
enabled: false
# poolSize: 10
# timeout: 5m
# sslEnabled: false
Expand Down
133 changes: 127 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,142 @@
module github.com/apache/servicecomb-kie

require (
github.com/apache/servicecomb-service-center/eventbase v0.0.0-20211230015739-512a9cc7b4cd
github.com/emicklei/go-restful v2.12.0+incompatible
github.com/go-chassis/cari v0.5.0
github.com/go-chassis/foundation v0.3.1-0.20210811025651-7f4d2b2b906c
github.com/go-chassis/cari v0.5.1-0.20211229072151-7fa40d0919c6
github.com/go-chassis/foundation v0.4.0
github.com/go-chassis/go-archaius v1.5.2-0.20210301074935-e4694f6b077b
github.com/go-chassis/go-chassis/v2 v2.3.0
github.com/go-chassis/go-chassis/v2 v2.3.1-0.20211217084436-360a6a6a0ef3
github.com/go-chassis/openlog v1.1.3
github.com/go-chassis/seclog v1.3.0
github.com/go-chassis/seclog v1.3.1-0.20210917082355-52c40864f240
github.com/gofrs/uuid v4.0.0+incompatible
github.com/hashicorp/serf v0.9.5
github.com/little-cui/etcdadpt v0.2.1
github.com/little-cui/etcdadpt v0.3.1
github.com/stretchr/testify v1.7.0
github.com/urfave/cli v1.22.4
go.mongodb.org/mongo-driver v1.4.6
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
gopkg.in/yaml.v2 v2.4.0
)

go 1.16
require (
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e // indirect
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/aws/aws-sdk-go v1.34.28 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cenkalti/backoff/v4 v4.1.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set v1.7.1 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/fatih/color v1.9.0 // indirect
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-chassis/go-restful-swagger20 v1.0.3 // indirect
github.com/go-chassis/kie-client v0.1.1-0.20210926011742-97eed4281056 // indirect
github.com/go-chassis/sc-client v0.6.1-0.20210918130508-2b9daad232da // indirect
github.com/go-playground/locales v0.13.0 // indirect
github.com/go-playground/universal-translator v0.17.0 // indirect
github.com/go-playground/validator v9.31.0+incompatible // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.1+incompatible // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/gorilla/websocket v1.4.3-0.20210424162022-e8629af678b7 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-immutable-radix v1.0.0 // indirect
github.com/hashicorp/go-msgpack v0.5.3 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/hashicorp/go-sockaddr v1.0.0 // indirect
github.com/hashicorp/go-syslog v1.0.0 // indirect
github.com/hashicorp/go-version v1.2.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/mdns v1.0.1 // indirect
github.com/hashicorp/memberlist v0.2.2 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/karlseguin/ccache/v2 v2.0.8 // indirect
github.com/klauspost/compress v1.9.5 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mattn/go-colorable v0.1.7 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/miekg/dns v1.1.26 // indirect
github.com/mitchellh/cli v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/opentracing/opentracing-go v1.1.0 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.26.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/sirupsen/logrus v1.7.0 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/spf13/cast v1.3.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect
github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
go.etcd.io/etcd/api/v3 v3.5.0 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.0 // indirect
go.etcd.io/etcd/client/v2 v2.305.0 // indirect
go.etcd.io/etcd/client/v3 v3.5.0 // indirect
go.etcd.io/etcd/pkg/v3 v3.5.0 // indirect
go.etcd.io/etcd/raft/v3 v3.5.0 // indirect
go.etcd.io/etcd/server/v3 v3.5.0 // indirect
go.opentelemetry.io/contrib v0.20.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0 // indirect
go.opentelemetry.io/otel v0.20.0 // indirect
go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect
go.opentelemetry.io/otel/metric v0.20.0 // indirect
go.opentelemetry.io/otel/sdk v0.20.0 // indirect
go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect
go.opentelemetry.io/otel/sdk/metric v0.20.0 // indirect
go.opentelemetry.io/otel/trace v0.20.0 // indirect
go.opentelemetry.io/proto/otlp v0.7.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b // indirect
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 // indirect
golang.org/x/text v0.3.5 // indirect
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
google.golang.org/grpc v1.40.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/apimachinery v0.19.5 // indirect
k8s.io/client-go v0.19.5 // indirect
k8s.io/utils v0.0.0-20200729134348-d5654de09c73 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)

go 1.17
Loading