From be0b91ef564e618ee719d06915cc1dab4624560b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Mon, 7 Jun 2021 11:53:52 +0200 Subject: [PATCH] Add network-v2 default files + vip data examples Add a default file for network data and vip data to use with network-data-v2. The network data is an empty list, i.e no network isolation is the default. The default vip data file keeps one entry for the ctlplane network, which is the only Virtual IP in the no network isolation scenarios. Related-Blueprint: blueprint network-data-v2-ports Change-Id: Ia50435c0560ed76791d1859612f625a1b776a8b2 --- .../vip-data-default-network-isolation.yaml | 39 ++++++++++++++++++ network-data-samples/vip-data-fixed-ip.yaml | 35 ++++++++++++++++ .../vip-data-routed-networks.yaml | 40 +++++++++++++++++++ network_data_default.yaml | 7 ++++ tools/yaml-validate.py | 3 +- vip_data_default.yaml | 8 ++++ 6 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 network-data-samples/vip-data-default-network-isolation.yaml create mode 100644 network-data-samples/vip-data-fixed-ip.yaml create mode 100644 network-data-samples/vip-data-routed-networks.yaml create mode 100644 network_data_default.yaml create mode 100644 vip_data_default.yaml diff --git a/network-data-samples/vip-data-default-network-isolation.yaml b/network-data-samples/vip-data-default-network-isolation.yaml new file mode 100644 index 0000000000..898690f838 --- /dev/null +++ b/network-data-samples/vip-data-default-network-isolation.yaml @@ -0,0 +1,39 @@ +# Exmaple vip data file for the default network-isolation scenario +# +# The vip data file should be a list of vip definitions, following is the +# configurable options for each vip entry. +# +# name: +# description: +# - Virtual IP name (optional) +# type: str +# network: +# description: +# - Neutron Network name +# type: str +# required: True +# ip_address: +# description: +# - IP address (Optional) +# type: str +# subnet: +# description: +# - Neutron Subnet name (Optional) +# type: str +# dns_name: +# description: +# - Dns Name +# type: str +# required: True +# default: overcloud +# +- network: storage_mgmt + dns_name: overcloud +- network: internal_api + dns_name: overcloud +- network: storage + dns_name: overcloud +- network: external + dns_name: overcloud +- network: ctlplane + dns_name: overcloud diff --git a/network-data-samples/vip-data-fixed-ip.yaml b/network-data-samples/vip-data-fixed-ip.yaml new file mode 100644 index 0000000000..b481811b7d --- /dev/null +++ b/network-data-samples/vip-data-fixed-ip.yaml @@ -0,0 +1,35 @@ +# Example vip data entry specifying a fixed IP address +# +# The vip data file should be a list of vip definitions, following is the +# configurable options for each vip entry. +# +# name: +# description: +# - Virtual IP name (optional) +# type: str +# network: +# description: +# - Neutron Network name +# type: str +# required: True +# ip_address: +# description: +# - IP address (Optional) +# type: str +# subnet: +# description: +# - Neutron Subnet name (Optional) +# type: str +# dns_name: +# description: +# - Dns Name +# type: str +# required: True +# default: overcloud +# +- network: ctlplane + dns_name: overcloud + ip_address: 192.168.24.5 +- network: external + dns_name: overcloud + ip_address: 10.0.0.5 diff --git a/network-data-samples/vip-data-routed-networks.yaml b/network-data-samples/vip-data-routed-networks.yaml new file mode 100644 index 0000000000..ab3936d593 --- /dev/null +++ b/network-data-samples/vip-data-routed-networks.yaml @@ -0,0 +1,40 @@ +# Example vip data file for a routed networks scenario where Virtual IPs need +# to be created on the specific subnet used by controller nodes. +# +# The vip data file should be a list of vip definitions, following is the +# configurable options for each vip entry. +# +# name: +# description: +# - Virtual IP name (optional) +# type: str +# network: +# description: +# - Neutron Network name +# type: str +# required: True +# ip_address: +# description: +# - IP address (Optional) +# type: str +# subnet: +# description: +# - Neutron Subnet name (Optional) +# type: str +# dns_name: +# description: +# - Dns Name +# type: str +# required: True +# default: overcloud + +- network: storage_mgmt + subnet: storage_mgmt_subnet01 +- network: internal_api + subnet: internal_api_subnet01 +- network: storage + subnet: storage_subnet01 +- network: external + subnet: external_subnet +- network: ctlplane + subnet: ctlplane-leaf1 diff --git a/network_data_default.yaml b/network_data_default.yaml new file mode 100644 index 0000000000..1e9938df2c --- /dev/null +++ b/network_data_default.yaml @@ -0,0 +1,7 @@ +# The default is to deploy with no network isolation. The ctlplane network +# is implicit, thus the default is an empty list of networks. +# +# Please refer to the sample files in network-data-samples folder. +# +# +[] \ No newline at end of file diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py index f0cf372319..13e59a3409 100755 --- a/tools/yaml-validate.py +++ b/tools/yaml-validate.py @@ -1244,7 +1244,8 @@ def validate(filename, param_map): # definition instead. if (filename.startswith('./network_data_') and not filename.endswith(('routed.yaml', - 'undercloud.yaml'))): + 'undercloud.yaml', + 'default.yaml'))): result = validate_network_data_file(filename) retval |= result else: diff --git a/vip_data_default.yaml b/vip_data_default.yaml new file mode 100644 index 0000000000..36be352d71 --- /dev/null +++ b/vip_data_default.yaml @@ -0,0 +1,8 @@ +# The default is to deploy with no network isolation, with a virtual IP only +# on the ctlplane network. +# +# Please refer to the sample files in network-data-samples folder for examples +# for more advanced configuration. +# +- network: ctlplane + dns_name: overcloud \ No newline at end of file