blob: c790c5fc3363fc17297c86f8aa74577c42a76e37 [file] [log] [blame]
Matthew Treinisha970d652015-03-11 15:39:24 -04001.. _tempest-configuration:
2
Matthew Treinishbc1b15b2015-02-20 15:56:07 -05003Tempest Configuration Guide
4===========================
5
Eric Friede0cfc3e2015-12-14 16:10:49 -06006This guide is a starting point for configuring Tempest. It aims to elaborate
Matthew Treinishf640f662015-03-11 15:13:30 -04007on and explain some of the mandatory and common configuration settings and how
8they are used in conjunction. The source of truth on each option is the sample
Matthew Treinishf45ba2e2015-08-24 15:05:01 -04009config file which explains the purpose of each individual option. You can see
10the sample config file here: :ref:`tempest-sampleconf`
Matthew Treinishf640f662015-03-11 15:13:30 -040011
Matthew Treinishe8ab5f92017-03-01 15:25:39 -050012.. _tempest_cred_provider_conf:
13
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -050014Test Credentials
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050015----------------
16
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -050017Tempest allows for configuring a set of admin credentials in the ``auth``
18section, via the following parameters:
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050019
Masayuki Igawab78b9232017-11-17 16:12:37 +090020#. ``admin_username``
21#. ``admin_password``
22#. ``admin_project_name``
23#. ``admin_domain_name``
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -050024
25Admin credentials are not mandatory to run Tempest, but when provided they
26can be used to:
27
28- Run tests for admin APIs
29- Generate test credentials on the fly (see `Dynamic Credentials`_)
30
Jordan Pittier74a56ab2017-04-26 16:46:20 +020031When Keystone uses a policy that requires domain scoped tokens for admin
Andrea Frittoli (andreaf)100d18d2016-05-05 23:34:52 +010032actions, the flag ``admin_domain_scope`` must be set to ``True``.
33The admin user configured, if any, must have a role assigned to the domain to
34be usable.
35
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -050036Tempest allows for configuring pre-provisioned test credentials as well.
Matthew Treinish40847ac2016-01-04 13:16:03 -050037This can be done using the accounts.yaml file (see
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -050038`Pre-Provisioned Credentials`_). This file is used to specify an arbitrary
39number of users available to run tests with.
40You can specify the location of the file in the ``auth`` section in the
Eric Friede0cfc3e2015-12-14 16:10:49 -060041tempest.conf file. To see the specific format used in the file please refer to
Jordan Pittier74a56ab2017-04-26 16:46:20 +020042the ``accounts.yaml.sample`` file included in Tempest.
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -050043
Matthew Treinish7909e122015-04-15 15:43:50 -040044Keystone Connection Info
45^^^^^^^^^^^^^^^^^^^^^^^^
Eric Friede0cfc3e2015-12-14 16:10:49 -060046In order for Tempest to be able to talk to your OpenStack deployment you need
Matthew Treinish7909e122015-04-15 15:43:50 -040047to provide it with information about how it communicates with keystone.
Eric Friede0cfc3e2015-12-14 16:10:49 -060048This involves configuring the following options in the ``identity`` section:
Matthew Treinish7909e122015-04-15 15:43:50 -040049
Masayuki Igawab78b9232017-11-17 16:12:37 +090050- ``auth_version``
51- ``uri``
52- ``uri_v3``
Matthew Treinish7909e122015-04-15 15:43:50 -040053
Eric Friede0cfc3e2015-12-14 16:10:49 -060054The ``auth_version`` option is used to tell Tempest whether it should be using
Jordan Pittier74a56ab2017-04-26 16:46:20 +020055Keystone's v2 or v3 api for communicating with Keystone. The two uri options are
Eric Friede0cfc3e2015-12-14 16:10:49 -060056used to tell Tempest the url of the keystone endpoint. The ``uri`` option is
Jordan Pittier74a56ab2017-04-26 16:46:20 +020057used for Keystone v2 request and ``uri_v3`` is used for Keystone v3. You want to
Eric Friede0cfc3e2015-12-14 16:10:49 -060058ensure that which ever version you set for ``auth_version`` has its uri option
59defined.
Matthew Treinish7909e122015-04-15 15:43:50 -040060
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050061Credential Provider Mechanisms
62^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
63
Castulo J. Martinez34329b52016-07-08 10:56:52 -070064Tempest currently has two different internal methods for providing authentication
65to tests: dynamic credentials and pre-provisioned credentials.
66Depending on which one is in use the configuration of Tempest is slightly different.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050067
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -070068Dynamic Credentials
69"""""""""""""""""""
70Dynamic Credentials (formerly known as Tenant isolation) was originally created
Eric Friede0cfc3e2015-12-14 16:10:49 -060071to enable running Tempest in parallel. For each test class it creates a unique
72set of user credentials to use for the tests in the class. It can create up to
Sean Dagueed6e5862016-04-04 10:49:13 -040073three sets of username, password, and project names for a primary user,
74an admin user, and an alternate user. To enable and use dynamic credentials you
Eric Friede0cfc3e2015-12-14 16:10:49 -060075only need to configure two things:
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050076
Masayuki Igawab78b9232017-11-17 16:12:37 +090077#. A set of admin credentials with permissions to create users and
78 projects. This is specified in the ``auth`` section with the
79 ``admin_username``, ``admin_project_name``, ``admin_domain_name`` and
80 ``admin_password`` options
81#. To enable dynamic credentials in the ``auth`` section with the
82 ``use_dynamic_credentials`` option.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050083
Eric Friede0cfc3e2015-12-14 16:10:49 -060084This is also currently the default credential provider enabled by Tempest, due
85to its common use and ease of configuration.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -050086
Matthew Treinish4fae4722015-04-16 21:03:54 -040087It is worth pointing out that depending on your cloud configuration you might
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -070088need to assign a role to each of the users created by Tempest's dynamic
Eric Friede0cfc3e2015-12-14 16:10:49 -060089credentials. This can be set using the ``tempest_roles`` option. It takes in a
90list of role names each of which will be assigned to each of the users created
91by dynamic credentials. This option will not have any effect when Tempest is not
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -070092configured to use dynamic credentials.
Matthew Treinish4fae4722015-04-16 21:03:54 -040093
Andrea Frittoli (andreaf)100d18d2016-05-05 23:34:52 +010094When the ``admin_domain_scope`` option is set to ``True``, provisioned admin
95accounts will be assigned a role on domain configured in
96``default_credentials_domain_name``. This will make the accounts provisioned
Jordan Pittier74a56ab2017-04-26 16:46:20 +020097usable in a cloud where domain scoped tokens are required by Keystone for
Hironori Shiina91049ad2016-09-28 17:28:49 +090098admin operations. Note that the initial pre-provision admin accounts,
Andrea Frittoli (andreaf)100d18d2016-05-05 23:34:52 +010099configured in tempest.conf, must have a role on the same domain as well, for
100Dynamic Credentials to work.
101
Matthew Treinish4fae4722015-04-16 21:03:54 -0400102
Andrea Frittoli (andreaf)dd250702016-04-29 15:01:22 -0500103Pre-Provisioned Credentials
104"""""""""""""""""""""""""""
105
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -0700106For a long time using dynamic credentials was the only method available if you
Eric Friede0cfc3e2015-12-14 16:10:49 -0600107wanted to enable parallel execution of Tempest tests. However, this was
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500108insufficient for certain use cases because of the admin credentials requirement
109to create the credential sets on demand. To get around that the accounts.yaml
110file was introduced and with that a new internal credential provider to enable
Matthew Treinish4730b9d2019-08-15 09:33:15 -0400111using the list of credentials instead of creating them on demand. With
112pre-provisioned credentials (also known as locking test accounts) each test
113class will reserve a set of credentials from the accounts.yaml before executing
114any of its tests so that each class is isolated like with dynamic credentials.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500115
Matthew Treinish4730b9d2019-08-15 09:33:15 -0400116To enable and use pre-provisioned credentials you need do a few things:
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500117
Masayuki Igawab78b9232017-11-17 16:12:37 +0900118#. Create an accounts.yaml file which contains the set of pre-existing
119 credentials to use for testing. To make sure you don't have a credentials
120 starvation issue when running in parallel make sure you have at least two
121 times the number of worker processes you are using to execute Tempest
122 available in the file. (If running serially the worker count is 1.)
Matthew Treinish0fd69e42015-03-06 00:40:51 -0500123
Masayuki Igawab78b9232017-11-17 16:12:37 +0900124 You can check the accounts.yaml.sample file packaged in Tempest for the yaml
125 format.
126#. Provide Tempest with the location of your accounts.yaml file with the
127 ``test_accounts_file`` option in the ``auth`` section
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500128
Masayuki Igawab78b9232017-11-17 16:12:37 +0900129 *NOTE: Be sure to use a full path for the file; otherwise Tempest will
130 likely not find it.*
Matthew Treinish84c6d292015-12-16 17:50:57 -0500131
Masayuki Igawab78b9232017-11-17 16:12:37 +0900132#. Set ``use_dynamic_credentials = False`` in the ``auth`` group
Fei Long Wang7fee7872015-05-12 11:36:49 +1200133
Matthew Treinish93299852015-04-24 09:58:18 -0400134It is worth pointing out that each set of credentials in the accounts.yaml
Sean Dagueed6e5862016-04-04 10:49:13 -0400135should have a unique project. This is required to provide proper isolation
Matthew Treinish93299852015-04-24 09:58:18 -0400136to the tests using the credentials, and failure to do this will likely cause
Matthew Treinish45915b02016-08-31 10:25:55 -0400137unexpected failures in some tests. Also, ensure that these projects and users
138used do not have any pre-existing resources created. Tempest assumes all
139tenants it's using are empty and may sporadically fail if there are unexpected
140resources present.
Matthew Treinishbc1b15b2015-02-20 15:56:07 -0500141
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200142When the Keystone in the target cloud requires domain scoped tokens to
Andrea Frittoli (andreaf)100d18d2016-05-05 23:34:52 +0100143perform admin actions, all pre-provisioned admin users must have a role
144assigned on the domain where test accounts a provisioned.
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200145The option ``admin_domain_scope`` is used to tell Tempest that domain scoped
Andrea Frittoli (andreaf)100d18d2016-05-05 23:34:52 +0100146tokens shall be used. ``default_credentials_domain_name`` is the domain where
147test accounts are expected to be provisioned if no domain is specified.
148
149Note that if credentials are pre-provisioned via ``tempest account-generator``
150the role on the domain will be assigned automatically for you, as long as
151``admin_domain_scope`` as ``default_credentials_domain_name`` are configured
152properly in tempest.conf.
153
Hironori Shiina91049ad2016-09-28 17:28:49 +0900154Pre-Provisioned Credentials are also known as accounts.yaml or accounts file.
Matthew Treinish93299852015-04-24 09:58:18 -0400155
Ghanshyam Mann672eee12021-03-11 14:55:39 -0600156Keystone Scopes & Roles Support in Tempest
157""""""""""""""""""""""""""""""""""""""""""
158For details on scope and roles support in Tempest,
159please refer to :doc:`this document <keystone_scopes_and_roles_support>`
160
Matthew Treinish7909e122015-04-15 15:43:50 -0400161Compute
162-------
163
164Flavors
165^^^^^^^
Eric Friede0cfc3e2015-12-14 16:10:49 -0600166For Tempest to be able to create servers you need to specify flavors that it
167can use to boot the servers with. There are two options in the Tempest config
Matthew Treinish7909e122015-04-15 15:43:50 -0400168for doing this:
169
Masayuki Igawab78b9232017-11-17 16:12:37 +0900170#. ``flavor_ref``
171#. ``flavor_ref_alt``
Matthew Treinish7909e122015-04-15 15:43:50 -0400172
Eric Friede0cfc3e2015-12-14 16:10:49 -0600173Both of these options are in the ``compute`` section of the config file and take
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200174in the flavor id (not the name) from Nova. The ``flavor_ref`` option is what
Eric Friede0cfc3e2015-12-14 16:10:49 -0600175will be used for booting almost all of the guests; ``flavor_ref_alt`` is only
176used in tests where two different-sized servers are required (for example, a
177resize test).
Matthew Treinish7909e122015-04-15 15:43:50 -0400178
Eric Friede0cfc3e2015-12-14 16:10:49 -0600179Using a smaller flavor is generally recommended. When larger flavors are used,
deepak_mouryae495cd22018-07-16 12:38:17 +0530180the extra time required to bring up servers will likely affect the total run time
Matthew Treinish7909e122015-04-15 15:43:50 -0400181and probably require tweaking timeout values to ensure tests have ample time to
182finish.
183
184Images
185^^^^^^
Eric Friede0cfc3e2015-12-14 16:10:49 -0600186Just like with flavors, Tempest needs to know which images to use for booting
187servers. There are two options in the compute section just like with flavors:
Matthew Treinish7909e122015-04-15 15:43:50 -0400188
Masayuki Igawab78b9232017-11-17 16:12:37 +0900189#. ``image_ref``
190#. ``image_ref_alt``
Matthew Treinish7909e122015-04-15 15:43:50 -0400191
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200192Both options are expecting an image id (not name) from Nova. The ``image_ref``
Eric Friede0cfc3e2015-12-14 16:10:49 -0600193option is what will be used for booting the majority of servers in Tempest.
194``image_ref_alt`` is used for tests that require two images such as rebuild. If
195two images are not available you can set both options to the same image id and
Matthew Treinish7909e122015-04-15 15:43:50 -0400196those tests will be skipped.
197
Eric Friede0cfc3e2015-12-14 16:10:49 -0600198There are also options in the ``scenario`` section for images:
Matthew Treinish7909e122015-04-15 15:43:50 -0400199
Masayuki Igawab78b9232017-11-17 16:12:37 +0900200#. ``img_file``
Masayuki Igawab78b9232017-11-17 16:12:37 +0900201#. ``img_container_format``
202#. ``img_disk_format``
Matthew Treinish7909e122015-04-15 15:43:50 -0400203
Eric Friede0cfc3e2015-12-14 16:10:49 -0600204However, unlike the other image options, these are used for a very small subset
Matthew Treinish7909e122015-04-15 15:43:50 -0400205of scenario tests which are uploading an image. These options are used to tell
Eric Friede0cfc3e2015-12-14 16:10:49 -0600206Tempest where an image file is located and describe its metadata for when it is
Matthew Treinish7909e122015-04-15 15:43:50 -0400207uploaded.
208
Martin Kopec02af6a42020-03-03 12:39:12 +0000209You first need to specify full path of the image using ``img_file`` option.
210If it is found then the ``img_container_format`` and ``img_disk_format``
211options are used to upload that image to glance. If it's not found, the tests
Eric Friede0cfc3e2015-12-14 16:10:49 -0600212requiring an image to upload will fail.
Matthew Treinish7909e122015-04-15 15:43:50 -0400213
214It is worth pointing out that using `cirros`_ is a very good choice for running
Eric Friede0cfc3e2015-12-14 16:10:49 -0600215Tempest. It's what is used for upstream testing, they boot quickly and have a
Matthew Treinish7909e122015-04-15 15:43:50 -0400216small footprint.
217
218.. _cirros: https://launchpad.net/cirros
219
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400220Networking
221----------
222OpenStack has a myriad of different networking configurations possible and
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200223depending on which of the two network backends, nova-network or Neutron, you are
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400224using things can vary drastically. Due to this complexity Tempest has to provide
Eric Friede0cfc3e2015-12-14 16:10:49 -0600225a certain level of flexibility in its configuration to ensure it will work
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400226against any cloud. This ends up causing a large number of permutations in
227Tempest's config around network configuration.
228
229
230Enabling Remote Access to Created Servers
231^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Matthew Treinishe8ab5f92017-03-01 15:25:39 -0500232
233.. _tempest_conf_network_allocation:
234
Matthew Treinish275f1782016-06-07 12:19:34 -0400235Network Creation/Usage for Servers
236""""""""""""""""""""""""""""""""""
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400237When Tempest creates servers for testing, some tests require being able to
238connect those servers. Depending on the configuration of the cloud, the methods
deepak_mouryae495cd22018-07-16 12:38:17 +0530239for doing this can be different. In certain configurations, it is required to
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400240specify a single network with server create calls. Accordingly, Tempest provides
241a few different methods for providing this information in configuration to try
Eric Friede0cfc3e2015-12-14 16:10:49 -0600242and ensure that regardless of the cloud's configuration it'll still be able to
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400243run. This section covers the different methods of configuring Tempest to provide
244a network when creating servers.
245
246Fixed Network Name
Matthew Treinish275f1782016-06-07 12:19:34 -0400247''''''''''''''''''
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400248This is the simplest method of specifying how networks should be used. You can
249just specify a single network name/label to use for all server creations. The
Sean Dagueed6e5862016-04-04 10:49:13 -0400250limitation with this is that all projects and users must be able to see
Eric Friede0cfc3e2015-12-14 16:10:49 -0600251that network name/label if they are to perform a network list and be able to use
252it.
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400253
254If no network name is assigned in the config file and none of the below
255alternatives are used, then Tempest will not specify a network on server
256creations, which depending on the cloud configuration might prevent them from
257booting.
258
Eric Friede0cfc3e2015-12-14 16:10:49 -0600259To set a fixed network name simply:
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400260
Masayuki Igawab78b9232017-11-17 16:12:37 +0900261#. Set the ``fixed_network_name`` option in the ``compute`` group
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400262
263In the case that the configured fixed network name can not be found by a user
264network list call, it will be treated like one was not provided except that a
265warning will be logged stating that it couldn't be found.
266
267
268Accounts File
Matthew Treinish275f1782016-06-07 12:19:34 -0400269'''''''''''''
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400270If you are using an accounts file to provide credentials for running Tempest
271then you can leverage it to also specify which network should be used with
Sean Dagueed6e5862016-04-04 10:49:13 -0400272server creations on a per project and user pair basis. This provides
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400273the necessary flexibility to work with more intricate networking configurations
274by enabling the user to specify exactly which network to use for which
Sean Dagueed6e5862016-04-04 10:49:13 -0400275projects. You can refer to the accounts.yaml.sample file included in
Eric Friede0cfc3e2015-12-14 16:10:49 -0600276the Tempest repo for the syntax around specifying networks in the file.
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400277
278However, specifying a network is not required when using an accounts file. If
279one is not specified you can use a fixed network name to specify the network to
280use when creating servers just as without an accounts file. However, any network
281specified in the accounts file will take precedence over the fixed network name
282provided. If no network is provided in the accounts file and a fixed network
283name is not set then no network will be included in create server requests.
284
285If a fixed network is provided and the accounts.yaml file also contains networks
286this has the benefit of enabling a couple more tests which require a static
287network to perform operations like server lists with a network filter. If a
288fixed network name is not provided these tests are skipped. Additionally, if a
289fixed network name is provided it will serve as a fallback in case of a
290misconfiguration or a missing network in the accounts file.
291
292
Andrea Frittoli (andreaf)17209bb2015-05-22 10:16:57 -0700293With Dynamic Credentials
Matthew Treinish275f1782016-06-07 12:19:34 -0400294''''''''''''''''''''''''
Eric Friede0cfc3e2015-12-14 16:10:49 -0600295With dynamic credentials enabled and using nova-network, your only option for
lanoux63bb9032016-03-21 03:16:18 -0700296configuration is to either set a fixed network name or not. However, in most
deepak_mouryae495cd22018-07-16 12:38:17 +0530297cases, it shouldn't matter because nova-network should have no problem booting a
Eric Friede0cfc3e2015-12-14 16:10:49 -0600298server with multiple networks. If this is not the case for your cloud then using
299an accounts file is recommended because it provides the necessary flexibility to
deepak_mouryae495cd22018-07-16 12:38:17 +0530300describe your configuration. Dynamic credentials are not able to dynamically
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200301allocate things as necessary if Neutron is not enabled.
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400302
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200303With Neutron and dynamic credentials enabled there should not be any additional
Matthew Treinish2b7f0482015-04-10 12:49:01 -0400304configuration necessary to enable Tempest to create servers with working
Eric Friede0cfc3e2015-12-14 16:10:49 -0600305networking, assuming you have properly configured the ``network`` section to
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200306work for your cloud. Tempest will dynamically create the Neutron resources
Eric Friede0cfc3e2015-12-14 16:10:49 -0600307necessary to enable using servers with that network. Also, just as with the
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200308accounts file, if you specify a fixed network name while using Neutron and
Eric Friede0cfc3e2015-12-14 16:10:49 -0600309dynamic credentials it will enable running tests which require a static network
310and it will additionally be used as a fallback for server creation. However,
311unlike accounts.yaml this should never be triggered.
Matthew Treinish3220cad2015-04-15 16:25:48 -0400312
Eric Friede0cfc3e2015-12-14 16:10:49 -0600313However, there is an option ``create_isolated_networks`` to disable dynamic
314credentials's automatic provisioning of network resources. If this option is set
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200315to ``False`` you will have to either rely on there only being a single/default
Eric Friede0cfc3e2015-12-14 16:10:49 -0600316network available for the server creation, or use ``fixed_network_name`` to
317inform Tempest which network to use.
Matthew Treinish2219d382015-04-24 10:33:04 -0400318
Matthew Treinish275f1782016-06-07 12:19:34 -0400319SSH Connection Configuration
320""""""""""""""""""""""""""""
321There are also several different ways to actually establish a connection and
322authenticate/login on the server. After a server is booted with a provided
323network there are still details needed to know how to actually connect to
324the server. The ``validation`` group gathers all the options regarding
325connecting to and remotely accessing the created servers.
326
327To enable remote access to servers, there are 3 options at a minimum that are used:
328
Masayuki Igawab78b9232017-11-17 16:12:37 +0900329#. ``run_validation``
330#. ``connect_method``
331#. ``auth_method``
Matthew Treinish275f1782016-06-07 12:19:34 -0400332
333The ``run_validation`` is used to enable or disable ssh connectivity for
334all tests (with the exception of scenario tests which do not have a flag for
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200335enabling or disabling ssh) To enable ssh connectivity this needs be set to ``True``.
Matthew Treinish275f1782016-06-07 12:19:34 -0400336
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200337The ``connect_method`` option is used to tell Tempest what kind of IP to use for
Matthew Treinish275f1782016-06-07 12:19:34 -0400338establishing a connection to the server. Two methods are available: ``fixed``
339and ``floating``, the later being set by default. If this is set to floating
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200340Tempest will create a floating ip for the server before attempted to connect
Matthew Treinish275f1782016-06-07 12:19:34 -0400341to it. The IP for the floating ip is what is used for the connection.
342
343For the ``auth_method`` option there is currently, only one valid option,
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200344``keypair``. With this set to ``keypair`` Tempest will create an ssh keypair
Matthew Treinish275f1782016-06-07 12:19:34 -0400345and use that for authenticating against the created server.
346
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400347Configuring Available Services
348------------------------------
349OpenStack is really a constellation of several different projects which
350are running together to create a cloud. However which projects you're running
351is not set in stone, and which services are running is up to the deployer.
deepak_mouryae495cd22018-07-16 12:38:17 +0530352Tempest, however, needs to know which services are available so it can figure
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400353out which tests it is able to run and certain setup steps which differ based
354on the available services.
355
Eric Friede0cfc3e2015-12-14 16:10:49 -0600356The ``service_available`` section of the config file is used to set which
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400357services are available. It contains a boolean option for each service (except
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200358for Keystone which is a hard requirement) set it to ``True`` if the service is
359available or ``False`` if it is not.
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400360
361Service Catalog
362^^^^^^^^^^^^^^^
363Each project which has its own REST API contains an entry in the service
364catalog. Like most things in OpenStack this is also completely configurable.
Eric Friede0cfc3e2015-12-14 16:10:49 -0600365However, for Tempest to be able to figure out which endpoints should get REST
366API calls for each service, it needs to know how that project is defined in the
367service catalog. There are three options for each service section to accomplish
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400368this:
369
Masayuki Igawab78b9232017-11-17 16:12:37 +0900370#. ``catalog_type``
371#. ``endpoint_type``
372#. ``region``
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400373
Eric Friede0cfc3e2015-12-14 16:10:49 -0600374Setting ``catalog_type`` and ``endpoint_type`` should normally give Tempest
375enough information to determine which endpoint it should pull from the service
376catalog to use for talking to that particular service. However, if your cloud
377has multiple regions available and you need to specify a particular one to use a
378service you can set the ``region`` option in that service's section.
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400379
380It should also be noted that the default values for these options are set
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200381to what DevStack uses (which is a de facto standard for service catalog
Eric Friede0cfc3e2015-12-14 16:10:49 -0600382entries). So often nothing actually needs to be set on these options to enable
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400383communication to a particular service. It is only if you are either not using
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200384the same ``catalog_type`` as DevStack or you want Tempest to talk to a different
385endpoint type instead of ``publicURL`` for a service that these need to be
386changed.
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400387
ghanshyam571dfac2015-10-30 11:21:28 +0900388.. note::
389
deepak_mouryae495cd22018-07-16 12:38:17 +0530390 Tempest does not serve all kinds of fancy URLs in the service catalog.
391 The service catalog should be in a standard format (which is going to be
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200392 standardized at the Keystone level).
Eric Friede0cfc3e2015-12-14 16:10:49 -0600393 Tempest expects URLs in the Service catalog in the following format:
Masayuki Igawae63cf0f2016-05-25 10:25:21 +0900394
395 * ``http://example.com:1234/<version-info>``
396
ghanshyam571dfac2015-10-30 11:21:28 +0900397 Examples:
Masayuki Igawae63cf0f2016-05-25 10:25:21 +0900398
399 * Good - ``http://example.com:1234/v2.0``
gaofei6ec582f2018-01-24 14:08:36 +0800400 * Wouldn't work - ``http://example.com:1234/xyz/v2.0/``
Masayuki Igawae63cf0f2016-05-25 10:25:21 +0900401 (adding prefix/suffix around version etc)
Matthew Treinishf96ab3a2015-04-15 19:11:31 -0400402
Eric Friede0cfc3e2015-12-14 16:10:49 -0600403Service Feature Configuration
Matthew Treinish3220cad2015-04-15 16:25:48 -0400404-----------------------------
405
Eric Friede0cfc3e2015-12-14 16:10:49 -0600406OpenStack provides its deployers a myriad of different configuration options to
407enable anyone deploying it to create a cloud tailor-made for any individual use
408case. It provides options for several different backend types, databases,
Matthew Treinish3220cad2015-04-15 16:25:48 -0400409message queues, etc. However, the downside to this configurability is that
410certain operations and features aren't supported depending on the configuration.
411These features may or may not be discoverable from the API so the burden is
Eric Friede0cfc3e2015-12-14 16:10:49 -0600412often on the user to figure out what is supported by the cloud they're talking
deepak_mouryae495cd22018-07-16 12:38:17 +0530413to. Besides the obvious interoperability issues with this, it also leaves
Eric Friede0cfc3e2015-12-14 16:10:49 -0600414Tempest in an interesting situation trying to figure out which tests are
415expected to work. However, Tempest tests do not rely on dynamic API discovery
deepak_mouryae495cd22018-07-16 12:38:17 +0530416for a feature (assuming one exists). Instead, Tempest has to be explicitly
Eric Friede0cfc3e2015-12-14 16:10:49 -0600417configured as to which optional features are enabled. This is in order to
418prevent bugs in the discovery mechanisms from masking failures.
Matthew Treinish3220cad2015-04-15 16:25:48 -0400419
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200420The service ``feature-enabled`` config sections are how Tempest addresses the
Matthew Treinish3220cad2015-04-15 16:25:48 -0400421optional feature question. Each service that has tests for optional features
422contains one of these sections. The only options in it are boolean options
423with the name of a feature which is used. If it is set to false any test which
424depends on that functionality will be skipped. For a complete list of all these
425options refer to the sample config file.
426
427
428API Extensions
429^^^^^^^^^^^^^^
Eric Friede0cfc3e2015-12-14 16:10:49 -0600430The service feature-enabled sections often contain an ``api-extensions`` option
Jordan Pittier74a56ab2017-04-26 16:46:20 +0200431(or in the case of Swift a ``discoverable_apis`` option). This is used to tell
deepak_mouryae495cd22018-07-16 12:38:17 +0530432Tempest which API extensions (or configurable middleware) is used in your
Eric Friede0cfc3e2015-12-14 16:10:49 -0600433deployment. It has two valid config states: either it contains a single value
deepak_mouryae495cd22018-07-16 12:38:17 +0530434``all`` (which is the default) which means that every API extension is assumed
Matthew Treinish3220cad2015-04-15 16:25:48 -0400435to be enabled, or it is set to a list of each individual extension that is
436enabled for that service.