diff --git a/scheduler/Dockerfile b/scheduler/Dockerfile index 0d0a3b52eb6ebde4e4850cce9a06bd6e53d2a17f..82e8cae84cc575f5119f74213b8674b6b18849b7 100644 --- a/scheduler/Dockerfile +++ b/scheduler/Dockerfile @@ -3,7 +3,7 @@ FROM cern/cc7-base # Install my own python-nomad until the upstream one is fixed RUN yum install -y jq python-pip \ && pip install https://github.com/alexiri/python-nomad/archive/master.zip \ - && pip install hvac pyyaml configparser \ + && pip install pyyaml configparser \ && yum clean all RUN rm -rf /etc/yum.repos.d diff --git a/scheduler/schedule.py b/scheduler/schedule.py index de2dfa06731e5769189fb4e10c0cf6ea183dc9f7..7e0de5c70986d0ce820a41e831077dece0393e20 100755 --- a/scheduler/schedule.py +++ b/scheduler/schedule.py @@ -1,6 +1,5 @@ #!/usr/bin/python -import hvac import nomad from nomad.api import exceptions import yaml @@ -35,35 +34,6 @@ def error(**kwargs): kwargs.update({'message_type': 'error'}) log(**kwargs) -print('environment: {}'.format(os.environ)) -from os import walk -files = [] -for r, d, f in os.walk(os.getenv('NOMAD_SECRETS_DIR', '.')): - print('files: {}'.format(f)) - print('dirs: {}'.format(d)) - for file in f: - print('-- {}:'.format(file)) - try: - of = open(os.path.join(r, file)) - print(of.readlines()) - of.close() - except Exception as e: - print('error with {}: {}'.format(file, e)) - - -#debug(message='Connecting to Vault at: {}'.format(os.getenv('VAULT_ADDR', None))) -#client = hvac.Client(url=os.environ['VAULT_ADDR'], token=os.environ['VAULT_TOKEN'], verify=False) - -#if not client.is_authenticated(): -# error(message='Vault authentication failed!') -# sys.exit(1) - -#current_token = client.lookup_token() -#print('vault token: {}'.format(current_token)) - -#token = client.read('nomad/creds/write') -#print('nomad token: {}'.format(token)) - try: nomad_token = os.environ['NOMAD_TOKEN'] except KeyError: