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 | local.conf |
Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 10 | ========== |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 11 | |
Ian Wienand | a35391e | 2015-08-10 13:53:40 +1000 | [diff] [blame] | 12 | DevStack configuration is modified via the file ``local.conf``. It is |
| 13 | a modified INI format file that introduces a meta-section header to |
| 14 | carry additional information regarding the configuration files to be |
| 15 | changed. |
| 16 | |
| 17 | A sample is provided in ``devstack/samples`` |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 18 | |
| 19 | The new header is similar to a normal INI section header but with double |
| 20 | brackets (``[[ ... ]]``) and two internal fields separated by a pipe |
dieterly | 7c7679e | 2015-09-18 15:10:48 -0600 | [diff] [blame] | 21 | (``|``). Note that there are no spaces between the double brackets and the |
| 22 | internal fields. Likewise, there are no spaces between the pipe and the |
| 23 | internal fields: |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 24 | :: |
| 25 | |
dieterly | 7c7679e | 2015-09-18 15:10:48 -0600 | [diff] [blame] | 26 | '[[' <phase> '|' <config-file-name> ']]' |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 27 | |
| 28 | where ``<phase>`` is one of a set of phase names defined by ``stack.sh`` |
| 29 | and ``<config-file-name>`` is the configuration filename. The filename |
| 30 | is eval'ed in the ``stack.sh`` context so all environment variables are |
| 31 | available and may be used. Using the project config file variables in |
| 32 | the header is strongly suggested (see the ``NOVA_CONF`` example below). |
| 33 | If the path of the config file does not exist it is skipped. |
| 34 | |
| 35 | The defined phases are: |
| 36 | |
| 37 | - **local** - extracts ``localrc`` from ``local.conf`` before |
| 38 | ``stackrc`` is sourced |
| 39 | - **pre-install** - runs after the system packages are installed but |
| 40 | before any of the source repositories are installed |
| 41 | - **install** - runs immediately after the repo installations are |
| 42 | complete |
| 43 | - **post-config** - runs after the layer 2 services are configured and |
| 44 | before they are started |
| 45 | - **extra** - runs after services are started and before any files in |
| 46 | ``extra.d`` are executed |
YAMAMOTO Takashi | 961643e | 2015-07-31 13:45:27 +0900 | [diff] [blame] | 47 | - **post-extra** - runs after files in ``extra.d`` are executed |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 48 | |
| 49 | The file is processed strictly in sequence; meta-sections may be |
| 50 | specified more than once but if any settings are duplicated the last to |
| 51 | appear in the file will be used. |
| 52 | |
| 53 | :: |
| 54 | |
| 55 | [[post-config|$NOVA_CONF]] |
| 56 | [DEFAULT] |
| 57 | use_syslog = True |
| 58 | |
| 59 | [osapi_v3] |
| 60 | enabled = False |
| 61 | |
| 62 | A specific meta-section ``local|localrc`` is used to provide a default |
| 63 | ``localrc`` file (actually ``.localrc.auto``). This allows all custom |
| 64 | settings for DevStack to be contained in a single file. If ``localrc`` |
| 65 | exists it will be used instead to preserve backward-compatibility. More |
Dean Troyer | ea3cdfa | 2014-11-08 08:29:16 -0600 | [diff] [blame] | 66 | 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] | 67 | |
| 68 | :: |
| 69 | |
| 70 | [[local|localrc]] |
| 71 | FIXED_RANGE=10.254.1.0/24 |
| 72 | ADMIN_PASSWORD=speciale |
| 73 | LOGFILE=$DEST/logs/stack.sh.log |
| 74 | |
| 75 | Note that ``Q_PLUGIN_CONF_FILE`` is unique in that it is assumed to |
| 76 | *NOT* start with a ``/`` (slash) character. A slash will need to be |
| 77 | added: |
| 78 | |
| 79 | :: |
| 80 | |
| 81 | [[post-config|/$Q_PLUGIN_CONF_FILE]] |
| 82 | |
| 83 | 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] | 84 | fragment and MUST conform to the shell requirements, specifically no |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 85 | whitespace around ``=`` (equals). |
| 86 | |
James Polley | 5f2eb6d | 2015-03-30 17:36:26 +1100 | [diff] [blame] | 87 | .. _minimal-configuration: |
| 88 | |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 89 | Minimal Configuration |
Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 90 | ===================== |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 91 | |
| 92 | While ``stack.sh`` is happy to run without a ``localrc`` section in |
| 93 | ``local.conf``, devlife is better when there are a few minimal variables |
| 94 | set. This is an example of a minimal configuration that touches the |
| 95 | values that most often need to be set. |
| 96 | |
| 97 | - no logging |
| 98 | - pre-set the passwords to prevent interactive prompts |
| 99 | - move network ranges away from the local network (``FIXED_RANGE`` and |
| 100 | ``FLOATING_RANGE``, commented out below) |
| 101 | - set the host IP if detection is unreliable (``HOST_IP``, commented |
| 102 | out below) |
| 103 | |
| 104 | :: |
| 105 | |
| 106 | [[local|localrc]] |
| 107 | ADMIN_PASSWORD=secrete |
| 108 | DATABASE_PASSWORD=$ADMIN_PASSWORD |
| 109 | RABBIT_PASSWORD=$ADMIN_PASSWORD |
| 110 | SERVICE_PASSWORD=$ADMIN_PASSWORD |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 111 | #FIXED_RANGE=172.31.1.0/24 |
| 112 | #FLOATING_RANGE=192.168.20.0/25 |
| 113 | #HOST_IP=10.3.4.5 |
| 114 | |
| 115 | If the ``*_PASSWORD`` variables are not set here you will be prompted to |
| 116 | enter values for them by ``stack.sh``. |
| 117 | |
| 118 | The network ranges must not overlap with any networks in use on the |
| 119 | host. Overlap is not uncommon as RFC-1918 'private' ranges are commonly |
| 120 | used for both the local networking and Nova's fixed and floating ranges. |
| 121 | |
| 122 | ``HOST_IP`` is normally detected on the first run of ``stack.sh`` but |
| 123 | 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] | 124 | 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] | 125 | available for ``openrc`` to set ``OS_AUTH_URL``. ``HOST_IP`` is not set |
| 126 | by default. |
| 127 | |
Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 128 | ``HOST_IPV6`` is normally detected on the first run of ``stack.sh`` but |
| 129 | will not be set if there is no IPv6 address on the default Ethernet interface. |
| 130 | Setting it here also makes it available for ``openrc`` to set ``OS_AUTH_URL``. |
| 131 | ``HOST_IPV6`` is not set by default. |
| 132 | |
Ian Wienand | a35391e | 2015-08-10 13:53:40 +1000 | [diff] [blame] | 133 | Historical Notes |
| 134 | ================ |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 135 | |
Ian Wienand | a35391e | 2015-08-10 13:53:40 +1000 | [diff] [blame] | 136 | Historically DevStack obtained all local configuration and |
| 137 | customizations from a ``localrc`` file. In Oct 2013 the |
| 138 | ``local.conf`` configuration method was introduced (in `review 46768 |
| 139 | <https://review.openstack.org/#/c/46768/>`__) to simplify this |
| 140 | process. |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 141 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 142 | Configuration Notes |
| 143 | =================== |
| 144 | |
| 145 | .. contents:: |
| 146 | :local: |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 147 | |
Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 148 | Installation Directory |
| 149 | ---------------------- |
| 150 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 151 | The DevStack install directory is set by the ``DEST`` variable. By |
| 152 | default it is ``/opt/stack``. |
| 153 | |
| 154 | By setting it early in the ``localrc`` section you can reference it in |
| 155 | later variables. It can be useful to set it even though it is not |
| 156 | changed from the default value. |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 157 | |
| 158 | :: |
| 159 | |
| 160 | DEST=/opt/stack |
| 161 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 162 | Logging |
| 163 | ------- |
| 164 | |
| 165 | Enable Logging |
| 166 | ~~~~~~~~~~~~~~ |
| 167 | |
| 168 | By default ``stack.sh`` output is only written to the console where it |
| 169 | runs. It can be sent to a file in addition to the console by setting |
| 170 | ``LOGFILE`` to the fully-qualified name of the destination log file. A |
| 171 | timestamp will be appended to the given filename for each run of |
| 172 | ``stack.sh``. |
| 173 | |
| 174 | :: |
| 175 | |
| 176 | LOGFILE=$DEST/logs/stack.sh.log |
| 177 | |
| 178 | Old log files are cleaned automatically if ``LOGDAYS`` is set to the |
| 179 | number of days of old log files to keep. |
| 180 | |
| 181 | :: |
| 182 | |
| 183 | LOGDAYS=1 |
| 184 | |
| 185 | The some of the project logs (Nova, Cinder, etc) will be colorized by |
| 186 | default (if ``SYSLOG`` is not set below); this can be turned off by |
| 187 | setting ``LOG_COLOR`` to ``False``. |
| 188 | |
| 189 | :: |
| 190 | |
| 191 | LOG_COLOR=False |
| 192 | |
| 193 | Logging the Service Output |
| 194 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 195 | |
| 196 | DevStack will log the ``stdout`` output of the services it starts. |
| 197 | When using ``screen`` this logs the output in the screen windows to a |
| 198 | file. Without ``screen`` this simply redirects stdout of the service |
| 199 | process to a file in ``LOGDIR``. |
| 200 | |
| 201 | :: |
| 202 | |
| 203 | LOGDIR=$DEST/logs |
| 204 | |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 205 | Note the use of ``DEST`` to locate the main install directory; this |
| 206 | is why we suggest setting it in ``local.conf``. |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 207 | |
| 208 | Enabling Syslog |
| 209 | ~~~~~~~~~~~~~~~ |
| 210 | |
| 211 | Logging all services to a single syslog can be convenient. Enable |
| 212 | syslogging by setting ``SYSLOG`` to ``True``. If the destination log |
| 213 | host is not localhost ``SYSLOG_HOST`` and ``SYSLOG_PORT`` can be used |
yangyapeng | 01cf55a | 2015-10-29 13:21:29 -0400 | [diff] [blame] | 214 | to direct the message stream to the log host. |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 215 | |
| 216 | :: |
| 217 | |
| 218 | SYSLOG=True |
| 219 | SYSLOG_HOST=$HOST_IP |
| 220 | SYSLOG_PORT=516 |
| 221 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 222 | |
Ian Wienand | a35391e | 2015-08-10 13:53:40 +1000 | [diff] [blame] | 223 | Example Logging Configuration |
| 224 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 225 | |
| 226 | For example, non-interactive installs probably wish to save output to |
| 227 | a file, keep service logs and disable color in the stored files. |
| 228 | |
| 229 | :: |
| 230 | |
| 231 | [[local|localrc]] |
| 232 | DEST=/opt/stack/ |
| 233 | LOGDIR=$DEST/logs |
| 234 | LOGFILE=$LOGDIR/stack.sh.log |
| 235 | LOG_COLOR=False |
| 236 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 237 | Database Backend |
| 238 | ---------------- |
| 239 | |
| 240 | Multiple database backends are available. The available databases are defined |
| 241 | in the lib/databases directory. |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 242 | ``mysql`` is the default database, choose a different one by putting the |
| 243 | following in the ``localrc`` section: |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 244 | |
| 245 | :: |
| 246 | |
| 247 | disable_service mysql |
| 248 | enable_service postgresql |
| 249 | |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 250 | ``mysql`` is the default database. |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 251 | |
| 252 | RPC Backend |
| 253 | ----------- |
| 254 | |
| 255 | Support for a RabbitMQ RPC backend is included. Additional RPC |
| 256 | backends may be available via external plugins. Enabling or disabling |
| 257 | RabbitMQ is handled via the usual service functions and |
| 258 | ``ENABLED_SERVICES``. |
| 259 | |
| 260 | Example disabling RabbitMQ in ``local.conf``: |
| 261 | |
| 262 | :: |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 263 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 264 | disable_service rabbit |
| 265 | |
| 266 | |
| 267 | Apache Frontend |
| 268 | --------------- |
| 269 | |
| 270 | The Apache web server can be enabled for wsgi services that support |
| 271 | being deployed under HTTPD + mod_wsgi. By default, services that |
| 272 | recommend running under HTTPD + mod_wsgi are deployed under Apache. To |
| 273 | use an alternative deployment strategy (e.g. eventlet) for services |
| 274 | that support an alternative to HTTPD + mod_wsgi set |
| 275 | ``ENABLE_HTTPD_MOD_WSGI_SERVICES`` to ``False`` in your |
| 276 | ``local.conf``. |
| 277 | |
| 278 | Each service that can be run under HTTPD + mod_wsgi also has an |
| 279 | override toggle available that can be set in your ``local.conf``. |
| 280 | |
| 281 | Keystone is run under Apache with ``mod_wsgi`` by default. |
| 282 | |
| 283 | Example (Keystone) |
| 284 | |
| 285 | :: |
| 286 | |
| 287 | KEYSTONE_USE_MOD_WSGI="True" |
| 288 | |
| 289 | Example (Nova): |
| 290 | |
| 291 | :: |
| 292 | |
| 293 | NOVA_USE_MOD_WSGI="True" |
| 294 | |
| 295 | Example (Swift): |
| 296 | |
| 297 | :: |
| 298 | |
| 299 | SWIFT_USE_MOD_WSGI="True" |
| 300 | |
Oleksii Chuprykov | a692810 | 2015-06-11 08:56:58 -0400 | [diff] [blame] | 301 | Example (Heat): |
| 302 | |
| 303 | :: |
| 304 | |
| 305 | HEAT_USE_MOD_WSGI="True" |
| 306 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 307 | |
Anton Arefiev | 651cb1a | 2015-09-01 10:55:20 +0300 | [diff] [blame] | 308 | Example (Cinder): |
| 309 | |
| 310 | :: |
| 311 | |
| 312 | CINDER_USE_MOD_WSGI="True" |
| 313 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 314 | |
Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 315 | Libraries from Git |
| 316 | ------------------ |
| 317 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 318 | By default devstack installs OpenStack server components from git, |
| 319 | however it installs client libraries from released versions on pypi. |
| 320 | This is appropriate if you are working on server development, but if |
| 321 | you want to see how an unreleased version of the client affects the |
| 322 | system you can have devstack install it from upstream, or from local |
| 323 | git trees by specifying it in ``LIBS_FROM_GIT``. Multiple libraries |
| 324 | can be specified as a comma separated list. |
Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 325 | |
| 326 | :: |
| 327 | |
| 328 | LIBS_FROM_GIT=python-keystoneclient,oslo.config |
| 329 | |
Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 330 | Virtual Environments |
| 331 | -------------------- |
| 332 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 333 | Enable the use of Python virtual environments by setting ``USE_VENV`` |
| 334 | to ``True``. This will enable the creation of venvs for each project |
| 335 | that is defined in the ``PROJECT_VENV`` array. |
Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 336 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 337 | Each entry in the ``PROJECT_VENV`` array contains the directory name |
| 338 | of a venv to be used for the project. The array index is the project |
| 339 | name. Multiple projects can use the same venv if desired. |
Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 340 | |
| 341 | :: |
| 342 | |
| 343 | PROJECT_VENV["glance"]=${GLANCE_DIR}.venv |
| 344 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 345 | ``ADDITIONAL_VENV_PACKAGES`` is a comma-separated list of additional |
| 346 | packages to be installed into each venv. Often projects will not have |
| 347 | certain packages listed in its ``requirements.txt`` file because they |
| 348 | are 'optional' requirements, i.e. only needed for certain |
| 349 | configurations. By default, the enabled databases will have their |
| 350 | Python bindings added when they are enabled. |
Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 351 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 352 | :: |
Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 353 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 354 | ADDITIONAL_VENV_PACKAGES="python-foo, python-bar" |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 355 | |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 356 | |
| 357 | A clean install every time |
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 | By default ``stack.sh`` only clones the project repos if they do not |
| 361 | exist in ``$DEST``. ``stack.sh`` will freshen each repo on each run if |
| 362 | ``RECLONE`` is set to ``yes``. This avoids having to manually remove |
| 363 | repos in order to get the current branch from ``$GIT_BASE``. |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 364 | |
| 365 | :: |
| 366 | |
| 367 | RECLONE=yes |
| 368 | |
Chris Dent | ebdd9ac | 2015-03-04 12:35:14 +0000 | [diff] [blame] | 369 | Upgrade packages installed by pip |
| 370 | --------------------------------- |
| 371 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 372 | By default ``stack.sh`` only installs Python packages if no version is |
| 373 | currently installed or the current version does not match a specified |
| 374 | requirement. If ``PIP_UPGRADE`` is set to ``True`` then existing |
| 375 | required Python packages will be upgraded to the most recent version |
| 376 | that matches requirements. |
Chris Dent | ebdd9ac | 2015-03-04 12:35:14 +0000 | [diff] [blame] | 377 | |
| 378 | :: |
| 379 | |
| 380 | PIP_UPGRADE=True |
| 381 | |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 382 | |
| 383 | Service Catalog Backend |
Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 384 | ----------------------- |
| 385 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 386 | By default DevStack uses Keystone's ``sql`` service catalog backend. |
| 387 | An alternate ``template`` backend is also available, however, it does |
| 388 | not support the ``service-*`` and ``endpoint-*`` commands of the |
| 389 | ``keystone`` CLI. To do so requires the ``sql`` backend be enabled |
| 390 | with ``KEYSTONE_CATALOG_BACKEND``: |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 391 | |
| 392 | :: |
| 393 | |
| 394 | KEYSTONE_CATALOG_BACKEND=template |
| 395 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 396 | DevStack's default configuration in ``sql`` mode is set in |
Einst Crazy | f54f60a | 2015-10-30 23:00:57 +0800 | [diff] [blame] | 397 | ``lib/keystone`` |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 398 | |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 399 | |
John Hua | a4693b5 | 2015-08-06 13:53:35 +0100 | [diff] [blame] | 400 | Guest Images |
| 401 | ------------ |
| 402 | |
| 403 | Images provided in URLS via the comma-separated ``IMAGE_URLS`` |
| 404 | variable will be downloaded and uploaded to glance by DevStack. |
| 405 | |
| 406 | Default guest-images are predefined for each type of hypervisor and |
| 407 | their testing-requirements in ``stack.sh``. Setting |
| 408 | ``DOWNLOAD_DEFAULT_IMAGES=False`` will prevent DevStack downloading |
| 409 | these default images; in that case, you will want to populate |
| 410 | ``IMAGE_URLS`` with sufficient images to satisfy testing-requirements. |
| 411 | |
| 412 | :: |
| 413 | |
| 414 | DOWNLOAD_DEFAULT_IMAGES=False |
| 415 | IMAGE_URLS="http://foo.bar.com/image.qcow," |
| 416 | IMAGE_URLS+="http://foo.bar.com/image2.qcow" |
| 417 | |
Rafael Folco | f0131e1 | 2015-09-23 12:55:02 -0500 | [diff] [blame] | 418 | |
| 419 | Instance Type |
| 420 | ------------- |
| 421 | |
| 422 | ``DEFAULT_INSTANCE_TYPE`` can be used to configure the default instance |
| 423 | type. When this parameter is not specified, Devstack creates additional |
| 424 | micro & nano flavors for really small instances to run Tempest tests. |
| 425 | |
| 426 | For guests with larger memory requirements, ``DEFAULT_INSTANCE_TYPE`` |
| 427 | should be specified in the configuration file so Tempest selects the |
| 428 | default flavors instead. |
| 429 | |
| 430 | KVM on Power with QEMU 2.4 requires 512 MB to load the firmware - |
| 431 | `QEMU 2.4 - PowerPC <http://wiki.qemu.org/ChangeLog/2.4>`__ so users |
| 432 | running instances on ppc64/ppc64le can choose one of the default |
| 433 | created flavors as follows: |
| 434 | |
| 435 | :: |
| 436 | |
| 437 | DEFAULT_INSTANCE_TYPE=m1.tiny |
| 438 | |
| 439 | |
John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 440 | IP Version |
Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 441 | ---------- |
| 442 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 443 | ``IP_VERSION`` can be used to configure DevStack to create either an |
| 444 | IPv4, IPv6, or dual-stack tenant data-network by with either |
| 445 | ``IP_VERSION=4``, ``IP_VERSION=6``, or ``IP_VERSION=4+6`` |
| 446 | respectively. This functionality requires that the Neutron networking |
| 447 | service is enabled by setting the following options: |
John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 448 | |
| 449 | :: |
| 450 | |
| 451 | disable_service n-net |
| 452 | enable_service q-svc q-agt q-dhcp q-l3 |
| 453 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 454 | The following optional variables can be used to alter the default IPv6 |
| 455 | behavior: |
John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 456 | |
| 457 | :: |
| 458 | |
| 459 | IPV6_RA_MODE=slaac |
| 460 | IPV6_ADDRESS_MODE=slaac |
| 461 | FIXED_RANGE_V6=fd$IPV6_GLOBAL_ID::/64 |
| 462 | IPV6_PRIVATE_NETWORK_GATEWAY=fd$IPV6_GLOBAL_ID::1 |
| 463 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 464 | *Note*: ``FIXED_RANGE_V6`` and ``IPV6_PRIVATE_NETWORK_GATEWAY`` can be |
| 465 | configured with any valid IPv6 prefix. The default values make use of |
| 466 | an auto-generated ``IPV6_GLOBAL_ID`` to comply with RFC4193. |
Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 467 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 468 | Service Version |
| 469 | ~~~~~~~~~~~~~~~ |
| 470 | |
| 471 | DevStack can enable service operation over either IPv4 or IPv6 by |
| 472 | setting ``SERVICE_IP_VERSION`` to either ``SERVICE_IP_VERSION=4`` or |
| 473 | ``SERVICE_IP_VERSION=6`` respectively. |
| 474 | |
| 475 | When set to ``4`` devstack services will open listen sockets on |
| 476 | ``0.0.0.0`` and service endpoints will be registered using ``HOST_IP`` |
| 477 | as the address. |
| 478 | |
| 479 | When set to ``6`` devstack services will open listen sockets on ``::`` |
| 480 | and service endpoints will be registered using ``HOST_IPV6`` as the |
| 481 | address. |
| 482 | |
| 483 | The default value for this setting is ``4``. Dual-mode support, for |
| 484 | example ``4+6`` is not currently supported. ``HOST_IPV6`` can |
| 485 | optionally be used to alter the default IPv6 address |
Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 486 | |
| 487 | :: |
| 488 | |
| 489 | HOST_IPV6=${some_local_ipv6_address} |
John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 490 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 491 | Multi-node setup |
| 492 | ~~~~~~~~~~~~~~~~ |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 493 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 494 | See the :doc:`multi-node lab guide<guides/multinode-lab>` |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 495 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 496 | Projects |
| 497 | -------- |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 498 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 499 | Neutron |
| 500 | ~~~~~~~ |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 501 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 502 | See the :doc:`neutron configuration guide<guides/neutron>` for |
| 503 | details on configuration of Neutron |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 504 | |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 505 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 506 | Swift |
| 507 | ~~~~~ |
| 508 | |
| 509 | Swift is disabled by default. When enabled, it is configured with |
| 510 | only one replica to avoid being IO/memory intensive on a small |
| 511 | VM. When running with only one replica the account, container and |
| 512 | object services will run directly in screen. The others services like |
| 513 | replicator, updaters or auditor runs in background. |
| 514 | |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 515 | If you would like to enable Swift you can add this to your ``localrc`` |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 516 | section: |
| 517 | |
| 518 | :: |
| 519 | |
| 520 | enable_service s-proxy s-object s-container s-account |
| 521 | |
| 522 | If you want a minimal Swift install with only Swift and Keystone you |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 523 | can have this instead in your ``localrc`` section: |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 524 | |
| 525 | :: |
| 526 | |
| 527 | disable_all_services |
| 528 | enable_service key mysql s-proxy s-object s-container s-account |
| 529 | |
| 530 | If you only want to do some testing of a real normal swift cluster |
| 531 | with multiple replicas you can do so by customizing the variable |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 532 | ``SWIFT_REPLICAS`` in your ``localrc`` section (usually to 3). |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 533 | |
| 534 | Swift S3 |
| 535 | ++++++++ |
| 536 | |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 537 | If you are enabling ``swift3`` in ``ENABLED_SERVICES`` DevStack will |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 538 | install the swift3 middleware emulation. Swift will be configured to |
| 539 | act as a S3 endpoint for Keystone so effectively replacing the |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 540 | ``nova-objectstore``. |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 541 | |
| 542 | Only Swift proxy server is launched in the screen session all other |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 543 | services are started in background and managed by ``swift-init`` tool. |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 544 | |
| 545 | Heat |
| 546 | ~~~~ |
| 547 | |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 548 | Heat is disabled by default (see ``stackrc`` file). To enable it |
| 549 | explicitly you'll need the following settings in your ``localrc`` |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 550 | section |
| 551 | |
| 552 | :: |
| 553 | |
| 554 | enable_service heat h-api h-api-cfn h-api-cw h-eng |
| 555 | |
| 556 | Heat can also run in standalone mode, and be configured to orchestrate |
| 557 | on an external OpenStack cloud. To launch only Heat in standalone mode |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 558 | you'll need the following settings in your ``localrc`` section |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 559 | |
| 560 | :: |
| 561 | |
| 562 | disable_all_services |
| 563 | enable_service rabbit mysql heat h-api h-api-cfn h-api-cw h-eng |
| 564 | HEAT_STANDALONE=True |
| 565 | KEYSTONE_SERVICE_HOST=... |
| 566 | KEYSTONE_AUTH_HOST=... |
| 567 | |
| 568 | Tempest |
| 569 | ~~~~~~~ |
| 570 | |
| 571 | If tempest has been successfully configured, a basic set of smoke |
| 572 | tests can be run as follows: |
| 573 | |
| 574 | :: |
| 575 | |
| 576 | $ cd /opt/stack/tempest |
| 577 | $ tox -efull tempest.scenario.test_network_basic_ops |
| 578 | |
| 579 | By default tempest is downloaded and the config file is generated, but the |
| 580 | tempest package is not installed in the system's global site-packages (the |
| 581 | package install includes installing dependences). So tempest won't run |
| 582 | outside of tox. If you would like to install it add the following to your |
| 583 | ``localrc`` section: |
| 584 | |
| 585 | :: |
| 586 | |
| 587 | INSTALL_TEMPEST=True |
| 588 | |
| 589 | |
| 590 | Xenserver |
| 591 | ~~~~~~~~~ |
| 592 | |
| 593 | If you would like to use Xenserver as the hypervisor, please refer to |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 594 | the instructions in ``./tools/xen/README.md``. |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 595 | |
| 596 | Cells |
| 597 | ~~~~~ |
| 598 | |
| 599 | `Cells <http://wiki.openstack.org/blueprint-nova-compute-cells>`__ is |
| 600 | an alternative scaling option. To setup a cells environment add the |
Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 601 | following to your ``localrc`` section: |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 602 | |
| 603 | :: |
| 604 | |
| 605 | enable_service n-cell |
| 606 | |
| 607 | Be aware that there are some features currently missing in cells, one |
| 608 | notable one being security groups. The exercises have been patched to |
| 609 | disable functionality not supported by cells. |
| 610 | |
| 611 | Cinder |
| 612 | ~~~~~~ |
| 613 | |
| 614 | The logical volume group used to hold the Cinder-managed volumes is |
| 615 | set by ``VOLUME_GROUP``, the logical volume name prefix is set with |
| 616 | ``VOLUME_NAME_PREFIX`` and the size of the volume backing file is set |
| 617 | with ``VOLUME_BACKING_FILE_SIZE``. |
| 618 | |
| 619 | :: |
| 620 | |
| 621 | VOLUME_GROUP="stack-volumes" |
| 622 | VOLUME_NAME_PREFIX="volume-" |
| 623 | VOLUME_BACKING_FILE_SIZE=10250M |
| 624 | |
| 625 | |
| 626 | Keystone |
| 627 | ~~~~~~~~ |
| 628 | |
| 629 | Multi-Region Setup |
| 630 | ++++++++++++++++++ |
| 631 | |
| 632 | We want to setup two devstack (RegionOne and RegionTwo) with shared |
| 633 | keystone (same users and services) and horizon. Keystone and Horizon |
| 634 | will be located in RegionOne. Full spec is available at: |
| 635 | `<https://wiki.openstack.org/wiki/Heat/Blueprints/Multi_Region_Support_for_Heat>`__. |
| 636 | |
| 637 | In RegionOne: |
| 638 | |
| 639 | :: |
| 640 | |
| 641 | REGION_NAME=RegionOne |
| 642 | |
| 643 | In RegionTwo: |
| 644 | |
| 645 | :: |
henriquetruta | f212622 | 2016-01-05 13:43:18 -0300 | [diff] [blame] | 646 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 647 | disable_service horizon |
| 648 | KEYSTONE_SERVICE_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE> |
| 649 | KEYSTONE_AUTH_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE> |
| 650 | REGION_NAME=RegionTwo |
henriquetruta | f212622 | 2016-01-05 13:43:18 -0300 | [diff] [blame] | 651 | |
| 652 | Disabling Identity API v2 |
| 653 | +++++++++++++++++++++++++ |
| 654 | |
| 655 | The Identity API v2 is deprecated as of Mitaka and it is recommended to only |
| 656 | use the v3 API. It is possible to setup keystone without v2 API, by doing: |
| 657 | |
| 658 | :: |
| 659 | |
| 660 | ENABLE_IDENTITY_V2=False |