mirror of
https://github.com/GNS3/gns3-registry.git
synced 2024-12-18 20:37:57 +00:00
Added Oracle and Centos stream
This commit is contained in:
parent
42304ecc75
commit
715addcab6
9
cloud-init/centos-cloud/README.md
Normal file
9
cloud-init/centos-cloud/README.md
Normal 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
|
||||
```
|
BIN
cloud-init/centos-cloud/centos-cloud-init-data.iso
Normal file
BIN
cloud-init/centos-cloud/centos-cloud-init-data.iso
Normal file
Binary file not shown.
2
cloud-init/centos-cloud/meta-data
Normal file
2
cloud-init/centos-cloud/meta-data
Normal file
@ -0,0 +1,2 @@
|
||||
instance-id: centos-cloud
|
||||
local-hostname: centos-cloud
|
5
cloud-init/centos-cloud/user-data
Normal file
5
cloud-init/centos-cloud/user-data
Normal file
@ -0,0 +1,5 @@
|
||||
#cloud-config
|
||||
|
||||
password: centos
|
||||
chpasswd: { expire: False }
|
||||
ssh_pwauth: True
|
9
cloud-init/oracle-cloud/README.md
Normal file
9
cloud-init/oracle-cloud/README.md
Normal 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
|
||||
```
|
2
cloud-init/oracle-cloud/meta-data
Normal file
2
cloud-init/oracle-cloud/meta-data
Normal file
@ -0,0 +1,2 @@
|
||||
instance-id: oracle-cloud
|
||||
local-hostname: oracle-cloud
|
BIN
cloud-init/oracle-cloud/oracle-cloud-init-data.iso
Normal file
BIN
cloud-init/oracle-cloud/oracle-cloud-init-data.iso
Normal file
Binary file not shown.
5
cloud-init/oracle-cloud/user-data
Normal file
5
cloud-init/oracle-cloud/user-data
Normal file
@ -0,0 +1,5 @@
|
||||
#cloud-config
|
||||
|
||||
password: oracle
|
||||
chpasswd: { expire: False }
|
||||
ssh_pwauth: True
|
1
packer/centos/centos-cloud-init-data.iso
Symbolic link
1
packer/centos/centos-cloud-init-data.iso
Symbolic link
@ -0,0 +1 @@
|
||||
../../cloud-init/centos-cloud/centos-cloud-init-data.iso
|
51
packer/centos/centos8.json
Normal file
51
packer/centos/centos8.json
Normal 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"
|
||||
}
|
||||
}
|
||||
|
5
packer/centos/scripts/centos-gns3-user.sh
Normal file
5
packer/centos/scripts/centos-gns3-user.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -ex
|
||||
|
||||
printf "gns3\ngns3\n" | useradd -c "gns3" -G wheel gns3
|
10
packer/centos/scripts/post_setup.sh
Normal file
10
packer/centos/scripts/post_setup.sh
Normal 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
|
7
packer/centos/scripts/upgrade-os.sh
Normal file
7
packer/centos/scripts/upgrade-os.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
# clear repository
|
||||
dnf clean all
|
||||
|
||||
dnf update -y
|
1
packer/oracle/oracle-cloud-init-data.iso
Symbolic link
1
packer/oracle/oracle-cloud-init-data.iso
Symbolic link
@ -0,0 +1 @@
|
||||
../../cloud-init/oracle-cloud/oracle-cloud-init-data.iso
|
51
packer/oracle/oracle8.json
Normal file
51
packer/oracle/oracle8.json
Normal 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"
|
||||
}
|
||||
}
|
||||
|
5
packer/oracle/scripts/oracle-gns3-user.sh
Normal file
5
packer/oracle/scripts/oracle-gns3-user.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -ex
|
||||
|
||||
printf "gns3\ngns3\n" | useradd -c "gns3" -G wheel gns3
|
10
packer/oracle/scripts/post_setup.sh
Normal file
10
packer/oracle/scripts/post_setup.sh
Normal 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
|
7
packer/oracle/scripts/upgrade-os.sh
Normal file
7
packer/oracle/scripts/upgrade-os.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
# clear repository
|
||||
dnf clean all
|
||||
|
||||
dnf update -y
|
Loading…
Reference in New Issue
Block a user