Commit a0381b9c authored by Thomas Gambier's avatar Thomas Gambier

packer/build-vm-bootstrap.yml: remove old OSes

parent 8816acf5
...@@ -15,22 +15,6 @@ ...@@ -15,22 +15,6 @@
name: slapos.libnetworkcache name: slapos.libnetworkcache
state: latest state: latest
- shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' debian9.json >> log/debian9-{{ item.name }}.log
args:
creates: output-debian9-{{ item.size }}G-{{ item.name }}
with_items:
- { name: "vm-bootstrap", size: "200", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "25", script: "scripts/vm-bootstrap.sh"}
- shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' debian10.json >> log/debian10-{{ item.name }}.log
args:
creates: output-debian10-{{ item.size }}G-{{ item.name }}
with_items:
- { name: "vm-bootstrap", size: "200", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "25", script: "scripts/vm-bootstrap.sh"}
- shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' debian11.json >> log/debian11-{{ item.name }}.log - shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' debian11.json >> log/debian11-{{ item.name }}.log
args: args:
creates: output-debian11-{{ item.size }}G-{{ item.name }} creates: output-debian11-{{ item.size }}G-{{ item.name }}
...@@ -45,15 +29,6 @@ ...@@ -45,15 +29,6 @@
with_items: with_items:
- { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"} - { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"}
- shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' ubuntu-18.04-server-amd64.json >> log/ubuntu-18.04-server-amd64-{{ item.name }}.log
args:
creates: output-ubuntu-18.04-server-{{ item.size }}G-{{ item.name }}
with_items:
- { name: "vm-bootstrap", size: "200", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "25", script: "scripts/vm-bootstrap.sh"}
- shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' ubuntu-20.04-server-amd64.json >> log/ubuntu-20.04-server-amd64-{{ item.name }}.log - shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' ubuntu-20.04-server-amd64.json >> log/ubuntu-20.04-server-amd64-{{ item.name }}.log
args: args:
creates: output-ubuntu-20.04-server-{{ item.size }}G-{{ item.name }} creates: output-ubuntu-20.04-server-{{ item.size }}G-{{ item.name }}
...@@ -70,7 +45,6 @@ ...@@ -70,7 +45,6 @@
- { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"} - { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "25", script: "scripts/vm-bootstrap.sh"} - { name: "vm-bootstrap", size: "25", script: "scripts/vm-bootstrap.sh"}
- shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' centos-8.json >> log/centos8-{{ item.name }}.log - shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' centos-8.json >> log/centos8-{{ item.name }}.log
args: args:
creates: output-centos8-{{ item.size }}G-{{ item.name }} creates: output-centos8-{{ item.size }}G-{{ item.name }}
...@@ -79,36 +53,10 @@ ...@@ -79,36 +53,10 @@
- { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"} - { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "25", script: "scripts/vm-bootstrap.sh"} - { name: "vm-bootstrap", size: "25", script: "scripts/vm-bootstrap.sh"}
- shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' centos-7.json >> log/centos7-{{ item.name }}.log
args:
creates: output-centos7-{{ item.size }}G-{{ item.name }}
with_items:
- { name: "vm-bootstrap", size: "200", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"}
- { name: "vm-bootstrap", size: "25", script: "scripts/vm-bootstrap.sh"}
#### Generation of images are over. #### Generation of images are over.
#### Start compress everything #### Start compress everything
- shell: gzip output-debian9-{{ item.size }}G-{{ item.name }}/packer-debian9-{{ item.size }}G-{{ item.name }}
args:
creates: output-debian9-{{ item.size }}G-{{ item.name }}/packer-debian9-{{ item.size }}G-{{ item.name }}.gz
with_items:
- { name: "vm-bootstrap", size: "200"}
- { name: "vm-bootstrap", size: "50"}
- { name: "vm-bootstrap", size: "25"}
ignore_errors: True
- shell: gzip output-debian10-{{ item.size }}G-{{ item.name }}/packer-debian10-{{ item.size }}G-{{ item.name }}
args:
creates: output-debian10-{{ item.size }}G-{{ item.name }}/packer-debian10-{{ item.size }}G-{{ item.name }}.gz
with_items:
- { name: "vm-bootstrap", size: "200"}
- { name: "vm-bootstrap", size: "50"}
- { name: "vm-bootstrap", size: "25"}
ignore_errors: True
- shell: gzip output-debian11-{{ item.size }}G-{{ item.name }}/packer-debian11-{{ item.size }}G-{{ item.name }} - shell: gzip output-debian11-{{ item.size }}G-{{ item.name }}/packer-debian11-{{ item.size }}G-{{ item.name }}
args: args:
creates: output-debian11-{{ item.size }}G-{{ item.name }}/packer-debian11-{{ item.size }}G-{{ item.name }}.gz creates: output-debian11-{{ item.size }}G-{{ item.name }}/packer-debian11-{{ item.size }}G-{{ item.name }}.gz
...@@ -118,15 +66,6 @@ ...@@ -118,15 +66,6 @@
- { name: "vm-bootstrap", size: "25"} - { name: "vm-bootstrap", size: "25"}
ignore_errors: True ignore_errors: True
- shell: gzip output-ubuntu-18.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-18.04-server-{{ item.size }}G-{{ item.name }}
args:
creates: output-ubuntu-18.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-18.04-server-{{ item.size }}G-{{ item.name }}.gz
with_items:
- { name: "vm-bootstrap", size: "200"}
- { name: "vm-bootstrap", size: "50"}
- { name: "vm-bootstrap", size: "25"}
ignore_errors: True
- shell: gzip output-ubuntu-20.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-20.04-server-{{ item.size }}G-{{ item.name }} - shell: gzip output-ubuntu-20.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-20.04-server-{{ item.size }}G-{{ item.name }}
args: args:
creates: output-ubuntu-20.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-20.04-server-{{ item.size }}G-{{ item.name }}.gz creates: output-ubuntu-20.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-20.04-server-{{ item.size }}G-{{ item.name }}.gz
...@@ -154,14 +93,6 @@ ...@@ -154,14 +93,6 @@
- { name: "vm-bootstrap", size: "25"} - { name: "vm-bootstrap", size: "25"}
ignore_errors: True ignore_errors: True
- shell: gzip output-centos7-{{ item.size }}G-{{ item.name }}/packer-centos7-{{ item.size }}G-{{ item.name }}
args:
creates: output-centos7-{{ item.size }}G-{{ item.name }}/packer-centos7-{{ item.size }}G-{{ item.name }}.gz
with_items:
- { name: "vm-bootstrap", size: "200"}
- { name: "vm-bootstrap", size: "50"}
- { name: "vm-bootstrap", size: "25"}
ignore_errors: True
#### Gzip is over, start to upload to shacache #### Gzip is over, start to upload to shacache
#### Build SHA512SUM.txt and MD5SUM.txt of every file. #### Build SHA512SUM.txt and MD5SUM.txt of every file.
...@@ -173,25 +104,13 @@ ...@@ -173,25 +104,13 @@
sha512sum $FILE >> SHA512SUM.txt sha512sum $FILE >> SHA512SUM.txt
md5sum $FILE >> MD5SUM.txt md5sum $FILE >> MD5SUM.txt
with_items: with_items:
- { name: "vm-bootstrap", size: "200", distro: "debian9"}
- { name: "vm-bootstrap", size: "50", distro: "debian9"}
- { name: "vm-bootstrap", size: "25", distro: "debian9"}
- { name: "vm-bootstrap", size: "200", distro: "debian10"}
- { name: "vm-bootstrap", size: "50", distro: "debian10"}
- { name: "vm-bootstrap", size: "25", distro: "debian10"}
- { name: "vm-bootstrap", size: "200", distro: "debian11"} - { name: "vm-bootstrap", size: "200", distro: "debian11"}
- { name: "vm-bootstrap", size: "50", distro: "debian11"} - { name: "vm-bootstrap", size: "50", distro: "debian11"}
- { name: "vm-bootstrap", size: "25", distro: "debian11"} - { name: "vm-bootstrap", size: "25", distro: "debian11"}
- { name: "vm-bootstrap", size: "50", distro: "debian12"} - { name: "vm-bootstrap", size: "50", distro: "debian12"}
- { name: "vm-bootstrap", size: "200", distro: "centos7"}
- { name: "vm-bootstrap", size: "50", distro: "centos7"}
- { name: "vm-bootstrap", size: "25", distro: "centos7"}
- { name: "vm-bootstrap", size: "200", distro: "centos8"} - { name: "vm-bootstrap", size: "200", distro: "centos8"}
- { name: "vm-bootstrap", size: "50", distro: "centos8"} - { name: "vm-bootstrap", size: "50", distro: "centos8"}
- { name: "vm-bootstrap", size: "25", distro: "centos8"} - { name: "vm-bootstrap", size: "25", distro: "centos8"}
- { name: "vm-bootstrap", size: "200", distro: "ubuntu-18.04-server"}
- { name: "vm-bootstrap", size: "50", distro: "ubuntu-18.04-server"}
- { name: "vm-bootstrap", size: "25", distro: "ubuntu-18.04-server"}
- { name: "vm-bootstrap", size: "200", distro: "ubuntu-20.04-server"} - { name: "vm-bootstrap", size: "200", distro: "ubuntu-20.04-server"}
- { name: "vm-bootstrap", size: "50", distro: "ubuntu-20.04-server"} - { name: "vm-bootstrap", size: "50", distro: "ubuntu-20.04-server"}
- { name: "vm-bootstrap", size: "25", distro: "ubuntu-20.04-server"} - { name: "vm-bootstrap", size: "25", distro: "ubuntu-20.04-server"}
...@@ -214,24 +133,12 @@ ...@@ -214,24 +133,12 @@
MD5SUM=$(cat MD5SUM.txt | grep packer-{{ item.distro }}-{{ item.size }}G-{{ item.name }}.gz | cut -d ' ' -f1) MD5SUM=$(cat MD5SUM.txt | grep packer-{{ item.distro }}-{{ item.size }}G-{{ item.name }}.gz | cut -d ' ' -f1)
echo "packer-{{ item.distro }}-{{ item.size }}G-{{ item.name }}.gz $BASE_URL/$SHA512SUM $MD5SUM" >> URL.txt echo "packer-{{ item.distro }}-{{ item.size }}G-{{ item.name }}.gz $BASE_URL/$SHA512SUM $MD5SUM" >> URL.txt
with_items: with_items:
- { name: "vm-bootstrap", size: "200", distro: "debian9"}
- { name: "vm-bootstrap", size: "50", distro: "debian9"}
- { name: "vm-bootstrap", size: "25", distro: "debian9"}
- { name: "vm-bootstrap", size: "200", distro: "debian10"}
- { name: "vm-bootstrap", size: "50", distro: "debian10"}
- { name: "vm-bootstrap", size: "25", distro: "debian10"}
- { name: "vm-bootstrap", size: "200", distro: "debian11"} - { name: "vm-bootstrap", size: "200", distro: "debian11"}
- { name: "vm-bootstrap", size: "50", distro: "debian11"} - { name: "vm-bootstrap", size: "50", distro: "debian11"}
- { name: "vm-bootstrap", size: "25", distro: "debian11"} - { name: "vm-bootstrap", size: "25", distro: "debian11"}
- { name: "vm-bootstrap", size: "200", distro: "centos7"}
- { name: "vm-bootstrap", size: "50", distro: "centos7"}
- { name: "vm-bootstrap", size: "25", distro: "centos7"}
- { name: "vm-bootstrap", size: "200", distro: "centos8"} - { name: "vm-bootstrap", size: "200", distro: "centos8"}
- { name: "vm-bootstrap", size: "50", distro: "centos8"} - { name: "vm-bootstrap", size: "50", distro: "centos8"}
- { name: "vm-bootstrap", size: "25", distro: "centos8"} - { name: "vm-bootstrap", size: "25", distro: "centos8"}
- { name: "vm-bootstrap", size: "200", distro: "ubuntu-18.04-server"}
- { name: "vm-bootstrap", size: "50", distro: "ubuntu-18.04-server"}
- { name: "vm-bootstrap", size: "25", distro: "ubuntu-18.04-server"}
- { name: "vm-bootstrap", size: "200", distro: "ubuntu-20.04-server"} - { name: "vm-bootstrap", size: "200", distro: "ubuntu-20.04-server"}
- { name: "vm-bootstrap", size: "50", distro: "ubuntu-20.04-server"} - { name: "vm-bootstrap", size: "50", distro: "ubuntu-20.04-server"}
- { name: "vm-bootstrap", size: "25", distro: "ubuntu-20.04-server"} - { name: "vm-bootstrap", size: "25", distro: "ubuntu-20.04-server"}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment