diff --git a/README.md b/README.md index ffb6bce0de948bc035b2adb5202a8bec3a94bb49..e9c2a07fd755529822073c9627a837d005907f98 100644 --- a/README.md +++ b/README.md @@ -1,64 +1,64 @@ -Automatic Update Glance Images -============================== - -This script automates the process of updating images of operating systems in OpenStack. - -### Currently the supported OS are: - -- CentOS 6 -- CentOS 7 -- Debian 8 -- Debian 9 -- Ubuntu 14.04 -- Ubuntu 16.04 - -Installation ------------- - - $ sudo apt install python3 python3-dev python3-pip -y - $ pip3 install --upgrade pip - $ pip3 install datetime shade tqdm python-openstackclient - $ git clone https://git.garr.it/cloud/admin/update-images.git - -Usage ------ - -Source the `admin` credentials to gain access to `OpenStack` commands: - - $ source admin.rc - -Execute the script - - $ python3 update-images.py - -### Execution example - - $ python3 update-images.py - Download... - From: http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 - To: downloads/centos7-1505262668.qcow2 - downloads/centos7-1505262668.qcow2: 100%|████| 855M/855M [05:08<00:00, 2.77MB/s] - Download... - From: https://cdimage.debian.org/cdimage/openstack/current-9/debian-9-openstack-amd64.qcow2 - To: downloads/debian9-1507104230.qcow2 - downloads/debian9-1507104230.qcow2: 585MB [00:32, 18.0MB/s] - Download... - From: https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img - To: downloads/ubuntu-16.04-1505853444.qcow2 - downloads/ubuntu-16.04-1505853444.qcow2: 100%|████| 291M/291M [03:31<00:00, 1.37MB/s] - -Images are now present in OpenStack Glance. -This script uploads all the images as 'Public', accessible by all users. - - -Pipeline --------- - -1. Fetch from config.yaml the url -2. Download locally (in 'download' folder) the updated qcow2 of specified operating system -3. Upload the qcow2 image on glance using openstack-cli commands - -Notes ------ - +Automatic Update Glance Images +============================== + +This script automates the process of updating images of operating systems in OpenStack. + +### Currently the supported OS are: + +- CentOS 7 +- Debian 9 +- Fedora 28 +- Fedora 29 +- Ubuntu 16.04 +- Ubuntu 18.04 + +Installation +------------ + + $ sudo apt install python3 python3-dev python3-pip -y + $ pip3 install --upgrade pip + $ pip3 install datetime shade tqdm python-openstackclient + $ git clone https://git.garr.it/cloud/admin/update-images.git + +Usage +----- + +Source the `admin` credentials to gain access to `OpenStack` commands: + + $ source admin.rc + +Execute the script + + $ python3 update-images.py + +### Execution example + + $ python3 update-images.py + Download... + From: http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 + To: downloads/centos7-1505262668.qcow2 + downloads/centos7-1505262668.qcow2: 100%|████| 855M/855M [05:08<00:00, 2.77MB/s] + Download... + From: https://cdimage.debian.org/cdimage/openstack/current-9/debian-9-openstack-amd64.qcow2 + To: downloads/debian9-1507104230.qcow2 + downloads/debian9-1507104230.qcow2: 585MB [00:32, 18.0MB/s] + Download... + From: https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img + To: downloads/ubuntu-16.04-1505853444.qcow2 + downloads/ubuntu-16.04-1505853444.qcow2: 100%|████| 291M/291M [03:31<00:00, 1.37MB/s] + +Images are now present in OpenStack Glance. +This script uploads all the images as 'Public', accessible by all users. + + +Pipeline +-------- + +1. Fetch from config.yaml the url +2. Download locally (in 'download' folder) the updated qcow2 of specified operating system +3. Upload the qcow2 image on glance using openstack-cli commands + +Notes +----- + This script is tested on Ubuntu 16.04 x64 \ No newline at end of file diff --git a/config.yml b/config.yml index 3c2377174233ffb9ce3c5f4935193f5bfede64cc..718bccefba2ab1233dd2ca354071f12d76dd655b 100644 --- a/config.yml +++ b/config.yml @@ -1,18 +1,4 @@ images: - debian8: - name: Debian 8 - GARR - url: https://cdimage.debian.org/cdimage/openstack/current-8/debian-8-openstack-amd64.qcow2 - disk_format: qcow2 - extraargs: - - "min_disk=5" - - "min_ram=1024" - tags: - - "os_distro=debian" - - "os_type=linux" - - "os_version=8" - - "architecture=amd64" - - "os_require_quiesce=yes" - - "hw_qemu_guest_agent=yes" debian9: name: Debian 9 - GARR url: https://cdimage.debian.org/cdimage/openstack/current-9/debian-9-openstack-amd64.qcow2 @@ -45,24 +31,25 @@ images: - "hw_qemu_guest_agent=yes" - "hw_vif_multiqueue_enabled=true" - "hw_rng_model=virtio" - centos7: - name: CentOS 7 - GARR - url: http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 + fedora29: + name: Fedora 29 - GARR + url: https://download.fedoraproject.org/pub/fedora/linux/releases/29/Cloud/x86_64/images/Fedora-Cloud-Base-29-1.2.x86_64.qcow2 disk_format: qcow2 extraargs: - "min_disk=5" - "min_ram=1024" tags: - - "os_distro=centos" + - "os_distro=fedora" - "os_type=linux" - - "os_version=7.X" + - "os_version=29" - "architecture=x86_64" - "os_require_quiesce=yes" - "hw_qemu_guest_agent=yes" - "hw_vif_multiqueue_enabled=true" - centos6: - name: CentOS 6 - GARR - url: http://cloud.centos.org/centos/6/images/CentOS-6-x86_64-GenericCloud.qcow2 + - "hw_rng_model=virtio" + centos7: + name: CentOS 7 - GARR + url: http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 disk_format: qcow2 extraargs: - "min_disk=5" @@ -70,24 +57,11 @@ images: tags: - "os_distro=centos" - "os_type=linux" - - "os_version=6.X" + - "os_version=7.X" - "architecture=x86_64" - "os_require_quiesce=yes" - "hw_qemu_guest_agent=yes" - ubuntu-14.04: - name: Ubuntu 14.04 - GARR - url: https://cloud-images.ubuntu.com/releases/14.04/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img - disk_format: qcow2 - extraargs: - - "min_disk=5" - - "min_ram=1024" - tags: - - "os_distro=ubuntu" - - "os_type=linux" - - "os_version=14.04" - - "architecture=amd64" - - "os_require_quiesce=yes" - - "hw_qemu_guest_agent=yes" + - "hw_vif_multiqueue_enabled=true" ubuntu-16.04: name: Ubuntu 16.04 - GARR url: https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img