about summary refs log tree commit diff
path: root/users/Profpatsch/jaeger.nix
blob: 374e40df1ab8159381a69535cb0715ee8068c097 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ depot, pkgs, ... }:
let
  drv =
    pkgs.stdenv.mkDerivation {
      pname = "jaeger";
      version = "1.49.0";
      src = pkgs.fetchurl {
        url = "https://github.com/jaegertracing/jaeger/releases/download/v1.49.0/jaeger-1.49.0-linux-amd64.tar.gz";
        hash = "sha256-QhxISDlk/t431EesgVkHWTe7yiw2B+yyfq//GLP0As4=";
      };
      phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
      installPhase = ''
        mkdir -p $out/bin
        install ./jaeger-all-in-one $out/bin
      '';
    };
  image =
    pkgs.dockerTools.buildImage {
      name = "jaeger";
      tag = "1.49.0";
      copyToRoot = drv;
      config = {
        Cmd = [ "/bin/jaeger-all-in-one" ];
      };

    };

  runner =
    depot.nix.writeExecline "jaeger-docker-run" { } [
      "if"
      [ "docker" "load" "-i" image ]
      "docker"
      "run"
      "--rm"
      "--name"
      "jaeger"
      # Web UI
      "-p"
      "16686:16686"
      # Opentelemetry
      "-p"
      "4318:4318"
      "jaeger:1.49.0"
    ];
in
runner