Skip to content

Commit 7b88103

Browse files
authored
Merge pull request #29 from stackhpc/nodenet-fixes
Nodenet fixes
2 parents 65fe1fa + d787fcd commit 7b88103

File tree

3 files changed

+109
-9
lines changed

3 files changed

+109
-9
lines changed

files/environments/nodenet-library.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ resource_registry:
77
Cluster::NodeNet2: ../resources/nodenet-2.yaml
88
Cluster::NodeNet3: ../resources/nodenet-3.yaml
99
Cluster::NodeNet2WithFIPSRIOV: ../resources/nodenet-2-w-fip-sriov.yaml
10+
Cluster::NodeNet3WithFIPSRIOV: ../resources/nodenet-3-w-fip-sriov.yaml

files/resources/nodenet-2.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,7 @@ conditions:
3232
cluster_net: { get_param: [ cluster_net, 0 ] }
3333

3434
resources:
35-
node_ports:
36-
type: OS::Heat::ResourceGroup
37-
properties:
38-
count:
39-
yaql:
40-
data:
41-
cluster_groups: { get_param: nodegroup_networks }
42-
expression: $.data.cluster_groups.len()
43-
35+
4436
port1:
4537
type: OS::Neutron::Port
4638
properties:
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
heat_template_version: pike
3+
4+
description: >
5+
Heat stack template for a stack containing one Neutron port which is on
6+
a named network and subnet. A floating IP is created for the port.
7+
A second port is allocated on another network with SR-IOV port binding.
8+
A third port is allocated on another network with SR-IOV port binding.
9+
10+
parameters:
11+
node_idx:
12+
type: number
13+
label: Node index within cluster group
14+
cluster_net:
15+
type: json
16+
label: Network names and subnets to which the nodes should be attached
17+
cluster_fips:
18+
type: json
19+
label: List of UUIDs of prealloacted floating IPs
20+
default: []
21+
router_networks:
22+
type: json
23+
label: Permit host to route IP traffic from specific networks through this port
24+
default: []
25+
26+
conditions:
27+
security_groups_set:
28+
yaql:
29+
expression: $.data.cluster_net.containsKey('security_groups')
30+
data:
31+
cluster_net: { get_param: [ cluster_net, 0 ] }
32+
33+
resources:
34+
35+
port1:
36+
type: OS::Neutron::Port
37+
properties:
38+
network: { get_param: [ cluster_net, 0, net ] }
39+
security_groups:
40+
if:
41+
- security_groups_set
42+
- { get_param: [ cluster_net, 0, security_groups ] }
43+
- []
44+
fixed_ips:
45+
- subnet_id: { get_param: [ cluster_net, 0, subnet ] }
46+
47+
# The SR-IOV port.
48+
# It might be presumptious to assume there are no security groups here.
49+
port2:
50+
type: OS::Neutron::Port
51+
properties:
52+
admin_state_up: True
53+
network: { get_param: [ cluster_net, 1, net ] }
54+
binding:vnic_type: direct
55+
security_groups: []
56+
fixed_ips:
57+
- subnet_id: { get_param: [ cluster_net, 1, subnet ] }
58+
59+
# The OTHER SR-IOV port.
60+
# It might be presumptious to assume there are no security groups here.
61+
port3:
62+
type: OS::Neutron::Port
63+
properties:
64+
admin_state_up: True
65+
network: { get_param: [ cluster_net, 2, net ] }
66+
binding:vnic_type: direct
67+
security_groups: []
68+
fixed_ips:
69+
- subnet_id: { get_param: [ cluster_net, 2, subnet ] }
70+
71+
floating_ip:
72+
type: OS::Neutron::FloatingIP
73+
properties:
74+
floating_network: { get_param: [ cluster_net, 0, floating_net ] }
75+
76+
floating_ip_association:
77+
type: OS::Neutron::FloatingIPAssociation
78+
properties:
79+
floatingip_id: { get_resource: floating_ip }
80+
port_id: { get_resource: port1 }
81+
82+
outputs:
83+
OS::stack_id:
84+
description: The network list
85+
value:
86+
- port1: { get_resource: port1 }
87+
- port2: { get_resource: port2 }
88+
- port3: { get_resource: port3 }
89+
90+
networks:
91+
description: The network list
92+
value:
93+
- port: { get_resource: port1 }
94+
- port: { get_resource: port2 }
95+
- port: { get_resource: port3 }
96+
97+
node_ips:
98+
description: List of list of IPs assigned on the named cluster networks
99+
value:
100+
- - { get_attr: [ floating_ip, floating_ip_address ] }
101+
- { get_attr: [ port1, fixed_ips, 0, ip_address ] }
102+
- - { get_attr: [ port2, fixed_ips, 0, ip_address ] }
103+
- - { get_attr: [ port3, fixed_ips, 0, ip_address ] }
104+
105+
primary_ip:
106+
description: The primary IP of the instance
107+
value: { get_attr: [ floating_ip, floating_ip_address ] }

0 commit comments

Comments
 (0)