-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbm-nodes.sh.sample
More file actions
20 lines (16 loc) · 787 Bytes
/
bm-nodes.sh.sample
File metadata and controls
20 lines (16 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
nova_admin="nova --os-username admin --os-password $ADMIN_PASSWORD --os-tenant-name admin"
# Please change parameters according to your bare-metal machine
IPMI_ADDREESS=172.16.212.6
IPMI_USERNAME=test
IPMI_PASSWORD=password
CPUS=2
MEMORY_MB=8192
LOCAL_GB=250
MAC_FOR_BOOT=3c:4a:92:72:38:23
MAC1=00:15:17:73:06:82
node=$( $nova_admin baremetal-node-create --pm_address=$IPMI_ADDRESS --pm_user=$IPMI_USERNAME --pm_password=$IPMI_PASSWORD --terminal_port=8000 `hostname -f` $CPUS $MEMORY_MB $LOCAL_GB $MAC_FOR_BOOT
#node_id=$( echo "$node" | grep " id " | get_field 2 )
# At present, 'nova baremetal-node-create' does not print the ID of the created node (a patch is in review now).
# So as a workaround, assume the ID is 1.
node_id=1
$nova_admin baremetal-add-interface $node_id $MAC1