Added Oracle and Centos stream

This commit is contained in:
Eliezer Croitoru 2022-12-23 05:34:21 +02:00
parent 42304ecc75
commit 715addcab6
18 changed files with 180 additions and 0 deletions

View File

@ -0,0 +1,9 @@
# Centos-cloud cloud-init-data image for GNS3 virtual appliance
Generated using the following commands:
```
printf "#cloud-config\n\npassword: centos\nchpasswd: { expire: False }\nssh_pwauth: True\n" > user-data
printf "instance-id: centos-cloud\nlocal-hostname: centos-cloud\n" > meta-data
mkisofs -output centos-cloud-init-data.iso -volid cidata -joliet -rock user-data meta-data
```

Binary file not shown.

View File

@ -0,0 +1,2 @@
instance-id: centos-cloud
local-hostname: centos-cloud

View File

@ -0,0 +1,5 @@
#cloud-config
password: centos
chpasswd: { expire: False }
ssh_pwauth: True

View File

@ -0,0 +1,9 @@
# Oracle-cloud cloud-init-data image for GNS3 virtual appliance
Generated using the following commands:
```
printf "#cloud-config\n\npassword: oracle\nchpasswd: { expire: False }\nssh_pwauth: True\n" > user-data
printf "instance-id: oracle-cloud\nlocal-hostname: oracle-cloud\n" > meta-data
mkisofs -output oracle-cloud-init-data.iso -volid cidata -joliet -rock user-data meta-data
```

View File

@ -0,0 +1,2 @@
instance-id: oracle-cloud
local-hostname: oracle-cloud

Binary file not shown.

View File

@ -0,0 +1,5 @@
#cloud-config
password: oracle
chpasswd: { expire: False }
ssh_pwauth: True

View File

@ -0,0 +1 @@
../../cloud-init/centos-cloud/centos-cloud-init-data.iso

View File

@ -0,0 +1,51 @@
{
"builders": [
{
"disk_compression": true,
"disk_image": true,
"disk_interface": "virtio-scsi",
"disk_size": "{{user `disk_size`}}",
"headless": true,
"iso_checksum": "sha256:{{user `iso_checksum`}}",
"iso_url": "{{user `iso_url`}}",
"net_device": "virtio-net-pci",
"qemuargs": [
[
"-cdrom",
"centos-cloud-init-data.iso"
]
],
"shutdown_command": "sudo shutdown -P now",
"ssh_password": "centos",
"ssh_timeout": "3600s",
"ssh_username": "centos",
"type": "qemu",
"vm_name": "{{user `vm_name`}}"
}
],
"provisioners": [
{
"execute_command": "sudo env {{ .Vars }} {{ .Path }}",
"script": "scripts/upgrade-os.sh",
"type": "shell"
},
{
"execute_command": "sudo env {{ .Vars }} {{ .Path }}",
"script": "scripts/centos-gns3-user.sh",
"type": "shell"
},
{
"execute_command": "sudo env {{ .Vars }} {{ .Path }}",
"script": "scripts/post_setup.sh",
"type": "shell"
}
],
"variables": {
"disk_size": "20G",
"iso_checksum": "8717251f8e4d2fe3e5032799caae89358c1ba68d65a16b5128a59ec6003aac1c",
"iso_url": "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220913.0.x86_64.qcow2",
"setup_script": "centos8.sh",
"vm_name": "centos8.qcow2"
}
}

View File

@ -0,0 +1,5 @@
#!/usr/bin/env sh
set -ex
printf "gns3\ngns3\n" | useradd -c "gns3" -G wheel gns3

View File

@ -0,0 +1,10 @@
#!/bin/sh
set -ex
# clear repository
dnf clean all
# clear unused space
echo 'Clearing unused space...'
dd if=/dev/zero bs=1M of=/zero >/dev/null 2>&1 || true; rm -f /zero
sync

View File

@ -0,0 +1,7 @@
#!/bin/sh
set -ex
# clear repository
dnf clean all
dnf update -y

View File

@ -0,0 +1 @@
../../cloud-init/oracle-cloud/oracle-cloud-init-data.iso

View File

@ -0,0 +1,51 @@
{
"builders": [
{
"disk_compression": true,
"disk_image": true,
"disk_interface": "virtio-scsi",
"disk_size": "{{user `disk_size`}}",
"headless": true,
"iso_checksum": "sha256:{{user `iso_checksum`}}",
"iso_url": "{{user `iso_url`}}",
"net_device": "virtio-net-pci",
"qemuargs": [
[
"-cdrom",
"oracle-cloud-init-data.iso"
]
],
"shutdown_command": "sudo shutdown -P now",
"ssh_password": "oracle",
"ssh_timeout": "240s",
"ssh_username": "cloud-user",
"type": "qemu",
"vm_name": "{{user `vm_name`}}"
}
],
"provisioners": [
{
"execute_command": "sudo env {{ .Vars }} {{ .Path }}",
"script": "scripts/upgrade-os.sh",
"type": "shell"
},
{
"execute_command": "sudo env {{ .Vars }} {{ .Path }}",
"script": "scripts/oracle-gns3-user.sh",
"type": "shell"
},
{
"execute_command": "sudo env {{ .Vars }} {{ .Path }}",
"script": "scripts/post_setup.sh",
"type": "shell"
}
],
"variables": {
"disk_size": "40G",
"iso_checksum": "4a98e22908333dae1423e0bb4032c88aed60dbf1267addb73a6905778e9930df",
"iso_url": "https://yum.oracle.com/templates/OracleLinux/OL8/u7/x86_64/OL8U7_x86_64-kvm-b148.qcow",
"setup_script": "oracle8.sh",
"vm_name": "oracle8.qcow2"
}
}

View File

@ -0,0 +1,5 @@
#!/usr/bin/env sh
set -ex
printf "gns3\ngns3\n" | useradd -c "gns3" -G wheel gns3

View File

@ -0,0 +1,10 @@
#!/bin/sh
set -ex
# clear repository
dnf clean all
# clear unused space
echo 'Clearing unused space...'
dd if=/dev/zero bs=1M of=/zero >/dev/null 2>&1 || true; rm -f /zero
sync

View File

@ -0,0 +1,7 @@
#!/bin/sh
set -ex
# clear repository
dnf clean all
dnf update -y