From: Narinder Gupta Date: Wed, 17 Aug 2016 21:50:51 +0000 (-0500) Subject: modified to upload the cloud imaged for lxd containers for Xenial. X-Git-Tag: colorado.1.0~27 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F18885%2F4;p=joid.git modified to upload the cloud imaged for lxd containers for Xenial. JIRA: JOID-95 Change-Id: Ia63befb9e63b15c8b5bba5cfddeac6714826eb8f Signed-off-by: Narinder Gupta --- diff --git a/juju/get-cloud-images b/juju/get-cloud-images index bf2ed30b..162e4760 100755 --- a/juju/get-cloud-images +++ b/juju/get-cloud-images @@ -3,19 +3,23 @@ folder=/srv/data/ sudo mkdir $folder || true -URLS="http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img \ +URLS=" \ +http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img \ http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img \ http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img \ http://mirror.catn.com/pub/catn/images/qcow2/centos6.4-x86_64-gold-master.img \ http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 \ -http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img " +http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img \ +http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-lxc.tar.gz \ +http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-root.tar.gz " + for URL in $URLS do FILENAME=${URL##*/} if [ -f $folder/$FILENAME ]; then - echo "$FILENAME already downloaded." + echo "$FILENAME already downloaded." else wget -O $folder/$FILENAME $URL fi diff --git a/juju/joid-configure-openstack b/juju/joid-configure-openstack index a1b7aaa3..fafb22b8 100755 --- a/juju/joid-configure-openstack +++ b/juju/joid-configure-openstack @@ -136,11 +136,12 @@ nova quota-class-update --security-group-rules -1 $TENANT_ID echo "Uploading images to glance" #Upload images to glance -glance image-list | grep "Precise x86_64" > /dev/null 2>&1 || glance image-create --name="Precise x86_64" --visibility=public --container-format=ovf --disk-format=qcow2 < /srv/data/precise-server-cloudimg-amd64-disk1.img --progress -glance image-list | grep "Trusty x86_64" > /dev/null 2>&1 || glance image-create --name="Trusty x86_64" --visibility=public --container-format=ovf --disk-format=qcow2 < /srv/data/trusty-server-cloudimg-amd64-disk1.img --progress -glance image-list | grep "Xenial x86_64" > /dev/null 2>&1 || glance image-create --name="Xenial x86_64" --visibility=public --container-format=ovf --disk-format=qcow2 < /srv/data/xenial-server-cloudimg-amd64-disk1.img --progress -glance image-list | grep "CentOS 6.4" > /dev/null 2>&1 || glance image-create --name="CentOS 6.4" --visibility=public --container-format=bare --disk-format=qcow2 < /srv/data/centos6.4-x86_64-gold-master.img --progress -glance image-list | grep "Cirros 0.3" > /dev/null 2>&1 || glance image-create --name="Cirros 0.3" --visibility=public --container-format=bare --disk-format=qcow2 < /srv/data/cirros-0.3.4-x86_64-disk.img --progress +#glance image-list | grep "Precise x86_64" > /dev/null 2>&1 || glance image-create --name="Precise x86_64" --visibility=public --container-format=ovf --disk-format=qcow2 < /srv/data/precise-server-cloudimg-amd64-disk1.img +glance image-list | grep "Trusty x86_64" > /dev/null 2>&1 || glance image-create --name="Trusty x86_64" --visibility=public --container-format=ovf --disk-format=qcow2 < /srv/data/trusty-server-cloudimg-amd64-disk1.img +glance image-list | grep "Xenial x86_64" > /dev/null 2>&1 || glance image-create --name="Xenial x86_64" --visibility=public --container-format=ovf --disk-format=qcow2 < /srv/data/xenial-server-cloudimg-amd64-disk1.img +glance image-list | grep "CentOS 6.4" > /dev/null 2>&1 || glance image-create --name="CentOS 6.4" --visibility=public --container-format=bare --disk-format=qcow2 < /srv/data/centos6.4-x86_64-gold-master.img +glance image-list | grep "Cirros 0.3" > /dev/null 2>&1 || glance image-create --name="Cirros 0.3" --visibility=public --container-format=bare --disk-format=qcow2 < /srv/data/cirros-0.3.4-x86_64-disk.img +glance image-list | grep "Xenial LXC x86_64" > /dev/null 2>&1 || glance image-create --name="Xenial LXC x86_64" --visibility=public --container-format=bare --disk-format=root-tar --property architecture="x86_64" < /srv/data/xenial-server-cloudimg-amd64-root.tar.gz +glance image-list | grep "Cirros LXC 0.3" > /dev/null 2>&1 || glance image-create --name="Cirros LXC 0.3" --visibility=public --container-format=bare --disk-format=root-tar --property architecture="x86_64" < /srv/data/cirros-0.3.4-x86_64-lxc.tar.gz ## image name is used by script to generate metadata .. don't screw the series #glance image-list | grep "win2012r2" > /dev/null 2>&1 || gzip -cd /srv/data/windows_server_2012_r2_standard_eval_kvm_20151021.qcow2.gz |glance image-create --name="Windows Server 2012" --is-public=true --container-format=bare --disk-format=qcow2 --progress -