fix template for Juno, fix username creation and permissions
Signed-off-by: Arif Ali <mail@arif-ali.co.uk>
This commit is contained in:
@@ -214,7 +214,7 @@ resources:
|
||||
echo Done
|
||||
EOF
|
||||
|
||||
chown testuser:testuer ~testuser/torque.script
|
||||
chown testuser:testuser ~testuser/torque.script
|
||||
|
||||
cat > /tmp/wait-data << EOF
|
||||
{
|
||||
|
||||
@@ -6,6 +6,9 @@ description: >
|
||||
public network.
|
||||
|
||||
parameters:
|
||||
host_prefix:
|
||||
type: string
|
||||
description: The hostname will be prefixed by this string
|
||||
key_name:
|
||||
type: string
|
||||
description: Name of keypair to assign to servers
|
||||
@@ -57,7 +60,7 @@ resources:
|
||||
compute_node:
|
||||
type: OS::Nova::Server
|
||||
properties:
|
||||
name: { list_join : ["",["compute", { get_param: index_name }]] }
|
||||
name: { list_join : ["",[{ get_param: host_prefix }, { get_param: index_name }]] }
|
||||
image: { get_param: image }
|
||||
flavor: { get_param: flavor }
|
||||
key_name: { get_param: key_name }
|
||||
@@ -82,21 +85,28 @@ resources:
|
||||
|
||||
yum -y install torque-client
|
||||
|
||||
chkconfig trqauthd on
|
||||
chkconfig pbs_mom on
|
||||
|
||||
echo $MASTER_NODE_IP > /var/spool/torque/server_name
|
||||
|
||||
cat > /var/spool/torque/mom_priv/config << EOF
|
||||
$logevent 0x1ff
|
||||
\$logevent 0x1ff
|
||||
|
||||
$pbsserver $MASTER_NODE_IP
|
||||
\$pbsserver $MASTER_NODE_IP
|
||||
EOF
|
||||
|
||||
service pbs_mom start
|
||||
|
||||
myip=$(ip addr show eth0 | awk '$1 == "inet" {print $2}' | cut -f1 -d/)
|
||||
myip_last_octet=${myip##*.}
|
||||
|
||||
echo $myip `hostname` >> /etc/hosts
|
||||
|
||||
service trquathd restart
|
||||
service pbs_mom restart
|
||||
|
||||
groupadd -g 4001 testuser
|
||||
useradd -g 4001 -u 4001 -m testuser
|
||||
|
||||
cat > /tmp/wait-data << EOF
|
||||
{
|
||||
"Status" : "SUCCESS",
|
||||
|
||||
@@ -25,6 +25,11 @@ parameters:
|
||||
default: centos7
|
||||
description: glance image used to boot the server
|
||||
|
||||
host_prefix:
|
||||
type: string
|
||||
default: compute
|
||||
description: The prefix of the hostname of the compute node
|
||||
|
||||
flavor:
|
||||
type: string
|
||||
default: m1.small
|
||||
@@ -114,6 +119,9 @@ resources:
|
||||
- protocol: tcp
|
||||
port_range_min: 4001
|
||||
port_range_max: 4001
|
||||
- protocol: tcp
|
||||
port_range_min: 15000
|
||||
port_range_max: 15004
|
||||
|
||||
######################################################################
|
||||
#
|
||||
@@ -201,7 +209,7 @@ resources:
|
||||
echo Done
|
||||
EOF
|
||||
|
||||
chown testuser:testuer ~testuser/torque.script
|
||||
chown testuser:testuser ~testuser/torque.script
|
||||
|
||||
cat > /tmp/wait-data << EOF
|
||||
{
|
||||
@@ -214,9 +222,9 @@ resources:
|
||||
curl -T /tmp/wait-data '$WAIT_HANDLE'
|
||||
params:
|
||||
"$COMP_NODE_ADDRESSES":
|
||||
list_join: [" ", {get_attr: [compute_nodes, compute_node_ip]}]
|
||||
list_join: [",", {get_attr: [compute_nodes, compute_node_ip]}]
|
||||
"$COMP_NODE_NAMES":
|
||||
list_join: [" ", {get_attr: [compute_nodes, name]}]
|
||||
list_join: [",", {get_attr: [compute_nodes, compute_node_name]}]
|
||||
"$WAIT_HANDLE":
|
||||
get_resource: master_wait_handle
|
||||
networks:
|
||||
@@ -255,6 +263,7 @@ resources:
|
||||
type: compute_node.yaml
|
||||
properties:
|
||||
index_name: "%index%"
|
||||
host_prefix: {get_param: host_prefix}
|
||||
key_name: {get_param: key_name}
|
||||
image: {get_param: image}
|
||||
flavor: {get_param: flavor}
|
||||
@@ -265,14 +274,14 @@ resources:
|
||||
|
||||
outputs:
|
||||
|
||||
master_node:
|
||||
master_node_external:
|
||||
value: {get_attr: [master_node_floating, floating_ip_address]}
|
||||
|
||||
compute_nodes:
|
||||
compute_node_ips:
|
||||
value: {get_attr: [compute_nodes, compute_node_ip]}
|
||||
|
||||
compute_names:
|
||||
value: {get_attr: [compute_nodes, name]}
|
||||
compute_node_names:
|
||||
value: {get_attr: [compute_nodes, compute_node_name]}
|
||||
|
||||
compute_node_external:
|
||||
value: {get_attr: [compute_nodes, compute_node_external_ip]}
|
||||
|
||||
Reference in New Issue
Block a user