Skip to content

Commit

Permalink
slo
Browse files Browse the repository at this point in the history
  • Loading branch information
XmasApple committed Sep 7, 2023
1 parent 3167e28 commit 03e6e4a
Show file tree
Hide file tree
Showing 27 changed files with 1,922 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/slo.yml
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@php-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/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.idea/
.vs/
.vscode/
bin/
obj/
launchSettings.json
*.user
5 changes: 5 additions & 0 deletions slo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
data/
.idea/
bin/
obj/

40 changes: 40 additions & 0 deletions slo/playground/README.md
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/`
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: 1

providers:
- name: 'SLO'
options:
path: /etc/grafana/provisioning/dashboards
Loading

0 comments on commit 03e6e4a

Please sign in to comment.