foo
This commit is contained in:
parent
74253c0fde
commit
d886b659ce
3 changed files with 26 additions and 5 deletions
23
apps.nix
23
apps.nix
|
|
@ -2,8 +2,29 @@
|
|||
|
||||
let
|
||||
mkApp = {};
|
||||
ETCD_ENDPOINTS = "https://[fd00:23:42:1000::1]:2379,https://[fd00:23:42:1000::2]:2379,https://[fd00:23:42:1000::3]:2379";
|
||||
ETCD_ROOT_CRT = "/run/agenix/etcd-root-crt";
|
||||
ETCD_CLIENT_CRT = "/run/agenix/etcd-client-crt";
|
||||
ETCD_CLIENT_KEY = "/run/agenix/etcd-client-key";
|
||||
in
|
||||
{
|
||||
|
||||
etcd-endpoint-health = {
|
||||
type = "app";
|
||||
program = "${pkgs.writeShellScript "etcd-health-check" ''
|
||||
ssh fd00:23:42:1000::1 'etcdctl --endpoints=${ETCD_ENDPOINTS} --cacert=${ETCD_ROOT_CRT} --cert=${ETCD_CLIENT_CRT} --key=${ETCD_CLIENT_KEY} endpoint health'
|
||||
''}";
|
||||
};
|
||||
etcd-members = {
|
||||
type = "app";
|
||||
program = "${pkgs.writeShellScript "etcd-members" ''
|
||||
ssh fd00:23:42:1000::1 'etcdctl --endpoints=${ETCD_ENDPOINTS} --cacert=${ETCD_ROOT_CRT} --cert=${ETCD_CLIENT_CRT} --key=${ETCD_CLIENT_KEY} member list'
|
||||
''}";
|
||||
};
|
||||
etcd-endpoint-status = {
|
||||
type = "app";
|
||||
program = "${pkgs.writeShellScript "etcd-status" ''
|
||||
ssh fd00:23:42:1000::1 'etcdctl --endpoints=${ETCD_ENDPOINTS} --cacert=${ETCD_ROOT_CRT} --cert=${ETCD_CLIENT_CRT} --key=${ETCD_CLIENT_KEY} endpoint status --write-out=table'
|
||||
''}";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue