Skip to content

Commit

Permalink
Update docs + move to custom grafana image
Browse files Browse the repository at this point in the history
Signed-off-by: Mikayla Thompson <thomika@amazon.com>
  • Loading branch information
mikaylathompson committed Apr 11, 2024
1 parent 7552945 commit ffd5066
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
19 changes: 10 additions & 9 deletions TrafficCapture/dockerSolution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,20 @@ curl --insecure https://localhost:9200/_cat/indices -u 'admin:admin'
You can send the same calls to the source cluster while bypassing the Capture Proxy (calls will not be relayed to the
target cluster) via `localhost:19200`, and to the target cluster directly at `localhost:29200`.

For sample data that exercises various endpoints with a range of datatypes, you can `ssh` into the Migration Console
(`docker exec -i -t $(docker ps -aqf "ancestor=migrations/migration_console:latest") bash` or via the Docker console)
and run `./runTestBenchmarks.sh`. By default, this runs four workloads from
For sample data that exercises various endpoints with a range of datatypes, you can execute a shell in the Migration
Console (`docker exec -i -t $(docker ps -aqf "ancestor=migrations/migration_console:latest") bash` or via the Docker
console) and run `./runTestBenchmarks.sh`. By default, this runs four short test workloads from
[Opensearch-Benchmark](https://github.com/opensearch-project/opensearch-benchmark) against the Capture Proxy endpoint
(9200). The Migration Console contains other utility functions (`./catIndices.sh`, `kafka-tools`, etc.) to interact
with the various containers of the solution.

You can also access the metrics generated by the solution in Grafana. While the solution is running, go to
[http://localhost:3000](http://localhost:3000/) and enter the default credentials (admin, admin). Connections to
Jaeger and Prometheus are automatically provisioned (see them under `Connections->Data sources`), so you can go
directly to `Explore` and define a query using the supplied data from either data source.

Traces for the capture proxy and replayer are available via Jaeger at [http://localhost:16686](http://localhost:16686).
With the default docker-compose configuration launched with :dockerSolution:composeUp, instrumentation containers
will be started (see below for other options). You can access the metrics generated by the solution in Grafana.
While the solution is running, go to [http://localhost:3000](http://localhost:3000/) and enter the default credentials
(admin, admin). Connections to Jaeger and Prometheus are automatically provisioned (see them under
`Connections->Data sources`), so you can go directly to `Explore` and define a query using the supplied data
from either data source. Traces for the capture proxy and replayer are available via Jaeger at
[http://localhost:16686](http://localhost:16686).


### Running with different telemetry flavors.
Expand Down
4 changes: 3 additions & 1 deletion TrafficCapture/dockerSolution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ dependencies {
def dockerFilesForExternalServices = [
"elasticsearchWithSearchGuard": "elasticsearch_searchguard",
"migrationConsole": "migration_console",
"otelCollector": "otel_collector"
"otelCollector": "otel_collector",
"grafana": "grafana"
]
// Create the static docker files that aren't hosting migrations java code from this repo
dockerFilesForExternalServices.each { projectName, dockerImageName ->
Expand Down Expand Up @@ -74,6 +75,7 @@ task buildDockerImages {
dependsOn buildDockerImage_elasticsearchWithSearchGuard
dependsOn buildDockerImage_migrationConsole
dependsOn buildDockerImage_otelCollector
dependsOn buildDockerImage_grafana

dependsOn buildDockerImage_trafficCaptureProxyServer
dependsOn buildDockerImage_trafficReplayer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@ services:
- COLLECTOR_OTLP_ENABLED=true

grafana:
image: grafana/grafana:latest
image: 'migrations/grafana:latest'
networks:
- migrations
ports:
- "3000:3000"
volumes:
- ./grafana_data:/var/lib/grafana
- ./grafana_datasources.yaml:/usr/share/grafana/conf/provisioning/datasources/datasources.yaml
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
depends_on:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM grafana/grafana:latest

COPY datasources.yaml /usr/share/grafana/conf/provisioning/datasources/

0 comments on commit ffd5066

Please sign in to comment.