forked from hswaw/hscloud
nix/ -> cluster/nix/
These are related to cluster bootstrapping, not generic language libraries (like go/ and bzl/). Change-Id: I03a83c64f3e0fa6cb615d36b4e618f5e92d886ec
This commit is contained in:
parent
f3dd382eed
commit
116da981c9
4 changed files with 6 additions and 4 deletions
|
@ -44,7 +44,7 @@ logger.addHandler(sh)
|
|||
def pki_config(key):
|
||||
raw = subprocess.check_output([
|
||||
'nix', 'eval', '--raw',
|
||||
'( (import ' + local_root + '/nix/toplevel.nix ).pki.' + key + '.json )',
|
||||
'( (import ' + local_root + '/cluster/nix/toplevel.nix ).pki.' + key + '.json )',
|
||||
])
|
||||
return json.loads(raw)
|
||||
|
||||
|
@ -203,7 +203,7 @@ def nodestrap(args, nocerts=False):
|
|||
|
||||
# Upload NixOS config
|
||||
for f in ['toplevel', 'cluster-configuration']:
|
||||
r.put(local=os.path.join(local_root, 'nix/{}.nix'.format(f)),
|
||||
r.put(local=os.path.join(local_root, 'cluster/nix/{}.nix'.format(f)),
|
||||
remote='/etc/nixos/{}.nix'.format(f))
|
||||
|
||||
r.run('nixos-rebuild switch')
|
||||
|
@ -228,8 +228,10 @@ def main():
|
|||
elif mode == "config":
|
||||
print('etcd peer:')
|
||||
print(json.dumps(pki_config('etcdPeer'), indent=2))
|
||||
print('etcd client:')
|
||||
print(json.dumps(pki_config('etcdClient'), indent=2))
|
||||
print('etcd server:')
|
||||
print(json.dumps(pki_config('etcd.server'), indent=2))
|
||||
print('etcd client (kube):')
|
||||
print(json.dumps(pki_config('etcd.kube'), indent=2))
|
||||
else:
|
||||
usage()
|
||||
return 1
|
||||
|
|
Loading…
Add table
Reference in a new issue