Skip to content

Commit

Permalink
Merge pull request #829 from b-ehlers/debian
Browse files Browse the repository at this point in the history
Debian: Generate images by packer, update to versions 12.2 and 11.8
  • Loading branch information
grossmj authored Oct 14, 2023
2 parents b03cbd7 + 92f1a40 commit bd7456c
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 56 deletions.
2 changes: 1 addition & 1 deletion appliances/bird2.gns3a
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
59 changes: 17 additions & 42 deletions appliances/debian.gns3a
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"status": "experimental",
"maintainer": "Bernhard Ehlers",
"maintainer_email": "[email protected]",
"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": {
Expand All @@ -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"
}
}
]
Expand Down
9 changes: 0 additions & 9 deletions cloud-init/Debian/README.md

This file was deleted.

Binary file removed cloud-init/Debian/debian-cloud-init-data.iso
Binary file not shown.
1 change: 1 addition & 0 deletions packer/debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian-cloud-init-data.iso
18 changes: 17 additions & 1 deletion packer/debian/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions packer/debian/debian-11.json
Original file line number Diff line number Diff line change
@@ -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"
}
1 change: 0 additions & 1 deletion packer/debian/debian-cloud-init-data.iso

This file was deleted.

4 changes: 2 additions & 2 deletions packer/debian/debian.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions packer/debian/scripts/debian.sh
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions packer/debian/scripts/networking.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.

0 comments on commit bd7456c

Please sign in to comment.