diff options
author | Bogdan Dobrelya <bdobreli@redhat.com> | 2017-10-16 15:42:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-16 15:42:42 +0200 |
commit | ca88364175fe5177cecbb479a157d7329db05d8a (patch) | |
tree | 4d17cd0068ab3391ba29a5aeea43706e0e899098 /roles/openstack-stack/templates/heat_stack_server_nofloating.yaml.j2 | |
parent | d83bf080c272516e256ed45bf31c14eee8213f8c (diff) | |
download | openshift-ca88364175fe5177cecbb479a157d7329db05d8a.tar.gz openshift-ca88364175fe5177cecbb479a157d7329db05d8a.tar.bz2 openshift-ca88364175fe5177cecbb479a157d7329db05d8a.tar.xz openshift-ca88364175fe5177cecbb479a157d7329db05d8a.zip |
Support separate data network for Flannel SDN (#757)
* Support separate data network for Flannel SDN
Document the use case for a separate flannel data network.
Allow Nova servers for openshift cluster to be provisioned
with that isolated data network created and connected to
masters, computes and infra nodes. Do not configure dns
nameservers and router for that network.
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
* Fix flannel use cases with provider network
Provider network cannot be used with flannel SDN
as the latter requires a separate isolated network,
while the provider network is an externally managed
single network.
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
* Drop unused data_net_name
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
Diffstat (limited to 'roles/openstack-stack/templates/heat_stack_server_nofloating.yaml.j2')
-rw-r--r-- | roles/openstack-stack/templates/heat_stack_server_nofloating.yaml.j2 | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/roles/openstack-stack/templates/heat_stack_server_nofloating.yaml.j2 b/roles/openstack-stack/templates/heat_stack_server_nofloating.yaml.j2 index 4b79d5ab6..742d53649 100644 --- a/roles/openstack-stack/templates/heat_stack_server_nofloating.yaml.j2 +++ b/roles/openstack-stack/templates/heat_stack_server_nofloating.yaml.j2 @@ -66,6 +66,26 @@ parameters: label: Subnet ID description: Subnet resource +{% if openshift_use_flannel|default(False)|bool %} + attach_data_net: + type: boolean + default: false + label: Attach-data-net + description: A switch for data port connection + + data_net: + type: string + default: '' + label: Net ID + description: Net resource + + data_subnet: + type: string + default: '' + label: Subnet ID + description: Subnet resource +{% endif %} + secgrp: type: comma_delimited_list label: Security groups @@ -110,6 +130,11 @@ outputs: - 0 - addr +{% if openshift_use_flannel|default(False)|bool %} +conditions: + no_data_subnet: {not: { get_param: attach_data_net} } +{% endif %} + resources: server_nofloating: @@ -120,11 +145,28 @@ resources: image: { get_param: image } flavor: { get_param: flavor } networks: +{% if openshift_use_flannel|default(False)|bool %} + if: + - no_data_subnet +{% if use_trunk_ports|default(false)|bool %} + - - port: { get_attr: [trunk-port, port_id] } +{% else %} + - - port: { get_resource: port } +{% endif %} +{% if use_trunk_ports|default(false)|bool %} + - - port: { get_attr: [trunk-port, port_id] } +{% else %} + - - port: { get_resource: port } + - port: { get_resource: data_port } +{% endif %} + +{% else %} {% if use_trunk_ports|default(false)|bool %} - port: { get_attr: [trunk-port, port_id] } {% else %} - port: { get_resource: port } {% endif %} +{% endif %} user_data: get_file: user-data user_data_format: RAW @@ -154,6 +196,19 @@ resources: - subnet: { get_param: subnet } security_groups: { get_param: secgrp } +{% if openshift_use_flannel|default(False)|bool %} + data_port: + type: OS::Neutron::Port + condition: { not: no_data_subnet } + properties: + network: { get_param: data_net } + port_security_enabled: false +{% if not provider_network %} + fixed_ips: + - subnet: { get_param: data_subnet } +{% endif %} +{% endif %} + {% if not ephemeral_volumes|default(false)|bool %} cinder_volume: type: OS::Cinder::Volume |