-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmpi.yaml
95 lines (88 loc) · 2.41 KB
/
mpi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
heat_template_version: 2013-05-23
description: Template that installs a cluster of MPI servers.
parameters:
count:
description: Number of MPI nodes
type: number
default: 3
key_name:
type: string
description: Name of key-pair to be used
flavor:
type: string
default: m1.small
constraints:
- allowed_values:
- m1.small
- m1.large
- m1.xlarge
- m1.xxlarge
description: |
Choose an instance flavor
image_id:
type: string
label: Server image
net_id:
type: string
label: Network ID
description: ID of the public network to use
name:
type: string
description: Name of each MPI machine booted
public_network:
type: string
description: Public network id
default: ext-isimanet
private_key:
type: string
description: Name of private key to be used for the local MPI user
default: []
hidden: true
public_key:
type: string
description: Name of plublic key to be used for the local MPI user
default: []
hidden: true
resources:
my_key:
properties:
name: my_key
save_private_key: true
type: OS::Nova::KeyPair
mpi_cluster:
type: OS::Heat::ResourceGroup
properties:
count: { get_param: count}
resource_def:
type: Lib::MSG::MPINode
properties:
image_id: { get_param: image_id }
flavor: { get_param: flavor }
key_name: { get_param: key_name }
net_id: { get_param: net_id }
public_key: { get_attr: [ my_key, public_key ] }
private_key: { get_attr: [ my_key, private_key ] }
name:
str_replace:
template:
$name-$index
params:
$name: { get_param: name }
$index: "%index%"
mpi_master:
type: Lib::MSG::MPIMaster
depends_on: mpi_cluster
properties:
image_id: { get_param: image_id }
flavor: { get_param: flavor }
key_name: { get_param: key_name }
net_id: { get_param: net_id }
servers: { get_attr: [mpi_cluster, node_param] }
private_key: { get_attr: [ my_key, private_key ] }
public_key: { get_attr: [ my_key, public_key ] }
name: { get_param: name }
public_network: { get_param: public_network }
outputs:
public_ip:
description: The public IP address of this mpi cluster.
value: { get_attr: [mpi_master, ip] }