Skip to content

ManagingConfigurations

Matteo edited this page Dec 10, 2015 · 2 revisions

Managing Configurations

XOS comes with several pre-configured envirnments. The main available configurations are:

  • Devel
  • Frontend Only
  • CORD

Every configurations come with different settings and different features, from GUI elements to Services.

Basic configuration

A common configuration file is saved in xos/configurations/common/xos_common_config. In this file are stored all the common configurations for XOS.

This is the base config:

[plc]
name=plc
deployment=plc

[db]
name=xos
user=postgres
password=password
host=localhost
port=5432

[api]
host=localhost
port=8000
ssl_key=None
ssl_cert=None
ca_ssl_cert=None
ratelimit_enabled=0
omf_enabled=0
mail_support_address=support@localhost
nova_enabled=True
logfile=/var/log/xos.log

[nova]
admin_user=admin@domain.com
admin_password=admin
admin_tenant=admin
url=http://localhost:5000/v2.0/
default_image=None
default_flavor=m1.small
default_security_group=default
ca_ssl_cert=/etc/ssl/certs/ca-certificates.crt

[observer]
pretend=False
backoff_disabled=False
images_directory=/opt/xos/images
dependency_graph=/opt/xos/model-deps
logfile=/var/log/xos_backend.log

[gui]
disable_minidashboard=True
branding_name=Open Cloud
#branding_css= #no branding css is provided by default
branding_icon=/static/logo.png

Extending configuration

How it works

In some environment some changes to the configuration are needed, to achieve this XOS reads configurations from a xos/xos_configuration.

All the configuration files in this folder will be parsed with ConfigParser.

Exetending a configuration

An example is available in the CORD config

These are the basic step to extend a configuration. From now we'll use myConf as placeholder for the current configuration.

Local Config

  • In your configuration create a new config file named: xos_<myConf>_config

Sample local config:

[gui]
branding_name=A BRAND NAME
branding_icon=/static/my_logo.png

The file above will change the displayed brand name and the logo in the UI

Makefile Changes

  • Clean the configuration folder: rm ../../xos_configuration/*
  • Add the common config: cp ../common/xos_common_config ../../xos_configuration/
  • Add the local config: cp ./xos_<myConf>_config ../../xos_configuration/

IMPORTANT: this instructions have to be executed before docker build