openstack devstack configuration localrc local.conf tutorial
TRANSCRIPT
OpenStack DevStack Configuration Tutorial
● localrc● local.conf
Devstack
localrc
localrc
localrc is the old file used to configure DevStack. It is deprecated and has been replaced by local.conf.
DevStack will continue to use localrc if it is present and ignore the localrc section in local.conf.
Remove localrc to switch to using the new file.
OpenStack Training Videos
Play Training Videoshttps://www.youtube.com/user/sajuptpm/videos
Devstack
local.conf
local.conf
local.conf is a user-maintained setings file that is sourced in stackrc.
It contains a section that replaces the historical localrc file.
local.conf
local.conf resides in the root DevStack directory like the old localrc file.
It is a modified INI format file that introduces a meta-section header to carry additional information regarding the configuration files to be changed.
Read More:http://docs.openstack.org/developer/devstack/configuration.html
local.conf
A specific meta-section local|localrc is used to provide a default localrc file.
This allows all custom settings for DevStack to be contained in a single file.If localrc exists it will be used instead to preserve backward-compatibility.
Example:[[local|localrc]]ADMIN_PASSWORD=secreteDATABASE_PASSWORD=secrete
local.conf Configuration
1) pre-set the passwords to prevent interactive prompts
Example:[[local|localrc]]ADMIN_PASSWORD=secreteDATABASE_PASSWORD=secreteRABBIT_PASSWORD=secreteSERVICE_PASSWORD=secreteSERVICE_TOKEN=tokentoken
If the *_PASSWORD variables are not set here you will be prompted to enter values for them by stack.sh.
local.conf Configuration
2) Move network ranges away from the local network
Example:[[local|localrc]]FIXED_RANGE=172.31.1.0/24FLOATING_RANGE=192.168.56.0/25
The network ranges must not overlap with any networks in use on the host.
local.conf Configuration
3) Set the host IP if detection is unreliable
Example:[[local|localrc]]HOST_IP=192.168.56.104
HOST_IP is normally detected on the first run of stack.sh but often is indeterminate on later runs due to the IP being moved from an Ethernet interface to a bridge on the host. Setting it here also makes it available for openrc to set OS_AUTH_URL. HOST_IP is not set by default.
local.conf Configuration
4) Change Installation Directory
Example:[[local|localrc]]DEST=/opt/stack
Default: “DEST=/opt/stack”
local.conf Configuration
5) Specify the libraries to be installed from Git
Example:[[local|localrc]]LIBS_FROM_GIT=python-keystoneclient,oslo.config
Default: LIBS_FROM_GIT=”“By default devstack installs OpenStack server components from git, however it installs client libraries from released versions on pypi. This is appropriate if you are working on server development, but if you want to see how an unreleased version of the client affects the system you can have devstack install it from upstream, or from local git trees.Multiple libraries can be specified as a comma separated list.
local.conf Configuration
6) Enable Logging
Example:[[local|localrc]]LOGFILE=$DEST/logs/stack.sh.log
By default stack.sh output is only written to the console where is runs. It can be sent to a file in addition to the console by setting LOGFILE to the fully-qualified name of the destination log file. A timestamp will be appended to the given filename for each run of stack.sh.
local.conf Configuration
7) Enable Syslog
Example:[[local|localrc]]SYSLOG=TrueSYSLOG_HOST=$HOST_IPSYSLOG_PORT=516
Logging all services to a single syslog can be convenient. Enable syslogging by setting SYSLOG to True. If the destination log host is not localhost SYSLOG_HOST and SYSLOG_PORT can be used to direct the message stream to the log host.
local.conf Configuration
8) A clean installation of OpenStack every time you run stack.sh
Example:[[local|localrc]]RECLONE=yes
By default stack.sh only clones the project repos if they do not exist in $DEST. stack.sh will freshen each repo on each run if RECLONE is set to yes.
local.conf Configuration9) Sample local.conf with screen logging enabled
Example:[[local|localrc]]FIXED_RANGE=10.254.1.0/24NETWORK_GATEWAY=10.254.1.1FLOATING_RANGE=192.168.56.0/25LOGFILE=$DEST/logs/stack.sh.logADMIN_PASSWORD=secretDATABASE_PASSWORD=secretRABBIT_PASSWORD=secretSERVICE_PASSWORD=secretSERVICE_TOKEN=tokentokenHOST_IP=192.168.56.104
Thanks
● Email: [email protected]
● Training Videos: https://www.youtube.com/user/sajuptpm/videos
● WebSite: http://fosshelp.blogspot.in
● IRC: saju_m
● Skype: sajuptpm