-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:linkall-labs/vanus into segment
Signed-off-by: jyjiangkai <jyjiangkai@163.com>
- Loading branch information
Showing
383 changed files
with
19,253 additions
and
8,514 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
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,33 @@ | ||
FROM --platform=$BUILDPLATFORM golang:1.18 as builder | ||
WORKDIR /workspace | ||
|
||
COPY . . | ||
RUN go mod download | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-controller | ||
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-store | ||
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-trigger | ||
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-timer | ||
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build-gateway | ||
|
||
FROM centos:latest | ||
WORKDIR /vanus | ||
|
||
ARG VERSION | ||
COPY --from=builder /workspace/bin/controller bin/controller | ||
COPY --from=builder /workspace/bin/store bin/store | ||
COPY --from=builder /workspace/bin/trigger bin/trigger | ||
COPY --from=builder /workspace/bin/timer bin/timer | ||
COPY --from=builder /workspace/bin/gateway bin/gateway | ||
COPY --from=builder /workspace/build/all-in-one/config config | ||
COPY --from=builder /workspace/build/all-in-one/run.sh run.sh | ||
|
||
RUN chmod a+x /vanus/run.sh | ||
RUN mkdir /vanus/logs | ||
|
||
ENV VERSION=$VERSION | ||
|
||
ENTRYPOINT ["/vanus/run.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,34 @@ | ||
name: "standalone" | ||
ip: "127.0.0.1" | ||
port: 2048 | ||
etcd: | ||
- "127.0.0.1:2379" | ||
data_dir: "/vanus/data/controller" | ||
gateway_endpoint: "127.0.0.1:18080" | ||
segment_capacity: 8388604 # 8MB | ||
topology: | ||
standalone: 127.0.0.1:2048 | ||
replicas: 1 | ||
metadata: | ||
key_prefix: "/standalone" | ||
embed_etcd: | ||
# relative path to ${data_dir} above | ||
data_dir: "etcd" | ||
listen_client_addr: 127.0.0.1:2379 | ||
listen_peer_addr: 127.0.0.1:2380 | ||
advertise_client_addr: 127.0.0.1:2379 | ||
advertise_peer_addr: 127.0.0.1:2380 | ||
heartbeat-interval: 600000 | ||
election-timeout: 600000 | ||
clusters: | ||
- standalone=http://127.0.0.1:2380 | ||
secret_encryption_salt: "encryption_salt" | ||
observability: | ||
metrics: | ||
enable: false | ||
# metrics for prometheus scratch data | ||
port: 2112 | ||
tracing: | ||
enable: false | ||
# OpenTelemetry Collector endpoint, https://opentelemetry.io/docs/collector/getting-started/ | ||
otel_collector: http://127.0.0.1:4318 |
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,12 @@ | ||
port: 8080 | ||
controllers: | ||
- "127.0.0.1:2048" | ||
observability: | ||
metrics: | ||
enable: false | ||
# metrics for prometheus scratch data | ||
port: 2113 | ||
tracing: | ||
enable: false | ||
# OpenTelemetry Collector endpoint, https://opentelemetry.io/docs/collector/getting-started/ | ||
otel_collector: http://127.0.0.1:4318 |
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,30 @@ | ||
port: 11811 | ||
ip : 127.0.0.1 | ||
controllers: | ||
- 127.0.0.1:2048 | ||
volume: | ||
id: 1 | ||
dir: /vanus/data/store | ||
capacity: 1073741824 # 1GB | ||
meta_store: | ||
wal: | ||
io: | ||
engine: psync | ||
offset_store: | ||
wal: | ||
io: | ||
engine: psync | ||
raft: | ||
wal: | ||
block_size: 32768 | ||
io: | ||
engine: psync | ||
observability: | ||
metrics: | ||
enable: false | ||
# metrics for prometheus scratch data | ||
port: 2114 | ||
tracing: | ||
enable: false | ||
# OpenTelemetry Collector endpoint, https://opentelemetry.io/docs/collector/getting-started/ | ||
otel_collector: http://127.0.0.1:4318 |
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,24 @@ | ||
name: "timer" | ||
ip: "127.0.0.1" | ||
etcd: | ||
- "127.0.0.1:2379" | ||
replicas: 1 | ||
metadata: | ||
key_prefix: "/standalone" | ||
leaderelection: | ||
lease_duration: 15 | ||
timingwheel: | ||
tick: 1 | ||
wheel_size: 32 | ||
layers: 4 | ||
controllers: | ||
- 127.0.0.1:2048 | ||
observability: | ||
metrics: | ||
enable: false | ||
# metrics for prometheus scratch data | ||
port: 2115 | ||
tracing: | ||
enable: false | ||
# OpenTelemetry Collector endpoint, https://opentelemetry.io/docs/collector/getting-started/ | ||
otel_collector: http://127.0.0.1:4318 |
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,14 @@ | ||
port: 2148 | ||
ip: "127.0.0.1" | ||
controllers: | ||
- 127.0.0.1:2048 | ||
rateLimit: 0 | ||
observability: | ||
metrics: | ||
enable: false | ||
# metrics for prometheus scratch data | ||
port: 2116 | ||
tracing: | ||
enable: false | ||
# OpenTelemetry Collector endpoint, https://opentelemetry.io/docs/collector/getting-started/ | ||
otel_collector: http://127.0.0.1:4318 |
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,10 @@ | ||
#!/usr/bin/env bash | ||
nohup /vanus/bin/controller --config /vanus/config/controller.yaml > /vanus/logs/controller.log & | ||
nohup /vanus/bin/store --config /vanus/config/store.yaml > /vanus/logs/store.log & | ||
nohup /vanus/bin/trigger --config /vanus/config/trigger.yaml > /vanus/logs/trigger.log & | ||
nohup /vanus/bin/timer --config /vanus/config/timer.yaml > /vanus/logs/timer.log & | ||
nohup /vanus/bin/gateway --config /vanus/config/gateway.yaml > /vanus/logs/gateway.log & | ||
|
||
sleep 3600 | ||
|
||
pkill -f vanus |
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
Oops, something went wrong.