Matthew Treinish | a970d65 | 2015-03-11 15:39:24 -0400 | [diff] [blame] | 1 | .. _tempest-configuration: |
| 2 | |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 3 | Tempest Configuration Guide |
| 4 | =========================== |
| 5 | |
Matthew Treinish | f640f66 | 2015-03-11 15:13:30 -0400 | [diff] [blame] | 6 | This guide is a starting point for configuring tempest. It aims to elaborate |
| 7 | on and explain some of the mandatory and common configuration settings and how |
| 8 | they are used in conjunction. The source of truth on each option is the sample |
Matthew Treinish | f45ba2e | 2015-08-24 15:05:01 -0400 | [diff] [blame] | 9 | config file which explains the purpose of each individual option. You can see |
| 10 | the sample config file here: :ref:`tempest-sampleconf` |
Matthew Treinish | f640f66 | 2015-03-11 15:13:30 -0400 | [diff] [blame] | 11 | |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 12 | Auth/Credentials |
| 13 | ---------------- |
| 14 | |
| 15 | Tempest currently has 2 different ways in configuration to provide credentials |
| 16 | to use when running tempest. One is a traditional set of configuration options |
Felix Li | cf58610 | 2016-01-04 12:07:50 -0500 | [diff] [blame] | 17 | in the tempest.conf file. These options are in the auth and identity sections |
| 18 | and let you specify a global admin user, a regular user and an alternate user |
| 19 | set of credentials. (which consist of a username, password, and project/tenant |
| 20 | name) These options should be clearly labelled in the sample config file in the |
| 21 | auth and identity sections. |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 22 | |
| 23 | The other method to provide credentials is using the accounts.yaml file. This |
| 24 | file is used to specify an arbitrary number of users available to run tests |
| 25 | with. You can specify the location of the file in the |
| 26 | auth section in the tempest.conf file. To see the specific format used in |
| 27 | the file please refer to the accounts.yaml.sample file included in tempest. |
| 28 | Currently users that are specified in the accounts.yaml file are assumed to |
| 29 | have the same set of roles which can be used for executing all the tests you |
| 30 | are running. This will be addressed in the future, but is a current limitation. |
| 31 | Eventually the config options for providing credentials to tempest will be |
| 32 | deprecated and removed in favor of the accounts.yaml file. |
| 33 | |
Matthew Treinish | 7909e12 | 2015-04-15 15:43:50 -0400 | [diff] [blame] | 34 | Keystone Connection Info |
| 35 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 36 | In order for tempest to be able to talk to your OpenStack deployment you need |
| 37 | to provide it with information about how it communicates with keystone. |
| 38 | This involves configuring the following options in the identity section: |
| 39 | |
| 40 | #. auth_version |
| 41 | #. uri |
| 42 | #. uri_v3 |
| 43 | |
| 44 | The *auth_version* option is used to tell tempest whether it should be using |
| 45 | keystone's v2 or v3 api for communicating with keystone. (except for the |
| 46 | identity api tests which will test a specific version) The 2 uri options are |
| 47 | used to tell tempest the url of the keystone endpoint. The *uri* option is used |
| 48 | for keystone v2 request and *uri_v3* is used for keystone v3. You want to ensure |
| 49 | that which ever version you set for *auth_version* has its uri option defined. |
| 50 | |
| 51 | |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 52 | Credential Provider Mechanisms |
| 53 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 54 | |
| 55 | Tempest currently also has 3 different internal methods for providing |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 56 | authentication to tests. Dynamic credentials, locking test accounts, and |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 57 | non-locking test accounts. Depending on which one is in use the configuration |
| 58 | of tempest is slightly different. |
| 59 | |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 60 | Dynamic Credentials |
| 61 | """"""""""""""""""" |
| 62 | Dynamic Credentials (formerly known as Tenant isolation) was originally created |
| 63 | to enable running tempest in parallel. |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 64 | For each test class it creates a unique set of user credentials to use for the |
| 65 | tests in the class. It can create up to 3 sets of username, password, and |
| 66 | tenant/project names for a primary user, an admin user, and an alternate user. |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 67 | To enable and use dynamic credentials you only need to configure 2 things: |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 68 | |
| 69 | #. A set of admin credentials with permissions to create users and |
Matthew Treinish | 16cf1e5 | 2015-08-11 10:39:23 -0400 | [diff] [blame] | 70 | tenants/projects. This is specified in the auth section with the |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 71 | admin_username, admin_tenant_name, admin_domain_name and admin_password |
Matthew Treinish | 16cf1e5 | 2015-08-11 10:39:23 -0400 | [diff] [blame] | 72 | options |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 73 | #. To enable dynamic_creds in the auth section with the |
| 74 | use_dynamic_credentials option. |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 75 | |
Matthew Treinish | 0fd69e4 | 2015-03-06 00:40:51 -0500 | [diff] [blame] | 76 | This is also the currently the default credential provider enabled by tempest, |
| 77 | due to it's common use and ease of configuration. |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 78 | |
Matthew Treinish | 4fae472 | 2015-04-16 21:03:54 -0400 | [diff] [blame] | 79 | It is worth pointing out that depending on your cloud configuration you might |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 80 | need to assign a role to each of the users created by Tempest's dynamic |
| 81 | credentials. |
Matthew Treinish | 4fae472 | 2015-04-16 21:03:54 -0400 | [diff] [blame] | 82 | This can be set using the *tempest_roles* option. It takes in a list of role |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 83 | names each of which will be assigned to each of the users created by dynamic |
| 84 | credentials. This option will not have any effect when set and tempest is not |
| 85 | configured to use dynamic credentials. |
Matthew Treinish | 4fae472 | 2015-04-16 21:03:54 -0400 | [diff] [blame] | 86 | |
| 87 | |
Matthew Treinish | 9329985 | 2015-04-24 09:58:18 -0400 | [diff] [blame] | 88 | Locking Test Accounts (aka accounts.yaml or accounts file) |
| 89 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 90 | For a long time using dynamic credentials was the only method available if you |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 91 | wanted to enable parallel execution of tempest tests. However this was |
| 92 | insufficient for certain use cases because of the admin credentials requirement |
| 93 | to create the credential sets on demand. To get around that the accounts.yaml |
| 94 | file was introduced and with that a new internal credential provider to enable |
| 95 | using the list of credentials instead of creating them on demand. With locking |
| 96 | test accounts each test class will reserve a set of credentials from the |
| 97 | accounts.yaml before executing any of its tests so that each class is isolated |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 98 | like with dynamic credentials. |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 99 | |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 100 | To enable and use locking test accounts you need do a few things: |
| 101 | |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 102 | #. Create a accounts.yaml file which contains the set of pre-existing |
| 103 | credentials to use for testing. To make sure you don't have a credentials |
| 104 | starvation issue when running in parallel make sure you have at least 2 |
Matthew Treinish | fc7cd8f | 2015-03-30 11:51:55 -0400 | [diff] [blame] | 105 | times the number of worker processes you are using to execute tempest |
| 106 | available in the file. (if running serially the worker count is 1) |
Matthew Treinish | 0fd69e4 | 2015-03-06 00:40:51 -0500 | [diff] [blame] | 107 | |
| 108 | You can check the sample file packaged in tempest for the yaml format |
liuchenhong | aa4aa69 | 2015-06-10 12:18:42 +0800 | [diff] [blame] | 109 | #. Provide tempest with the location of your accounts.yaml file with the |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 110 | test_accounts_file option in the auth section |
| 111 | |
Matthew Treinish | 84c6d29 | 2015-12-16 17:50:57 -0500 | [diff] [blame] | 112 | *NOTE: Be sure to use a full path for the file otherwise Tempest will |
| 113 | likely not find it.* |
| 114 | |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 115 | #. Set use_dynamic_credentials = False in the auth group |
Fei Long Wang | 7fee787 | 2015-05-12 11:36:49 +1200 | [diff] [blame] | 116 | |
Matthew Treinish | 9329985 | 2015-04-24 09:58:18 -0400 | [diff] [blame] | 117 | It is worth pointing out that each set of credentials in the accounts.yaml |
| 118 | should have a unique tenant. This is required to provide proper isolation |
| 119 | to the tests using the credentials, and failure to do this will likely cause |
| 120 | unexpected failures in some tests. |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 121 | |
Matthew Treinish | 9329985 | 2015-04-24 09:58:18 -0400 | [diff] [blame] | 122 | |
Andrea Frittoli (andreaf) | 290b3e1 | 2015-10-08 10:25:02 +0100 | [diff] [blame] | 123 | Legacy test accounts (aka credentials config options) |
| 124 | """"""""""""""""""""""""""""""""""""""""""""""""""""" |
Matthew Treinish | 16cf1e5 | 2015-08-11 10:39:23 -0400 | [diff] [blame] | 125 | **Starting in the Liberty release this mechanism was deprecated and will be |
| 126 | removed in a future release** |
| 127 | |
Matthew Treinish | 5709213 | 2015-04-21 14:21:35 -0400 | [diff] [blame] | 128 | When Tempest was refactored to allow for locking test accounts, the original |
| 129 | non-tenant isolated case was converted to internally work similarly to the |
Andrea Frittoli (andreaf) | 290b3e1 | 2015-10-08 10:25:02 +0100 | [diff] [blame] | 130 | accounts.yaml file. This mechanism was then called the legacy test accounts |
| 131 | provider. To use the legacy test accounts provider you can specify the sets of |
Felix Li | cf58610 | 2016-01-04 12:07:50 -0500 | [diff] [blame] | 132 | credentials in the configuration file like detailed above with following 6 |
Matthew Treinish | 5709213 | 2015-04-21 14:21:35 -0400 | [diff] [blame] | 133 | options in the identity section: |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 134 | |
| 135 | #. username |
| 136 | #. password |
| 137 | #. tenant_name |
Matthew Treinish | bc1b15b | 2015-02-20 15:56:07 -0500 | [diff] [blame] | 138 | #. alt_username |
| 139 | #. alt_password |
| 140 | #. alt_tenant_name |
| 141 | |
Atsushi SAKAI | 0a183b8 | 2015-07-28 21:52:17 +0900 | [diff] [blame] | 142 | And in the auth section: |
Felix Li | cf58610 | 2016-01-04 12:07:50 -0500 | [diff] [blame] | 143 | |
| 144 | #. admin_username |
| 145 | #. admin_password |
| 146 | #. admin_tenant_name |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 147 | #. use_dynamic_credentials = False |
Fei Long Wang | 7fee787 | 2015-05-12 11:36:49 +1200 | [diff] [blame] | 148 | #. comment out 'test_accounts_file' or keep it as empty |
| 149 | |
Matthew Treinish | 5709213 | 2015-04-21 14:21:35 -0400 | [diff] [blame] | 150 | It only makes sense to use it if parallel execution isn't needed, since tempest |
| 151 | won't be able to properly isolate tests using this. Additionally, using the |
| 152 | traditional config options for credentials is not able to provide credentials to |
| 153 | tests which requires specific roles on accounts. This is because the config |
| 154 | options do not give sufficient flexibility to describe the roles assigned to a |
| 155 | user for running the tests. There are additional limitations with regard to |
| 156 | network configuration when using this credential provider mechanism, see the |
| 157 | `Networking`_ section below. |
Matthew Treinish | 2b7f048 | 2015-04-10 12:49:01 -0400 | [diff] [blame] | 158 | |
Matthew Treinish | 7909e12 | 2015-04-15 15:43:50 -0400 | [diff] [blame] | 159 | Compute |
| 160 | ------- |
| 161 | |
| 162 | Flavors |
| 163 | ^^^^^^^ |
| 164 | For tempest to be able to create servers you need to specify flavors that it |
| 165 | can use to boot the servers with. There are 2 options in the tempest config |
| 166 | for doing this: |
| 167 | |
| 168 | #. flavor_ref |
| 169 | #. flavor_ref_alt |
| 170 | |
| 171 | Both of these options are in the compute section of the config file and take |
| 172 | in the flavor id (not the name) from nova. The *flavor_ref* option is what will |
| 173 | be used for booting almost all of the guests, *flavor_ref_alt* is only used in |
| 174 | tests where 2 different sized servers are required. (for example a resize test) |
| 175 | |
| 176 | Using a smaller flavor is generally recommended, when larger flavors are used |
| 177 | the extra time required to bring up servers will likely affect total run time |
| 178 | and probably require tweaking timeout values to ensure tests have ample time to |
| 179 | finish. |
| 180 | |
| 181 | Images |
| 182 | ^^^^^^ |
| 183 | Just like with flavors, tempest needs to know which images to use for booting |
| 184 | servers. There are 2 options in the compute section just like with flavors: |
| 185 | |
| 186 | #. image_ref |
| 187 | #. image_ref_alt |
| 188 | |
| 189 | Both options are expecting an image id (not name) from nova. The *image_ref* |
Brandon Palm | 304bfdd | 2015-08-18 10:57:21 -0500 | [diff] [blame] | 190 | option is what will be used for booting the majority of servers in tempest. |
Matthew Treinish | 7909e12 | 2015-04-15 15:43:50 -0400 | [diff] [blame] | 191 | *image_ref_alt* is used for tests that require 2 images such as rebuild. If 2 |
| 192 | images are not available you can set both options to the same image_ref and |
| 193 | those tests will be skipped. |
| 194 | |
| 195 | There are also options in the scenario section for images: |
| 196 | |
| 197 | #. img_file |
| 198 | #. img_dir |
| 199 | #. aki_img_file |
| 200 | #. ari_img_file |
| 201 | #. ami_img_file |
| 202 | #. img_container_format |
| 203 | #. img_disk_format |
| 204 | |
| 205 | however unlike the other image options these are used for a very small subset |
| 206 | of scenario tests which are uploading an image. These options are used to tell |
| 207 | tempest where an image file is located and describe it's metadata for when it's |
| 208 | uploaded. |
| 209 | |
| 210 | The behavior of these options is a bit convoluted (which will likely be fixed |
| 211 | in future versions). You first need to specify *img_dir*, which is the directory |
| 212 | tempest will look for the image files in. First it will check if the filename |
| 213 | set for *img_file* could be found in *img_dir*. If it is found then the |
| 214 | *img_container_format* and *img_disk_format* options are used to upload that |
| 215 | image to glance. However if it's not found tempest will look for the 3 uec image |
| 216 | file name options as a fallback. If neither is found the tests requiring an |
| 217 | image to upload will fail. |
| 218 | |
| 219 | It is worth pointing out that using `cirros`_ is a very good choice for running |
| 220 | tempest. It's what is used for upstream testing, they boot quickly and have a |
| 221 | small footprint. |
| 222 | |
| 223 | .. _cirros: https://launchpad.net/cirros |
| 224 | |
Matthew Treinish | 2b7f048 | 2015-04-10 12:49:01 -0400 | [diff] [blame] | 225 | Networking |
| 226 | ---------- |
| 227 | OpenStack has a myriad of different networking configurations possible and |
| 228 | depending on which of the 2 network backends, nova-network or neutron, you are |
| 229 | using things can vary drastically. Due to this complexity Tempest has to provide |
| 230 | a certain level of flexibility in it's configuration to ensure it will work |
| 231 | against any cloud. This ends up causing a large number of permutations in |
| 232 | Tempest's config around network configuration. |
| 233 | |
| 234 | |
| 235 | Enabling Remote Access to Created Servers |
| 236 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 237 | When Tempest creates servers for testing, some tests require being able to |
| 238 | connect those servers. Depending on the configuration of the cloud, the methods |
| 239 | for doing this can be different. In certain configurations it is required to |
| 240 | specify a single network with server create calls. Accordingly, Tempest provides |
| 241 | a few different methods for providing this information in configuration to try |
| 242 | and ensure that regardless of the clouds configuration it'll still be able to |
| 243 | run. This section covers the different methods of configuring Tempest to provide |
| 244 | a network when creating servers. |
| 245 | |
| 246 | Fixed Network Name |
| 247 | """""""""""""""""" |
| 248 | This is the simplest method of specifying how networks should be used. You can |
| 249 | just specify a single network name/label to use for all server creations. The |
| 250 | limitation with this is that all tenants/projects and users must be able to see |
| 251 | that network name/label if they were to perform a network list and be able to |
| 252 | use it. |
| 253 | |
| 254 | If no network name is assigned in the config file and none of the below |
| 255 | alternatives are used, then Tempest will not specify a network on server |
| 256 | creations, which depending on the cloud configuration might prevent them from |
| 257 | booting. |
| 258 | |
| 259 | To set a fixed network name simply do: |
| 260 | |
| 261 | #. Set the fixed_network_name option in the compute group |
| 262 | |
| 263 | In the case that the configured fixed network name can not be found by a user |
| 264 | network list call, it will be treated like one was not provided except that a |
| 265 | warning will be logged stating that it couldn't be found. |
| 266 | |
| 267 | |
| 268 | Accounts File |
| 269 | """"""""""""" |
| 270 | If you are using an accounts file to provide credentials for running Tempest |
| 271 | then you can leverage it to also specify which network should be used with |
| 272 | server creations on a per tenant/project and user pair basis. This provides |
| 273 | the necessary flexibility to work with more intricate networking configurations |
| 274 | by enabling the user to specify exactly which network to use for which |
| 275 | tenants/projects. You can refer to the accounts.yaml sample file included in |
| 276 | the tempest repo for the syntax around specifying networks in the file. |
| 277 | |
| 278 | However, specifying a network is not required when using an accounts file. If |
| 279 | one is not specified you can use a fixed network name to specify the network to |
| 280 | use when creating servers just as without an accounts file. However, any network |
| 281 | specified in the accounts file will take precedence over the fixed network name |
| 282 | provided. If no network is provided in the accounts file and a fixed network |
| 283 | name is not set then no network will be included in create server requests. |
| 284 | |
| 285 | If a fixed network is provided and the accounts.yaml file also contains networks |
| 286 | this has the benefit of enabling a couple more tests which require a static |
| 287 | network to perform operations like server lists with a network filter. If a |
| 288 | fixed network name is not provided these tests are skipped. Additionally, if a |
| 289 | fixed network name is provided it will serve as a fallback in case of a |
| 290 | misconfiguration or a missing network in the accounts file. |
| 291 | |
| 292 | |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 293 | With Dynamic Credentials |
| 294 | """""""""""""""""""""""" |
| 295 | With dynamic credentials enabled and using nova-network then nothing changes. |
| 296 | Your only option for configuration is to either set a fixed network name or not. |
Matthew Treinish | 2b7f048 | 2015-04-10 12:49:01 -0400 | [diff] [blame] | 297 | However, in most cases it shouldn't matter because nova-network should have no |
| 298 | problem booting a server with multiple networks. If this is not the case for |
| 299 | your cloud then using an accounts file is recommended because it provides the |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 300 | necessary flexibility to describe your configuration. Dynamic credentials is not |
Matthew Treinish | 2b7f048 | 2015-04-10 12:49:01 -0400 | [diff] [blame] | 301 | able to dynamically allocate things as necessary if neutron is not enabled. |
| 302 | |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 303 | With neutron and dynamic credentials enabled there should not be any additional |
Matthew Treinish | 2b7f048 | 2015-04-10 12:49:01 -0400 | [diff] [blame] | 304 | configuration necessary to enable Tempest to create servers with working |
| 305 | networking, assuming you have properly configured the network section to work |
| 306 | for your cloud. Tempest will dynamically create the neutron resources necessary |
| 307 | to enable using servers with that network. Also, just as with the accounts |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 308 | file, if you specify a fixed network name while using neutron and dynamic |
| 309 | credentials it will enable running tests which require a static network and it |
Matthew Treinish | 2b7f048 | 2015-04-10 12:49:01 -0400 | [diff] [blame] | 310 | will additionally be used as a fallback for server creation. However, unlike |
| 311 | accounts.yaml this should never be triggered. |
Matthew Treinish | 3220cad | 2015-04-15 16:25:48 -0400 | [diff] [blame] | 312 | |
Andrea Frittoli (andreaf) | 17209bb | 2015-05-22 10:16:57 -0700 | [diff] [blame] | 313 | However, there is an option *create_isolated_networks* to disable dynamic |
| 314 | credentials's automatic provisioning of network resources. If this option is |
Matthew Treinish | 2219d38 | 2015-04-24 10:33:04 -0400 | [diff] [blame] | 315 | used you will have to either rely on there only being a single/default network |
| 316 | available for the server creation, or use *fixed_network_name* to inform |
| 317 | Tempest which network to use. |
| 318 | |
Matthew Treinish | f96ab3a | 2015-04-15 19:11:31 -0400 | [diff] [blame] | 319 | Configuring Available Services |
| 320 | ------------------------------ |
| 321 | OpenStack is really a constellation of several different projects which |
| 322 | are running together to create a cloud. However which projects you're running |
| 323 | is not set in stone, and which services are running is up to the deployer. |
| 324 | Tempest however needs to know which services are available so it can figure |
| 325 | out which tests it is able to run and certain setup steps which differ based |
| 326 | on the available services. |
| 327 | |
| 328 | The *service_available* section of the config file is used to set which |
| 329 | services are available. It contains a boolean option for each service (except |
| 330 | for keystone which is a hard requirement) set it to True if the service is |
| 331 | available or False if it is not. |
| 332 | |
| 333 | Service Catalog |
| 334 | ^^^^^^^^^^^^^^^ |
| 335 | Each project which has its own REST API contains an entry in the service |
| 336 | catalog. Like most things in OpenStack this is also completely configurable. |
| 337 | However, for tempest to be able to figure out the endpoints to send REST API |
| 338 | calls for each service to it needs to know how that project is defined in the |
| 339 | service catalog. There are 3 options for each service section to accomplish |
| 340 | this: |
| 341 | |
| 342 | #. catalog_type |
| 343 | #. endpoint_type |
| 344 | #. region |
| 345 | |
| 346 | Setting *catalog_type* and *endpoint_type* should normally give Tempest enough |
| 347 | information to determine which endpoint it should pull from the service |
| 348 | catalog to use for talking to that particular service. However, if you're cloud |
| 349 | has multiple regions available and you need to specify a particular one to use |
| 350 | a service you can set the *region* option in that service's section. |
| 351 | |
| 352 | It should also be noted that the default values for these options are set |
| 353 | to what devstack uses. (which is a de facto standard for service catalog |
| 354 | entries) So often nothing actually needs to be set on these options to enable |
| 355 | communication to a particular service. It is only if you are either not using |
| 356 | the same *catalog_type* as devstack or you want Tempest to talk to a different |
| 357 | endpoint type instead of publicURL for a service that these need to be changed. |
| 358 | |
ghanshyam | 571dfac | 2015-10-30 11:21:28 +0900 | [diff] [blame] | 359 | .. note:: |
| 360 | |
| 361 | Tempest does not serve all kind of fancy URLs in the service catalog. |
| 362 | Service catalog should be in a standard format (which is going to be |
| 363 | standardized at keystone level). |
| 364 | Tempest expects URLs in the Service catalog in below format: |
| 365 | * http://example.com:1234/<version-info> |
| 366 | Examples: |
| 367 | * Good - http://example.com:1234/v2.0 |
| 368 | * Wouldn’t work - http://example.com:1234/xyz/v2.0/ |
| 369 | (adding prefix/suffix around version etc) |
Matthew Treinish | f96ab3a | 2015-04-15 19:11:31 -0400 | [diff] [blame] | 370 | |
Matthew Treinish | 3220cad | 2015-04-15 16:25:48 -0400 | [diff] [blame] | 371 | Service feature configuration |
| 372 | ----------------------------- |
| 373 | |
| 374 | OpenStack provides its deployers a myriad of different configuration options |
| 375 | to enable anyone deploying it to create a cloud tailor-made for any individual |
| 376 | use case. It provides options for several different backend type, databases, |
| 377 | message queues, etc. However, the downside to this configurability is that |
| 378 | certain operations and features aren't supported depending on the configuration. |
| 379 | These features may or may not be discoverable from the API so the burden is |
| 380 | often on the user to figure out what the cloud they're talking to supports. |
| 381 | Besides the obvious interoperability issues with this it also leaves Tempest |
| 382 | in an interesting situation trying to figure out which tests are expected to |
| 383 | work. However, Tempest tests do not rely on dynamic api discovery for a feature |
| 384 | (assuming one exists). Instead Tempest has to be explicitly configured as to |
| 385 | which optional features are enabled. This is in order to prevent bugs in the |
| 386 | discovery mechanisms from masking failures. |
| 387 | |
| 388 | The service feature-enabled config sections are how Tempest addresses the |
| 389 | optional feature question. Each service that has tests for optional features |
| 390 | contains one of these sections. The only options in it are boolean options |
| 391 | with the name of a feature which is used. If it is set to false any test which |
| 392 | depends on that functionality will be skipped. For a complete list of all these |
| 393 | options refer to the sample config file. |
| 394 | |
| 395 | |
| 396 | API Extensions |
| 397 | ^^^^^^^^^^^^^^ |
| 398 | The service feature-enabled sections often contain an *api-extensions* option |
| 399 | (or in the case of swift a *discoverable_apis* option) this is used to tell |
| 400 | tempest which api extensions (or configurable middleware) is used in your |
| 401 | deployment. It has 2 valid config states, either it contains a single value |
| 402 | "all" (which is the default) which means that every api extension is assumed |
| 403 | to be enabled, or it is set to a list of each individual extension that is |
| 404 | enabled for that service. |