| 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 | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 39 | -  **post-config** - runs after the layer 2 services are configured and | 
 | 40 |    before they are started | 
 | 41 | -  **extra** - runs after services are started and before any files in | 
 | 42 |    ``extra.d`` are executed | 
| YAMAMOTO Takashi | 961643e | 2015-07-31 13:45:27 +0900 | [diff] [blame] | 43 | -  **post-extra** - runs after files in ``extra.d`` are executed | 
| Matt Riedemann | 18abffb | 2018-03-14 20:09:14 -0400 | [diff] [blame] | 44 | -  **test-config** - runs after tempest (and plugins) are configured | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 45 |  | 
 | 46 | The file is processed strictly in sequence; meta-sections may be | 
 | 47 | specified more than once but if any settings are duplicated the last to | 
 | 48 | appear in the file will be used. | 
 | 49 |  | 
 | 50 | :: | 
 | 51 |  | 
 | 52 |     [[post-config|$NOVA_CONF]] | 
 | 53 |     [DEFAULT] | 
 | 54 |     use_syslog = True | 
 | 55 |  | 
 | 56 |     [osapi_v3] | 
 | 57 |     enabled = False | 
 | 58 |  | 
 | 59 | A specific meta-section ``local|localrc`` is used to provide a default | 
 | 60 | ``localrc`` file (actually ``.localrc.auto``). This allows all custom | 
 | 61 | settings for DevStack to be contained in a single file. If ``localrc`` | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 62 | exists it will be used instead to preserve backward-compatibility. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 63 |  | 
 | 64 | :: | 
 | 65 |  | 
 | 66 |     [[local|localrc]] | 
| Kevin Benton | 4bfbc29 | 2016-11-15 17:26:05 -0800 | [diff] [blame] | 67 |     IPV4_ADDRS_SAFE_TO_USE=10.254.1.0/24 | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 68 |     ADMIN_PASSWORD=speciale | 
 | 69 |     LOGFILE=$DEST/logs/stack.sh.log | 
 | 70 |  | 
 | 71 | Note that ``Q_PLUGIN_CONF_FILE`` is unique in that it is assumed to | 
 | 72 | *NOT* start with a ``/`` (slash) character. A slash will need to be | 
 | 73 | added: | 
 | 74 |  | 
 | 75 | :: | 
 | 76 |  | 
 | 77 |     [[post-config|/$Q_PLUGIN_CONF_FILE]] | 
 | 78 |  | 
 | 79 | 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] | 80 | fragment and MUST conform to the shell requirements, specifically no | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 81 | whitespace around ``=`` (equals). | 
 | 82 |  | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 83 | openrc | 
 | 84 | ====== | 
 | 85 |  | 
 | 86 | ``openrc`` configures login credentials suitable for use with the | 
 | 87 | OpenStack command-line tools. ``openrc`` sources ``stackrc`` at the | 
 | 88 | beginning (which in turn sources the ``localrc`` section of | 
 | 89 | ``local.conf``) in order to pick up ``HOST_IP`` and/or ``SERVICE_HOST`` | 
 | 90 | to use in the endpoints. The values shown below are the default values. | 
 | 91 |  | 
 | 92 | OS\_PROJECT\_NAME (OS\_TENANT\_NAME) | 
 | 93 |     Keystone has | 
 | 94 |     standardized the term *project* as the entity that owns resources. In | 
 | 95 |     some places references still exist to the previous term | 
 | 96 |     *tenant* for this use. Also, *project\_name* is preferred to | 
 | 97 |     *project\_id*.  OS\_TENANT\_NAME remains supported for compatibility | 
 | 98 |     with older tools. | 
 | 99 |  | 
 | 100 |     :: | 
 | 101 |  | 
 | 102 |         OS_PROJECT_NAME=demo | 
 | 103 |  | 
 | 104 | OS\_USERNAME | 
 | 105 |     In addition to the owning entity (project), OpenStack calls the entity | 
 | 106 |     performing the action *user*. | 
 | 107 |  | 
 | 108 |     :: | 
 | 109 |  | 
 | 110 |         OS_USERNAME=demo | 
 | 111 |  | 
 | 112 | OS\_PASSWORD | 
 | 113 |     Keystone's default authentication requires a password be provided. | 
 | 114 |     The usual cautions about putting passwords in environment variables | 
 | 115 |     apply, for most DevStack uses this may be an acceptable tradeoff. | 
 | 116 |  | 
 | 117 |     :: | 
 | 118 |  | 
 | 119 |         OS_PASSWORD=secret | 
 | 120 |  | 
 | 121 | HOST\_IP, SERVICE\_HOST | 
 | 122 |     Set API endpoint host using ``HOST_IP``. ``SERVICE_HOST`` may also | 
 | 123 |     be used to specify the endpoint, which is convenient for some | 
 | 124 |     ``local.conf`` configurations. Typically, ``HOST_IP`` is set in the | 
 | 125 |     ``localrc`` section. | 
 | 126 |  | 
 | 127 |     :: | 
 | 128 |  | 
 | 129 |         HOST_IP=127.0.0.1 | 
 | 130 |         SERVICE_HOST=$HOST_IP | 
 | 131 |  | 
 | 132 | OS\_AUTH\_URL | 
 | 133 |     Authenticating against an OpenStack cloud using Keystone returns a | 
 | 134 |     *Token* and *Service Catalog*. The catalog contains the endpoints | 
 | 135 |     for all services the user/tenant has access to - including Nova, | 
 | 136 |     Glance, Keystone and Swift. | 
 | 137 |  | 
 | 138 |     :: | 
 | 139 |  | 
| Le Hou | c09eaf8 | 2017-08-28 17:25:38 +0800 | [diff] [blame] | 140 |         OS_AUTH_URL=http://$SERVICE_HOST:5000/v3.0 | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 141 |  | 
 | 142 | KEYSTONECLIENT\_DEBUG, NOVACLIENT\_DEBUG | 
 | 143 |     Set command-line client log level to ``DEBUG``. These are commented | 
 | 144 |     out by default. | 
 | 145 |  | 
 | 146 |     :: | 
 | 147 |  | 
 | 148 |         # export KEYSTONECLIENT_DEBUG=1 | 
 | 149 |         # export NOVACLIENT_DEBUG=1 | 
 | 150 |  | 
 | 151 |  | 
 | 152 |  | 
| James Polley | 5f2eb6d | 2015-03-30 17:36:26 +1100 | [diff] [blame] | 153 | .. _minimal-configuration: | 
 | 154 |  | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 155 | Minimal Configuration | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 156 | ===================== | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 157 |  | 
 | 158 | While ``stack.sh`` is happy to run without a ``localrc`` section in | 
 | 159 | ``local.conf``, devlife is better when there are a few minimal variables | 
 | 160 | set. This is an example of a minimal configuration that touches the | 
 | 161 | values that most often need to be set. | 
 | 162 |  | 
 | 163 | -  no logging | 
 | 164 | -  pre-set the passwords to prevent interactive prompts | 
| Kevin Benton | 4bfbc29 | 2016-11-15 17:26:05 -0800 | [diff] [blame] | 165 | -  move network ranges away from the local network (``IPV4_ADDRS_SAFE_TO_USE`` | 
 | 166 |    and ``FLOATING_RANGE``, commented out below) | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 167 | -  set the host IP if detection is unreliable (``HOST_IP``, commented | 
 | 168 |    out below) | 
 | 169 |  | 
 | 170 | :: | 
 | 171 |  | 
 | 172 |     [[local|localrc]] | 
| Balagopal | 7ed812c | 2016-03-01 04:43:31 +0000 | [diff] [blame] | 173 |     ADMIN_PASSWORD=secret | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 174 |     DATABASE_PASSWORD=$ADMIN_PASSWORD | 
 | 175 |     RABBIT_PASSWORD=$ADMIN_PASSWORD | 
 | 176 |     SERVICE_PASSWORD=$ADMIN_PASSWORD | 
| Kevin Benton | 4bfbc29 | 2016-11-15 17:26:05 -0800 | [diff] [blame] | 177 |     #IPV4_ADDRS_SAFE_TO_USE=172.31.1.0/24 | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 178 |     #FLOATING_RANGE=192.168.20.0/25 | 
 | 179 |     #HOST_IP=10.3.4.5 | 
 | 180 |  | 
 | 181 | If the ``*_PASSWORD`` variables are not set here you will be prompted to | 
 | 182 | enter values for them by ``stack.sh``. | 
 | 183 |  | 
 | 184 | The network ranges must not overlap with any networks in use on the | 
 | 185 | host. Overlap is not uncommon as RFC-1918 'private' ranges are commonly | 
 | 186 | used for both the local networking and Nova's fixed and floating ranges. | 
 | 187 |  | 
 | 188 | ``HOST_IP`` is normally detected on the first run of ``stack.sh`` but | 
 | 189 | 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] | 190 | 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] | 191 | available for ``openrc`` to set ``OS_AUTH_URL``. ``HOST_IP`` is not set | 
 | 192 | by default. | 
 | 193 |  | 
| Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 194 | ``HOST_IPV6`` is normally detected on the first run of ``stack.sh`` but | 
 | 195 | will not be set if there is no IPv6 address on the default Ethernet interface. | 
 | 196 | Setting it here also makes it available for ``openrc`` to set ``OS_AUTH_URL``. | 
 | 197 | ``HOST_IPV6`` is not set by default. | 
 | 198 |  | 
| Markus Zoeller | 14728c7 | 2017-05-29 15:39:21 +0200 | [diff] [blame] | 199 | For architecture specific configurations which differ from the x86 default | 
 | 200 | here, see `arch-configuration`_. | 
 | 201 |  | 
| Ian Wienand | a35391e | 2015-08-10 13:53:40 +1000 | [diff] [blame] | 202 | Historical Notes | 
 | 203 | ================ | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 204 |  | 
| Ian Wienand | a35391e | 2015-08-10 13:53:40 +1000 | [diff] [blame] | 205 | Historically DevStack obtained all local configuration and | 
 | 206 | customizations from a ``localrc`` file.  In Oct 2013 the | 
 | 207 | ``local.conf`` configuration method was introduced (in `review 46768 | 
| Matt Riedemann | 9b6d2f2 | 2019-06-18 10:43:16 -0400 | [diff] [blame] | 208 | <https://review.opendev.org/#/c/46768/>`__) to simplify this | 
| Ian Wienand | a35391e | 2015-08-10 13:53:40 +1000 | [diff] [blame] | 209 | process. | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 210 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 211 | Configuration Notes | 
 | 212 | =================== | 
 | 213 |  | 
 | 214 | .. contents:: | 
 | 215 |    :local: | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 216 |  | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 217 | Service Repos | 
 | 218 | ------------- | 
 | 219 |  | 
 | 220 | The Git repositories used to check out the source for each service are | 
 | 221 | controlled by a pair of variables set for each service.  ``*_REPO`` | 
 | 222 | points to the repository and ``*_BRANCH`` selects which branch to | 
 | 223 | check out. These may be overridden in ``local.conf`` to pull source | 
 | 224 | from a different repo for testing, such as a Gerrit branch | 
 | 225 | proposal. ``GIT_BASE`` points to the primary repository server. | 
 | 226 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 227 | :: | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 228 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 229 |     NOVA_REPO=$GIT_BASE/openstack/nova.git | 
 | 230 |     NOVA_BRANCH=master | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 231 |  | 
 | 232 | To pull a branch directly from Gerrit, get the repo and branch from | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 233 | the Gerrit review page:: | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 234 |  | 
| Matt Riedemann | 9b6d2f2 | 2019-06-18 10:43:16 -0400 | [diff] [blame] | 235 |     git fetch https://review.opendev.org/openstack/nova \ | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 236 |         refs/changes/50/5050/1 && git checkout FETCH_HEAD | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 237 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 238 | The repo is the stanza following ``fetch`` and the branch is the | 
 | 239 | stanza following that:: | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 240 |  | 
| Matt Riedemann | 9b6d2f2 | 2019-06-18 10:43:16 -0400 | [diff] [blame] | 241 |     NOVA_REPO=https://review.opendev.org/openstack/nova | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 242 |     NOVA_BRANCH=refs/changes/50/5050/1 | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 243 |  | 
 | 244 |  | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 245 | Installation Directory | 
 | 246 | ---------------------- | 
 | 247 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 248 | The DevStack install directory is set by the ``DEST`` variable.  By | 
 | 249 | default it is ``/opt/stack``. | 
 | 250 |  | 
 | 251 | By setting it early in the ``localrc`` section you can reference it in | 
 | 252 | later variables.  It can be useful to set it even though it is not | 
 | 253 | changed from the default value. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 254 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 255 | :: | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 256 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 257 |     DEST=/opt/stack | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 258 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 259 | Logging | 
 | 260 | ------- | 
 | 261 |  | 
| Andreas Jaeger | 8dd89e5 | 2019-08-11 16:00:12 +0200 | [diff] [blame] | 262 | .. _enable_logging: | 
 | 263 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 264 | Enable Logging | 
 | 265 | ~~~~~~~~~~~~~~ | 
 | 266 |  | 
 | 267 | By default ``stack.sh`` output is only written to the console where it | 
 | 268 | runs. It can be sent to a file in addition to the console by setting | 
 | 269 | ``LOGFILE`` to the fully-qualified name of the destination log file. A | 
 | 270 | timestamp will be appended to the given filename for each run of | 
 | 271 | ``stack.sh``. | 
 | 272 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 273 | :: | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 274 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 275 |     LOGFILE=$DEST/logs/stack.sh.log | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 276 |  | 
 | 277 | Old log files are cleaned automatically if ``LOGDAYS`` is set to the | 
 | 278 | number of days of old log files to keep. | 
 | 279 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 280 | :: | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 281 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 282 |     LOGDAYS=1 | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 283 |  | 
| Sean Dague | 8b8441f | 2017-05-02 06:14:11 -0400 | [diff] [blame] | 284 | Some coloring is used during the DevStack runs to make it easier to | 
 | 285 | see what is going on. This can be disabled with:: | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 286 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 287 |     LOG_COLOR=False | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 288 |  | 
| Ian Wienand | 83ecb97 | 2018-02-06 10:03:34 +1100 | [diff] [blame] | 289 | When using the logfile, by default logs are sent to the console and | 
 | 290 | the file.  You can set ``VERBOSE`` to ``false`` if you only wish the | 
 | 291 | logs to be sent to the file (this may avoid having double-logging in | 
 | 292 | some cases where you are capturing the script output and the log | 
 | 293 | files).  If ``VERBOSE`` is ``true`` you can additionally set | 
 | 294 | ``VERBOSE_NO_TIMESTAMP`` to avoid timestamps being added to each | 
 | 295 | output line sent to the console.  This can be useful in some | 
 | 296 | situations where the console output is being captured by a runner or | 
 | 297 | framework (e.g. Ansible) that adds its own timestamps.  Note that the | 
 | 298 | log lines sent to the ``LOGFILE`` will still be prefixed with a | 
 | 299 | timestamp. | 
 | 300 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 301 | Logging the Service Output | 
 | 302 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
 | 303 |  | 
| Sean Dague | 8b8441f | 2017-05-02 06:14:11 -0400 | [diff] [blame] | 304 | By default, services run under ``systemd`` and are natively logging to | 
 | 305 | the systemd journal. | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 306 |  | 
| Sean Dague | 8b8441f | 2017-05-02 06:14:11 -0400 | [diff] [blame] | 307 | To query the logs use the ``journalctl`` command, such as:: | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 308 |  | 
| caowei | 32eccca | 2017-11-01 11:45:21 +0800 | [diff] [blame] | 309 |   sudo journalctl --unit devstack@* | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 310 |  | 
| Sean Dague | 8b8441f | 2017-05-02 06:14:11 -0400 | [diff] [blame] | 311 | More examples can be found in :ref:`journalctl-examples`. | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 312 |  | 
| Ian Wienand | a35391e | 2015-08-10 13:53:40 +1000 | [diff] [blame] | 313 | Example Logging Configuration | 
 | 314 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
 | 315 |  | 
 | 316 | For example, non-interactive installs probably wish to save output to | 
 | 317 | a file, keep service logs and disable color in the stored files. | 
 | 318 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 319 | :: | 
| Ian Wienand | a35391e | 2015-08-10 13:53:40 +1000 | [diff] [blame] | 320 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 321 |    [[local|localrc]] | 
 | 322 |    DEST=/opt/stack/ | 
 | 323 |    LOGFILE=$LOGDIR/stack.sh.log | 
 | 324 |    LOG_COLOR=False | 
| Ian Wienand | a35391e | 2015-08-10 13:53:40 +1000 | [diff] [blame] | 325 |  | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 326 | Database Backend | 
 | 327 | ---------------- | 
 | 328 |  | 
| Matt Riedemann | b14665f | 2019-10-17 19:34:05 +0000 | [diff] [blame] | 329 | Multiple database backends are available. The available databases are defined | 
 | 330 | in the lib/databases directory. | 
 | 331 | ``mysql`` is the default database, choose a different one by putting the | 
 | 332 | following in the ``localrc`` section:: | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 333 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 334 |   disable_service mysql | 
| Matt Riedemann | b14665f | 2019-10-17 19:34:05 +0000 | [diff] [blame] | 335 |   enable_service postgresql | 
 | 336 |  | 
 | 337 | ``mysql`` is the default database. | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 338 |  | 
 | 339 | RPC Backend | 
 | 340 | ----------- | 
 | 341 |  | 
| Matt Riedemann | b14665f | 2019-10-17 19:34:05 +0000 | [diff] [blame] | 342 | Support for a RabbitMQ RPC backend is included. Additional RPC | 
 | 343 | backends may be available via external plugins.  Enabling or disabling | 
 | 344 | RabbitMQ is handled via the usual service functions and | 
 | 345 | ``ENABLED_SERVICES``. | 
 | 346 |  | 
 | 347 | Example disabling RabbitMQ in ``local.conf``:: | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 348 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 349 |   disable_service rabbit | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 350 |  | 
| Matt Riedemann | b14665f | 2019-10-17 19:34:05 +0000 | [diff] [blame] | 351 |  | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 352 | Apache Frontend | 
 | 353 | --------------- | 
 | 354 |  | 
 | 355 | The Apache web server can be enabled for wsgi services that support | 
 | 356 | being deployed under HTTPD + mod_wsgi. By default, services that | 
 | 357 | recommend running under HTTPD + mod_wsgi are deployed under Apache. To | 
 | 358 | use an alternative deployment strategy (e.g. eventlet) for services | 
 | 359 | that support an alternative to HTTPD + mod_wsgi set | 
 | 360 | ``ENABLE_HTTPD_MOD_WSGI_SERVICES`` to ``False`` in your | 
 | 361 | ``local.conf``. | 
 | 362 |  | 
 | 363 | Each service that can be run under HTTPD + mod_wsgi also has an | 
 | 364 | override toggle available that can be set in your ``local.conf``. | 
 | 365 |  | 
 | 366 | Keystone is run under Apache with ``mod_wsgi`` by default. | 
 | 367 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 368 | Example (Keystone):: | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 369 |  | 
 | 370 |     KEYSTONE_USE_MOD_WSGI="True" | 
 | 371 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 372 | Example (Nova):: | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 373 |  | 
 | 374 |     NOVA_USE_MOD_WSGI="True" | 
 | 375 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 376 | Example (Swift):: | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 377 |  | 
 | 378 |     SWIFT_USE_MOD_WSGI="True" | 
 | 379 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 380 | Example (Heat):: | 
| Oleksii Chuprykov | a692810 | 2015-06-11 08:56:58 -0400 | [diff] [blame] | 381 |  | 
 | 382 |     HEAT_USE_MOD_WSGI="True" | 
 | 383 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 384 | Example (Cinder):: | 
| Anton Arefiev | 651cb1a | 2015-09-01 10:55:20 +0300 | [diff] [blame] | 385 |  | 
 | 386 |     CINDER_USE_MOD_WSGI="True" | 
 | 387 |  | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 388 |  | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 389 | Libraries from Git | 
 | 390 | ------------------ | 
 | 391 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 392 | By default devstack installs OpenStack server components from git, | 
 | 393 | however it installs client libraries from released versions on pypi. | 
 | 394 | This is appropriate if you are working on server development, but if | 
 | 395 | you want to see how an unreleased version of the client affects the | 
 | 396 | system you can have devstack install it from upstream, or from local | 
 | 397 | git trees by specifying it in ``LIBS_FROM_GIT``.  Multiple libraries | 
 | 398 | can be specified as a comma separated list. | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 399 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 400 | :: | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 401 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 402 |   LIBS_FROM_GIT=python-keystoneclient,oslo.config | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 403 |  | 
| Marc Koderer | 46f8cb7 | 2016-05-13 09:08:16 +0200 | [diff] [blame] | 404 | Setting the variable to ``ALL`` will activate the download for all | 
 | 405 | libraries. | 
 | 406 |  | 
| Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 407 | Virtual Environments | 
 | 408 | -------------------- | 
 | 409 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 410 | Enable the use of Python virtual environments by setting ``USE_VENV`` | 
 | 411 | to ``True``.  This will enable the creation of venvs for each project | 
 | 412 | that is defined in the ``PROJECT_VENV`` array. | 
| Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 413 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 414 | Each entry in the ``PROJECT_VENV`` array contains the directory name | 
 | 415 | of a venv to be used for the project.  The array index is the project | 
 | 416 | name.  Multiple projects can use the same venv if desired. | 
| Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 417 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 418 | :: | 
| Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 419 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 420 |   PROJECT_VENV["glance"]=${GLANCE_DIR}.venv | 
| Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 421 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 422 | ``ADDITIONAL_VENV_PACKAGES`` is a comma-separated list of additional | 
 | 423 | packages to be installed into each venv.  Often projects will not have | 
 | 424 | certain packages listed in its ``requirements.txt`` file because they | 
 | 425 | are 'optional' requirements, i.e. only needed for certain | 
 | 426 | configurations.  By default, the enabled databases will have their | 
 | 427 | Python bindings added when they are enabled. | 
| Dean Troyer | 5686dbc | 2015-03-09 14:27:51 -0500 | [diff] [blame] | 428 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 429 | :: | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 430 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 431 |   ADDITIONAL_VENV_PACKAGES="python-foo, python-bar" | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 432 |  | 
| Lajos Katona | dae1041 | 2018-09-21 10:51:47 +0200 | [diff] [blame] | 433 | Use python3 | 
 | 434 | ------------ | 
 | 435 |  | 
 | 436 | By default ``stack.sh`` uses python2 (the exact version set by the | 
 | 437 | ``PYTHON2_VERSION``). This can be overriden so devstack will run | 
 | 438 | python3 (the exact version set by ``PYTHON3_VERSION``). | 
 | 439 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 440 | :: | 
| Lajos Katona | dae1041 | 2018-09-21 10:51:47 +0200 | [diff] [blame] | 441 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 442 |   USE_PYTHON3=True | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 443 |  | 
 | 444 | A clean install every time | 
| Sean Dague | 07d7e5b | 2014-11-17 07:10:14 -0500 | [diff] [blame] | 445 | -------------------------- | 
 | 446 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 447 | By default ``stack.sh`` only clones the project repos if they do not | 
 | 448 | exist in ``$DEST``. ``stack.sh`` will freshen each repo on each run if | 
 | 449 | ``RECLONE`` is set to ``yes``. This avoids having to manually remove | 
 | 450 | repos in order to get the current branch from ``$GIT_BASE``. | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 451 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 452 | :: | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 453 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 454 |   RECLONE=yes | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 455 |  | 
| Chris Dent | ebdd9ac | 2015-03-04 12:35:14 +0000 | [diff] [blame] | 456 | Upgrade packages installed by pip | 
 | 457 | --------------------------------- | 
 | 458 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 459 | By default ``stack.sh`` only installs Python packages if no version is | 
 | 460 | currently installed or the current version does not match a specified | 
 | 461 | requirement. If ``PIP_UPGRADE`` is set to ``True`` then existing | 
 | 462 | required Python packages will be upgraded to the most recent version | 
 | 463 | that matches requirements. | 
| Chris Dent | ebdd9ac | 2015-03-04 12:35:14 +0000 | [diff] [blame] | 464 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 465 | :: | 
| Chris Dent | ebdd9ac | 2015-03-04 12:35:14 +0000 | [diff] [blame] | 466 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 467 |   PIP_UPGRADE=True | 
| Chris Dent | ebdd9ac | 2015-03-04 12:35:14 +0000 | [diff] [blame] | 468 |  | 
| John Hua | a4693b5 | 2015-08-06 13:53:35 +0100 | [diff] [blame] | 469 | Guest Images | 
 | 470 | ------------ | 
 | 471 |  | 
 | 472 | Images provided in URLS via the comma-separated ``IMAGE_URLS`` | 
 | 473 | variable will be downloaded and uploaded to glance by DevStack. | 
 | 474 |  | 
 | 475 | Default guest-images are predefined for each type of hypervisor and | 
 | 476 | their testing-requirements in ``stack.sh``.  Setting | 
 | 477 | ``DOWNLOAD_DEFAULT_IMAGES=False`` will prevent DevStack downloading | 
 | 478 | these default images; in that case, you will want to populate | 
 | 479 | ``IMAGE_URLS`` with sufficient images to satisfy testing-requirements. | 
 | 480 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 481 | :: | 
| John Hua | a4693b5 | 2015-08-06 13:53:35 +0100 | [diff] [blame] | 482 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 483 |   DOWNLOAD_DEFAULT_IMAGES=False | 
 | 484 |   IMAGE_URLS="http://foo.bar.com/image.qcow," | 
 | 485 |   IMAGE_URLS+="http://foo.bar.com/image2.qcow" | 
| John Hua | a4693b5 | 2015-08-06 13:53:35 +0100 | [diff] [blame] | 486 |  | 
| Rafael Folco | f0131e1 | 2015-09-23 12:55:02 -0500 | [diff] [blame] | 487 |  | 
 | 488 | Instance Type | 
 | 489 | ------------- | 
 | 490 |  | 
 | 491 | ``DEFAULT_INSTANCE_TYPE`` can be used to configure the default instance | 
 | 492 | type. When this parameter is not specified, Devstack creates additional | 
 | 493 | micro & nano flavors for really small instances to run Tempest tests. | 
 | 494 |  | 
 | 495 | For guests with larger memory requirements, ``DEFAULT_INSTANCE_TYPE`` | 
 | 496 | should be specified in the configuration file so Tempest selects the | 
 | 497 | default flavors instead. | 
 | 498 |  | 
 | 499 | KVM on Power with QEMU 2.4 requires 512 MB to load the firmware - | 
| Andreas Jaeger | 8dd89e5 | 2019-08-11 16:00:12 +0200 | [diff] [blame] | 500 | `QEMU 2.4 - PowerPC <https://wiki.qemu.org/ChangeLog/2.4>`__ so users | 
| Rafael Folco | f0131e1 | 2015-09-23 12:55:02 -0500 | [diff] [blame] | 501 | running instances on ppc64/ppc64le can choose one of the default | 
 | 502 | created flavors as follows: | 
 | 503 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 504 | :: | 
| Rafael Folco | f0131e1 | 2015-09-23 12:55:02 -0500 | [diff] [blame] | 505 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 506 |   DEFAULT_INSTANCE_TYPE=m1.tiny | 
| Rafael Folco | f0131e1 | 2015-09-23 12:55:02 -0500 | [diff] [blame] | 507 |  | 
 | 508 |  | 
| John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 509 | IP Version | 
| Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 510 | ---------- | 
 | 511 |  | 
| Clay Gerrard | 148d0e6 | 2016-09-01 02:38:06 -0700 | [diff] [blame] | 512 | ``IP_VERSION`` can be used to configure Neutron to create either an | 
 | 513 | IPv4, IPv6, or dual-stack self-service project data-network by with | 
| Sean Dague | db48db1 | 2016-04-06 08:09:31 -0400 | [diff] [blame] | 514 | either ``IP_VERSION=4``, ``IP_VERSION=6``, or ``IP_VERSION=4+6`` | 
| Clay Gerrard | 148d0e6 | 2016-09-01 02:38:06 -0700 | [diff] [blame] | 515 | respectively. | 
| John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 516 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 517 | :: | 
| John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 518 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 519 |   IP_VERSION=4+6 | 
| John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 520 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 521 | The following optional variables can be used to alter the default IPv6 | 
 | 522 | behavior: | 
| John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 523 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 524 | :: | 
| John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 525 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 526 |   IPV6_RA_MODE=slaac | 
 | 527 |   IPV6_ADDRESS_MODE=slaac | 
 | 528 |   IPV6_ADDRS_SAFE_TO_USE=fd$IPV6_GLOBAL_ID::/56 | 
 | 529 |   IPV6_PRIVATE_NETWORK_GATEWAY=fd$IPV6_GLOBAL_ID::1 | 
| John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 530 |  | 
| Kevin Benton | 4bfbc29 | 2016-11-15 17:26:05 -0800 | [diff] [blame] | 531 | *Note*: ``IPV6_ADDRS_SAFE_TO_USE`` and ``IPV6_PRIVATE_NETWORK_GATEWAY`` | 
 | 532 | can be configured with any valid IPv6 prefix. The default values make | 
 | 533 | use of an auto-generated ``IPV6_GLOBAL_ID`` to comply with RFC4193. | 
| Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 534 |  | 
| Ian Wienand | 815db16 | 2015-08-06 10:25:45 +1000 | [diff] [blame] | 535 | Service Version | 
 | 536 | ~~~~~~~~~~~~~~~ | 
 | 537 |  | 
 | 538 | DevStack can enable service operation over either IPv4 or IPv6 by | 
 | 539 | setting ``SERVICE_IP_VERSION`` to either ``SERVICE_IP_VERSION=4`` or | 
 | 540 | ``SERVICE_IP_VERSION=6`` respectively. | 
 | 541 |  | 
 | 542 | When set to ``4`` devstack services will open listen sockets on | 
 | 543 | ``0.0.0.0`` and service endpoints will be registered using ``HOST_IP`` | 
 | 544 | as the address. | 
 | 545 |  | 
 | 546 | When set to ``6`` devstack services will open listen sockets on ``::`` | 
 | 547 | and service endpoints will be registered using ``HOST_IPV6`` as the | 
 | 548 | address. | 
 | 549 |  | 
 | 550 | The default value for this setting is ``4``.  Dual-mode support, for | 
 | 551 | example ``4+6`` is not currently supported.  ``HOST_IPV6`` can | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 552 | optionally be used to alter the default IPv6 address:: | 
| Brian Haley | 180f5eb | 2015-06-16 13:14:31 -0400 | [diff] [blame] | 553 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 554 |   HOST_IPV6=${some_local_ipv6_address} | 
| John Davidge | 21529a5 | 2014-06-30 09:55:11 -0400 | [diff] [blame] | 555 |  | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 556 | Multi-node setup | 
 | 557 | ~~~~~~~~~~~~~~~~ | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 558 |  | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 559 | See the :doc:`multi-node lab guide<guides/multinode-lab>` | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 560 |  | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 561 | Projects | 
 | 562 | -------- | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 563 |  | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 564 | Neutron | 
 | 565 | ~~~~~~~ | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 566 |  | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 567 | See the :doc:`neutron configuration guide<guides/neutron>` for | 
 | 568 | details on configuration of Neutron | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 569 |  | 
| Sean M. Collins | 09e550c | 2014-10-21 11:40:08 -0400 | [diff] [blame] | 570 |  | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 571 | Swift | 
 | 572 | ~~~~~ | 
 | 573 |  | 
 | 574 | Swift is disabled by default.  When enabled, it is configured with | 
 | 575 | only one replica to avoid being IO/memory intensive on a small | 
| Sean Dague | 8b8441f | 2017-05-02 06:14:11 -0400 | [diff] [blame] | 576 | VM. | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 577 |  | 
| Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 578 | 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] | 579 | section: | 
 | 580 |  | 
 | 581 | :: | 
 | 582 |  | 
 | 583 |     enable_service s-proxy s-object s-container s-account | 
 | 584 |  | 
 | 585 | 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] | 586 | can have this instead in your ``localrc`` section: | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 587 |  | 
 | 588 | :: | 
 | 589 |  | 
 | 590 |     disable_all_services | 
 | 591 |     enable_service key mysql s-proxy s-object s-container s-account | 
 | 592 |  | 
 | 593 | If you only want to do some testing of a real normal swift cluster | 
 | 594 | with multiple replicas you can do so by customizing the variable | 
| Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 595 | ``SWIFT_REPLICAS`` in your ``localrc`` section (usually to 3). | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 596 |  | 
| Christian Schwede | 91d2245 | 2016-04-12 10:53:46 +0200 | [diff] [blame] | 597 | You can manually override the ring building to use specific storage | 
 | 598 | nodes, for example when you want to test a multinode environment. In | 
 | 599 | this case you have to set a space-separated list of IPs in | 
 | 600 | ``SWIFT_STORAGE_IPS`` in your ``localrc`` section that should be used | 
 | 601 | as Swift storage nodes. | 
 | 602 | Please note that this does not create a multinode setup, it is only | 
 | 603 | used when adding nodes to the Swift rings. | 
 | 604 |  | 
 | 605 | :: | 
 | 606 |  | 
 | 607 |     SWIFT_STORAGE_IPS="192.168.1.10 192.168.1.11 192.168.1.12" | 
 | 608 |  | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 609 | Swift S3 | 
 | 610 | ++++++++ | 
 | 611 |  | 
| Kota Tsuyuzaki | 070e4ee | 2018-09-13 03:08:19 +0900 | [diff] [blame] | 612 | If you are enabling ``s3api`` in ``ENABLED_SERVICES`` DevStack will | 
 | 613 | install the s3api middleware emulation. Swift will be configured to | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 614 | act as a S3 endpoint for Keystone so effectively replacing the | 
| Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 615 | ``nova-objectstore``. | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 616 |  | 
| Sean Dague | 8b8441f | 2017-05-02 06:14:11 -0400 | [diff] [blame] | 617 | Only Swift proxy server is launched in the systemd system all other | 
| Markus Zoeller | c30657d | 2015-11-02 11:27:46 +0100 | [diff] [blame] | 618 | services are started in background and managed by ``swift-init`` tool. | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 619 |  | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 620 | Tempest | 
 | 621 | ~~~~~~~ | 
 | 622 |  | 
 | 623 | If tempest has been successfully configured, a basic set of smoke | 
 | 624 | tests can be run as follows: | 
 | 625 |  | 
 | 626 | :: | 
 | 627 |  | 
 | 628 |     $ cd /opt/stack/tempest | 
 | 629 |     $ tox -efull  tempest.scenario.test_network_basic_ops | 
 | 630 |  | 
 | 631 | By default tempest is downloaded and the config file is generated, but the | 
 | 632 | tempest package is not installed in the system's global site-packages (the | 
 | 633 | package install includes installing dependences). So tempest won't run | 
 | 634 | outside of tox. If you would like to install it add the following to your | 
 | 635 | ``localrc`` section: | 
 | 636 |  | 
 | 637 | :: | 
 | 638 |  | 
 | 639 |     INSTALL_TEMPEST=True | 
 | 640 |  | 
 | 641 |  | 
 | 642 | Xenserver | 
 | 643 | ~~~~~~~~~ | 
 | 644 |  | 
 | 645 | 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] | 646 | the instructions in ``./tools/xen/README.md``. | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 647 |  | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 648 | Cinder | 
 | 649 | ~~~~~~ | 
 | 650 |  | 
 | 651 | The logical volume group used to hold the Cinder-managed volumes is | 
| Jordan Pittier | f5069f3 | 2016-11-08 12:10:12 +0100 | [diff] [blame] | 652 | set by ``VOLUME_GROUP_NAME``, the logical volume name prefix is set with | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 653 | ``VOLUME_NAME_PREFIX`` and the size of the volume backing file is set | 
 | 654 | with ``VOLUME_BACKING_FILE_SIZE``. | 
 | 655 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 656 | :: | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 657 |  | 
| Sean McGinnis | f7302e1 | 2019-06-19 11:49:40 -0500 | [diff] [blame] | 658 |   VOLUME_GROUP_NAME="stack-volumes" | 
 | 659 |   VOLUME_NAME_PREFIX="volume-" | 
 | 660 |   VOLUME_BACKING_FILE_SIZE=24G | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 661 |  | 
 | 662 |  | 
 | 663 | Keystone | 
 | 664 | ~~~~~~~~ | 
 | 665 |  | 
 | 666 | Multi-Region Setup | 
 | 667 | ++++++++++++++++++ | 
 | 668 |  | 
 | 669 | We want to setup two devstack (RegionOne and RegionTwo) with shared | 
 | 670 | keystone (same users and services) and horizon.  Keystone and Horizon | 
 | 671 | will be located in RegionOne.  Full spec is available at: | 
 | 672 | `<https://wiki.openstack.org/wiki/Heat/Blueprints/Multi_Region_Support_for_Heat>`__. | 
 | 673 |  | 
 | 674 | In RegionOne: | 
 | 675 |  | 
 | 676 | :: | 
 | 677 |  | 
 | 678 |     REGION_NAME=RegionOne | 
 | 679 |  | 
 | 680 | In RegionTwo: | 
 | 681 |  | 
 | 682 | :: | 
| henriquetruta | f212622 | 2016-01-05 13:43:18 -0300 | [diff] [blame] | 683 |  | 
| Ian Wienand | 7d5be29 | 2015-08-10 13:39:17 +1000 | [diff] [blame] | 684 |     disable_service horizon | 
 | 685 |     KEYSTONE_SERVICE_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE> | 
 | 686 |     KEYSTONE_AUTH_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE> | 
 | 687 |     REGION_NAME=RegionTwo | 
| zhiyuan_cai | 6f1781f | 2016-04-07 18:36:46 +0800 | [diff] [blame] | 688 |     KEYSTONE_REGION_NAME=RegionOne | 
 | 689 |  | 
 | 690 | In the devstack for RegionOne, we set REGION_NAME as RegionOne, so region of | 
 | 691 | the services started in this devstack are registered as RegionOne. In devstack | 
 | 692 | for RegionTwo, similarly, we set REGION_NAME as RegionTwo since we want | 
 | 693 | services started in this devstack to be registered in RegionTwo. But Keystone | 
 | 694 | service is started and registered in RegionOne, not RegionTwo, so we use | 
 | 695 | KEYSTONE_REGION_NAME to specify the region of Keystone service. | 
 | 696 | KEYSTONE_REGION_NAME has a default value the same as REGION_NAME thus we omit | 
 | 697 | it in the configuration of RegionOne. | 
| henriquetruta | f212622 | 2016-01-05 13:43:18 -0300 | [diff] [blame] | 698 |  | 
 | 699 | Disabling Identity API v2 | 
 | 700 | +++++++++++++++++++++++++ | 
 | 701 |  | 
 | 702 | The Identity API v2 is deprecated as of Mitaka and it is recommended to only | 
 | 703 | use the v3 API. It is possible to setup keystone without v2 API, by doing: | 
 | 704 |  | 
 | 705 | :: | 
 | 706 |  | 
 | 707 |     ENABLE_IDENTITY_V2=False | 
| Ian Wienand | 7cd16ce | 2016-04-08 09:40:56 +1000 | [diff] [blame] | 708 |  | 
| Markus Zoeller | 14728c7 | 2017-05-29 15:39:21 +0200 | [diff] [blame] | 709 | .. _arch-configuration: | 
 | 710 |  | 
 | 711 | Architectures | 
 | 712 | ------------- | 
 | 713 |  | 
 | 714 | The upstream CI runs exclusively on nodes with x86 architectures, but | 
 | 715 | OpenStack supports even more architectures. Some of them need to configure | 
 | 716 | Devstack in a certain way. | 
 | 717 |  | 
 | 718 | KVM on s390x (IBM z Systems) | 
 | 719 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
 | 720 |  | 
 | 721 | KVM on s390x (IBM z Systems) is supported since the *Kilo* release. For | 
 | 722 | an all-in-one setup, these minimal settings in the ``local.conf`` file | 
 | 723 | are needed:: | 
 | 724 |  | 
 | 725 |     [[local|localrc]] | 
 | 726 |     ADMIN_PASSWORD=secret | 
 | 727 |     DATABASE_PASSWORD=$ADMIN_PASSWORD | 
 | 728 |     RABBIT_PASSWORD=$ADMIN_PASSWORD | 
 | 729 |     SERVICE_PASSWORD=$ADMIN_PASSWORD | 
 | 730 |  | 
 | 731 |     DOWNLOAD_DEFAULT_IMAGES=False | 
 | 732 |     IMAGE_URLS="https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-s390x-disk1.img" | 
 | 733 |  | 
| Andreas Scheuring | 941940a | 2017-09-13 00:24:02 +0200 | [diff] [blame] | 734 |     # Provide a custom etcd3 binary download URL and ints sha256. | 
 | 735 |     # The binary must be located under '/<etcd version>/etcd-<etcd-version>-linux-s390x.tar.gz' | 
 | 736 |     # on this URL. | 
 | 737 |     # Build instructions for etcd3: https://github.com/linux-on-ibm-z/docs/wiki/Building-etcd | 
 | 738 |     ETCD_DOWNLOAD_URL=<your-etcd-download-url> | 
 | 739 |     ETCD_SHA256=<your-etcd3-sha256> | 
 | 740 |  | 
| Markus Zoeller | 14728c7 | 2017-05-29 15:39:21 +0200 | [diff] [blame] | 741 |     enable_service n-sproxy | 
 | 742 |     disable_service n-novnc | 
| Markus Zoeller | 14728c7 | 2017-05-29 15:39:21 +0200 | [diff] [blame] | 743 |  | 
 | 744 |     [[post-config|$NOVA_CONF]] | 
 | 745 |  | 
 | 746 |     [serial_console] | 
 | 747 |     base_url=ws://$HOST_IP:6083/  # optional | 
 | 748 |  | 
 | 749 | Reasoning: | 
 | 750 |  | 
 | 751 | * The default image of Devstack is x86 only, so we deactivate the download | 
 | 752 |   with ``DOWNLOAD_DEFAULT_IMAGES``. The referenced guest image | 
 | 753 |   in the code above (``IMAGE_URLS``) serves as an example. The list of | 
 | 754 |   possible s390x guest images is not limited to that. | 
 | 755 |  | 
 | 756 | * This platform doesn't support a graphical console like VNC or SPICE. | 
 | 757 |   The technical reason is the missing framebuffer on the platform. This | 
 | 758 |   means we rely on the substitute feature *serial console* which needs the | 
 | 759 |   proxy service ``n-sproxy``. We also disable VNC's proxy ``n-novnc`` for | 
 | 760 |   that reason . The configuration in the ``post-config`` section is only | 
 | 761 |   needed if you want to use the *serial console* outside of the all-in-one | 
 | 762 |   setup. | 
 | 763 |  | 
| Andreas Scheuring | 941940a | 2017-09-13 00:24:02 +0200 | [diff] [blame] | 764 | * A link to an etcd3 binary and its sha256 needs to be provided as the | 
 | 765 |   binary for s390x is not hosted on github like it is for other | 
 | 766 |   architectures. For more details see | 
 | 767 |   https://bugs.launchpad.net/devstack/+bug/1693192. Etcd3 can easily be | 
 | 768 |   built along https://github.com/linux-on-ibm-z/docs/wiki/Building-etcd. | 
| Markus Zoeller | 14728c7 | 2017-05-29 15:39:21 +0200 | [diff] [blame] | 769 |  | 
 | 770 | .. note:: To run *Tempest* against this *Devstack* all-in-one, you'll need | 
 | 771 |    to use a guest image which is smaller than 1GB when uncompressed. | 
 | 772 |    The example image from above is bigger than that! |