github.com/jiasir/deis@v1.12.2/controller/templates/confd_settings.py (about)

     1  # security keys and auth tokens
     2  SECRET_KEY = '{{ getv "/deis/controller/secretKey" }}'
     3  BUILDER_KEY = '{{ getv "/deis/controller/builderKey" }}'
     4  
     5  # scheduler settings
     6  SCHEDULER_MODULE = 'scheduler.{{ if exists "/deis/controller/schedulerModule" }}{{ getv "/deis/controller/schedulerModule" }}{{ else }}fleet{{ end }}'
     7  SCHEDULER_TARGET = '{{ if exists "/deis/controller/schedulerTarget" }}{{ getv "/deis/controller/schedulerTarget" }}{{ else }}/var/run/fleet.sock{{ end }}'
     8  try:
     9      SCHEDULER_OPTIONS = dict('{{ if exists "/deis/controller/schedulerOptions" }}{{ getv "/deis/controller/schedulerOptions" }}{{ else }}{}{{ end }}')
    10  except:
    11      SCHEDULER_OPTIONS = {}
    12  
    13  # scheduler swarm manager host
    14  
    15  SWARM_HOST = '{{ if exists "/deis/scheduler/swarm/host" }}{{ getv "/deis/scheduler/swarm/host" }}{{ else }}127.0.0.1{{ end }}'
    16  
    17  MARATHON_HOST = '{{ if exists "/deis/scheduler/mesos/marathon" }}{{ getv "/deis/scheduler/mesos/marathon" }}{{ else }}127.0.0.1{{ end }}'
    18  
    19  K8S_MASTER = '{{ if exists "/deis/scheduler/k8s/master" }}{{ getv "/deis/scheduler/k8s/master" }}{{ else }}127.0.0.1{{ end }}'
    20  
    21  # base64-encoded SSH private key to facilitate current version of "deis run"
    22  SSH_PRIVATE_KEY = """{{ if exists "/deis/platform/sshPrivateKey" }}{{ getv "/deis/platform/sshPrivateKey" }}{{ else }}""{{end}}"""
    23  
    24  # platform domain must be provided
    25  DEIS_DOMAIN = '{{ getv "/deis/platform/domain" }}'
    26  
    27  ENABLE_PLACEMENT_OPTIONS = """{{ if exists "/deis/platform/enablePlacementOptions" }}{{ getv "/deis/platform/enablePlacementOptions" }}{{ else }}false{{end}}"""
    28  
    29  # use the private registry module
    30  REGISTRY_URL = '{{ getv "/deis/registry/protocol" }}://{{ getv "/deis/registry/host" }}:{{ getv "/deis/registry/port" }}'  # noqa
    31  REGISTRY_HOST = '{{ getv "/deis/registry/host" }}'
    32  REGISTRY_PORT = '{{ getv "/deis/registry/port" }}'
    33  
    34  # default to sqlite3, but allow postgresql config through envvars
    35  DATABASES = {
    36      'default': {
    37          'ENGINE': 'django.db.backends.{{ getv "/deis/database/engine" }}',
    38          'NAME': '{{ getv "/deis/database/name" }}',
    39          'USER': '{{ getv "/deis/database/user" }}',
    40          'PASSWORD': '{{ getv "/deis/database/password" }}',
    41          'HOST': '{{ getv "/deis/database/host" }}',
    42          'PORT': '{{ getv "/deis/database/port" }}',
    43      }
    44  }
    45  
    46  LOGGER_HOST = '{{ getv "/deis/logs/host"}}'
    47  
    48  {{ if exists "/deis/controller/registrationMode" }}
    49  REGISTRATION_MODE = '{{ getv "/deis/controller/registrationMode" }}'
    50  {{ end }}
    51  
    52  {{ if exists "/deis/controller/webEnabled" }}
    53  WEB_ENABLED = bool({{ getv "/deis/controller/webEnabled" }})
    54  {{ end }}
    55  UNIT_HOSTNAME = '{{ if exists "/deis/controller/unitHostname" }}{{ getv "/deis/controller/unitHostname" }}{{ else }}default{{ end }}'
    56  
    57  {{ if exists "/deis/controller/subdomain" }}
    58  DEIS_RESERVED_NAMES = ['{{ getv "/deis/controller/subdomain" }}']
    59  {{ end }}
    60  
    61  # AUTH
    62  # LDAP
    63  {{ if exists "/deis/controller/auth/ldap/endpoint" }}
    64  LDAP_ENDPOINT = '{{ if exists "/deis/controller/auth/ldap/endpoint" }}{{ getv "/deis/controller/auth/ldap/endpoint"}}{{ else }} {{ end }}'
    65  BIND_DN = '{{ if exists "/deis/controller/auth/ldap/bind/dn" }}{{ getv "/deis/controller/auth/ldap/bind/dn"}}{{ else }} {{ end }}'
    66  BIND_PASSWORD = '{{ if exists "/deis/controller/auth/ldap/bind/password" }}{{ getv "/deis/controller/auth/ldap/bind/password"}}{{ else }} {{ end }}'
    67  USER_BASEDN = '{{ if exists "/deis/controller/auth/ldap/user/basedn" }}{{ getv "/deis/controller/auth/ldap/user/basedn"}}{{ else }} {{ end }}'
    68  USER_FILTER = '{{ if exists "/deis/controller/auth/ldap/user/filter" }}{{ getv "/deis/controller/auth/ldap/user/filter"}}{{ else }} {{ end }}'
    69  GROUP_BASEDN = '{{ if exists "/deis/controller/auth/ldap/group/basedn" }}{{ getv "/deis/controller/auth/ldap/group/basedn"}}{{ else }} {{ end }}'
    70  GROUP_FILTER = '{{ if exists "/deis/controller/auth/ldap/group/filter" }}{{ getv "/deis/controller/auth/ldap/group/filter"}}{{ else }} {{ end }}'
    71  GROUP_TYPE = '{{ if exists "/deis/controller/auth/ldap/group/type" }}{{ getv "/deis/controller/auth/ldap/group/type"}}{{ else }} {{ end }}'
    72  {{ end }}