| Dean Troyer | 0986a7b | 2014-10-29 22:08:13 -0500 | [diff] [blame] | 1 | ============= | 
|  | 2 | Configuration | 
|  | 3 | ============= | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 4 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 5 | .. contents:: | 
|  | 6 | :local: | 
|  | 7 | :depth: 1 | 
|  | 8 |  | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 9 | DevStack has always tried to be mostly-functional with a minimal amount | 
|  | 10 | of configuration. The number of options has ballooned as projects add | 
|  | 11 | features, new projects added and more combinations need to be tested. | 
|  | 12 | Historically DevStack obtained all local configuration and | 
|  | 13 | customizations from a ``localrc`` file. The number of configuration | 
|  | 14 | variables that are simply passed-through to the individual project | 
|  | 15 | configuration files is also increasing. The old mechanism for this | 
|  | 16 | (``EXTRAS_OPTS`` and friends) required specific code for each file and | 
|  | 17 | did not scale well. | 
|  | 18 |  | 
|  | 19 | In Oct 2013 a new configuration method was introduced (in `review | 
|  | 20 | 46768 <https://review.openstack.org/#/c/46768/>`__) to hopefully | 
|  | 21 | simplify this process and meet the following goals: | 
|  | 22 |  | 
|  | 23 | -  contain all non-default local configuration in a single file | 
|  | 24 | -  be backward-compatible with ``localrc`` to smooth the transition | 
|  | 25 | process | 
|  | 26 | -  allow settings in arbitrary configuration files to be changed | 
|  | 27 |  | 
|  | 28 | local.conf | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 29 | ========== | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 30 |  | 
| venkatamahesh | b237b93 | 2015-08-10 16:07:03 +0530 | [diff] [blame] | 31 | The new configuration file is ``local.conf`` and should reside in the | 
|  | 32 | root Devstack directory. An example of such ``local.conf`` file | 
|  | 33 | is provided in the ``devstack/samples`` directory. Copy this file into | 
|  | 34 | the root Devstack directory and adapt it to your needs. It is a modified INI | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 35 | format file that introduces a meta-section header to carry additional | 
|  | 36 | information regarding the configuration files to be changed. | 
|  | 37 |  | 
|  | 38 | The new header is similar to a normal INI section header but with double | 
|  | 39 | brackets (``[[ ... ]]``) and two internal fields separated by a pipe | 
|  | 40 | (``|``): | 
|  | 41 |  | 
|  | 42 | :: | 
|  | 43 |  | 
|  | 44 | [[ <phase> | <config-file-name> ]] | 
|  | 45 |  | 
|  | 46 | where ``<phase>`` is one of a set of phase names defined by ``stack.sh`` | 
|  | 47 | and ``<config-file-name>`` is the configuration filename. The filename | 
|  | 48 | is eval'ed in the ``stack.sh`` context so all environment variables are | 
|  | 49 | available and may be used. Using the project config file variables in | 
|  | 50 | the header is strongly suggested (see the ``NOVA_CONF`` example below). | 
|  | 51 | If the path of the config file does not exist it is skipped. | 
|  | 52 |  | 
|  | 53 | The defined phases are: | 
|  | 54 |  | 
|  | 55 | -  **local** - extracts ``localrc`` from ``local.conf`` before | 
|  | 56 | ``stackrc`` is sourced | 
|  | 57 | -  **pre-install** - runs after the system packages are installed but | 
|  | 58 | before any of the source repositories are installed | 
|  | 59 | -  **install** - runs immediately after the repo installations are | 
|  | 60 | complete | 
|  | 61 | -  **post-config** - runs after the layer 2 services are configured and | 
|  | 62 | before they are started | 
|  | 63 | -  **extra** - runs after services are started and before any files in | 
|  | 64 | ``extra.d`` are executed | 
|  | 65 |  | 
|  | 66 | The file is processed strictly in sequence; meta-sections may be | 
|  | 67 | specified more than once but if any settings are duplicated the last to | 
|  | 68 | appear in the file will be used. | 
|  | 69 |  | 
|  | 70 | :: | 
|  | 71 |  | 
|  | 72 | [[post-config|$NOVA_CONF]] | 
|  | 73 | [DEFAULT] | 
|  | 74 | use_syslog = True | 
|  | 75 |  | 
|  | 76 | [osapi_v3] | 
|  | 77 | enabled = False | 
|  | 78 |  | 
|  | 79 | A specific meta-section ``local|localrc`` is used to provide a default | 
|  | 80 | ``localrc`` file (actually ``.localrc.auto``). This allows all custom | 
|  | 81 | settings for DevStack to be contained in a single file. If ``localrc`` | 
|  | 82 | exists it will be used instead to preserve backward-compatibility. More | 
| Dean Troyer | ea3cdfa | 2014-11-08 08:29:16 -0600 | [diff] [blame] | 83 | details on the :doc:`contents of local.conf <local.conf>` are available. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 84 |  | 
|  | 85 | :: | 
|  | 86 |  | 
|  | 87 | [[local|localrc]] | 
|  | 88 | FIXED_RANGE=10.254.1.0/24 | 
|  | 89 | ADMIN_PASSWORD=speciale | 
|  | 90 | LOGFILE=$DEST/logs/stack.sh.log | 
|  | 91 |  | 
|  | 92 | Note that ``Q_PLUGIN_CONF_FILE`` is unique in that it is assumed to | 
|  | 93 | *NOT* start with a ``/`` (slash) character. A slash will need to be | 
|  | 94 | added: | 
|  | 95 |  | 
|  | 96 | :: | 
|  | 97 |  | 
|  | 98 | [[post-config|/$Q_PLUGIN_CONF_FILE]] | 
|  | 99 |  | 
|  | 100 | Also note that the ``localrc`` section is sourced as a shell script | 
| Juan Antonio Osorio Robles | fe6dccb | 2014-11-28 13:12:14 +0200 | [diff] [blame] | 101 | fragment and MUST conform to the shell requirements, specifically no | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 102 | whitespace around ``=`` (equals). | 
|  | 103 |  | 
| James Polley | 5f2eb6d | 2015-03-30 17:36:26 +1100 | [diff] [blame] | 104 | .. _minimal-configuration: | 
|  | 105 |  | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 106 | Minimal Configuration | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 107 | ===================== | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 108 |  | 
|  | 109 | While ``stack.sh`` is happy to run without a ``localrc`` section in | 
|  | 110 | ``local.conf``, devlife is better when there are a few minimal variables | 
|  | 111 | set. This is an example of a minimal configuration that touches the | 
|  | 112 | values that most often need to be set. | 
|  | 113 |  | 
|  | 114 | -  no logging | 
|  | 115 | -  pre-set the passwords to prevent interactive prompts | 
|  | 116 | -  move network ranges away from the local network (``FIXED_RANGE`` and | 
|  | 117 | ``FLOATING_RANGE``, commented out below) | 
|  | 118 | -  set the host IP if detection is unreliable (``HOST_IP``, commented | 
|  | 119 | out below) | 
|  | 120 |  | 
|  | 121 | :: | 
|  | 122 |  | 
|  | 123 | [[local|localrc]] | 
|  | 124 | ADMIN_PASSWORD=secrete | 
|  | 125 | DATABASE_PASSWORD=$ADMIN_PASSWORD | 
|  | 126 | RABBIT_PASSWORD=$ADMIN_PASSWORD | 
|  | 127 | SERVICE_PASSWORD=$ADMIN_PASSWORD | 
|  | 128 | SERVICE_TOKEN=a682f596-76f3-11e3-b3b2-e716f9080d50 | 
|  | 129 | #FIXED_RANGE=172.31.1.0/24 | 
|  | 130 | #FLOATING_RANGE=192.168.20.0/25 | 
|  | 131 | #HOST_IP=10.3.4.5 | 
|  | 132 |  | 
|  | 133 | If the ``*_PASSWORD`` variables are not set here you will be prompted to | 
|  | 134 | enter values for them by ``stack.sh``. | 
|  | 135 |  | 
|  | 136 | The network ranges must not overlap with any networks in use on the | 
|  | 137 | host. Overlap is not uncommon as RFC-1918 'private' ranges are commonly | 
|  | 138 | used for both the local networking and Nova's fixed and floating ranges. | 
|  | 139 |  | 
|  | 140 | ``HOST_IP`` is normally detected on the first run of ``stack.sh`` but | 
|  | 141 | often is indeterminate on later runs due to the IP being moved from an | 
| Juan Antonio Osorio Robles | fe6dccb | 2014-11-28 13:12:14 +0200 | [diff] [blame] | 142 | Ethernet interface to a bridge on the host. Setting it here also makes it | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 143 | available for ``openrc`` to set ``OS_AUTH_URL``. ``HOST_IP`` is not set | 
|  | 144 | by default. | 
|  | 145 |  | 
| Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 146 | ``HOST_IPV6`` is normally detected on the first run of ``stack.sh`` but | 
|  | 147 | will not be set if there is no IPv6 address on the default Ethernet interface. | 
|  | 148 | Setting it here also makes it available for ``openrc`` to set ``OS_AUTH_URL``. | 
|  | 149 | ``HOST_IPV6`` is not set by default. | 
|  | 150 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 151 | Configuration Notes | 
|  | 152 | =================== | 
|  | 153 |  | 
|  | 154 | .. contents:: | 
|  | 155 | :local: | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 156 |  | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 157 | Installation Directory | 
|  | 158 | ---------------------- | 
|  | 159 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 160 | The DevStack install directory is set by the ``DEST`` variable.  By | 
|  | 161 | default it is ``/opt/stack``. | 
|  | 162 |  | 
|  | 163 | By setting it early in the ``localrc`` section you can reference it in | 
|  | 164 | later variables.  It can be useful to set it even though it is not | 
|  | 165 | changed from the default value. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 166 |  | 
|  | 167 | :: | 
|  | 168 |  | 
|  | 169 | DEST=/opt/stack | 
|  | 170 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 171 | Logging | 
|  | 172 | ------- | 
|  | 173 |  | 
|  | 174 | Enable Logging | 
|  | 175 | ~~~~~~~~~~~~~~ | 
|  | 176 |  | 
|  | 177 | By default ``stack.sh`` output is only written to the console where it | 
|  | 178 | runs. It can be sent to a file in addition to the console by setting | 
|  | 179 | ``LOGFILE`` to the fully-qualified name of the destination log file. A | 
|  | 180 | timestamp will be appended to the given filename for each run of | 
|  | 181 | ``stack.sh``. | 
|  | 182 |  | 
|  | 183 | :: | 
|  | 184 |  | 
|  | 185 | LOGFILE=$DEST/logs/stack.sh.log | 
|  | 186 |  | 
|  | 187 | Old log files are cleaned automatically if ``LOGDAYS`` is set to the | 
|  | 188 | number of days of old log files to keep. | 
|  | 189 |  | 
|  | 190 | :: | 
|  | 191 |  | 
|  | 192 | LOGDAYS=1 | 
|  | 193 |  | 
|  | 194 | The some of the project logs (Nova, Cinder, etc) will be colorized by | 
|  | 195 | default (if ``SYSLOG`` is not set below); this can be turned off by | 
|  | 196 | setting ``LOG_COLOR`` to ``False``. | 
|  | 197 |  | 
|  | 198 | :: | 
|  | 199 |  | 
|  | 200 | LOG_COLOR=False | 
|  | 201 |  | 
|  | 202 | Logging the Service Output | 
|  | 203 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
|  | 204 |  | 
|  | 205 | DevStack will log the ``stdout`` output of the services it starts. | 
|  | 206 | When using ``screen`` this logs the output in the screen windows to a | 
|  | 207 | file.  Without ``screen`` this simply redirects stdout of the service | 
|  | 208 | process to a file in ``LOGDIR``. | 
|  | 209 |  | 
|  | 210 | :: | 
|  | 211 |  | 
|  | 212 | LOGDIR=$DEST/logs | 
|  | 213 |  | 
|  | 214 | *Note the use of ``DEST`` to locate the main install directory; this | 
|  | 215 | is why we suggest setting it in ``local.conf``.* | 
|  | 216 |  | 
|  | 217 | Enabling Syslog | 
|  | 218 | ~~~~~~~~~~~~~~~ | 
|  | 219 |  | 
|  | 220 | Logging all services to a single syslog can be convenient. Enable | 
|  | 221 | syslogging by setting ``SYSLOG`` to ``True``. If the destination log | 
|  | 222 | host is not localhost ``SYSLOG_HOST`` and ``SYSLOG_PORT`` can be used | 
|  | 223 | to direct the message stream to the log host.  | | 
|  | 224 |  | 
|  | 225 | :: | 
|  | 226 |  | 
|  | 227 | SYSLOG=True | 
|  | 228 | SYSLOG_HOST=$HOST_IP | 
|  | 229 | SYSLOG_PORT=516 | 
|  | 230 |  | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 231 | Libraries from Git | 
|  | 232 | ------------------ | 
|  | 233 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 234 | By default devstack installs OpenStack server components from git, | 
|  | 235 | however it installs client libraries from released versions on pypi. | 
|  | 236 | This is appropriate if you are working on server development, but if | 
|  | 237 | you want to see how an unreleased version of the client affects the | 
|  | 238 | system you can have devstack install it from upstream, or from local | 
|  | 239 | git trees by specifying it in ``LIBS_FROM_GIT``.  Multiple libraries | 
|  | 240 | can be specified as a comma separated list. | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 241 |  | 
|  | 242 | :: | 
|  | 243 |  | 
|  | 244 | LIBS_FROM_GIT=python-keystoneclient,oslo.config | 
|  | 245 |  | 
| Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 246 | Virtual Environments | 
|  | 247 | -------------------- | 
|  | 248 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 249 | Enable the use of Python virtual environments by setting ``USE_VENV`` | 
|  | 250 | to ``True``.  This will enable the creation of venvs for each project | 
|  | 251 | that is defined in the ``PROJECT_VENV`` array. | 
| Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 252 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 253 | Each entry in the ``PROJECT_VENV`` array contains the directory name | 
|  | 254 | of a venv to be used for the project.  The array index is the project | 
|  | 255 | name.  Multiple projects can use the same venv if desired. | 
| Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 256 |  | 
|  | 257 | :: | 
|  | 258 |  | 
|  | 259 | PROJECT_VENV["glance"]=${GLANCE_DIR}.venv | 
|  | 260 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 261 | ``ADDITIONAL_VENV_PACKAGES`` is a comma-separated list of additional | 
|  | 262 | packages to be installed into each venv.  Often projects will not have | 
|  | 263 | certain packages listed in its ``requirements.txt`` file because they | 
|  | 264 | are 'optional' requirements, i.e. only needed for certain | 
|  | 265 | configurations.  By default, the enabled databases will have their | 
|  | 266 | Python bindings added when they are enabled. | 
| Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 267 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 268 | :: | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 269 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 270 | ADDITIONAL_VENV_PACKAGES="python-foo, python-bar" | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 271 |  | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 272 |  | 
|  | 273 | A clean install every time | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 274 | -------------------------- | 
|  | 275 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 276 | By default ``stack.sh`` only clones the project repos if they do not | 
|  | 277 | exist in ``$DEST``. ``stack.sh`` will freshen each repo on each run if | 
|  | 278 | ``RECLONE`` is set to ``yes``. This avoids having to manually remove | 
|  | 279 | repos in order to get the current branch from ``$GIT_BASE``. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 280 |  | 
|  | 281 | :: | 
|  | 282 |  | 
|  | 283 | RECLONE=yes | 
|  | 284 |  | 
| Chris Dent | ebdd9ac | 2015-03-04 12:35:14 +0000 | [diff] [blame] | 285 | Upgrade packages installed by pip | 
|  | 286 | --------------------------------- | 
|  | 287 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 288 | By default ``stack.sh`` only installs Python packages if no version is | 
|  | 289 | currently installed or the current version does not match a specified | 
|  | 290 | requirement. If ``PIP_UPGRADE`` is set to ``True`` then existing | 
|  | 291 | required Python packages will be upgraded to the most recent version | 
|  | 292 | that matches requirements. | 
| Chris Dent | ebdd9ac | 2015-03-04 12:35:14 +0000 | [diff] [blame] | 293 |  | 
|  | 294 | :: | 
|  | 295 |  | 
|  | 296 | PIP_UPGRADE=True | 
|  | 297 |  | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 298 | Swift | 
|  | 299 | ----- | 
|  | 300 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 301 | Swift is now used as the back-end for the S3-like object store.  When | 
|  | 302 | enabled Nova's objectstore (``n-obj`` in ``ENABLED_SERVICES``) is | 
|  | 303 | automatically disabled. Enable Swift by adding it services to | 
|  | 304 | ``ENABLED_SERVICES`` | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 305 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 306 | :: | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 307 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 308 | enable_service s-proxy s-object s-container s-account | 
|  | 309 |  | 
|  | 310 | Setting Swift's hash value is required and you will be prompted for it | 
|  | 311 | if Swift is enabled so just set it to something already: | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 312 |  | 
|  | 313 | :: | 
|  | 314 |  | 
|  | 315 | SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5 | 
|  | 316 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 317 | For development purposes the default number of replicas is set to | 
|  | 318 | ``1`` to reduce the overhead required. To better simulate a production | 
|  | 319 | deployment set this to ``3`` or more. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 320 |  | 
|  | 321 | :: | 
|  | 322 |  | 
|  | 323 | SWIFT_REPLICAS=3 | 
|  | 324 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 325 | The data for Swift is stored in the source tree by default (in | 
|  | 326 | ``$DEST/swift/data``) and can be moved by setting | 
|  | 327 | ``SWIFT_DATA_DIR``. The specified directory will be created if it does | 
|  | 328 | not exist. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 329 |  | 
|  | 330 | :: | 
|  | 331 |  | 
|  | 332 | SWIFT_DATA_DIR=$DEST/data/swift | 
|  | 333 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 334 | *Note*: Previously just enabling ``swift`` was sufficient to start the | 
|  | 335 | Swift services. That does not provide proper service granularity, | 
|  | 336 | particularly in multi-host configurations, and is considered | 
|  | 337 | deprecated. Some service combination tests now check for specific | 
|  | 338 | Swift services and the old blanket acceptance will longer work | 
|  | 339 | correctly. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 340 |  | 
|  | 341 | Service Catalog Backend | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 342 | ----------------------- | 
|  | 343 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 344 | By default DevStack uses Keystone's ``sql`` service catalog backend. | 
|  | 345 | An alternate ``template`` backend is also available, however, it does | 
|  | 346 | not support the ``service-*`` and ``endpoint-*`` commands of the | 
|  | 347 | ``keystone`` CLI.  To do so requires the ``sql`` backend be enabled | 
|  | 348 | with ``KEYSTONE_CATALOG_BACKEND``: | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 349 |  | 
|  | 350 | :: | 
|  | 351 |  | 
|  | 352 | KEYSTONE_CATALOG_BACKEND=template | 
|  | 353 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 354 | DevStack's default configuration in ``sql`` mode is set in | 
|  | 355 | ``files/keystone_data.sh`` | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 356 |  | 
|  | 357 | Cinder | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 358 | ------ | 
|  | 359 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 360 | The logical volume group used to hold the Cinder-managed volumes is | 
|  | 361 | set by ``VOLUME_GROUP``, the logical volume name prefix is set with | 
|  | 362 | ``VOLUME_NAME_PREFIX`` and the size of the volume backing file is set | 
|  | 363 | with ``VOLUME_BACKING_FILE_SIZE``. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 364 |  | 
|  | 365 | :: | 
|  | 366 |  | 
|  | 367 | VOLUME_GROUP="stack-volumes" | 
|  | 368 | VOLUME_NAME_PREFIX="volume-" | 
|  | 369 | VOLUME_BACKING_FILE_SIZE=10250M | 
|  | 370 |  | 
|  | 371 | Multi-host DevStack | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 372 | ------------------- | 
|  | 373 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 374 | Running DevStack with multiple hosts requires a custom ``local.conf`` | 
|  | 375 | section for each host. The master is the same as a single host | 
|  | 376 | installation with ``MULTI_HOST=True``. The slaves have fewer services | 
|  | 377 | enabled and a couple of host variables pointing to the master. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 378 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 379 | Master | 
|  | 380 | ~~~~~~ | 
|  | 381 |  | 
|  | 382 | Set ``MULTI_HOST`` to true | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 383 | :: | 
|  | 384 |  | 
|  | 385 | MULTI_HOST=True | 
|  | 386 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 387 | Slave | 
|  | 388 | ~~~~~ | 
|  | 389 |  | 
|  | 390 | Set the following options to point to the master | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 391 |  | 
|  | 392 | :: | 
|  | 393 |  | 
|  | 394 | MYSQL_HOST=w.x.y.z | 
|  | 395 | RABBIT_HOST=w.x.y.z | 
|  | 396 | GLANCE_HOSTPORT=w.x.y.z:9292 | 
|  | 397 | ENABLED_SERVICES=n-vol,n-cpu,n-net,n-api | 
|  | 398 |  | 
| John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 399 | IP Version | 
| Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 400 | ---------- | 
|  | 401 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 402 | ``IP_VERSION`` can be used to configure DevStack to create either an | 
|  | 403 | IPv4, IPv6, or dual-stack tenant data-network by with either | 
|  | 404 | ``IP_VERSION=4``, ``IP_VERSION=6``, or ``IP_VERSION=4+6`` | 
|  | 405 | respectively.  This functionality requires that the Neutron networking | 
|  | 406 | service is enabled by setting the following options: | 
| John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 407 |  | 
|  | 408 | :: | 
|  | 409 |  | 
|  | 410 | disable_service n-net | 
|  | 411 | enable_service q-svc q-agt q-dhcp q-l3 | 
|  | 412 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 413 | The following optional variables can be used to alter the default IPv6 | 
|  | 414 | behavior: | 
| John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 415 |  | 
|  | 416 | :: | 
|  | 417 |  | 
|  | 418 | IPV6_RA_MODE=slaac | 
|  | 419 | IPV6_ADDRESS_MODE=slaac | 
|  | 420 | FIXED_RANGE_V6=fd$IPV6_GLOBAL_ID::/64 | 
|  | 421 | IPV6_PRIVATE_NETWORK_GATEWAY=fd$IPV6_GLOBAL_ID::1 | 
|  | 422 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 423 | *Note*: ``FIXED_RANGE_V6`` and ``IPV6_PRIVATE_NETWORK_GATEWAY`` can be | 
|  | 424 | configured with any valid IPv6 prefix. The default values make use of | 
|  | 425 | an auto-generated ``IPV6_GLOBAL_ID`` to comply with RFC4193. | 
| Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 426 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 427 | Service Version | 
|  | 428 | ~~~~~~~~~~~~~~~ | 
|  | 429 |  | 
|  | 430 | DevStack can enable service operation over either IPv4 or IPv6 by | 
|  | 431 | setting ``SERVICE_IP_VERSION`` to either ``SERVICE_IP_VERSION=4`` or | 
|  | 432 | ``SERVICE_IP_VERSION=6`` respectively. | 
|  | 433 |  | 
|  | 434 | When set to ``4`` devstack services will open listen sockets on | 
|  | 435 | ``0.0.0.0`` and service endpoints will be registered using ``HOST_IP`` | 
|  | 436 | as the address. | 
|  | 437 |  | 
|  | 438 | When set to ``6`` devstack services will open listen sockets on ``::`` | 
|  | 439 | and service endpoints will be registered using ``HOST_IPV6`` as the | 
|  | 440 | address. | 
|  | 441 |  | 
|  | 442 | The default value for this setting is ``4``.  Dual-mode support, for | 
|  | 443 | example ``4+6`` is not currently supported.  ``HOST_IPV6`` can | 
|  | 444 | optionally be used to alter the default IPv6 address | 
| Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 445 |  | 
|  | 446 | :: | 
|  | 447 |  | 
|  | 448 | HOST_IPV6=${some_local_ipv6_address} | 
| John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 449 |  | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 450 | Examples | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 451 | ======== | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 452 |  | 
|  | 453 | -  Eliminate a Cinder pass-through (``CINDER_PERIODIC_INTERVAL``): | 
|  | 454 |  | 
|  | 455 | :: | 
|  | 456 |  | 
|  | 457 | [[post-config|$CINDER_CONF]] | 
|  | 458 | [DEFAULT] | 
|  | 459 | periodic_interval = 60 | 
|  | 460 |  | 
|  | 461 | -  Sample ``local.conf`` with screen logging enabled: | 
|  | 462 |  | 
|  | 463 | :: | 
|  | 464 |  | 
|  | 465 | [[local|localrc]] | 
|  | 466 | FIXED_RANGE=10.254.1.0/24 | 
|  | 467 | NETWORK_GATEWAY=10.254.1.1 | 
|  | 468 | LOGDAYS=1 | 
| Dean Troyer | dde41d0 | 2014-12-09 17:47:57 -0600 | [diff] [blame] | 469 | LOGDIR=$DEST/logs | 
|  | 470 | LOGFILE=$LOGDIR/stack.sh.log | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 471 | ADMIN_PASSWORD=quiet | 
|  | 472 | DATABASE_PASSWORD=$ADMIN_PASSWORD | 
|  | 473 | RABBIT_PASSWORD=$ADMIN_PASSWORD | 
|  | 474 | SERVICE_PASSWORD=$ADMIN_PASSWORD | 
|  | 475 | SERVICE_TOKEN=a682f596-76f3-11e3-b3b2-e716f9080d50 |