Compare commits
4 commits
c922615666
...
0e8abeb78b
Author | SHA1 | Date | |
---|---|---|---|
0e8abeb78b | |||
c3073e347b | |||
4957c6f07f | |||
03bfb51682 |
5 changed files with 17 additions and 9 deletions
|
@ -11,12 +11,17 @@ in
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
services.consul = {
|
services.consul = {
|
||||||
nodes.agent = [ "checkmate" "grail" "thunderskin" "VEGAS" "prophet" ];
|
nodes = {
|
||||||
nixos.agent = [
|
agent = [ "checkmate" "grail" "thunderskin" "VEGAS" "prophet" ];
|
||||||
|
ready = config.services.consul.nodes.agent;
|
||||||
|
};
|
||||||
|
nixos = {
|
||||||
|
agent = [
|
||||||
./agent.nix
|
./agent.nix
|
||||||
./remote-api.nix
|
./remote-api.nix
|
||||||
./ready.nix
|
|
||||||
];
|
];
|
||||||
|
ready = ./ready.nix;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
dns.records."consul-remote.internal".consulService = "consul-remote";
|
dns.records."consul-remote.internal".consulService = "consul-remote";
|
||||||
|
|
|
@ -42,8 +42,8 @@ in
|
||||||
{
|
{
|
||||||
systemd.services.consul-ready = {
|
systemd.services.consul-ready = {
|
||||||
description = "Wait for Consul";
|
description = "Wait for Consul";
|
||||||
requires = [ "consul.service" ];
|
requires = lib.mkIf config.services.consul.enable [ "consul.service" ];
|
||||||
after = [ "consul.service" ];
|
after = lib.mkIf config.services.consul.enable [ "consul.service" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = lib.getExe consulReady;
|
ExecStart = lib.getExe consulReady;
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ testers, nixosModules, consul }:
|
{ testers, nixosModules, consul, cluster }:
|
||||||
|
|
||||||
let
|
let
|
||||||
dataDir = {
|
dataDir = {
|
||||||
|
@ -28,6 +28,7 @@ testers.runNixOSTest {
|
||||||
nixosModules.ascensions
|
nixosModules.ascensions
|
||||||
nixosModules.systemd-extras
|
nixosModules.systemd-extras
|
||||||
nixosModules.consul-distributed-services
|
nixosModules.consul-distributed-services
|
||||||
|
cluster.config.services.consul.nixos.ready
|
||||||
];
|
];
|
||||||
systemd.services = {
|
systemd.services = {
|
||||||
create-file = {
|
create-file = {
|
||||||
|
|
|
@ -12,6 +12,7 @@ in
|
||||||
ascensions = pkgs.callPackage ./ascensions.nix {
|
ascensions = pkgs.callPackage ./ascensions.nix {
|
||||||
inherit (self'.packages) consul;
|
inherit (self'.packages) consul;
|
||||||
inherit (self) nixosModules;
|
inherit (self) nixosModules;
|
||||||
|
inherit (config) cluster;
|
||||||
};
|
};
|
||||||
|
|
||||||
garage = pkgs.callPackage ./garage.nix {
|
garage = pkgs.callPackage ./garage.nix {
|
||||||
|
|
|
@ -22,6 +22,7 @@ testers.runNixOSTest {
|
||||||
nixosModules.port-magic
|
nixosModules.port-magic
|
||||||
cluster.config.services.storage.nixos.garage
|
cluster.config.services.storage.nixos.garage
|
||||||
cluster.config.services.storage.nixos.garageInternal
|
cluster.config.services.storage.nixos.garageInternal
|
||||||
|
cluster.config.services.consul.nixos.ready
|
||||||
];
|
];
|
||||||
options.services.locksmith.providers = lib.mkOption {
|
options.services.locksmith.providers = lib.mkOption {
|
||||||
type = lib.types.raw;
|
type = lib.types.raw;
|
||||||
|
|
Loading…
Reference in a new issue