Merge "Remove unsupported --no-cache CLI parameter"
This commit is contained in:
@@ -35,7 +35,7 @@ if [ ! -f $key_path ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#add the public key to nova.
|
#add the public key to nova.
|
||||||
nova --no-cache keypair-add --pub_key /tmp/id_rsa.pub key_cirros
|
nova keypair-add --pub_key /tmp/id_rsa.pub key_cirros
|
||||||
|
|
||||||
|
|
||||||
instance_name='<%= @image_type %>_test_vm'
|
instance_name='<%= @image_type %>_test_vm'
|
||||||
@@ -57,27 +57,27 @@ neutron router-interface-add router1 $neutron_prv_subnet
|
|||||||
neutron router-gateway-set router1 $neutron_public_net
|
neutron router-gateway-set router1 $neutron_public_net
|
||||||
|
|
||||||
|
|
||||||
nova --no-cache boot --flavor 1 --image $IMAGE_ID --key_name key_cirros --nic net-id=$neutron_net $instance_name
|
nova boot --flavor 1 --image $IMAGE_ID --key_name key_cirros --nic net-id=$neutron_net $instance_name
|
||||||
<% else -%>
|
<% else -%>
|
||||||
<% if @floating_ip -%>
|
<% if @floating_ip -%>
|
||||||
# create a security group so that we can allow ssh, http, and ping traffic
|
# create a security group so that we can allow ssh, http, and ping traffic
|
||||||
# when we add a floating IP (assuming you are adding floating IPs)
|
# when we add a floating IP (assuming you are adding floating IPs)
|
||||||
nova --no-cache secgroup-create nova_test 'Cirros test security group'
|
nova secgroup-create nova_test 'Cirros test security group'
|
||||||
nova --no-cache secgroup-add-rule nova_test tcp 22 22 0.0.0.0/0
|
nova secgroup-add-rule nova_test tcp 22 22 0.0.0.0/0
|
||||||
nova --no-cache secgroup-add-rule nova_test tcp 80 80 0.0.0.0/0
|
nova secgroup-add-rule nova_test tcp 80 80 0.0.0.0/0
|
||||||
nova --no-cache secgroup-add-rule nova_test icmp -1 -1 0.0.0.0/0
|
nova secgroup-add-rule nova_test icmp -1 -1 0.0.0.0/0
|
||||||
# request a floating IP address, and extract the address from the results message
|
# request a floating IP address, and extract the address from the results message
|
||||||
floating_ip=`nova --no-cache floating-ip-create | grep None | awk '{print $2}'`
|
floating_ip=`nova floating-ip-create | grep None | awk '{print $2}'`
|
||||||
<% end -%>
|
<% end -%>
|
||||||
# Boot the added image against the "1" flavor which by default maps to a micro instance. <% if @floating_ip -%> Include the cirros_test group so our address will work when we add it later <% end %>
|
# Boot the added image against the "1" flavor which by default maps to a micro instance. <% if @floating_ip -%> Include the cirros_test group so our address will work when we add it later <% end %>
|
||||||
nova --no-cache boot --flavor 1 <% if @floating_ip -%>--security_groups nova_test<% end %> --image ${IMAGE_ID} --key_name key_cirros $instance_name
|
nova boot --flavor 1 <% if @floating_ip -%>--security_groups nova_test<% end %> --image ${IMAGE_ID} --key_name key_cirros $instance_name
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
# let the system catch up
|
# let the system catch up
|
||||||
sleep <%= @sleep_time %>
|
sleep <%= @sleep_time %>
|
||||||
|
|
||||||
# Show the state of the system we just requested.
|
# Show the state of the system we just requested.
|
||||||
nova --no-cache show $instance_name
|
nova show $instance_name
|
||||||
|
|
||||||
# wait for the server to boot
|
# wait for the server to boot
|
||||||
sleep <%= @sleep_time %>
|
sleep <%= @sleep_time %>
|
||||||
@@ -85,7 +85,7 @@ sleep <%= @sleep_time %>
|
|||||||
<% if @floating_ip -%>
|
<% if @floating_ip -%>
|
||||||
# Now add the floating IP we reserved earlier to the machine.
|
# Now add the floating IP we reserved earlier to the machine.
|
||||||
# if not neutron
|
# if not neutron
|
||||||
nova --no-cache add-floating-ip $instance_name $floating_ip
|
nova add-floating-ip $instance_name $floating_ip
|
||||||
# Wait and then try to SSH to the node, leveraging the private key
|
# Wait and then try to SSH to the node, leveraging the private key
|
||||||
# we generated earlier.
|
# we generated earlier.
|
||||||
sleep <%= @sleep_time %>
|
sleep <%= @sleep_time %>
|
||||||
|
Reference in New Issue
Block a user