From b76538862bfb2e1ba0411a4dd4b1e2b7e87395c0 Mon Sep 17 00:00:00 2001 From: Bernhard Ehlers Date: Fri, 13 Oct 2023 22:03:48 +0200 Subject: [PATCH] Debian: Generate images by packer, update to versions 12.2 and 11.8 --- appliances/bird2.gns3a | 2 +- appliances/debian.gns3a | 59 +++++------------- cloud-init/Debian/README.md | 9 --- cloud-init/Debian/debian-cloud-init-data.iso | Bin 374784 -> 0 bytes packer/debian/.gitignore | 1 + packer/debian/README.md | 18 +++++- packer/debian/debian-11.json | 5 ++ packer/debian/debian-cloud-init-data.iso | 1 - packer/debian/debian.json | 4 +- .../Debian => packer/debian}/meta-data | 0 packer/debian/scripts/debian.sh | 3 + packer/debian/scripts/networking.sh | 1 + .../Debian => packer/debian}/user-data | 0 13 files changed, 47 insertions(+), 56 deletions(-) delete mode 100644 cloud-init/Debian/README.md delete mode 100644 cloud-init/Debian/debian-cloud-init-data.iso create mode 100644 packer/debian/.gitignore create mode 100644 packer/debian/debian-11.json delete mode 120000 packer/debian/debian-cloud-init-data.iso rename {cloud-init/Debian => packer/debian}/meta-data (100%) rename {cloud-init/Debian => packer/debian}/user-data (100%) diff --git a/appliances/bird2.gns3a b/appliances/bird2.gns3a index 4d573e11..4a076d78 100644 --- a/appliances/bird2.gns3a +++ b/appliances/bird2.gns3a @@ -29,7 +29,7 @@ "md5sum": "435218a2e90cba921cc7fde1d64a9419", "filesize": 287965184, "download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/", - "direct_download_url": "http://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/bird2-debian-2.0.12.qcow2" + "direct_download_url": "https://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/bird2-debian-2.0.12.qcow2" } ], "versions": [ diff --git a/appliances/debian.gns3a b/appliances/debian.gns3a index bb3909f4..91525a42 100644 --- a/appliances/debian.gns3a +++ b/appliances/debian.gns3a @@ -10,7 +10,7 @@ "status": "experimental", "maintainer": "Bernhard Ehlers", "maintainer_email": "dev-ehlers@mailbox.org", - "usage": "Username:\tdebian\nPassword:\tdebian\nTo become root, use \"sudo -s\".\n\nNetwork configuration:\n- In \"/etc/network/interfaces\" comment out \"source-directory /run/network/interfaces.d\"\n- Remove \"/etc/network/interfaces.d/50-cloud-init\"\n- Create \"/etc/network/interfaces.d/10-ens4\", for example:\n\nauto ens4\n#iface ens4 inet dhcp\niface ens4 inet static\n address 10.1.1.100/24\n gateway 10.1.1.1\n dns-nameservers 10.1.1.1\n", + "usage": "Username:\tdebian\nPassword:\tdebian\nTo become root, use \"sudo -s\".\n", "symbol": "linux_guest.svg", "port_name_format": "ens{port4}", "qemu": { @@ -24,58 +24,33 @@ }, "images": [ { - "filename": "debian-12-genericcloud-amd64-20230723-1450.qcow2", - "version": "12.1", - "md5sum": "6d1efcaa206de01eeeb590d773421c5c", - "filesize": 280166400, - "download_url": "https://cloud.debian.org/images/cloud/bookworm/", - "direct_download_url": "https://cloud.debian.org/images/cloud/bookworm/20230723-1450/debian-12-genericcloud-amd64-20230723-1450.qcow2" + "filename": "debian-12.2.qcow2", + "version": "12.2", + "md5sum": "adf7716ec4a4e4e9e5ccfc7a1d7bd103", + "filesize": 286654464, + "download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/", + "direct_download_url": "https://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/debian-12.2.qcow2" }, { - "filename": "debian-11-genericcloud-amd64-20230601-1398.qcow2", - "version": "11.7", - "md5sum": "1b24a841dc5ca9bcf40b94ad4b4775d4", - "filesize": 259063808, - "download_url": "https://cloud.debian.org/images/cloud/bullseye/", - "direct_download_url": "https://cloud.debian.org/images/cloud/bullseye/20230601-1398/debian-11-genericcloud-amd64-20230601-1398.qcow2" - }, - { - "filename": "debian-10-genericcloud-amd64-20230601-1398.qcow2", - "version": "10.13", - "md5sum": "ca799fb4011712f4686c422c1a9731cf", - "filesize": 228130816, - "download_url": "https://cloud.debian.org/images/cloud/buster/", - "direct_download_url": "https://cloud.debian.org/images/cloud/buster/20230601-1398/debian-10-genericcloud-amd64-20230601-1398.qcow2" - }, - { - "filename": "debian-cloud-init-data.iso", - "version": "1.0", - "md5sum": "43f6bf70c178a9d3c270b5c24971e578", - "filesize": 374784, - "download_url": "https://github.com/GNS3/gns3-registry/tree/master/cloud-init/Debian", - "direct_download_url": "https://github.com/GNS3/gns3-registry/raw/master/cloud-init/Debian/debian-cloud-init-data.iso" + "filename": "debian-11.8.qcow2", + "version": "11.8", + "md5sum": "95bf44716c7fa1a1da290fd3c98591f2", + "filesize": 264933376, + "download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/", + "direct_download_url": "https://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/debian-11.8.qcow2" } ], "versions": [ { - "name": "12.1", - "images": { - "hda_disk_image": "debian-12-genericcloud-amd64-20230723-1450.qcow2", - "cdrom_image": "debian-cloud-init-data.iso" - } - }, - { - "name": "11.7", + "name": "12.2", "images": { - "hda_disk_image": "debian-11-genericcloud-amd64-20230601-1398.qcow2", - "cdrom_image": "debian-cloud-init-data.iso" + "hda_disk_image": "debian-12.2.qcow2" } }, { - "name": "10.13", + "name": "11.8", "images": { - "hda_disk_image": "debian-10-genericcloud-amd64-20230601-1398.qcow2", - "cdrom_image": "debian-cloud-init-data.iso" + "hda_disk_image": "debian-11.8.qcow2" } } ] diff --git a/cloud-init/Debian/README.md b/cloud-init/Debian/README.md deleted file mode 100644 index 3a39551a..00000000 --- a/cloud-init/Debian/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Debian cloud-init-data image for GNS3 virtual appliance - -Generated using the following commands: - -``` -printf "#cloud-config\n\npassword: debian\nchpasswd: { expire: False }\nssh_pwauth: True\n" > user-data -printf "instance-id: debian\nlocal-hostname: debian\n" > meta-data -mkisofs -output debian-cloud-init-data.iso -volid cidata -joliet -rock user-data meta-data -``` diff --git a/cloud-init/Debian/debian-cloud-init-data.iso b/cloud-init/Debian/debian-cloud-init-data.iso deleted file mode 100644 index c5eb157e498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5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+ z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk i1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009D*B=8@y;sLe* diff --git a/packer/debian/.gitignore b/packer/debian/.gitignore new file mode 100644 index 00000000..73f64f20 --- /dev/null +++ b/packer/debian/.gitignore @@ -0,0 +1 @@ +debian-cloud-init-data.iso diff --git a/packer/debian/README.md b/packer/debian/README.md index 3bda1c00..4b6a8bff 100644 --- a/packer/debian/README.md +++ b/packer/debian/README.md @@ -8,12 +8,28 @@ To use these newer versions, you must delete the line containing `iso_checksum_type` from debian.json. -## Debian CLI installation +## Generate debian-cloud-init-data image + +debian-cloud-init-data can be generated with the following commands: + +``` +printf "#cloud-config\n\npassword: debian\nchpasswd: { expire: False }\nssh_pwauth: True\n" > user-data +printf "instance-id: debian\nlocal-hostname: debian\n" > meta-data +mkisofs -output debian-cloud-init-data.iso -volid cidata -joliet -rock user-data meta-data +``` + +## Debian CLI ``` packer build debian.json ``` +## Debian-11 CLI + +``` +packer build -var-file=debian-11.json debian.json +``` + ## BIRDv2 A build of Debian with BIRD Internet Routing Daemon v2 preinstalled. diff --git a/packer/debian/debian-11.json b/packer/debian/debian-11.json new file mode 100644 index 00000000..588c4143 --- /dev/null +++ b/packer/debian/debian-11.json @@ -0,0 +1,5 @@ +{ + "iso_url": "https://cloud.debian.org/images/cloud/bullseye/20231013-1532/debian-11-genericcloud-amd64-20231013-1532.qcow2", + "iso_checksum": "b3b2f6b3411ea6e2f097a91b579ad2838611d5cdf8fbd1089435c55f9c6bb398", + "vm_name": "debian-11.qcow2" +} diff --git a/packer/debian/debian-cloud-init-data.iso b/packer/debian/debian-cloud-init-data.iso deleted file mode 120000 index 44b9665b..00000000 --- a/packer/debian/debian-cloud-init-data.iso +++ /dev/null @@ -1 +0,0 @@ -../../cloud-init/Debian/debian-cloud-init-data.iso \ No newline at end of file diff --git a/packer/debian/debian.json b/packer/debian/debian.json index 0ee0a0f9..f17fdba6 100644 --- a/packer/debian/debian.json +++ b/packer/debian/debian.json @@ -1,7 +1,7 @@ { "variables": { - "iso_url": "https://cloud.debian.org/images/cloud/bookworm/20230612-1409/debian-12-genericcloud-amd64-20230612-1409.qcow2", - "iso_checksum": "9a18ee4954800113ee130b66ef24c0e27124aaf90cff1eb339f744a52354f788", + "iso_url": "https://cloud.debian.org/images/cloud/bookworm/20231013-1532/debian-12-genericcloud-amd64-20231013-1532.qcow2", + "iso_checksum": "3a5fd3f38f055ceb1a2f84c6184ca4de3566e29e519b405865719cc43426afdf", "disk_size": "2G", "vm_name": "debian.qcow2", "setup_script": "debian.sh" diff --git a/cloud-init/Debian/meta-data b/packer/debian/meta-data similarity index 100% rename from cloud-init/Debian/meta-data rename to packer/debian/meta-data diff --git a/packer/debian/scripts/debian.sh b/packer/debian/scripts/debian.sh index aa085731..efc9824e 100644 --- a/packer/debian/scripts/debian.sh +++ b/packer/debian/scripts/debian.sh @@ -1,5 +1,8 @@ #!/bin/sh set -ex +# reset terminal attributes on login +sed -i "1s/^/$(export TERM=vt220; tput sgr0; tput smam)/" /etc/issue + # create GNS3 user printf 'gns3\ngns3\n' | adduser --gecos 'GNS3' gns3 diff --git a/packer/debian/scripts/networking.sh b/packer/debian/scripts/networking.sh index 8667a77b..702c419d 100644 --- a/packer/debian/scripts/networking.sh +++ b/packer/debian/scripts/networking.sh @@ -12,6 +12,7 @@ fi cp /etc/resolv.conf /etc/resolv.conf.orig export DEBIAN_FRONTEND=noninteractive apt-get update +apt-get upgrade apt-get -y install --purge ifupdown resolvconf cat /etc/resolv.conf.orig > /etc/resolv.conf rm -f /etc/resolv.conf.orig diff --git a/cloud-init/Debian/user-data b/packer/debian/user-data similarity index 100% rename from cloud-init/Debian/user-data rename to packer/debian/user-data