Skip to content

Contrail daemons' configuration

rombie edited this page Sep 5, 2014 · 21 revisions

Most of the configuration files follow the standard ini file format, with name=value pairs divided into various appropriate sections. These values can be overridden from command line as well.

Notes

  • Use --help to see various options accepted
  • A different configuration file can be provided using --conf_file=config-file option
  • Values from the config file can be overridden using command line option --<SECTION>.<option>=<value> format. e.g. --DEFAULT.log_level=DEBUG
  • Config values can be modified using this command: /usr/bin/openstack-config --set|--del config_file section [parameter] [value]
  • When changes are made to the configuration file, the process must be restarted. (e.g. service supervisord-control restart).

When a contrail-package is installed via yum/dpkg, default configuration files are generated and placed under /etc/contrail/. unless one already exists.

###Precedence of configuration### As mentioned before, configuration takes into affect (after daemon restart) in the following order of preference (highest to lowest)

  • Command line
  • Configuration file
  • Default value (as shown in --help)

Provisioning through fab

When fab is used to provision various roles such as controller, compute, etc. appropriate configuration files (in ini format) are generated and placed in /etc/contrail/. in appropriate nodes, based on the topology file specified.

Transition from old configuration format to new ini based format

Following scripts can be used to convert old configuration files into new ones with the ini format.

  • /opt/contrail/contrail_installer/contrail_config_templates/collector.conf.sh
  • /opt/contrail/contrail_installer/contrail_config_templates/control-node.conf.sh
  • /opt/contrail/contrail_installer/contrail_config_templates/dns.conf.sh
  • /opt/contrail/contrail_installer/contrail_config_templates/query-engine.conf.sh
  • /opt/contrail/contrail_installer/contrail_config_templates/vrouter-agent.conf.sh
e.g. old configuration file /etc/contrail/control_param
root@b6s23:~# cat /etc/contrail/control_param 
IFMAP_USER=192.168.68.1
IFMAP_PASWD=192.168.68.1
COLLECTOR=192.168.68.1
COLLECTOR_PORT=8086
DISCOVERY=192.168.69.2
HOSTNAME=b6s23
HOSTIP=192.168.68.1
BGP_PORT=179
CERT_OPTS=
LOGFILE=--log-file=/var/log/contrail/control.log
LOG_LOCAL=

> /opt/contrail/contrail_installer/contrail_config_templates/control-node.conf.sh
> cat /etc/contrail/contrail-control.conf

#
# Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
#
# Control-node configuration options, generated from /etc/contrail/control_param
#

[DEFAULT]
# bgp_config_file=bgp_config.xml
# bgp_port=179
# collectors= # Provided by discovery server
  hostip=192.168.68.1 # Resolved IP of single-node-253
  hostname=b6s23 # Retrieved as single-node-253
# http_server_port=8083
# log_category=
# log_disable=0
  log_file=/var/log/contrail/contrail-control.log
# log_files_count=10
# log_file_size=10485760 # 10MB
# log_level=SYS_NOTICE
# log_local=0
# test_mode=0
# xmpp_server_port=5269

[DISCOVERY]
# port=5998
  server=192.168.69.2 # discovery-server IP address

[IFMAP]
  certs_store=
  password=192.168.68.1
# server_url= # Provided by discovery server, e.g. https://127.0.0.1:8443
  user=192.168.68.1

Clone this wiki locally