-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from grafana/feat/13-tls-refactor
- Loading branch information
Showing
12 changed files
with
1,208 additions
and
375 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# How to run a k6 test against a Redis test server with TLS | ||
|
||
1. Move in the docker folder `cd docker` | ||
2. Run `sh gen-test-certs.sh` to generate custom TLS certificates that the docker container will use. | ||
3. Run `docker-compose up` to start the Redis server with TLS enabled. | ||
4. Connect to it with `redis-cli --tls --cert ./tests/tls/redis.crt --key ./tests/tls/redis.key --cacert ./tests/tls/ca.crt` and run `AUTH tjkbZ8jrwz3pGiku` to authenticate, and verify that the redis server is properly set up. | ||
5. Build the k6 binary with `xk6 build --with github.com/k6io/xk6-redis=.` | ||
5. Run `./k6 run loadtest-tls.js` to run the k6 load test with TLS enabled. |
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,26 @@ | ||
version: "3.3" | ||
|
||
services: | ||
redis: | ||
image: docker.io/bitnami/redis:7.0.8 | ||
user: root | ||
restart: always | ||
environment: | ||
- ALLOW_EMPTY_PASSWORD=false | ||
- REDIS_PASSWORD=tjkbZ8jrwz3pGiku | ||
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL | ||
- REDIS_EXTRA_FLAGS=--loglevel verbose --tls-auth-clients optional | ||
- REDIS_TLS_ENABLED=yes | ||
- REDIS_TLS_PORT=6379 | ||
- REDIS_TLS_CERT_FILE=/tls/redis.crt | ||
- REDIS_TLS_KEY_FILE=/tls/redis.key | ||
- REDIS_TLS_CA_FILE=/tls/ca.crt | ||
ports: | ||
- "6379:6379" | ||
volumes: | ||
- redis_data:/bitnami/redis/data | ||
- ./tests/tls:/tls | ||
|
||
volumes: | ||
redis_data: | ||
driver: local |
Oops, something went wrong.