File tree Expand file tree Collapse file tree 5 files changed +14
-13
lines changed Expand file tree Collapse file tree 5 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -95,14 +95,15 @@ def get_1st_partition(device)
95
95
end
96
96
97
97
#
98
- # Get vpc-ipv4-cidr-block
98
+ # Get vpc-ipv4-cidr-blocks
99
99
#
100
- def get_vpc_ipv4_cidr_block ( eth0_mac )
101
- uri = URI ( "http://169.254.169.254/latest/meta-data/network/interfaces/macs/#{ eth0_mac . downcase } /vpc-ipv4-cidr-block " )
100
+ def get_vpc_ipv4_cidr_blocks ( eth0_mac )
101
+ uri = URI ( "http://169.254.169.254/latest/meta-data/network/interfaces/macs/#{ eth0_mac . downcase } /vpc-ipv4-cidr-blocks " )
102
102
res = Net ::HTTP . get_response ( uri )
103
- vpc_ipv4_cidr_block = res . body if res . code == '200'
104
-
105
- vpc_ipv4_cidr_block
103
+ vpc_ipv4_cidr_blocks = res . body if res . code == '200'
104
+ # Parse into array
105
+ vpc_ipv4_cidr_blocks = vpc_ipv4_cidr_blocks . split ( "\n " )
106
+ vpc_ipv4_cidr_blocks
106
107
end
107
108
108
109
def get_instance_type ( )
Original file line number Diff line number Diff line change 28
28
end
29
29
30
30
# Get VPC CIDR
31
- node . default [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-block ' ] = get_vpc_ipv4_cidr_block ( node [ 'macaddress' ] )
31
+ node . default [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-blocks ' ] = get_vpc_ipv4_cidr_blocks ( node [ 'macaddress' ] )
32
32
33
33
# Parse shared directory info and turn into an array
34
34
shared_dir_array = node [ 'cfncluster' ] [ 'cfn_shared_dir' ] . split ( ',' )
119
119
120
120
# Export shared dir
121
121
nfs_export shared_dir_array [ index ] do
122
- network node [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-block ' ]
122
+ network node [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-blocks ' ]
123
123
writeable true
124
124
options [ 'no_root_squash' ]
125
125
end
126
126
end
127
127
128
128
# Export /home
129
129
nfs_export "/home" do
130
- network node [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-block ' ]
130
+ network node [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-blocks ' ]
131
131
writeable true
132
132
options [ 'no_root_squash' ]
133
133
end
134
134
135
135
# Export /opt/intel if it exists
136
136
nfs_export "/opt/intel" do
137
- network node [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-block ' ]
137
+ network node [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-blocks ' ]
138
138
writeable true
139
139
options [ 'no_root_squash' ]
140
140
only_if { ::File . directory? ( "/opt/intel" ) }
Original file line number Diff line number Diff line change 17
17
18
18
# Export /opt/sge
19
19
nfs_export "/opt/sge" do
20
- network node [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-block ' ]
20
+ network node [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-blocks ' ]
21
21
writeable true
22
22
options [ 'no_root_squash' ]
23
23
end
Original file line number Diff line number Diff line change 17
17
18
18
# Export /opt/slurm
19
19
nfs_export "/opt/slurm" do
20
- network node [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-block ' ]
20
+ network node [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-blocks ' ]
21
21
writeable true
22
22
options [ 'no_root_squash' ]
23
23
end
Original file line number Diff line number Diff line change 112
112
113
113
# Export RAID directory via nfs
114
114
nfs_export raid_shared_dir do
115
- network node [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-block ' ]
115
+ network node [ 'cfncluster' ] [ 'ec2-metadata' ] [ 'vpc-ipv4-cidr-blocks ' ]
116
116
writeable true
117
117
options [ 'no_root_squash' ]
118
118
end
You can’t perform that action at this time.
0 commit comments