Openstack TripleO Network Configuration

TripleO offers a default network topology when deploying with network isolation enabled, and this is reflected {tripleo_repo}/network-data-samples/default-network-isolation.yaml file in tripleo-heat-templates.

These default networks are as follows:

  1. External – External network traffic (disabled by default for Compute/Storage nodes)
  2. InternalApi – Internal API traffic, most intra-service traffic uses this network by default
  3. Storage – Storage traffic
  4. StorageMgmt – Storage management traffic (such as replication traffic between storage nodes)
  5. Tenant – Tenant networks for compute workloads running on the cloud

Each network is defined in the network_data YAML file. There are sample files in /usr/share/openstack-tripleo-heat-templates/network-data-samples, which can be copied or modified as needed. The network_data YAML file contains a list of networks, with definitions like:

- name: CustomNetwork
  vip: false
  name_lower: custom_network
  subnets:
    custom_network_subnet:
      ip_subnet: 172.16.6.0/24
      allocation_pools:
        - start: 172.16.6.4
        - end: 172.16.6.250
      gateway_ip: 172.16.6.1

The steps to define your custom networks are:

1. Copy one of the sample network_data YAML definitions provided by tripleo-heat-templates, for example:

$ cp /usr/share/openstack-tripleo-heat-templates/network-data-samples/default-network-isolation.yaml \
custom_network_data.yaml

2. Modify the custom_network_data.yaml file as required
3. Copy one of the sample vip_data YAML definitions provided by tripleo-heat-templates, for example:

$ cp /usr/share/openstack-tripleo-heat-templates/network-data-samples/vip-data-default-network-isolation.yaml  \
  custom_vip_data.yaml

4. Modify the custom_vip_data.yaml file as required. 
5. Copy network configuration templates, add or modify new networks.

$ cp -r /usr/share/ansible/roles/tripleo_network_config/templates/single_nic_vlans custom-single-nic-vlans

6. Set your environment overrides to enable your nic config templates. Create or update an existing environment file and set the parameter values to enable your custom nic config templates, for example create a file custom-net-single-nic-with-vlans.yaml with these parameter settings:

parameter_defaults:
  ControllerNetworkConfigTemplate: '/path/to/custom-single-nic-vlans/single_nic_vlans.j2'
  CephStorageNetworkConfigTemplate: '/path/to/custom-single-nic-vlans/single_nic_vlans_storage.j2'
  ComputeNetworkConfigTemplate: '/path/to/custom-single-nic-vlans/single_nic_vlans.j2'

7. Create the networks on the undercloud and generate the networks-deployed-environment.yaml which will be used as an environment file when deploying the overcloud.

$ openstack overcloud network provision --output networks-deployed-environment.yaml custom_network_data.yaml

8. Create the overcloud network Virtual IPs and generate the vip-deployed-environment.yaml which will be used as an environment file when deploying the overcloud.

$ openstack overcloud network vip provision --output ~/templates/vip-deployed-environment.yaml ~/templates/custom_vip_data.yaml

9. To deploy include network, Virtual IPs and baremetal provisioning in the overcloud deploy command

$ openstack overcloud deploy --templates \
  --networks-file custom_network_data.yaml \
  --vip-file custom_vip_data.yaml \
  --baremetal-deployment baremetal_deployment.yaml \
  --network-config \
  -e custom-net-single-nic-with-vlans.yaml

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top