Skip to content

frevisto/TestLab

Repository files navigation

README.md

'generated by copilot'

TestLab

TestLab is a repository designed to test and demonstrate various technologies, including InfluxDB, Grafana, Loki, and Promtail. This repository includes Docker configurations for setting up these services and running performance tests using k6.

Repository Structure

  • Dockerfile: Defines the Docker images for InfluxDB, Grafana, Loki, and Promtail.
  • docker-compose.yml: Configures and orchestrates the services.
  • logging/loki: Contains configuration files for Loki.
  • logging/promtail: Contains configuration files for Promtail.
  • scripts: Directory for k6 test scripts.

Services

InfluxDB

InfluxDB is used as the time series database.

  • Image: influxdb:1.8.10
  • Ports: 8086
  • Environment Variables:
    • INFLUXDB_ADMIN_USER
    • INFLUXDB_ADMIN_PASSWORD
    • INFLUXDB_DB

Grafana

Grafana is used for data visualization.

  • Image: grafana/grafana:latest
  • Ports: 3000
  • Environment Variables:
    • GF_SECURITY_ADMIN_PASSWORD

Loki

Loki is used for log aggregation.

  • Image: grafana/loki:2.7.3

Promtail

Promtail is used to collect logs and push them to Loki.

  • Image: grafana/promtail:2.7.3

k6

k6 is used for running performance tests.

  • Image: grafana/k6:latest
  • Entrypoint: /bin/sh -c
  • Command: while true; do sleep 30; done;

Setup Instructions

Prerequisites

  • Docker
  • Docker Compose

Running the Services

  1. Clone the repository:
    git clone https://github.com/frevisto/TestLab.git
    cd TestLab
  2. Start the services:
    sudo docker compose up -d

Accessing the Services

Running k6 Tests

To run k6 tests, attach to the k6 container:

sudo docker exec -it k6 /bin/sh

Then you can manually run your k6 scripts.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Feel free to modify this README to better fit your specific needs!

About

This is a docker-based lab for k6 load testing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published