mirror of
https://github.com/GNS3/gns3-registry.git
synced 2025-01-18 02:40:11 +00:00
Add MicroCore 6.4. More appliances are coming
This commit is contained in:
parent
9f5cea4d32
commit
8697637934
@ -11,7 +11,7 @@
|
||||
"status": "stable",
|
||||
"maintainer": "GNS3 Team",
|
||||
"maintainer_email": "developers@gns3.net",
|
||||
"usage": "Login is tc. sudo work without password",
|
||||
"usage": "For version >= 6.4 Login is gns3 and password gns3. For older version it's tc. sudo work without password",
|
||||
"symbol": "linux_guest.svg",
|
||||
|
||||
"qemu": {
|
||||
@ -38,6 +38,14 @@
|
||||
"filesize": 26411008,
|
||||
"download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
|
||||
"direct_download_url": "http://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/linux-microcore-4.0.2-clean.img"
|
||||
},
|
||||
{
|
||||
"filename": "linux-microcore-6.4.img",
|
||||
"version": "6.4",
|
||||
"md5sum": "b714d7045c5fd66ffee328e00ff798bf",
|
||||
"filesize": 52363264,
|
||||
"download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/",
|
||||
"direct_download_url": "http://downloads.sourceforge.net/project/gns-3/Qemu%20Appliances/linux-microcore-6.4.img"
|
||||
}
|
||||
],
|
||||
|
||||
@ -53,6 +61,12 @@
|
||||
"images": {
|
||||
"hda_disk_image": "linux-microcore-4.0.2-clean.img"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "6.4",
|
||||
"images": {
|
||||
"hda_disk_image": "linux-microcore-linux-6.4.img"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
14
check.py
14
check.py
@ -29,6 +29,17 @@ def check_schema(appliance):
|
||||
jsonschema.validate(appliance_json, schema)
|
||||
|
||||
|
||||
def check_packer(packer):
|
||||
path = os.path.join('packer', packer)
|
||||
if not os.path.isdir(path):
|
||||
return
|
||||
for file in os.listdir(path):
|
||||
if file.endswith('.json'):
|
||||
print('Check {}/{}'.format(packer, file))
|
||||
with open(os.path.join('packer', packer, file)) as f:
|
||||
json.load(f)
|
||||
|
||||
|
||||
def check_symbol(symbol):
|
||||
licence_file = os.path.join('symbols', symbol.replace('.svg', '.txt'))
|
||||
if not os.path.exists(licence_file):
|
||||
@ -46,6 +57,9 @@ def main():
|
||||
if symbol.endswith('.svg'):
|
||||
print('Check {}'.format(symbol))
|
||||
check_symbol(symbol)
|
||||
print("=> Check packer files")
|
||||
for packer in os.listdir('packer'):
|
||||
check_packer(packer)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -1,15 +1,18 @@
|
||||
Packer for TinyCore GNS3 appliance
|
||||
==================================
|
||||
|
||||
For building a TinyCore V6.4 appliance run:
|
||||
For building a MicroCore / TinyCore appliance run:
|
||||
|
||||
|
||||
Clean core Linux installation
|
||||
*****************************
|
||||
|
||||
The only added packages are:
|
||||
* ipv6
|
||||
* iptables
|
||||
* iproute2
|
||||
|
||||
.. code:: bash
|
||||
|
||||
packer build -var-file=tc-6.4.json tinycore-linux.json
|
||||
packer build core-linux.json
|
||||
|
||||
|
||||
Likewise, to build a TinyCore V4.7.7 appliance run:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
packer build -var-file=tc-4.7.7.json tinycore-linux.json
|
||||
|
@ -1,7 +1,9 @@
|
||||
{
|
||||
"variables": {
|
||||
"tc_iso_url": null,
|
||||
"tc_iso_checksum": null
|
||||
"tc_iso_url": "http://distro.ibiblio.org/tinycorelinux/6.x/x86/release/Core-6.4.iso",
|
||||
"tc_iso_checksum": "c8e04e26de234e5528e6eac8ecb1bdda",
|
||||
"vm_name": "linux-microcore-linux-6.4.img",
|
||||
"setup_script": "core.sh"
|
||||
},
|
||||
"builders": [
|
||||
{
|
||||
@ -15,14 +17,14 @@
|
||||
"ssh_username": "gns3",
|
||||
"ssh_password": "gns3",
|
||||
"accelerator": "none",
|
||||
"vm_name": "tinycore-linux",
|
||||
"vm_name": "{{user `vm_name`}}",
|
||||
"disk_interface": "ide",
|
||||
"disk_size": 50,
|
||||
"disk_size": 50000,
|
||||
"net_device": "e1000",
|
||||
"http_directory": "http",
|
||||
"boot_wait": "10s",
|
||||
"boot_wait": "5s",
|
||||
"boot_command": [
|
||||
"mc user=gns3<enter><wait10><wait10><wait10>",
|
||||
"mc user=gns3 secure=gns3<enter><wait10><wait10><wait10><wait10><wait10><wait10>",
|
||||
"sudo passwd gns3<enter>gns3<enter>gns3<enter>",
|
||||
"tce-load -wi openssh<enter><wait10>",
|
||||
"cd /usr/local/etc/ssh; [ -f sshd_config.example ] && sudo cp -a sshd_config.example sshd_config; cd<enter>",
|
||||
@ -43,6 +45,10 @@
|
||||
"type": "shell",
|
||||
"script": "scripts/packages.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"script": "scripts/{{user `setup_script`}}"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"script": "scripts/post_setup.sh"
|
0
packer/tinycore-linux/scripts/core.sh
Normal file
0
packer/tinycore-linux/scripts/core.sh
Normal file
@ -18,7 +18,7 @@ sudo mv /mnt/sda1/boot/isolinux /mnt/sda1/boot/extlinux
|
||||
cd /mnt/sda1/boot/extlinux
|
||||
sudo rm boot.cat isolinux.bin
|
||||
sudo mv isolinux.cfg extlinux.conf
|
||||
sudo sed -i -e '/append / s/$/ user=gns3/' -e 's/timeout .*/timeout 30/' extlinux.conf
|
||||
sudo sed -i -e '/append / s/$/ user=gns3/' -e 's/timeout .*/timeout 1/' extlinux.conf
|
||||
cd
|
||||
|
||||
# make disk bootable
|
||||
|
@ -7,14 +7,5 @@ mv /etc/sysconfig/tcedir /etc/sysconfig/tcedir.bak
|
||||
ln -s /mnt/sda1/tce /etc/sysconfig/tcedir
|
||||
rm -rf /usr/local/tce.installed/*
|
||||
|
||||
# openssh (optional)
|
||||
tce-load -wi openssh
|
||||
[ -f /usr/local/etc/ssh/ssh_config.example ] && sudo cp -a /usr/local/etc/ssh/ssh_config.example /usr/local/etc/ssh/ssh_config
|
||||
[ -f /usr/local/etc/ssh/sshd_config.example ] && sudo cp -a /usr/local/etc/ssh/sshd_config.example /usr/local/etc/ssh/sshd_config
|
||||
echo 'usr/local/etc/ssh' >> /opt/.filetool.lst
|
||||
echo '/usr/local/etc/init.d/openssh start' >> /opt/bootlocal.sh
|
||||
|
||||
tce-load -wi ipv6-`uname -r` iptables iproute2
|
||||
tce-load -wi tcpdump
|
||||
tce-load -wi iperf3
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"tc_iso_url": "http://distro.ibiblio.org/tinycorelinux/4.x/x86/archive/4.7.7/Core-4.7.7.iso",
|
||||
"tc_iso_checksum": "f610b20a97801c937ffb791443a32640"
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"tc_iso_url": "http://distro.ibiblio.org/tinycorelinux/6.x/x86/release/Core-6.4.iso",
|
||||
"tc_iso_checksum": "c8e04e26de234e5528e6eac8ecb1bdda"
|
||||
}
|
Loading…
Reference in New Issue
Block a user