Merge pull request #18624 from ericsagnes/fix/cadvisor
Cadvisor: update and fix test
This commit is contained in:
commit
00b7c5c5c2
@ -13,10 +13,6 @@ import ./make-test.nix ({ pkgs, ... } : {
|
|||||||
services.cadvisor.enable = true;
|
services.cadvisor.enable = true;
|
||||||
services.cadvisor.storageDriver = "influxdb";
|
services.cadvisor.storageDriver = "influxdb";
|
||||||
services.influxdb.enable = true;
|
services.influxdb.enable = true;
|
||||||
systemd.services.influxdb.postStart = mkAfter ''
|
|
||||||
${pkgs.curl.bin}/bin/curl -X POST 'http://localhost:8086/db?u=root&p=root' \
|
|
||||||
-d '{"name": "root"}'
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -27,6 +23,15 @@ import ./make-test.nix ({ pkgs, ... } : {
|
|||||||
$machine->succeed("curl http://localhost:8080/containers/");
|
$machine->succeed("curl http://localhost:8080/containers/");
|
||||||
|
|
||||||
$influxdb->waitForUnit("influxdb.service");
|
$influxdb->waitForUnit("influxdb.service");
|
||||||
|
|
||||||
|
# Wait until influxdb admin interface is available
|
||||||
|
$influxdb->waitUntilSucceeds("curl -f 127.0.0.1:8083");
|
||||||
|
|
||||||
|
# create influxdb database
|
||||||
|
$influxdb->succeed(q~
|
||||||
|
curl -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE root"
|
||||||
|
~);
|
||||||
|
|
||||||
$influxdb->waitForUnit("cadvisor.service");
|
$influxdb->waitForUnit("cadvisor.service");
|
||||||
$influxdb->succeed("curl http://localhost:8080/containers/");
|
$influxdb->succeed("curl http://localhost:8080/containers/");
|
||||||
'';
|
'';
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "cadvisor-${version}";
|
name = "cadvisor-${version}";
|
||||||
version = "0.10.1";
|
version = "0.23.8";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "google";
|
owner = "google";
|
||||||
repo = "cadvisor";
|
repo = "cadvisor";
|
||||||
rev = "${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0k0qfhw755k3ripsfkhml0ixaglhy64hdzxrjvlmbgc50s3j37vh";
|
sha256 = "0wan6a4rpyh5fflq88saznyf2kiic9nmj8sil1s49nh3c3y4yxcj";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ go ];
|
buildInputs = [ go ];
|
||||||
|
Loading…
Reference in New Issue
Block a user