Split routed-networks environment

This allows the path-specific registry entries to be static and
doesn't impose any requirements on where the environment containing
parameters lives. The documentation is also updated, which required
a newer version of sphinx to allow automatic references to headings.
This commit is contained in:
Ben Nemec 2018-10-31 20:35:44 +00:00
parent c445db26dd
commit e4edf35b64
7 changed files with 52 additions and 40 deletions

View File

@ -87,7 +87,7 @@ def _generate_environment(input_env, parent_env=None):
param_names = []
sample_values = env.get('sample_values', {})
static_names = env.get('static', [])
for template_file, template_data in env['files'].items():
for template_file, template_data in env.get('files', {}).items():
with open(template_file) as f:
f_data = yaml.safe_load(f)
f_params = f_data['parameters']

View File

@ -28,6 +28,7 @@ sys.path.insert(0, os.path.abspath('../../openstack_virtual_baremetal'))
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.autosectionlabel',
]
@ -95,6 +96,7 @@ pygments_style = 'sphinx'
# -- Options for HTML output ---------------------------------------------------
html_theme = 'sphinx_rtd_theme'
html_static_path = []
# html_style = 'custom.css'
templates_path = []

View File

@ -1,5 +1,3 @@
.. _env-index:
Sample Environment Index
========================
@ -138,7 +136,15 @@ Disable the Undercloud in a QuintupleO Stack
instance.
.. _env-routed-networks-role:
Configuration for Routed Networks
---------------------------------
**File:** environments/routed-networks-configuration.yaml
**Description:** Contains the available parameters that need to be configured when using
a routed networks environment. Requires the routed-networks.yaml
environment.
Base Role Configuration for Routed Networks
-------------------------------------------
@ -149,8 +155,6 @@ Base Role Configuration for Routed Networks
deploying with routed networks.
.. _env-enable-routed-networks:
Enable Routed Networks
----------------------
@ -159,7 +163,9 @@ Enable Routed Networks
**Description:** Enable use of routed networks, where there may be multiple separate
networks connected with a router and DHCP relay. Do not pass any other
network configuration environments after this one or they may override
the changes made by this environment.
the changes made by this environment. When this environment is in use,
the routed-networks-configuration environment should usually be
included as well.
Assign the Undercloud an Existing Floating IP

View File

@ -168,18 +168,20 @@ OVB as well.
#. When deploying QuintupleO with routed networks environment files to enable
routed networks must be included, as well as one or more role environment
files. See :ref:`env-enable-routed-networks` and
:ref:`env-routed-networks-role` in the :ref:`env-index` for details.
files. See :ref:`Enable Routed Networks`,
:ref:`Configuration for Routed Networks`, and
:ref:`Base Role Configuration for Routed Networks` in the
:doc:`environment-index` for details.
#. Copy the example env file and edit it to reflect the host environment::
cp environments/base.yaml env.yaml
vi env.yaml
#. Copy the ``routed-networks.yaml`` sample environment file and edit it to
reflect the host environment::
#. Copy the ``routed-networks-configuration.yaml`` sample environment file and
edit it to reflect the host environment::
cp environments/routed-networks.yaml env-routed-networks.yaml
cp environments/routed-networks-configuration.yaml env-routed-networks.yaml
vi env-routed-networks.yaml
#. For each desired role, copy the ``routed-networks-role.yaml`` sample
@ -194,11 +196,12 @@ OVB as well.
./bin/deploy.py --env env.yaml \
--quintupleo \
--env environments/all-networks-port-security.yaml \
--env environments/routed-networks.yaml \
--env env-routed-networks.yaml \
--role env-leaf1.yaml
#. When generateing the ``nodes.json`` file for TripleO undercloud node import
the environment ``env-routed.yaml`` should be specified. Also to include
#. When generating the ``nodes.json`` file for TripleO undercloud node import,
the environment ``env-routed.yaml`` should be specified. Also, to include
physical network attributes of the node ports in ``nodes.json`` specify the
``--physical_network`` option when running ``build-nodes-json``. For
example::
@ -206,7 +209,7 @@ OVB as well.
bin/build-nodes-json --physical_network
The following is an example node definition produced when using the
``--physical-network`` options. (Notice that ports are defined with both
``--physical_network`` options. Notice that ports are defined with both
``address`` and ``physical_network`` attributes.
::

View File

@ -9,18 +9,10 @@
# Enable use of routed networks, where there may be multiple separate
# networks connected with a router and DHCP relay. Do not pass any other
# network configuration environments after this one or they may override
# the changes made by this environment.
parameter_defaults:
# The Nova flavor to use for the dhcrelay instance
# Type: string
dhcp_relay_flavor: m1.small
# The base image for the dhcrelay instance. A CentOS 7 image is currently
# the only one supported.
# Type: string
dhcp_relay_image: CentOS-7-x86_64-GenericCloud
# the changes made by this environment. When this environment is in use,
# the routed-networks-configuration environment should usually be
# included as well.
resource_registry:
OS::OVB::BaremetalNetworks: templates/baremetal-networks-routed.yaml
OS::OVB::DHCPRelay: templates/dhcp-relay.yaml
OS::OVB::UndercloudNetworks: templates/undercloud-networks-routed.yaml
OS::OVB::BaremetalNetworks: ../templates/baremetal-networks-routed.yaml
OS::OVB::DHCPRelay: ../templates/dhcp-relay.yaml
OS::OVB::UndercloudNetworks: ../templates/undercloud-networks-routed.yaml

View File

@ -222,6 +222,18 @@ environments:
- bmc_use_cache
sample_values:
bmc_use_cache: True
-
name: routed-networks-configuration
title: Configuration for Routed Networks
description: |
Contains the available parameters that need to be configured when using
a routed networks environment. Requires the routed-networks.yaml
environment.
files:
templates/dhcp-relay.yaml:
parameters:
- dhcp_relay_flavor
- dhcp_relay_image
-
name: routed-networks
title: Enable Routed Networks
@ -229,16 +241,13 @@ environments:
Enable use of routed networks, where there may be multiple separate
networks connected with a router and DHCP relay. Do not pass any other
network configuration environments after this one or they may override
the changes made by this environment.
files:
templates/dhcp-relay.yaml:
parameters:
- dhcp_relay_flavor
- dhcp_relay_image
the changes made by this environment. When this environment is in use,
the routed-networks-configuration environment should usually be
included as well.
resource_registry:
OS::OVB::UndercloudNetworks: templates/undercloud-networks-routed.yaml
OS::OVB::BaremetalNetworks: templates/baremetal-networks-routed.yaml
OS::OVB::DHCPRelay: templates/dhcp-relay.yaml
OS::OVB::UndercloudNetworks: ../templates/undercloud-networks-routed.yaml
OS::OVB::BaremetalNetworks: ../templates/baremetal-networks-routed.yaml
OS::OVB::DHCPRelay: ../templates/dhcp-relay.yaml
-
name: routed-networks-role
title: Base Role Configuration for Routed Networks

View File

@ -7,5 +7,5 @@ testtools>=0.9.36,!=1.2.0
mock>=1.0
# docs
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
sphinx_rtd_theme==0.1.7
sphinx>=1.6
sphinx_rtd_theme