ConfigurationΒΆ

Sample /etc/racks/settings.yaml content:

DATABASES:
  default:
    ENGINE: django.db.backends.mysql
    NAME: racks
    USER: 'user'
    PASSWORD: 'password'

SECRET_KEY: ...

ZABBIX_URL: 'http://<zabbix host>/'
ZABBIX_USER: 'user'
ZABBIX_PASSWORD: 'password'

PUPPET:
  puppet_ssl_cert: '<puppet ssl cert>'
  puppet_ssl_key: '<puppet ssl key>'
  puppet_ssl_verify: <path to ca or False>
  puppet_url: '<puppet host>'
  ignore_regex: '<regex for names of ignored attributes>'


DCIM_URL: "http://<dcim host>/"
DCIM_API: "http://<dcim host>/api/v1/"

DCIM_USER: '<user>'
DCIM_PASSWORD: '<password>'
# List of ids to use in filter 'Owner' in DCIM
DCIM_SERVER_OWNER_IDS_LIST:
  - 3
  - 4
  - 5
DCIM_API_TIMEOUT: 1
# DCIM custom field id with JIRA issue
DCIM_JIRA_ISSUE_CUSTOM_VALUE_ID: 2
# DCIM custom field id with User name and surname
DCIM_CUSTOM_REPORTER_VALUE_ID: 5

# Disables create/edit/delete functionality for Jenkins instances/slaves in web UI.
JENKINS_DISABLE_UI_FORMS: True

AUTH_LDAP_SERVER_URI: "ldap://<ldap host>"
AUTH_LDAP_BIND_DN: "o=<organization>,dc=<domain component>"
AUTH_LDAP_USER_DN_TEMPLATE: "uid=%(user)s,ou=<organizational unit for people>,o=<organization>,dc=<domain component>"
AUTH_LDAP_REQUIRE_GROUP: "cn=<common name>,ou=<organizational unit for groups>,o=<organization>,dc=<domain component>"
AUTH_LDAP_GROUP_SEARCH:
  base_dn: "ou=<organizational unit for groups>,o=<organization>,dc=<domain component>"
  scope: "SCOPE_SUBTREE"
  filterstr: "(objectClass=groupOfNames)"
AUTH_LDAP_USER_ATTR_MAP:
    "first_name": "givenName"
    "last_name": "sn"
    "email": "mail"
AUTH_LDAP_CACHE_GROUPS: true
AUTH_LDAP_GROUP_CACHE_TIMEOUT: 3600

CELERYBEAT_SCHEDULE:
  import-all-every-hour:
    task: importers.tasks.import_all
    schedule:
      crontab:
        minute: 0

GOOGLE_OAUTH2_CLIENT_ID: '....apps.googleusercontent.com'
GOOGLE_OAUTH2_CLIENT_SECRET: '....'

AUTHENTICATION_BACKENDS:
  - 'racks.auth.OAuthBackend'
  - 'django.contrib.auth.backends.ModelBackend'
  - 'django_auth_ldap.backend.LDAPBackend'

For SECRET_KEY and DATABASES refer to Django documentation. You can also override other Django settings.

Settings starting with ZABBIX_ and DCIM_ are for Zabbix and DCIM importers respectively.

DCIM_JIRA_ISSUE_CUSTOM_VALUE_ID is an id of Jira Issue in CustomValues associated with object in DCIM, if applicable.

PUPPET is configuration for Puppet importer. If it’s not specified, puppet importer won’t run.

Settings starting with AUTH_LDAP_ are documented in django-auth-ldap reference.

CELERYBEATH_SCHEDULE is basically documented at Celery documentation. But to specify crontab [1] schedule you have to use crontab [1] mapping. It’s keys are converted to keyword arguments used to instantiate Celery crontab [1] object.

Options GOOGLE_OAUTH2_CLIENT_ID and GOOGLE_OAUTH2_CLIENT_SECRET allow to authenticate users by email. User should be created by import from LDAP or locally. To use this options create your own credentials for Google oauth, go to https://console.developers.google.com “APIs & Auth” -> Credentials and create new credentials there.

AUTHENTICATION_BACKENDS used for specifying what type of authentication is allowed for user login. Only following backends are supported: racks.auth.OAuthBackend, django.contrib.auth.backends.ModelBackend and django_auth_ldap.backend.LDAPBackend.

[1](1, 2, 3) http://docs.celeryproject.org/en/latest/reference/celery.schedules.html#celery.schedules.crontab