Skip to content

Commit 1e82e4e

Browse files
Bootstrap example cluster with cartridge-cli
Closes #33, #34
1 parent ed9a621 commit 1e82e4e

31 files changed

+303
-557
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
## Changed
1515
- Update metrics version to 0.9.0
16+
- Separate app cluster and load generator in example docker stand
17+
- Use cartridge-cli to run and setup example app cluster instead of luatest
1618

1719
## Fixed
1820
- Add missing space and replication metrics labels to Telegraf configuration

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Refer to dashboard [documentation page](https://www.tarantool.io/en/doc/latest/b
2020

2121
## Experimental cluster
2222

23-
```docker-compose up -d``` will start 5 containers: Tarantool, Telegraf, InfluxDB, Prometheus and Grafana, which build cluster with two fully operational metrics datasources (InfluxDB and Prometheus), extracting metrics from Tarantool example project. We recommend using the exact versions we use in experimental cluster (e.g. Grafana v6.6.0).
23+
```docker-compose up -d``` will start 6 containers: Tarantool App, Tarantool Load Generator, Telegraf, InfluxDB, Prometheus and Grafana, which build cluster with two fully operational metrics datasources (InfluxDB and Prometheus), extracting metrics from Tarantool App example project. We recommend using the exact versions we use in experimental cluster (e.g. Grafana v6.6.0).
2424

2525
## How to compile dashboard
2626

docker-compose.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
version: '3'
22
services:
3-
example_project:
3+
app:
44
build:
55
context: ./example/project
6-
dockerfile: Dockerfile
7-
entrypoint: ["/app/.rocks/bin/luatest"]
8-
command: ["./cluster"]
6+
dockerfile: app.Dockerfile
97
networks:
108
tarantool_dashboard_dev:
119
ports:
@@ -20,13 +18,21 @@ services:
2018
- 8084:8084
2119
- 8085:8085
2220

21+
load_generator:
22+
build:
23+
context: ./example/project
24+
dockerfile: load.Dockerfile
25+
networks:
26+
tarantool_dashboard_dev:
27+
2328
telegraf:
2429
image: telegraf:1.13-alpine
2530
networks:
2631
tarantool_dashboard_dev:
2732
volumes:
2833
# configure telegraf to work out of the box
2934
- ./example/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
35+
3036
influxdb:
3137
image: influxdb:1.7-alpine
3238
environment:
@@ -39,6 +45,8 @@ services:
3945
INFLUXDB_HTTP_AUTH_ENABLED: "true"
4046
networks:
4147
tarantool_dashboard_dev:
48+
ports:
49+
- 8086:8086
4250

4351
prometheus:
4452
image: prom/prometheus:v2.17.2

example/project/.cartridge.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
---
2-
run_dir: 'tmp'
2+
# Here you can specify default parameters for local running, such as:
3+
4+
# cfg: path-to-cfg-file
5+
# log-dir: path-to-log-dir
6+
# run-dir: path-to-run-dir
7+
# data-dir: path-to-data-dir
8+
9+
stateboard: false # --stateboard flag value is true by default

example/project/.luacheckrc

Lines changed: 0 additions & 15 deletions
This file was deleted.

example/project/.luacov

Lines changed: 0 additions & 5 deletions
This file was deleted.

example/project/Dockerfile.build.cartridge

Lines changed: 0 additions & 13 deletions
This file was deleted.

example/project/Dockerfile.cartridge

Lines changed: 0 additions & 15 deletions
This file was deleted.

example/project/app.Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM tarantool/tarantool:1.x-centos7
2+
3+
WORKDIR /app
4+
5+
RUN yum install -y git \
6+
cmake \
7+
make \
8+
gcc \
9+
gcc-c++
10+
COPY . .
11+
RUN mkdir -p tmp
12+
13+
# https://github.com/tarantool/cartridge-cli#installation
14+
RUN curl -L https://tarantool.io/installer.sh | bash -s -- --repo-only
15+
RUN yum install -y cartridge-cli
16+
RUN cartridge build
17+
18+
ENTRYPOINT cartridge start -d && \
19+
sleep 3 && \
20+
(cartridge replicasets setup --bootstrap-vshard || true) && \
21+
cartridge log -f

example/project/cartridge.post-build

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)