blob: 2dfb803885c4d2f9056051cc4309d5936672c31f [file] [log] [blame]
dfilppi9981f552017-08-07 20:10:53 +00001.. _config:
2
3Openstack Configuration
4=======================
5
6The Openstack plugin requires credentials and endpoint setup information in order to authenticate and interact with Openstack.
7
8This information will be gathered by the plugin from the following sources,
9each source possibly partially or completely overriding values gathered from previous ones:
10
111. environment variables for each of the configuration parameters.
122. JSON file at ``~/openstack_config.json`` or at a path specified by the value of an environment variable named ``OPENSTACK_CONFIG_PATH``
133. values specified in the ``openstack_config`` property for the node whose operation is currently getting executed (in the case of relationship operations, the ``openstack_config`` property of either the **source** or **target** nodes will be used if available, with the **source**'s one taking precedence).
14
15The structure of the JSON file in section (2), as well as of the ``openstack_config`` property in section (3), is as follows:
16
17.. highlight:: json
18
19::
20
21 {
22 "username": "",
23 "password": "",
24 "tenant_name": "",
25 "auth_url": "",
26 "region": "",
27 "nova_url": "",
28 "neutron_url": "",
29 "custom_configuration": ""
30 }
31
32* ``username`` username for authentication with Openstack Keystone service.
33* ``password`` password for authentication with Openstack Keystone service.
34* ``tenant_name`` name of the tenant to be used.
35* ``auth_url`` URL of the Openstack Keystone service.
36
37 .. attention:: New in 2.0
38
39 ``auth_url`` must include the full keystone auth URL, including the version number.
40
41* ``region`` Openstack region to be used. This may be optional when there's but a single region.
42* ``nova_url`` (**DEPRECATED** - instead, use ``custom_configuration`` to pass ``endpoint_override`` directly to the Nova client) explicit URL for the Openstack Nova service. This may be used to override the URL for the Nova service that is listed in the Keystone service.
43* ``neutron_url`` (**DEPRECATED** - instead, use ``custom_configuration`` to pass ``endpoint_url`` directly to the Neutron client) explicit URL for the Openstack Neutron service. This may be used to override the URL for the Neutron service that is listed in the Keystone service.
44* ``custom_configuration`` a dictionary which allows overriding or directly passing custom configuration parameter to each of the Openstack clients, by using any of the relevant keys: ``keystone_client``, ``nova_client``, ``neutron_client`` or ``cinder_client``.
45 * Parameters passed directly to Openstack clients using the ``custom_configuration`` mechanism will override other definitions (e.g. any of the common Openstack configuration parameters listed above, such as ``username`` and ``tenant_name``)
46 * The following is an example for the usage of the ``custom_configuration`` section in a blueprint:
47
48.. highlight:: yaml
49
50::
51
52 custom_configuration:
53 nova_client:
54 endpoint_override: nova-endpoint-url
55 nova_specific_key_1: value_1
56 nova_specific_key_2: value_2
57 neutron_client:
58 endpoint_url: neutron-endpoint-url
59 keystone_client:
60 ..
61 cinder_client:
62 ..
63
64
65The environment variables mentioned in (1) are the standard Openstack environment variables equivalent to the ones in the JSON file or ``openstack_config`` property. In their respective order, they are:
66
67* ``OS_USERNAME``
68* ``OS_PASSWORD``
69* ``OS_TENANT_NAME``
70* ``OS_AUTH_URL``
71* ``OS_REGION_NAME``
72* ``NOVACLIENT_BYPASS_URL``
73* ``OS_URL``
74
75**Note**: ``custom_configuration`` doesn't have an equivalent standard Openstack environment variable.
76
77
78 The Openstack manager blueprint stores the Openstack configuration used for the bootstrap process in a JSON file as described in (2) at
79 ``~/openstack-config.json``.
80 Therefore, if they've been used for bootstrap,
81 the Openstack configuration for applications isn't required as the plugin will default to these same settings.
82