-
Notifications
You must be signed in to change notification settings - Fork 67
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 #71 from gian1200/feature/add-windows-support
Add Windows support for main scripts (run and build)
- Loading branch information
Showing
8 changed files
with
129 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@echo off | ||
|
||
SET release_tag=latest | ||
if not "%~1"=="" ( | ||
SET release_tag=%1 | ||
) | ||
|
||
WHERE /Q podman | ||
if not ERRORLEVEL 1 ( | ||
goto use_podman | ||
) | ||
|
||
WHERE /Q docker | ||
if not ERRORLEVEL 1 ( | ||
goto use_docker | ||
) | ||
|
||
:no_executable_found | ||
echo Please install Podman or docker | ||
goto:EOF | ||
|
||
:use_podman | ||
podman buildx build -f docker/Dockerfile docker --tag grafana/otel-lgtm:%release_tag% | ||
goto:EOF | ||
|
||
:use_docker | ||
docker buildx build -f docker/Dockerfile docker --tag grafana/otel-lgtm:%release_tag% | ||
goto:EOF |
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,5 +1,5 @@ | ||
#!/bin/bash | ||
|
||
RELEASE=${1:-dev} | ||
RELEASE=${1:-latest} | ||
|
||
docker buildx build -f docker/Dockerfile docker --tag grafana/otel-lgtm:${RELEASE} |
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,16 @@ | ||
@REM @echo off | ||
|
||
if not exist ./target/rolldice.jar ( | ||
mvnw clean package | ||
) | ||
|
||
set version=v2.1.0 | ||
set jar=opentelemetry-javaagent-%version%.jar | ||
if not exist ./%jar% ( | ||
curl -sL https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/%version%/opentelemetry-javaagent.jar -o %jar% | ||
) | ||
|
||
set OTEL_RESOURCE_ATTRIBUTES=service.name=rolldice,service.instance.id=localhost:8080 | ||
@REM uncomment the next line to switch to Prometheus native histograms. | ||
@REM set OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION=base2_exponential_bucket_histogram | ||
java -Dotel.metric.export.interval=500 -Dotel.bsp.schedule.delay=500 -javaagent:%jar% -jar ./target/rolldice.jar |
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,9 @@ | ||
@ECHO OFF | ||
:loop | ||
cls | ||
curl -s http://localhost:8080/rolldice | ||
curl -s http://localhost:8081/rolldice | ||
curl -s http://localhost:8082/rolldice | ||
curl -s http://localhost:8083/rolldice | ||
timeout /t 2 | ||
goto loop |
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,4 @@ | ||
@echo off | ||
|
||
cd examples/java | ||
run |
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,54 @@ | ||
@echo off | ||
|
||
SET release_tag=latest | ||
if not "%~1"=="" ( | ||
SET release_tag=%1 | ||
) | ||
|
||
mkdir "container/grafana" | ||
mkdir "container/prometheus" | ||
mkdir "container/loki" | ||
|
||
WHERE /Q podman | ||
if not ERRORLEVEL 1 ( | ||
goto use_podman | ||
) | ||
|
||
WHERE /Q docker | ||
if not ERRORLEVEL 1 ( | ||
goto use_docker | ||
) | ||
|
||
:no_executable_found | ||
echo Please install Podman or docker | ||
goto:EOF | ||
|
||
:use_podman | ||
podman run ^ | ||
--name lgtm ^ | ||
-p 3000:3000 ^ | ||
-p 4317:4317 ^ | ||
-p 4318:4318 ^ | ||
--rm ^ | ||
-ti ^ | ||
-v ./container/grafana:/data/grafana ^ | ||
-v ./container/prometheus:/data/prometheus ^ | ||
-v ./container/loki:/loki ^ | ||
-e GF_PATHS_DATA=/data/grafana ^ | ||
docker.io/grafana/otel-lgtm:%release_tag% | ||
goto:EOF | ||
|
||
:use_docker | ||
docker run ^ | ||
--name lgtm ^ | ||
-p 3000:3000 ^ | ||
-p 4317:4317 ^ | ||
-p 4318:4318 ^ | ||
--rm ^ | ||
-ti ^ | ||
-v ./container/grafana:/data/grafana ^ | ||
-v ./container/prometheus:/data/prometheus ^ | ||
-v ./container/loki:/loki ^ | ||
-e GF_PATHS_DATA=/data/grafana ^ | ||
docker.io/grafana/otel-lgtm:%release_tag% | ||
goto:EOF |
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,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
RELEASE=${1:-dev} | ||
RELEASE=${1:-latest} | ||
|
||
docker run \ | ||
--name lgtm \ | ||
|