Skip to content

Commit 5ccb9cd

Browse files
authored
Merge pull request #39 slo
2 parents f09a8fe + cf08b23 commit 5ccb9cd

29 files changed

+2116
-2
lines changed

.github/workflows/lint.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ jobs:
1010
autoformatter:
1111
strategy:
1212
matrix:
13-
source-dir: ["./src/", "./examples/src/"]
13+
source-dir: ["./src/", "./examples/src/", "./slo/src/"]
1414
include:
1515
- source-dir: "./src/"
1616
solutionFile: "YdbSdk.sln"
1717
- source-dir: "./examples/src/"
1818
solutionFile: "YdbExamples.sln"
19+
- source-dir: "./slo/src/"
20+
solutionFile: "src.sln"
1921
name: autoformat check
2022
runs-on: ubuntu-latest
2123
steps:
@@ -37,7 +39,7 @@ jobs:
3739
inspection:
3840
strategy:
3941
matrix:
40-
solutionPath: ["./src/YdbSdk.sln", "./examples/src/YdbExamples.sln"]
42+
solutionPath: ["./src/YdbSdk.sln", "./examples/src/YdbExamples.sln", "./slo/src/src.sln"]
4143
runs-on: ubuntu-latest
4244
name: Inspection
4345
steps:

.github/workflows/slo.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
on:
2+
push:
3+
branches: [main]
4+
pull_request:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
name: SLO
9+
10+
jobs:
11+
test-slo:
12+
concurrency:
13+
group: slo-${{ github.ref }}
14+
if: (!contains(github.event.pull_request.labels.*.name, 'no slo'))
15+
16+
runs-on: ubuntu-latest
17+
name: SLO test
18+
permissions:
19+
checks: write
20+
pull-requests: write
21+
contents: read
22+
issues: write
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v3
27+
if: env.DOCKER_REPO != null
28+
env:
29+
DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }}
30+
31+
- name: Run SLO
32+
uses: ydb-platform/slo-tests@php-version
33+
if: env.DOCKER_REPO != null
34+
env:
35+
DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }}
36+
with:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
KUBECONFIG_B64: ${{ secrets.SLO_KUBE_CONFIG }}
39+
AWS_CREDENTIALS_B64: ${{ secrets.SLO_AWS_CREDENTIALS }}
40+
AWS_CONFIG_B64: ${{ secrets.SLO_AWS_CONFIG }}
41+
DOCKER_USERNAME: ${{ secrets.SLO_DOCKER_USERNAME }}
42+
DOCKER_PASSWORD: ${{ secrets.SLO_DOCKER_PASSWORD }}
43+
DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }}
44+
DOCKER_FOLDER: ${{ secrets.SLO_DOCKER_FOLDER }}
45+
s3_endpoint: ${{ secrets.SLO_S3_ENDPOINT }}
46+
s3_images_folder: ${{ vars.SLO_S3_IMAGES_FOLDER }}
47+
grafana_domain: ${{ vars.SLO_GRAFANA_DOMAIN }}
48+
# grafana_dashboard: ${{ vars.SLO_GRAFANA_DASHBOARD }}
49+
grafana_dashboard: dca60386-0d3d-43f5-a2af-5f3fd3e3b295
50+
grafana_dashboard_width: 2000
51+
grafana_dashboard_height: 2300
52+
ydb_version: 'newest'
53+
timeBetweenPhases: 30
54+
shutdownTime: 30
55+
56+
language_id0: 'dotnet'
57+
workload_path0: 'slo/src'
58+
language0: '.NET SDK'
59+
workload_build_context0: ../..
60+
workload_build_options0: -f Dockerfile
61+
62+
- uses: actions/upload-artifact@v3
63+
if: always() && env.DOCKER_REPO != null
64+
env:
65+
DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }}
66+
with:
67+
name: slo-logs
68+
path: logs/

slo/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
data/
2+
.idea/
3+
bin/
4+
obj/
5+

slo/playground/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# SLO playground
2+
3+
Playground may be used for testing SLO workloads locally
4+
5+
It has several services:
6+
7+
- `prometheus` - storage for metrics
8+
- `prometheus-pushgateway` - push acceptor for prometheus
9+
- `grafana` - provides chats for metrics
10+
- `ydb` - local instance of ydb-database to run workload with
11+
12+
## Network addresses
13+
14+
- Grafana dashboard: http://localhost:3000
15+
- Prometheus pushgateway: http://localhost:9091
16+
- YDB monitoring: http://localhost:8765
17+
- YDB GRPC: grpc://localhost:2136
18+
- YDB GRPC TLS: grpcs://localhost:2135
19+
20+
## Start
21+
22+
```shell
23+
docker-compose up -d
24+
```
25+
26+
## Stop
27+
28+
```shell
29+
docker-compose down
30+
```
31+
32+
## Configs
33+
34+
Grafana's dashboards stored in `configs/grafana/provisioning/dashboards`
35+
36+
## Data
37+
38+
YDB databases are not persistent
39+
40+
All other data like metrics and certs stored in `data/`
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: 1
2+
3+
providers:
4+
- name: 'SLO'
5+
options:
6+
path: /etc/grafana/provisioning/dashboards

0 commit comments

Comments
 (0)