~narindergupta/opnfv/stable-R2

351 by Narinder Gupta
adding script to enable juju on openstack.
1
#!/bin/bash -e
2
3
folder=/srv/data/
352 by Narinder Gupta
patch not to remove swift API.
4
sudo mkdir $folder || true
5
737 by Narinder Gupta
New lab added for arm64 bit.
6
NODE_ARCTYPE=`arch`
7
8
if  [ "ppc64le" == "$NODE_ARCTYPE" ]; then
9
    NODE_ARCHES="ppc64el"
10
elif [ "aarch64" == "$NODE_ARCTYPE" ]; then
11
    NODE_ARCHES="arm64"
12
else
13
    NODE_ARCHES="amd64"
14
fi
15
16
405 by David Blaisonneau
Get only images for LXC or not
17
if grep -q 'virt-type: lxd' bundles.yaml; then
18
    URLS=" \
737 by Narinder Gupta
New lab added for arm64 bit.
19
    http://download.cirros-cloud.net/daily/20161201/cirros-dl161201-$NODE_ARCTYPE-lxc.tar.gz \
20
    http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-$NODE_ARCHES-root.tar.gz "
389 by Narinder Gupta
modified to upload the cloud imaged for lxd containers for Xenial.
21
405 by David Blaisonneau
Get only images for LXC or not
22
else
23
    URLS=" \
737 by Narinder Gupta
New lab added for arm64 bit.
24
    http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-$NODE_ARCHES-uefi1.img \
25
    http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-$NODE_ARCHES-uefi1.img \
405 by David Blaisonneau
Get only images for LXC or not
26
    http://mirror.catn.com/pub/catn/images/qcow2/centos6.4-x86_64-gold-master.img \
27
    http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 \
737 by Narinder Gupta
New lab added for arm64 bit.
28
    http://download.cirros-cloud.net/daily/20161201/cirros-dl161201-$NODE_ARCTYPE-disk.img "
405 by David Blaisonneau
Get only images for LXC or not
29
fi
351 by Narinder Gupta
adding script to enable juju on openstack.
30
31
for URL in $URLS
32
do
33
FILENAME=${URL##*/}
34
if [ -f $folder/$FILENAME ];
35
then
389 by Narinder Gupta
modified to upload the cloud imaged for lxd containers for Xenial.
36
    echo "$FILENAME already downloaded."
351 by Narinder Gupta
adding script to enable juju on openstack.
37
else
38
    wget  -O  $folder/$FILENAME $URL
39
fi
40
done
41
42
echo "To download Windows image get there : https://cloudbase.it/windows-cloud-images/"