-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
872 additions
and
272 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
name: SLO | ||
|
||
jobs: | ||
test-slo: | ||
concurrency: | ||
group: slo-${{ github.ref }} | ||
if: (!contains(github.event.pull_request.labels.*.name, 'no slo')) | ||
|
||
runs-on: ubuntu-latest | ||
name: SLO test | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
contents: read | ||
issues: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
if: env.DOCKER_REPO != null | ||
env: | ||
DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }} | ||
|
||
- name: Run SLO | ||
uses: ydb-platform/slo-tests@js-version | ||
if: env.DOCKER_REPO != null | ||
env: | ||
DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }} | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
KUBECONFIG_B64: ${{ secrets.SLO_KUBE_CONFIG }} | ||
AWS_CREDENTIALS_B64: ${{ secrets.SLO_AWS_CREDENTIALS }} | ||
AWS_CONFIG_B64: ${{ secrets.SLO_AWS_CONFIG }} | ||
DOCKER_USERNAME: ${{ secrets.SLO_DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.SLO_DOCKER_PASSWORD }} | ||
DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }} | ||
DOCKER_FOLDER: ${{ secrets.SLO_DOCKER_FOLDER }} | ||
s3_endpoint: ${{ secrets.SLO_S3_ENDPOINT }} | ||
s3_images_folder: ${{ vars.SLO_S3_IMAGES_FOLDER }} | ||
grafana_domain: ${{ vars.SLO_GRAFANA_DOMAIN }} | ||
grafana_dashboard: ${{ vars.SLO_GRAFANA_DASHBOARD }} | ||
ydb_version: 'newest' | ||
timeBetweenPhases: 30 | ||
shutdownTime: 30 | ||
|
||
language_id0: 'dotnet' | ||
workload_path0: 'slo/src' | ||
language0: '.NET SDK' | ||
workload_build_context0: ../.. | ||
workload_build_options0: -f Dockerfile | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: env.DOCKER_REPO != null | ||
env: | ||
DOCKER_REPO: ${{ secrets.SLO_DOCKER_REPO }} | ||
with: | ||
name: slo-logs | ||
path: logs/ |
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
data/ | ||
.idea/ | ||
bin/ | ||
obj/ | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,40 @@ | ||
# SLO playground | ||
|
||
Playground may be used for testing SLO workloads locally | ||
|
||
It has several services: | ||
|
||
- `prometheus` - storage for metrics | ||
- `prometheus-pushgateway` - push acceptor for prometheus | ||
- `grafana` - provides chats for metrics | ||
- `ydb` - local instance of ydb-database to run workload with | ||
|
||
## Network addresses | ||
|
||
- Grafana dashboard: http://localhost:3000 | ||
- Prometheus pushgateway: http://localhost:9091 | ||
- YDB monitoring: http://localhost:8765 | ||
- YDB GRPC: grpc://localhost:2136 | ||
- YDB GRPC TLS: grpcs://localhost:2135 | ||
|
||
## Start | ||
|
||
```shell | ||
docker-compose up -d | ||
``` | ||
|
||
## Stop | ||
|
||
```shell | ||
docker-compose down | ||
``` | ||
|
||
## Configs | ||
|
||
Grafana's dashboards stored in `configs/grafana/provisioning/dashboards` | ||
|
||
## Data | ||
|
||
YDB databases are not persistent | ||
|
||
All other data like metrics and certs stored in `data/` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,8 @@ | ||
global: | ||
scrape_interval: 1s | ||
evaluation_interval: 1s | ||
|
||
scrape_configs: | ||
- job_name: 'slo' | ||
static_configs: | ||
- targets: ['prometheus-pushgateway:9091'] |
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 @@ | ||
version: '2.1' | ||
|
||
networks: | ||
monitor-net: | ||
driver: bridge | ||
|
||
services: | ||
prometheus: | ||
image: prom/prometheus:v2.44.0 | ||
container_name: prometheus | ||
user: "$UID:$GID" | ||
volumes: | ||
- ./configs/prometheus:/etc/prometheus | ||
- ../data/prometheus:/prometheus | ||
command: | ||
- '--config.file=/etc/prometheus/prometheus.yml' | ||
- '--storage.tsdb.path=/prometheus' | ||
- '--storage.tsdb.retention.time=200h' | ||
- '--web.enable-lifecycle' | ||
restart: unless-stopped | ||
ports: | ||
- "9090:9090" | ||
networks: | ||
- monitor-net | ||
|
||
prometheus-pushgateway: | ||
image: prom/pushgateway:v1.6.0 | ||
container_name: prometheus-pushgateway | ||
ports: | ||
- "9091:9091" | ||
networks: | ||
- monitor-net | ||
|
||
grafana: | ||
image: grafana/grafana:9.5.3 | ||
container_name: grafana | ||
user: "$UID:$GID" | ||
volumes: | ||
- ./configs/grafana/provisioning:/etc/grafana/provisioning | ||
- ../data/grafana:/var/lib/grafana | ||
environment: | ||
- GF_SECURITY_ADMIN_USER=admin | ||
- GF_SECURITY_ADMIN_PASSWORD=passw0rD | ||
restart: unless-stopped | ||
ports: | ||
- "3000:3000" | ||
networks: | ||
- monitor-net | ||
|
||
ydb: | ||
image: cr.yandex/yc/yandex-docker-local-ydb:23.1 | ||
container_name: ydb | ||
# hostname: localhost | ||
environment: | ||
- GRPC_TLS_PORT=2135 | ||
- GRPC_PORT=2136 | ||
- MON_PORT=8765 | ||
- YDB_USE_IN_MEMORY_PDISKS=true | ||
- YDB_DEFAULT_LOG_LEVEL=NOTICE | ||
ports: | ||
- "2135:2135" | ||
- "2136:2136" | ||
- "8765:8765" | ||
volumes: | ||
- ../data/ydb_certs:/ydb_certs | ||
networks: | ||
- monitor-net | ||
|
||
slo-runner: | ||
build: | ||
context: ../.. | ||
dockerfile: slo/src/Dockerfile | ||
command: | ||
- 'run' | ||
- 'http://ydb:2136' | ||
- '/local' | ||
- '-prom-pgw=http://prometheus-pushgateway:9091/metrics' | ||
networks: | ||
- monitor-net | ||
depends_on: | ||
ydb: | ||
condition: service_healthy | ||
|
Oops, something went wrong.