162e4760d23aafa1ea18ab982daf1e391edeaa0d
[joid.git] / juju / get-cloud-images
1 #!/bin/bash -e
2
3 folder=/srv/data/
4 sudo mkdir $folder || true
5
6 URLS=" \
7 http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img \
8 http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img \
9 http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img \
10 http://mirror.catn.com/pub/catn/images/qcow2/centos6.4-x86_64-gold-master.img \
11 http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 \
12 http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img \
13 http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-lxc.tar.gz \
14 http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-root.tar.gz "
15
16
17 for URL in $URLS
18 do
19 FILENAME=${URL##*/}
20 if [ -f $folder/$FILENAME ];
21 then
22     echo "$FILENAME already downloaded."
23 else
24     wget  -O  $folder/$FILENAME $URL
25 fi
26 done
27
28 echo "To download Windows image get there : https://cloudbase.it/windows-cloud-images/"