Skip to content

Commit

Permalink
Scripts library
Browse files Browse the repository at this point in the history
  • Loading branch information
Sriram S committed Mar 16, 2015
1 parent db3e189 commit 7e9e678
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/setup-cirros-image.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
source $(dirname $0)/config-parameters.sh

glance_image_name="cirros-0.3.3-x86_64"
if [ ! -z $1 ]
then
glance_image_name=$1
fi

echo_and_sleep "About to add cirros image to Glance"
cirros_image_name="cirros-0.3.3-x86_64-disk.img"
wget_url_for_cirros="http://cdn.download.cirros-cloud.net/0.3.3/"$cirros_image_name
echo_and_sleep "Cirros Image URL: $wget_url_for_cirros"
wget $wget_url_for_cirros
source $(dirname $0)/admin_openrc.sh
echo_and_sleep "Downloaded Cirros Image. Ready to call glance image-create command" 3
glance image-create --name "cirros-0.3.3-x86_64" --file $cirros_image_name --disk-format qcow2 --container-format bare --is-public True --progress
glance image-create --name $glance_image_name --file $cirros_image_name --disk-format qcow2 --container-format bare --is-public True --progress
echo_and_sleep "Completed glance image-create"
glance image-list
echo_and_sleep "Verify Glance Image List" 7

0 comments on commit 7e9e678

Please sign in to comment.