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 | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame^] | 151 | Examples |
| 152 | ======== |
| 153 | |
| 154 | - Eliminate a Cinder pass-through (``CINDER_PERIODIC_INTERVAL``): |
| 155 | |
| 156 | :: |
| 157 | |
| 158 | [[post-config|$CINDER_CONF]] |
| 159 | [DEFAULT] |
| 160 | periodic_interval = 60 |
| 161 | |
| 162 | - Sample ``local.conf`` with screen logging enabled: |
| 163 | |
| 164 | :: |
| 165 | |
| 166 | [[local|localrc]] |
| 167 | FIXED_RANGE=10.254.1.0/24 |
| 168 | NETWORK_GATEWAY=10.254.1.1 |
| 169 | LOGDAYS=1 |
| 170 | LOGDIR=$DEST/logs |
| 171 | LOGFILE=$LOGDIR/stack.sh.log |
| 172 | ADMIN_PASSWORD=quiet |
| 173 | DATABASE_PASSWORD=$ADMIN_PASSWORD |
| 174 | RABBIT_PASSWORD=$ADMIN_PASSWORD |
| 175 | SERVICE_PASSWORD=$ADMIN_PASSWORD |
| 176 | SERVICE_TOKEN=a682f596-76f3-11e3-b3b2-e716f9080d50 |
| 177 | |
| 178 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 179 | Configuration Notes |
| 180 | =================== |
| 181 | |
| 182 | .. contents:: |
| 183 | :local: |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 184 | |
Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 185 | Installation Directory |
| 186 | ---------------------- |
| 187 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 188 | The DevStack install directory is set by the ``DEST`` variable. By |
| 189 | default it is ``/opt/stack``. |
| 190 | |
| 191 | By setting it early in the ``localrc`` section you can reference it in |
| 192 | later variables. It can be useful to set it even though it is not |
| 193 | changed from the default value. |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 194 | |
| 195 | :: |
| 196 | |
| 197 | DEST=/opt/stack |
| 198 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 199 | Logging |
| 200 | ------- |
| 201 | |
| 202 | Enable Logging |
| 203 | ~~~~~~~~~~~~~~ |
| 204 | |
| 205 | By default ``stack.sh`` output is only written to the console where it |
| 206 | runs. It can be sent to a file in addition to the console by setting |
| 207 | ``LOGFILE`` to the fully-qualified name of the destination log file. A |
| 208 | timestamp will be appended to the given filename for each run of |
| 209 | ``stack.sh``. |
| 210 | |
| 211 | :: |
| 212 | |
| 213 | LOGFILE=$DEST/logs/stack.sh.log |
| 214 | |
| 215 | Old log files are cleaned automatically if ``LOGDAYS`` is set to the |
| 216 | number of days of old log files to keep. |
| 217 | |
| 218 | :: |
| 219 | |
| 220 | LOGDAYS=1 |
| 221 | |
| 222 | The some of the project logs (Nova, Cinder, etc) will be colorized by |
| 223 | default (if ``SYSLOG`` is not set below); this can be turned off by |
| 224 | setting ``LOG_COLOR`` to ``False``. |
| 225 | |
| 226 | :: |
| 227 | |
| 228 | LOG_COLOR=False |
| 229 | |
| 230 | Logging the Service Output |
| 231 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 232 | |
| 233 | DevStack will log the ``stdout`` output of the services it starts. |
| 234 | When using ``screen`` this logs the output in the screen windows to a |
| 235 | file. Without ``screen`` this simply redirects stdout of the service |
| 236 | process to a file in ``LOGDIR``. |
| 237 | |
| 238 | :: |
| 239 | |
| 240 | LOGDIR=$DEST/logs |
| 241 | |
| 242 | *Note the use of ``DEST`` to locate the main install directory; this |
| 243 | is why we suggest setting it in ``local.conf``.* |
| 244 | |
| 245 | Enabling Syslog |
| 246 | ~~~~~~~~~~~~~~~ |
| 247 | |
| 248 | Logging all services to a single syslog can be convenient. Enable |
| 249 | syslogging by setting ``SYSLOG`` to ``True``. If the destination log |
| 250 | host is not localhost ``SYSLOG_HOST`` and ``SYSLOG_PORT`` can be used |
| 251 | to direct the message stream to the log host. | |
| 252 | |
| 253 | :: |
| 254 | |
| 255 | SYSLOG=True |
| 256 | SYSLOG_HOST=$HOST_IP |
| 257 | SYSLOG_PORT=516 |
| 258 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame^] | 259 | |
| 260 | Database Backend |
| 261 | ---------------- |
| 262 | |
| 263 | Multiple database backends are available. The available databases are defined |
| 264 | in the lib/databases directory. |
| 265 | `mysql` is the default database, choose a different one by putting the |
| 266 | following in the `localrc` section: |
| 267 | |
| 268 | :: |
| 269 | |
| 270 | disable_service mysql |
| 271 | enable_service postgresql |
| 272 | |
| 273 | `mysql` is the default database. |
| 274 | |
| 275 | RPC Backend |
| 276 | ----------- |
| 277 | |
| 278 | Support for a RabbitMQ RPC backend is included. Additional RPC |
| 279 | backends may be available via external plugins. Enabling or disabling |
| 280 | RabbitMQ is handled via the usual service functions and |
| 281 | ``ENABLED_SERVICES``. |
| 282 | |
| 283 | Example disabling RabbitMQ in ``local.conf``: |
| 284 | |
| 285 | :: |
| 286 | disable_service rabbit |
| 287 | |
| 288 | |
| 289 | Apache Frontend |
| 290 | --------------- |
| 291 | |
| 292 | The Apache web server can be enabled for wsgi services that support |
| 293 | being deployed under HTTPD + mod_wsgi. By default, services that |
| 294 | recommend running under HTTPD + mod_wsgi are deployed under Apache. To |
| 295 | use an alternative deployment strategy (e.g. eventlet) for services |
| 296 | that support an alternative to HTTPD + mod_wsgi set |
| 297 | ``ENABLE_HTTPD_MOD_WSGI_SERVICES`` to ``False`` in your |
| 298 | ``local.conf``. |
| 299 | |
| 300 | Each service that can be run under HTTPD + mod_wsgi also has an |
| 301 | override toggle available that can be set in your ``local.conf``. |
| 302 | |
| 303 | Keystone is run under Apache with ``mod_wsgi`` by default. |
| 304 | |
| 305 | Example (Keystone) |
| 306 | |
| 307 | :: |
| 308 | |
| 309 | KEYSTONE_USE_MOD_WSGI="True" |
| 310 | |
| 311 | Example (Nova): |
| 312 | |
| 313 | :: |
| 314 | |
| 315 | NOVA_USE_MOD_WSGI="True" |
| 316 | |
| 317 | Example (Swift): |
| 318 | |
| 319 | :: |
| 320 | |
| 321 | SWIFT_USE_MOD_WSGI="True" |
| 322 | |
| 323 | |
| 324 | |
Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 325 | Libraries from Git |
| 326 | ------------------ |
| 327 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 328 | By default devstack installs OpenStack server components from git, |
| 329 | however it installs client libraries from released versions on pypi. |
| 330 | This is appropriate if you are working on server development, but if |
| 331 | you want to see how an unreleased version of the client affects the |
| 332 | system you can have devstack install it from upstream, or from local |
| 333 | git trees by specifying it in ``LIBS_FROM_GIT``. Multiple libraries |
| 334 | can be specified as a comma separated list. |
Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 335 | |
| 336 | :: |
| 337 | |
| 338 | LIBS_FROM_GIT=python-keystoneclient,oslo.config |
| 339 | |
Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 340 | Virtual Environments |
| 341 | -------------------- |
| 342 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 343 | Enable the use of Python virtual environments by setting ``USE_VENV`` |
| 344 | to ``True``. This will enable the creation of venvs for each project |
| 345 | that is defined in the ``PROJECT_VENV`` array. |
Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 346 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 347 | Each entry in the ``PROJECT_VENV`` array contains the directory name |
| 348 | of a venv to be used for the project. The array index is the project |
| 349 | name. Multiple projects can use the same venv if desired. |
Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 350 | |
| 351 | :: |
| 352 | |
| 353 | PROJECT_VENV["glance"]=${GLANCE_DIR}.venv |
| 354 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 355 | ``ADDITIONAL_VENV_PACKAGES`` is a comma-separated list of additional |
| 356 | packages to be installed into each venv. Often projects will not have |
| 357 | certain packages listed in its ``requirements.txt`` file because they |
| 358 | are 'optional' requirements, i.e. only needed for certain |
| 359 | configurations. By default, the enabled databases will have their |
| 360 | Python bindings added when they are enabled. |
Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 361 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 362 | :: |
Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 363 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 364 | ADDITIONAL_VENV_PACKAGES="python-foo, python-bar" |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 365 | |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 366 | |
| 367 | A clean install every time |
Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 368 | -------------------------- |
| 369 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 370 | By default ``stack.sh`` only clones the project repos if they do not |
| 371 | exist in ``$DEST``. ``stack.sh`` will freshen each repo on each run if |
| 372 | ``RECLONE`` is set to ``yes``. This avoids having to manually remove |
| 373 | repos in order to get the current branch from ``$GIT_BASE``. |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 374 | |
| 375 | :: |
| 376 | |
| 377 | RECLONE=yes |
| 378 | |
Chris Dent | ebdd9ac | 2015-03-04 12:35:14 +0000 | [diff] [blame] | 379 | Upgrade packages installed by pip |
| 380 | --------------------------------- |
| 381 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 382 | By default ``stack.sh`` only installs Python packages if no version is |
| 383 | currently installed or the current version does not match a specified |
| 384 | requirement. If ``PIP_UPGRADE`` is set to ``True`` then existing |
| 385 | required Python packages will be upgraded to the most recent version |
| 386 | that matches requirements. |
Chris Dent | ebdd9ac | 2015-03-04 12:35:14 +0000 | [diff] [blame] | 387 | |
| 388 | :: |
| 389 | |
| 390 | PIP_UPGRADE=True |
| 391 | |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 392 | |
| 393 | Service Catalog Backend |
Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 394 | ----------------------- |
| 395 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 396 | By default DevStack uses Keystone's ``sql`` service catalog backend. |
| 397 | An alternate ``template`` backend is also available, however, it does |
| 398 | not support the ``service-*`` and ``endpoint-*`` commands of the |
| 399 | ``keystone`` CLI. To do so requires the ``sql`` backend be enabled |
| 400 | with ``KEYSTONE_CATALOG_BACKEND``: |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 401 | |
| 402 | :: |
| 403 | |
| 404 | KEYSTONE_CATALOG_BACKEND=template |
| 405 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 406 | DevStack's default configuration in ``sql`` mode is set in |
| 407 | ``files/keystone_data.sh`` |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 408 | |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 409 | |
John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 410 | IP Version |
Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 411 | ---------- |
| 412 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 413 | ``IP_VERSION`` can be used to configure DevStack to create either an |
| 414 | IPv4, IPv6, or dual-stack tenant data-network by with either |
| 415 | ``IP_VERSION=4``, ``IP_VERSION=6``, or ``IP_VERSION=4+6`` |
| 416 | respectively. This functionality requires that the Neutron networking |
| 417 | service is enabled by setting the following options: |
John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 418 | |
| 419 | :: |
| 420 | |
| 421 | disable_service n-net |
| 422 | enable_service q-svc q-agt q-dhcp q-l3 |
| 423 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 424 | The following optional variables can be used to alter the default IPv6 |
| 425 | behavior: |
John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 426 | |
| 427 | :: |
| 428 | |
| 429 | IPV6_RA_MODE=slaac |
| 430 | IPV6_ADDRESS_MODE=slaac |
| 431 | FIXED_RANGE_V6=fd$IPV6_GLOBAL_ID::/64 |
| 432 | IPV6_PRIVATE_NETWORK_GATEWAY=fd$IPV6_GLOBAL_ID::1 |
| 433 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 434 | *Note*: ``FIXED_RANGE_V6`` and ``IPV6_PRIVATE_NETWORK_GATEWAY`` can be |
| 435 | configured with any valid IPv6 prefix. The default values make use of |
| 436 | an auto-generated ``IPV6_GLOBAL_ID`` to comply with RFC4193. |
Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 437 | |
Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 438 | Service Version |
| 439 | ~~~~~~~~~~~~~~~ |
| 440 | |
| 441 | DevStack can enable service operation over either IPv4 or IPv6 by |
| 442 | setting ``SERVICE_IP_VERSION`` to either ``SERVICE_IP_VERSION=4`` or |
| 443 | ``SERVICE_IP_VERSION=6`` respectively. |
| 444 | |
| 445 | When set to ``4`` devstack services will open listen sockets on |
| 446 | ``0.0.0.0`` and service endpoints will be registered using ``HOST_IP`` |
| 447 | as the address. |
| 448 | |
| 449 | When set to ``6`` devstack services will open listen sockets on ``::`` |
| 450 | and service endpoints will be registered using ``HOST_IPV6`` as the |
| 451 | address. |
| 452 | |
| 453 | The default value for this setting is ``4``. Dual-mode support, for |
| 454 | example ``4+6`` is not currently supported. ``HOST_IPV6`` can |
| 455 | optionally be used to alter the default IPv6 address |
Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 456 | |
| 457 | :: |
| 458 | |
| 459 | HOST_IPV6=${some_local_ipv6_address} |
John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 460 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame^] | 461 | Multi-node setup |
| 462 | ~~~~~~~~~~~~~~~~ |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 463 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame^] | 464 | See the :doc:`multi-node lab guide<guides/multinode-lab>` |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 465 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame^] | 466 | Projects |
| 467 | -------- |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 468 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame^] | 469 | Neutron |
| 470 | ~~~~~~~ |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 471 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame^] | 472 | See the :doc:`neutron configuration guide<guides/neutron>` for |
| 473 | details on configuration of Neutron |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 474 | |
Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 475 | |
Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame^] | 476 | Swift |
| 477 | ~~~~~ |
| 478 | |
| 479 | Swift is disabled by default. When enabled, it is configured with |
| 480 | only one replica to avoid being IO/memory intensive on a small |
| 481 | VM. When running with only one replica the account, container and |
| 482 | object services will run directly in screen. The others services like |
| 483 | replicator, updaters or auditor runs in background. |
| 484 | |
| 485 | If you would like to enable Swift you can add this to your `localrc` |
| 486 | section: |
| 487 | |
| 488 | :: |
| 489 | |
| 490 | enable_service s-proxy s-object s-container s-account |
| 491 | |
| 492 | If you want a minimal Swift install with only Swift and Keystone you |
| 493 | can have this instead in your `localrc` section: |
| 494 | |
| 495 | :: |
| 496 | |
| 497 | disable_all_services |
| 498 | enable_service key mysql s-proxy s-object s-container s-account |
| 499 | |
| 500 | If you only want to do some testing of a real normal swift cluster |
| 501 | with multiple replicas you can do so by customizing the variable |
| 502 | `SWIFT_REPLICAS` in your `localrc` section (usually to 3). |
| 503 | |
| 504 | Swift S3 |
| 505 | ++++++++ |
| 506 | |
| 507 | If you are enabling `swift3` in `ENABLED_SERVICES` DevStack will |
| 508 | install the swift3 middleware emulation. Swift will be configured to |
| 509 | act as a S3 endpoint for Keystone so effectively replacing the |
| 510 | `nova-objectstore`. |
| 511 | |
| 512 | Only Swift proxy server is launched in the screen session all other |
| 513 | services are started in background and managed by `swift-init` tool. |
| 514 | |
| 515 | Heat |
| 516 | ~~~~ |
| 517 | |
| 518 | Heat is disabled by default (see `stackrc` file). To enable it |
| 519 | explicitly you'll need the following settings in your `localrc` |
| 520 | section |
| 521 | |
| 522 | :: |
| 523 | |
| 524 | enable_service heat h-api h-api-cfn h-api-cw h-eng |
| 525 | |
| 526 | Heat can also run in standalone mode, and be configured to orchestrate |
| 527 | on an external OpenStack cloud. To launch only Heat in standalone mode |
| 528 | you'll need the following settings in your `localrc` section |
| 529 | |
| 530 | :: |
| 531 | |
| 532 | disable_all_services |
| 533 | enable_service rabbit mysql heat h-api h-api-cfn h-api-cw h-eng |
| 534 | HEAT_STANDALONE=True |
| 535 | KEYSTONE_SERVICE_HOST=... |
| 536 | KEYSTONE_AUTH_HOST=... |
| 537 | |
| 538 | Tempest |
| 539 | ~~~~~~~ |
| 540 | |
| 541 | If tempest has been successfully configured, a basic set of smoke |
| 542 | tests can be run as follows: |
| 543 | |
| 544 | :: |
| 545 | |
| 546 | $ cd /opt/stack/tempest |
| 547 | $ tox -efull tempest.scenario.test_network_basic_ops |
| 548 | |
| 549 | By default tempest is downloaded and the config file is generated, but the |
| 550 | tempest package is not installed in the system's global site-packages (the |
| 551 | package install includes installing dependences). So tempest won't run |
| 552 | outside of tox. If you would like to install it add the following to your |
| 553 | ``localrc`` section: |
| 554 | |
| 555 | :: |
| 556 | |
| 557 | INSTALL_TEMPEST=True |
| 558 | |
| 559 | |
| 560 | Xenserver |
| 561 | ~~~~~~~~~ |
| 562 | |
| 563 | If you would like to use Xenserver as the hypervisor, please refer to |
| 564 | the instructions in `./tools/xen/README.md`. |
| 565 | |
| 566 | Cells |
| 567 | ~~~~~ |
| 568 | |
| 569 | `Cells <http://wiki.openstack.org/blueprint-nova-compute-cells>`__ is |
| 570 | an alternative scaling option. To setup a cells environment add the |
| 571 | following to your `localrc` section: |
| 572 | |
| 573 | :: |
| 574 | |
| 575 | enable_service n-cell |
| 576 | |
| 577 | Be aware that there are some features currently missing in cells, one |
| 578 | notable one being security groups. The exercises have been patched to |
| 579 | disable functionality not supported by cells. |
| 580 | |
| 581 | Cinder |
| 582 | ~~~~~~ |
| 583 | |
| 584 | The logical volume group used to hold the Cinder-managed volumes is |
| 585 | set by ``VOLUME_GROUP``, the logical volume name prefix is set with |
| 586 | ``VOLUME_NAME_PREFIX`` and the size of the volume backing file is set |
| 587 | with ``VOLUME_BACKING_FILE_SIZE``. |
| 588 | |
| 589 | :: |
| 590 | |
| 591 | VOLUME_GROUP="stack-volumes" |
| 592 | VOLUME_NAME_PREFIX="volume-" |
| 593 | VOLUME_BACKING_FILE_SIZE=10250M |
| 594 | |
| 595 | |
| 596 | Keystone |
| 597 | ~~~~~~~~ |
| 598 | |
| 599 | Multi-Region Setup |
| 600 | ++++++++++++++++++ |
| 601 | |
| 602 | We want to setup two devstack (RegionOne and RegionTwo) with shared |
| 603 | keystone (same users and services) and horizon. Keystone and Horizon |
| 604 | will be located in RegionOne. Full spec is available at: |
| 605 | `<https://wiki.openstack.org/wiki/Heat/Blueprints/Multi_Region_Support_for_Heat>`__. |
| 606 | |
| 607 | In RegionOne: |
| 608 | |
| 609 | :: |
| 610 | |
| 611 | REGION_NAME=RegionOne |
| 612 | |
| 613 | In RegionTwo: |
| 614 | |
| 615 | :: |
| 616 | |
| 617 | disable_service horizon |
| 618 | KEYSTONE_SERVICE_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE> |
| 619 | KEYSTONE_AUTH_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE> |
| 620 | REGION_NAME=RegionTwo |