Minimal contents
While stack.sh is happy to run without localrc, devlife is better when there are a few minimal variables set.
ADMIN_PASSWORD=nomoresecrete
MYSQL_PASSWORD=stackdb
RABBIT_PASSWORD=stackqueue
SERVICE_PASSWORD=$ADMIN_PASSWORD
HOST_IP=w.x.y.z
If the *_PASSWORD variables are not set here you will be prompted to enter values for them by stack.sh.

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 integace 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.

Set DevStack install directory
The DevStack install directory is set by the DEST variable. By setting it early in localrc you can reference it in later variables. The default value is /opt/stack. It can be useful to set it even though it is not changed from the default value.
DEST=/opt/stack
stack.sh logging
By default stack.sh output is only to the console where is runs. It can be made to 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. LOGFILE is not set by default.
LOGFILE=stack.sh.log
Old log files are cleaned automatically if LOGDAYS is set to the number of days of old log files to keep. LOGDAYS defaults to 7.
LOGDAYS=1
The Nova logs will be colorized by default (if SYSLOG is not set below); this can be turned off by setting LOG_COLOR false.
LOG_COLOR=False
Screen logging
DevStack runs the OpenStack services under screen which is useful for watching log and debug output. However, in automated testing the interactive screen sessions may not be available after the fact; setting SCREEN_LOGDIR enables logging of the screen sessions in the specified diretory. There will be one file per screen session named for the session name and a timestamp. SCREEN_LOGDIR is not set by default.
SCREEN_LOGDIR=$DEST/logs/screen
Note the use of DEST to locate the main install directory; this is why we set it in localrc

One syslog to bind them all
Logging all services to a single syslog can be convenient. Enable syslogging by seting 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. By default SYSLOG is set to False, SYSLOG_HOST is set to $HOST_IP and SYSLOG_PORT is set to 516.
SYSLOG=True
SYSLOG_HOST=$HOST_IP
SYSLOG_PORT=516
A clean install every time
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. This avoids having to remove and re-download all of the repo objects from GitHub. By default, RECLONE is not set.
RECLONE=yes
Swift
Swift is now used as the back-end for the S3-like object store. If Nova's objectstore (n-obj in ENABLED_SERVICES) is enabled, it will NOT run if Swift is enabled. Enable Swift by adding it to ENABLED_SERVICES:
ENABLED_SERVICES+=,swift
Setting Swift's hash value is required and you will be prompted for it if Swift is enabled so just set it to something already:
SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
For development purposes the default of 3 replicas is usually not required. Set this to 1 to save some resources:
SWIFT_REPLICAS=1
The data for Swift is stored in the source tree by default ($DEST/swift/data) and can be moved by setting SWIFT_DATA_DIR. The directory will be created if it does not exist.
SWIFT_DATA_DIR=$DEST/data
SQL Service Catalog
By default DevStack uses Keystone's template service catalog backend. This backend does not support the service-* and endpoint-* commands of the keystone CLI. To do so requires the sql backend be enabled:
KEYSTONE_CATALOG_BACKEND=sql
DevStack's default configuration in sql mode is set in files/keystone_data.sh
Cinder vs. Nova Volume
Cinder is the replacement for Nova's volume service and is now the default for DevStack. To re-enable Nova's volume driver add the following lines to localrc:
disable_service c-api c-sch c-vol cinder
enable_service n-vol
The volume group used to hold the volumes is set by VOLUME_GROUP, the logical volume name prefix is set with VOLUME_NAME_PREFIX and the size of the volume backing file is set with VOLUME_BACKING_FILE_SIZE. The default values are shown below.
VOLUME_GROUP="stack-volumes"
VOLUME_NAME_PREFIX="volume-"
VOLUME_BACKING_FILE_SIZE=5130M
Multi-host DevStack
Running DevStack with multiple hosts requires a custom localrc file for each host. The master is the same as a single host installation with code>MULTI_HOST set to True. The slaves have fewer services enabled and a couple of host variables pointing to the master. By default is set to False.

Master
MULTI_HOST=True
Slave
MYSQL_HOST=w.x.y.z
RABBIT_HOST=w.x.y.z
GLANCE_HOSTPORT=w.x.y.z:9292
ENABLED_SERVICES=n-vol,n-cpu,n-net,n-api
API rate limits
Interation tests such as Tempest will likely run afoul of the default rate limits configured for Nova. Turn off rate limiting during testing by setting API_RATE_LIMIT=False. By default API_RATE_LIMIT is set to True.
API_RATE_LIMIT=False

© Openstack Foundation 2011-2013 — this is not an official OpenStack project...