Create a network template

Create a network templateΒΆ

You can use one of the network templates provided in Network template examples. However, if these templates do not meet your networking requirements, you can create your own. We strongly recommend that you use the default.yaml network template provided in this documentation to build your own network template.

Note

When you configure a network using a network template, you cannot apply changes to the nodes network configuration using the Fuel web UI. For example, if you configure an OpenStack environment using network templates, deploy the OpenStack environment, and later decide to add new nodes to that environment, you must update network configuration of these nodes using a network template and do not use the Fuel web UI.

However, templates do not describe the level 2 and level 3 network settings. Therefore, you must set them using Fuel web UI, CLI, or API.

After uploading a network template, you must create and/or delete networks and node groups using the Fuel CLI to reflect the uploaded network configuration. Otherwise, the configuration specified in the network template will not take effect and may result in a malfunction.

To create a network template:

  1. Create a .yaml file.

  2. Specify your network configuration in the .yaml file following the conventions described in Structure of network templates.

  3. Log in to the Fuel Master node CLI.

  4. Display the ID of the environment in which you want to upload the template:

    fuel environment
    
  5. Upload the network template to Fuel:

    fuel --env <ENV_ID> network-template --upload --dir <PATH>
    

    Example:

    fuel --env 1 network-template --upload --dir /home/stack/
    
  6. Add or delete custom networks that you have introduced through the network template:

    • If you need to delete a network:

      1. View the ID of the network by typing:

        fuel network-group
        

        Example of system response:

        id | name          | vlan_start | cidr         | gateway  |group_id
        ---+---------------+------------+--------------+----------+--------
        24 | private       |            |              |          | 4
        23 | private       |            |              |          | 5
        22 | storage       | 102        | 10.10.1.0/24 | 10.1.1.1 | 5
        25 | management    | 101        | 10.10.0.0/24 | 10.0.0.1 | 4
        21 | public        |            | 10.10.0.0/24 | 10.10.0.1| 4
        
      2. Delete the required network using the network ID.

        fuel network-group --delete --env <env_id> --network <network_id>
        
    • If you need to add a new network, type:

      fuel network-group --create --node-group <node_group_id> --name
      <network_name> --vlan <vlan_id> --cidr <cidr_id>
      
  7. Add or delete custom networks as described in Network group management commands.

  8. Configure L2 and L3 network settings:

    Note

    You cannot modify VLAN settings through the Fuel web UI or CLI Configure VLAN settings in the network template.

    • Using Fuel web UI:
      1. Log in to the Fuel web UI.
      2. Click Networks.
      3. Configure Network Settings as required.

    Note

    If you add additional node network group with different from the default node network group settings, update the network template with the required changes.

    • Using Fuel CLI:

      1. Log in to the Fuel CLI.

      2. Download network configuration:

        fuel --env <env_ID> network --download
        
      3. Make the required changes in the network .yaml file.

      4. Upload the configuration to the Fuel Master node:

        fuel --env <env_ID> network --upload
        
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

Contents