├── vSphere ├── ubuntu_2004 │ ├── http │ │ ├── meta-data │ │ └── user-data │ ├── readme.md │ ├── script.sh │ ├── customisation_scripts │ │ ├── script-cloudinit-guestinfo.sh │ │ ├── script-no-dhcp.sh │ │ └── script-longhorn.sh │ ├── LICENSE │ └── ubuntu-2004.json ├── ubuntu_2204 │ ├── http │ │ ├── meta-data │ │ └── user-data │ ├── script.sh │ ├── customisation_scripts │ │ ├── script-cloudinit-guestinfo.sh │ │ ├── script-no-dhcp.sh │ │ └── script-longhorn.sh │ ├── LICENSE │ └── ubuntu-2204.json ├── centos_7 │ ├── script.sh │ ├── variables.json.example │ ├── centos7.json │ └── http │ │ └── ks.cfg ├── rhel_7 │ ├── .gitignore │ ├── variables.json.example │ ├── readme.md │ ├── rhel7.json │ ├── script.sh │ └── http │ │ └── ks.cfg ├── rhel_8 │ ├── .gitignore │ ├── variables.json.example │ ├── readme.md │ ├── rhel8.json │ ├── script.sh │ └── http │ │ └── ks.cfg ├── ubuntu_1804 │ ├── variables.json.example │ ├── script.sh │ ├── customisation_scripts │ │ └── script-no-dhcp.sh │ ├── preseed.cfg │ └── ubuntu-18.json ├── sles_15_sp2 │ ├── variables.json.example │ ├── README.md │ ├── install.sh │ ├── sles-15sp2.json │ └── autoinst.xml ├── sles_15_sp3 │ ├── variables.json.example │ ├── README.md │ ├── install.sh │ ├── sles-15sp3.json │ └── autoinst.xml ├── sles_15_sp4 │ ├── variables.json.example │ ├── README.md │ ├── install.sh │ ├── sles-15sp4.json │ └── autoinst.xml ├── opensuse_leap_15.2 │ ├── variables.json.example │ ├── install.sh │ ├── opensuse-leap-15.2-x86_64.json │ └── autoinst.xml ├── opensuse_leap_15.3 │ ├── variables.json.example │ ├── install.sh │ ├── opensuse-leap-15.3-x86_64.json │ └── autoinst.xml └── opensuse_leap_15.4 │ ├── install.sh │ ├── README.md │ ├── variables.pkrvar.hcl.example │ ├── opensuse_leap15_4_x86_64.pkr.hcl │ └── autoinst.xml ├── .idea ├── Rancher-Packer.iml ├── vcs.xml └── .gitignore ├── .gitignore ├── .github ├── cloud-init.yaml └── workflows │ └── mainv2.yml ├── readme.md └── LICENSE /vSphere/ubuntu_2004/http/meta-data: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vSphere/ubuntu_2204/http/meta-data: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.idea/Rancher-Packer.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Cache objects 2 | packer_cache/ 3 | 4 | # Crash log 5 | crash.log 6 | 7 | # For built boxes 8 | *.box 9 | 10 | # Config file 11 | variables.json 12 | 13 | # Downloaded iso's 14 | *.iso -------------------------------------------------------------------------------- /vSphere/centos_7/script.sh: -------------------------------------------------------------------------------- 1 | # Reset the machine-id value. This has known to cause issues with DHCP 2 | # 3 | echo -n > /etc/machine-id 4 | 5 | # Reset any existing cloud-init state 6 | # 7 | cloud-init clean -s -l 8 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | -------------------------------------------------------------------------------- /vSphere/rhel_7/.gitignore: -------------------------------------------------------------------------------- 1 | # Cache objects 2 | packer_cache/ 3 | 4 | # Crash log 5 | crash.log 6 | 7 | # For built boxes 8 | *.box 9 | 10 | # Config file 11 | variables.json 12 | 13 | # Downloaded iso's 14 | *.iso 15 | -------------------------------------------------------------------------------- /vSphere/rhel_8/.gitignore: -------------------------------------------------------------------------------- 1 | # Cache objects 2 | packer_cache/ 3 | 4 | # Crash log 5 | crash.log 6 | 7 | # For built boxes 8 | *.box 9 | 10 | # Config file 11 | variables.json 12 | 13 | # Downloaded iso's 14 | *.iso 15 | -------------------------------------------------------------------------------- /vSphere/ubuntu_2004/readme.md: -------------------------------------------------------------------------------- 1 | Ubuntu 2004 Install using the newer Subiquity based installer 2 | 3 | Used Nick Charlton's config as a template, modifying it for RKE use: 4 | 5 | https://nickcharlton.net/posts/automating-ubuntu-2004-installs-with-packer.html -------------------------------------------------------------------------------- /vSphere/centos_7/variables.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "vcenter_server":"", 3 | "username":"administrator@vsphere.local", 4 | "password":"", 5 | "datastore":"", 6 | "folder": "", 7 | "host":"", 8 | "cluster": "", 9 | "network": "", 10 | "ssh_username": "root", 11 | "ssh_password": "PackerBuilt!" 12 | } 13 | -------------------------------------------------------------------------------- /vSphere/ubuntu_1804/variables.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "vcenter_server":"", 3 | "username":"administrator@vsphere.local", 4 | "password":"", 5 | "datastore":"", 6 | "folder": "", 7 | "host":"", 8 | "cluster": "", 9 | "network": "", 10 | "ssh_username": "packerbuilt", 11 | "ssh_password": "PackerBuilt!" 12 | } 13 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp2/variables.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "vcenter_server":"", 3 | "username":"", 4 | "password":"", 5 | "datastore":"", 6 | "folder": "", 7 | "host":"", 8 | "cluster": "", 9 | "network": "", 10 | "ssh_username": "packerbuilt", 11 | "ssh_password": "PackerBuilt!", 12 | "template_name": "template_sles_rancher" 13 | } 14 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp3/variables.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "vcenter_server":"", 3 | "username":"", 4 | "password":"", 5 | "datastore":"", 6 | "folder": "", 7 | "host":"", 8 | "cluster": "", 9 | "network": "", 10 | "ssh_username": "packerbuilt", 11 | "ssh_password": "PackerBuilt!", 12 | "template_name": "template_sles_rancher" 13 | } 14 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp4/variables.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "vcenter_server":"", 3 | "username":"", 4 | "password":"", 5 | "datastore":"", 6 | "folder": "", 7 | "host":"", 8 | "cluster": "", 9 | "network": "", 10 | "ssh_username": "packerbuilt", 11 | "ssh_password": "PackerBuilt!", 12 | "template_name": "template_sles_rancher" 13 | } 14 | -------------------------------------------------------------------------------- /vSphere/opensuse_leap_15.2/variables.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "vcenter_server":"", 3 | "username":"", 4 | "password":"", 5 | "datastore":"", 6 | "folder": "", 7 | "host":"", 8 | "cluster": "", 9 | "network": "", 10 | "ssh_username": "packerbuilt", 11 | "ssh_password": "PackerBuilt!", 12 | "template_name": "template_opensuse_rancher" 13 | } 14 | -------------------------------------------------------------------------------- /vSphere/opensuse_leap_15.3/variables.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "vcenter_server":"", 3 | "username":"", 4 | "password":"", 5 | "datastore":"", 6 | "folder": "", 7 | "host":"", 8 | "cluster": "", 9 | "network": "", 10 | "ssh_username": "packerbuilt", 11 | "ssh_password": "PackerBuilt!", 12 | "template_name": "template_opensuse_rancher" 13 | } 14 | -------------------------------------------------------------------------------- /vSphere/rhel_7/variables.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "vcenter_server":"", 3 | "username":"administrator@vsphere.local", 4 | "password":"", 5 | "datastore":"", 6 | "folder": "", 7 | "host":"", 8 | "cluster": "", 9 | "network": "", 10 | "ssh_username": "root", 11 | "ssh_password": "PackerBuilt!", 12 | "vm_image_name" "rhel_7_packer_image" 13 | } 14 | -------------------------------------------------------------------------------- /vSphere/rhel_8/variables.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "vcenter_server":"", 3 | "username":"administrator@vsphere.local", 4 | "password":"", 5 | "datastore":"", 6 | "folder": "", 7 | "host":"", 8 | "cluster": "", 9 | "network": "", 10 | "ssh_username": "root", 11 | "ssh_password": "PackerBuilt!", 12 | "vm_image_name" "rhel_8_packer_image" 13 | } 14 | -------------------------------------------------------------------------------- /vSphere/rhel_8/readme.md: -------------------------------------------------------------------------------- 1 | #Rhel 8 clean template 2 | This should build a usable Rancher Template 3 | 4 | It does have the code for an internal proxy - just remove that configuration if its not needed. 5 | 6 | Please edit the following: 7 | * script.sh 8 | * variables.json 9 | * rhel7.json 10 | 11 | Replace values for proxy (if needed), docker server repo if you have it local, domain names for subscription, and your local Red Hat Satellite Server if its on prem. 12 | 13 | -------------------------------------------------------------------------------- /vSphere/rhel_7/readme.md: -------------------------------------------------------------------------------- 1 | #Rhel 7 clean template 2 | This should build a usable Rancher Template 3 | 4 | It does have the code for an internal proxy - just remove that configuration if its not needed. 5 | 6 | Please edit the following: 7 | * script.sh 8 | * variables.json 9 | * rhel7.json 10 | 11 | Replace values for proxy (if needed), docker server repo if you have it local, domain names for subscription, and your local Red Hat Satellite Server if its on prem. 12 | 13 | 14 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp2/README.md: -------------------------------------------------------------------------------- 1 | # Rancher-suitable Packer build configuration for SLES 15 SP2 2 | 3 | Before you use Packer to build this image, you need to do the following: 4 | 5 | * Download the SLES 15 SP2 'online' GM ISO (`SLE-15-SP2-Online-x86_64-GM-Media1.iso`) and drop 6 | it into this folder; 7 | * Update `autoinstall.xml` and amend line 272 to specify your registration code 8 | so that various add-ons can be included. 9 | 10 | As with the other openSUSE image, you may also want to change the default build user (`packerbuilt`) / 11 | password. 12 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp3/README.md: -------------------------------------------------------------------------------- 1 | # Rancher-suitable Packer build configuration for SLES 15 SP3 2 | 3 | Before you use Packer to build this image, you need to do the following: 4 | 5 | * Download the SLES 15 SP3 'online' GM ISO (`SLE-15-SP3-Online-x86_64-QU1-Media1.iso`) and drop 6 | it into this folder; 7 | * Update `autoinstall.xml` and amend line 269 to specify your registration code 8 | so that various add-ons can be included. 9 | 10 | As with the other openSUSE image, you may also want to change the default build user (`packerbuilt`) / 11 | password. 12 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp4/README.md: -------------------------------------------------------------------------------- 1 | # Rancher-suitable Packer build configuration for SLES 15 SP4 2 | 3 | Before you use Packer to build this image, you need to do the following: 4 | 5 | * Download the SLES 15 SP4 'online' GM ISO (`SLE-15-SP4-Online-x86_64-QU1-Media1.iso`) and drop 6 | it into this folder; 7 | * Update `autoinstall.xml` and amend line 266 to specify your registration code 8 | so that various add-ons can be included. 9 | 10 | As with the other openSUSE image, you may also want to change the default build user (`packerbuilt`) / 11 | password. 12 | -------------------------------------------------------------------------------- /vSphere/ubuntu_1804/script.sh: -------------------------------------------------------------------------------- 1 | # Apply updates and cleanup Apt cache 2 | # 3 | apt-get update ; apt-get -y dist-upgrade 4 | apt-get -y autoremove 5 | apt-get -y clean 6 | 7 | # Disable swap - generally recommended for K8s, but otherwise enable it for other workloads 8 | echo "Disable Swap" 9 | swapoff -a 10 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 11 | 12 | # Reset the machine-id value. This has known to cause issues with DHCP 13 | # 14 | echo "Resetting machine-id" 15 | truncate -s 0 /etc/machine-id 16 | rm /var/lib/dbus/machine-id 17 | ln -s /etc/machine-id /var/lib/dbus/machine-id 18 | 19 | # Reset any existing cloud-init state 20 | # 21 | cloud-init clean -s -l -------------------------------------------------------------------------------- /vSphere/ubuntu_2204/script.sh: -------------------------------------------------------------------------------- 1 | # Apply updates and cleanup Apt cache 2 | 3 | apt-get update ; apt-get -y dist-upgrade 4 | apt-get -y autoremove 5 | apt-get -y clean 6 | # apt-get install docker.io -y 7 | 8 | # Disable swap - generally recommended for K8s, but otherwise enable it for other workloads 9 | echo "Disabling Swap" 10 | swapoff -a 11 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 12 | 13 | # Reset the machine-id value. This has known to cause issues with DHCP 14 | # 15 | echo "Reset Machine-ID" 16 | truncate -s 0 /etc/machine-id 17 | rm /var/lib/dbus/machine-id 18 | ln -s /etc/machine-id /var/lib/dbus/machine-id 19 | 20 | # Reset any existing cloud-init state 21 | # 22 | echo "Reset Cloud-Init" 23 | rm /etc/cloud/cloud.cfg.d/*.cfg 24 | cloud-init clean -s -l -------------------------------------------------------------------------------- /vSphere/ubuntu_2004/script.sh: -------------------------------------------------------------------------------- 1 | # Apply updates and cleanup Apt cache 2 | # packer build --var-file=variables.json ubuntu-2004.json 3 | apt-get update ; apt-get -y dist-upgrade 4 | apt-get -y autoremove 5 | apt-get -y clean 6 | apt-get install docker.io -y 7 | 8 | # Disable swap - generally recommended for K8s, but otherwise enable it for other workloads 9 | echo "Disabling Swap" 10 | swapoff -a 11 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 12 | 13 | # Reset the machine-id value. This has known to cause issues with DHCP 14 | # 15 | echo "Reset Machine-ID" 16 | truncate -s 0 /etc/machine-id 17 | rm /var/lib/dbus/machine-id 18 | ln -s /etc/machine-id /var/lib/dbus/machine-id 19 | 20 | # Reset any existing cloud-init state 21 | # 22 | echo "Reset Cloud-Init" 23 | rm /etc/cloud/cloud.cfg.d/*.cfg 24 | cloud-init clean -s -l -------------------------------------------------------------------------------- /vSphere/ubuntu_2004/customisation_scripts/script-cloudinit-guestinfo.sh: -------------------------------------------------------------------------------- 1 | # Apply updates and cleanup Apt cache 2 | # 3 | apt-get update ; apt-get -y dist-upgrade 4 | apt-get -y autoremove 5 | apt-get -y clean 6 | 7 | # Disable swap - generally recommended for K8s, but otherwise enable it for other workloads 8 | swapoff -a 9 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 10 | 11 | # Reset the machine-id value. This has known to cause issues with DHCP 12 | # 13 | truncate -s 0 /etc/machine-id 14 | rm /var/lib/dbus/machine-id 15 | ln -s /etc/machine-id /var/lib/dbus/machine-id 16 | 17 | # Reset any existing cloud-init state 18 | # 19 | echo "Resetting Cloud-Init" 20 | rm /etc/cloud/cloud.cfg.d/*.cfg 21 | cloud-init clean -s -l 22 | 23 | # Add cloud-init-vmware-guestinfo 24 | # 25 | curl -sSL https://raw.githubusercontent.com/vmware/cloud-init-vmware-guestinfo/master/install.sh | sh - 26 | -------------------------------------------------------------------------------- /vSphere/ubuntu_2204/customisation_scripts/script-cloudinit-guestinfo.sh: -------------------------------------------------------------------------------- 1 | # Apply updates and cleanup Apt cache 2 | # 3 | apt-get update ; apt-get -y dist-upgrade 4 | apt-get -y autoremove 5 | apt-get -y clean 6 | 7 | # Disable swap - generally recommended for K8s, but otherwise enable it for other workloads 8 | swapoff -a 9 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 10 | 11 | # Reset the machine-id value. This has known to cause issues with DHCP 12 | # 13 | truncate -s 0 /etc/machine-id 14 | rm /var/lib/dbus/machine-id 15 | ln -s /etc/machine-id /var/lib/dbus/machine-id 16 | 17 | # Reset any existing cloud-init state 18 | # 19 | echo "Resetting Cloud-Init" 20 | rm /etc/cloud/cloud.cfg.d/*.cfg 21 | cloud-init clean -s -l 22 | 23 | # Add cloud-init-vmware-guestinfo 24 | # 25 | curl -sSL https://raw.githubusercontent.com/vmware/cloud-init-vmware-guestinfo/master/install.sh | sh - 26 | -------------------------------------------------------------------------------- /vSphere/opensuse_leap_15.2/install.sh: -------------------------------------------------------------------------------- 1 | # Apply updates 2 | # 3 | zypper -n dup -y 4 | 5 | # Disable swap - generally recommendeded for K8s 6 | # 7 | swapoff -a 8 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 9 | 10 | # Reset the machine-id value. This has known to cause issues with DHCP 11 | # 12 | truncate -s 0 /etc/machine-id 13 | rm /var/lib/dbus/machine-id 14 | ln -s /etc/machine-id /var/lib/dbus/machine-id 15 | 16 | # Cleanup 17 | # 18 | zypper -n clean --all 19 | rm -f /etc/udev/rules.d/70-persistent-net.rules 20 | touch /etc/udev/rules.d/75-persistent-net-generator.rules 21 | truncate -s 0 /etc/{hostname,hosts,resolv.conf} 22 | for seed in /var/lib/systemd/random-seed /var/lib/misc/random-seed; do 23 | [ -f "$seed" ] && rm -f "$seed" 24 | done 25 | if [ -d /var/lib/wicked ]; then 26 | rm -rf /var/lib/wicked/* 27 | fi 28 | rm -rf /tmp/* /tmp/.* /var/tmp/* /var/tmp/.* &> /dev/null || true 29 | rm -rf /var/cache/*/* /var/crash/* /var/lib/systemd/coredump/* 30 | cloud-init clean -s -l 31 | -------------------------------------------------------------------------------- /vSphere/opensuse_leap_15.3/install.sh: -------------------------------------------------------------------------------- 1 | # Apply updates 2 | # 3 | zypper -n dup -y 4 | 5 | # Disable swap - generally recommendeded for K8s 6 | # 7 | swapoff -a 8 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 9 | 10 | # Reset the machine-id value. This has known to cause issues with DHCP 11 | # 12 | truncate -s 0 /etc/machine-id 13 | rm /var/lib/dbus/machine-id 14 | ln -s /etc/machine-id /var/lib/dbus/machine-id 15 | 16 | # Cleanup 17 | # 18 | zypper -n clean --all 19 | rm -f /etc/udev/rules.d/70-persistent-net.rules 20 | touch /etc/udev/rules.d/75-persistent-net-generator.rules 21 | truncate -s 0 /etc/{hostname,hosts,resolv.conf} 22 | for seed in /var/lib/systemd/random-seed /var/lib/misc/random-seed; do 23 | [ -f "$seed" ] && rm -f "$seed" 24 | done 25 | if [ -d /var/lib/wicked ]; then 26 | rm -rf /var/lib/wicked/* 27 | fi 28 | rm -rf /tmp/* /tmp/.* /var/tmp/* /var/tmp/.* &> /dev/null || true 29 | rm -rf /var/cache/*/* /var/crash/* /var/lib/systemd/coredump/* 30 | cloud-init clean -s -l 31 | 32 | -------------------------------------------------------------------------------- /vSphere/ubuntu_1804/customisation_scripts/script-no-dhcp.sh: -------------------------------------------------------------------------------- 1 | # Apply updates and cleanup Apt cache 2 | # 3 | apt-get update ; apt-get -y dist-upgrade 4 | apt-get -y autoremove 5 | apt-get -y clean 6 | 7 | # Disable swap - generally recommended for K8s, but otherwise enable it for other workloads 8 | echo "Disable Swap" 9 | swapoff -a 10 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 11 | 12 | # Reset the machine-id value. This has known to cause issues with DHCP 13 | # 14 | echo "Resetting machine-id" 15 | truncate -s 0 /etc/machine-id 16 | rm /var/lib/dbus/machine-id 17 | ln -s /etc/machine-id /var/lib/dbus/machine-id 18 | 19 | # Prevent cloud-init from setting IP 20 | # 21 | echo "Disabling cloud-init networking" 22 | bash -c "echo 'network: {config: disabled}' > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg" 23 | 24 | # Reset any existing cloud-init state 25 | # 26 | echo "Resetting Cloud-Init" 27 | cloud-init clean -s -l 28 | 29 | echo "Removing existing Netplan config file" 30 | rm /etc/netplan/01-netcfg.yaml 31 | -------------------------------------------------------------------------------- /vSphere/ubuntu_2004/customisation_scripts/script-no-dhcp.sh: -------------------------------------------------------------------------------- 1 | # Apply updates and cleanup Apt cache 2 | # 3 | apt-get update ; apt-get -y dist-upgrade 4 | apt-get -y autoremove 5 | apt-get -y clean 6 | 7 | # Disable swap - generally recommended for K8s, but otherwise enable it for other workloads 8 | echo "Disable Swap" 9 | swapoff -a 10 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 11 | 12 | # Reset the machine-id value. This has known to cause issues with DHCP 13 | # 14 | echo "Resetting machine-id" 15 | truncate -s 0 /etc/machine-id 16 | rm /var/lib/dbus/machine-id 17 | ln -s /etc/machine-id /var/lib/dbus/machine-id 18 | 19 | # Reset any existing cloud-init state 20 | # 21 | echo "Resetting Cloud-Init" 22 | rm /etc/cloud/cloud.cfg.d/*.cfg 23 | cloud-init clean -s -l 24 | 25 | # Prevent cloud-init from setting IP 26 | # 27 | echo "Disabling cloud-init networking" 28 | bash -c "echo 'network: {config: disabled}' > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg" 29 | 30 | 31 | echo "Removing existing Netplan config file" 32 | rm /etc/netplan/*.yaml 33 | -------------------------------------------------------------------------------- /vSphere/ubuntu_2204/customisation_scripts/script-no-dhcp.sh: -------------------------------------------------------------------------------- 1 | # Apply updates and cleanup Apt cache 2 | # 3 | apt-get update ; apt-get -y dist-upgrade 4 | apt-get -y autoremove 5 | apt-get -y clean 6 | 7 | # Disable swap - generally recommended for K8s, but otherwise enable it for other workloads 8 | echo "Disable Swap" 9 | swapoff -a 10 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 11 | 12 | # Reset the machine-id value. This has known to cause issues with DHCP 13 | # 14 | echo "Resetting machine-id" 15 | truncate -s 0 /etc/machine-id 16 | rm /var/lib/dbus/machine-id 17 | ln -s /etc/machine-id /var/lib/dbus/machine-id 18 | 19 | # Reset any existing cloud-init state 20 | # 21 | echo "Resetting Cloud-Init" 22 | rm /etc/cloud/cloud.cfg.d/*.cfg 23 | cloud-init clean -s -l 24 | 25 | # Prevent cloud-init from setting IP 26 | # 27 | echo "Disabling cloud-init networking" 28 | bash -c "echo 'network: {config: disabled}' > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg" 29 | 30 | 31 | echo "Removing existing Netplan config file" 32 | rm /etc/netplan/*.yaml 33 | -------------------------------------------------------------------------------- /vSphere/ubuntu_2004/customisation_scripts/script-longhorn.sh: -------------------------------------------------------------------------------- 1 | # Apply updates and cleanup Apt cache 2 | # packer build --var-file=variables.json ubuntu-2004.json 3 | apt-get update ; apt-get -y dist-upgrade 4 | apt-get -y autoremove 5 | apt-get -y clean 6 | apt-get install docker.io open-iscsi -y 7 | 8 | # Disable swap - generally recommended for K8s, but otherwise enable it for other workloads 9 | echo "Disabling Swap" 10 | swapoff -a 11 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 12 | 13 | # Reset the machine-id value. This has known to cause issues with DHCP 14 | # 15 | echo "Reset Machine-ID" 16 | truncate -s 0 /etc/machine-id 17 | rm /var/lib/dbus/machine-id 18 | ln -s /etc/machine-id /var/lib/dbus/machine-id 19 | 20 | # Reset any existing cloud-init state 21 | # 22 | echo "Reset Cloud-Init" 23 | rm /etc/cloud/cloud.cfg.d/*.cfg 24 | cloud-init clean -s -l 25 | 26 | # Prevent cloud-init from setting IP 27 | # 28 | echo "Disabling cloud-init networking" 29 | bash -c "echo 'network: {config: disabled}' > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg" 30 | 31 | echo "Removing existing Netplan config file" 32 | rm /etc/netplan/*.yaml 33 | -------------------------------------------------------------------------------- /vSphere/ubuntu_2204/customisation_scripts/script-longhorn.sh: -------------------------------------------------------------------------------- 1 | # Apply updates and cleanup Apt cache 2 | # packer build --var-file=variables.json ubuntu-2004.json 3 | apt-get update ; apt-get -y dist-upgrade 4 | apt-get -y autoremove 5 | apt-get -y clean 6 | apt-get install docker.io open-iscsi -y 7 | 8 | # Disable swap - generally recommended for K8s, but otherwise enable it for other workloads 9 | echo "Disabling Swap" 10 | swapoff -a 11 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 12 | 13 | # Reset the machine-id value. This has known to cause issues with DHCP 14 | # 15 | echo "Reset Machine-ID" 16 | truncate -s 0 /etc/machine-id 17 | rm /var/lib/dbus/machine-id 18 | ln -s /etc/machine-id /var/lib/dbus/machine-id 19 | 20 | # Reset any existing cloud-init state 21 | # 22 | echo "Reset Cloud-Init" 23 | rm /etc/cloud/cloud.cfg.d/*.cfg 24 | cloud-init clean -s -l 25 | 26 | # Prevent cloud-init from setting IP 27 | # 28 | echo "Disabling cloud-init networking" 29 | bash -c "echo 'network: {config: disabled}' > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg" 30 | 31 | echo "Removing existing Netplan config file" 32 | rm /etc/netplan/*.yaml 33 | -------------------------------------------------------------------------------- /vSphere/ubuntu_2004/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 Nick Charlton 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /vSphere/ubuntu_2204/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 Nick Charlton 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /vSphere/opensuse_leap_15.4/install.sh: -------------------------------------------------------------------------------- 1 | # Apply updates not needed as these will be pulled after first reboot. 2 | # 3 | # zypper -n dup -y 4 | 5 | # Dirty hack to handle lock by yast2 packages install after reboot. 6 | # wait 10 minutes :) 7 | sleep 600 8 | 9 | # Disable swap - generally recommendeded for K8s 10 | # Handling this in the pre-seed (autoinst.xml) 11 | # swapoff -a 12 | # sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 13 | 14 | # Reset the machine-id value. This has known to cause issues with DHCP 15 | # 16 | truncate -s 0 /etc/machine-id 17 | rm /var/lib/dbus/machine-id 18 | ln -s /etc/machine-id /var/lib/dbus/machine-id 19 | 20 | # Cleanup 21 | # 22 | zypper -n clean --all 23 | rm -f /etc/udev/rules.d/70-persistent-net.rules 24 | touch /etc/udev/rules.d/75-persistent-net-generator.rules 25 | truncate -s 0 /etc/{hostname,hosts,resolv.conf} 26 | for seed in /var/lib/systemd/random-seed /var/lib/misc/random-seed; do 27 | [ -f "$seed" ] && rm -f "$seed" 28 | done 29 | if [ -d /var/lib/wicked ]; then 30 | rm -rf /var/lib/wicked/* 31 | fi 32 | rm -rf /tmp/* /tmp/.* /var/tmp/* /var/tmp/.* &> /dev/null || true 33 | rm -rf /var/cache/*/* /var/crash/* /var/lib/systemd/coredump/* 34 | cloud-init clean -s -l 35 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp4/install.sh: -------------------------------------------------------------------------------- 1 | # Apply updates 2 | # 3 | zypper -n dup -y 4 | 5 | # Disable swap - generally recommendeded for K8s 6 | # 7 | swapoff -a 8 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 9 | 10 | # Reset the machine-id value. This has known to cause issues with DHCP 11 | # 12 | truncate -s 0 /etc/machine-id 13 | rm /var/lib/dbus/machine-id 14 | ln -s /etc/machine-id /var/lib/dbus/machine-id 15 | 16 | # Ensure cloud-init services are enabled 17 | systemctl enable cloud-init.service 18 | systemctl enable cloud-init-local.server 19 | systemctl enable cloud-config.service 20 | systemctl enable cloud-final.service 21 | 22 | # Cleanup 23 | # 24 | zypper -n clean --all 25 | /usr/sbin/SUSEConnect --de-register 26 | zypper -n rr SLES15-SP4-15.4-0 27 | rm -f /etc/udev/rules.d/70-persistent-net.rules 28 | touch /etc/udev/rules.d/75-persistent-net-generator.rules 29 | truncate -s 0 /etc/{hostname,hosts,resolv.conf} 30 | for seed in /var/lib/systemd/random-seed /var/lib/misc/random-seed; do 31 | [ -f "$seed" ] && rm -f "$seed" 32 | done 33 | if [ -d /var/lib/wicked ]; then 34 | rm -rf /var/lib/wicked/* 35 | fi 36 | rm -rf /tmp/* /tmp/.* /var/tmp/* /var/tmp/.* &> /dev/null || true 37 | rm -rf /var/cache/*/* /var/crash/* /var/lib/systemd/coredump/* 38 | cloud-init clean -s -l 39 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp2/install.sh: -------------------------------------------------------------------------------- 1 | # Apply updates 2 | # 3 | zypper -n dup -y 4 | 5 | # Disable swap - generally recommendeded for K8s 6 | # 7 | swapoff -a 8 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 9 | 10 | # Reset the machine-id value. This has known to cause issues with DHCP 11 | # 12 | truncate -s 0 /etc/machine-id 13 | rm /var/lib/dbus/machine-id 14 | ln -s /etc/machine-id /var/lib/dbus/machine-id 15 | 16 | # Ensure cloud-init services are enabled 17 | systemctl enable cloud-init.service 18 | systemctl enable cloud-init-local.server 19 | systemctl enable cloud-config.service 20 | systemctl enable cloud-final.service 21 | 22 | 23 | # Cleanup 24 | # 25 | zypper -n clean --all 26 | /usr/sbin/SUSEConnect --de-register 27 | zypper -n rr SLES15-SP2-15.2-0 28 | rm -f /etc/udev/rules.d/70-persistent-net.rules 29 | touch /etc/udev/rules.d/75-persistent-net-generator.rules 30 | truncate -s 0 /etc/{hostname,hosts,resolv.conf} 31 | for seed in /var/lib/systemd/random-seed /var/lib/misc/random-seed; do 32 | [ -f "$seed" ] && rm -f "$seed" 33 | done 34 | if [ -d /var/lib/wicked ]; then 35 | rm -rf /var/lib/wicked/* 36 | fi 37 | rm -rf /tmp/* /tmp/.* /var/tmp/* /var/tmp/.* &> /dev/null || true 38 | rm -rf /var/cache/*/* /var/crash/* /var/lib/systemd/coredump/* 39 | cloud-init clean -s -l 40 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp3/install.sh: -------------------------------------------------------------------------------- 1 | # Apply updates 2 | # 3 | zypper -n dup -y 4 | 5 | # Disable swap - generally recommendeded for K8s 6 | # 7 | swapoff -a 8 | sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab 9 | 10 | # Reset the machine-id value. This has known to cause issues with DHCP 11 | # 12 | truncate -s 0 /etc/machine-id 13 | rm /var/lib/dbus/machine-id 14 | ln -s /etc/machine-id /var/lib/dbus/machine-id 15 | 16 | # Ensure cloud-init services are enabled 17 | systemctl enable cloud-init.service 18 | systemctl enable cloud-init-local.server 19 | systemctl enable cloud-config.service 20 | systemctl enable cloud-final.service 21 | 22 | 23 | # Cleanup 24 | # 25 | zypper -n clean --all 26 | /usr/sbin/SUSEConnect --de-register 27 | zypper -n rr SLES15-SP3-15.3-0 28 | rm -f /etc/udev/rules.d/70-persistent-net.rules 29 | touch /etc/udev/rules.d/75-persistent-net-generator.rules 30 | truncate -s 0 /etc/{hostname,hosts,resolv.conf} 31 | for seed in /var/lib/systemd/random-seed /var/lib/misc/random-seed; do 32 | [ -f "$seed" ] && rm -f "$seed" 33 | done 34 | if [ -d /var/lib/wicked ]; then 35 | rm -rf /var/lib/wicked/* 36 | fi 37 | rm -rf /tmp/* /tmp/.* /var/tmp/* /var/tmp/.* &> /dev/null || true 38 | rm -rf /var/cache/*/* /var/crash/* /var/lib/systemd/coredump/* 39 | cloud-init clean -s -l 40 | -------------------------------------------------------------------------------- /vSphere/ubuntu_2004/http/user-data: -------------------------------------------------------------------------------- 1 | #cloud-config 2 | autoinstall: 3 | version: 1 4 | early-commands: 5 | - systemctl stop ssh # otherwise packer tries to connect and exceed max attempts 6 | locale: en_US 7 | storage: 8 | config: 9 | - grub_device: true 10 | id: disk-sda 11 | path: /dev/sda 12 | ptable: gpt 13 | type: disk 14 | wipe: superblock-recursive 15 | - device: disk-sda 16 | flag: bios_grub 17 | id: partition-0 18 | number: 1 19 | size: 1048576 20 | type: partition 21 | - device: disk-sda 22 | id: partition-1 23 | number: 2 24 | size: -1 25 | type: partition 26 | wipe: superblock 27 | - fstype: ext4 28 | id: format-0 29 | type: format 30 | volume: partition-1 31 | - device: format-0 32 | id: mount-0 33 | path: / 34 | type: mount 35 | keyboard: 36 | layout: en 37 | variant: uk 38 | identity: 39 | hostname: ubuntu 40 | username: packerbuilt 41 | password: '$1$rKxy/hZT$vAZ801S0/UEAEmVKogUdU0' # Password in hashed format 42 | ssh: 43 | install-server: yes 44 | allow-pw: yes 45 | packages: 46 | - open-vm-tools 47 | late-commands: 48 | - echo 'packerbuilt ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/packerbuilt 49 | - chmod 440 /target/etc/sudoers.d/packerbuilt 50 | -------------------------------------------------------------------------------- /vSphere/ubuntu_2204/http/user-data: -------------------------------------------------------------------------------- 1 | #cloud-config 2 | autoinstall: 3 | version: 1 4 | early-commands: 5 | - systemctl stop ssh # otherwise packer tries to connect and exceed max attempts 6 | locale: en_US 7 | storage: 8 | config: 9 | - grub_device: true 10 | id: disk-sda 11 | path: /dev/sda 12 | ptable: gpt 13 | type: disk 14 | wipe: superblock-recursive 15 | - device: disk-sda 16 | flag: bios_grub 17 | id: partition-0 18 | number: 1 19 | size: 1048576 20 | type: partition 21 | - device: disk-sda 22 | id: partition-1 23 | number: 2 24 | size: -1 25 | type: partition 26 | wipe: superblock 27 | - fstype: ext4 28 | id: format-0 29 | type: format 30 | volume: partition-1 31 | - device: format-0 32 | id: mount-0 33 | path: / 34 | type: mount 35 | keyboard: 36 | layout: en 37 | variant: uk 38 | identity: 39 | hostname: ubuntu 40 | username: packerbuilt 41 | password: '$1$rKxy/hZT$vAZ801S0/UEAEmVKogUdU0' # Password in hashed format 42 | ssh: 43 | install-server: yes 44 | allow-pw: yes 45 | packages: 46 | - open-vm-tools 47 | late-commands: 48 | - echo 'packerbuilt ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/packerbuilt 49 | - chmod 440 /target/etc/sudoers.d/packerbuilt 50 | -------------------------------------------------------------------------------- /vSphere/opensuse_leap_15.4/README.md: -------------------------------------------------------------------------------- 1 | # Packer OpenSUSE Leap 15.4 Image in VMware for Rancher RKE2 2 | 3 | This packer script will create an OpenSUSE Leap 15.4 Template. tergeted to be a Golden Image for RKE2 deployments. 4 | 5 | ## The following is handled in the preseed file ```autoinst.xml``` 6 | 7 | * Swap not implemented. 8 | * Disk-1 as XFS Partition mounted under ```/var/lib/rancher```. 9 | * Installation of cloud-init. 10 | * cloud-init services enablement. 11 | 12 | ## Create a hashed 512-sha password for the priviledged user 13 | 14 | The user ```root``` is employed in the script for simplicity of operations and a hashed password must be provided in the ```autoinst.xml``` file. 15 | To generate a hashed 512-sha password for this user, you can use ```openssl``` as the example below: 16 | 17 | ```sh 18 | openssl passwd -6 19 | Password: 20 | Verifying - Password: 21 | $6$qe3staoHstY7ptxj$.QDw8GgQE.UFUdynEkJPgPdImB//Xu3M58dOXJ.KuE.MURj0D/PxzxWvlLVn4Nfd0woBCphXt2TRxwXwJ/Ltp1 22 | ``` 23 | 24 | ## Running packer build with hcl 25 | 26 | Rename the ```variables.pkrvar.hcl``` and populate as you see fit. 27 | run the following and enjoy your coffee :) 28 | 29 | ```sh 30 | packer build -var-file variables.pkrvar.hcl opensuse_leap15_4_x86_64.pkr.hcl 31 | ``` 32 | 33 | ## To do 34 | 35 | * In file ```install.sh``` there's a dirty hack to wait for 10 minutes (```sleep 600```) after the first boot, to allow YAST2 to complete the installation. The wait prevents the packer from shutting down the VM too soon. -------------------------------------------------------------------------------- /vSphere/opensuse_leap_15.4/variables.pkrvar.hcl.example: -------------------------------------------------------------------------------- 1 | # VSphere Specs 2 | vcenter_server = "vcsa00.lab.k8" # vCenter FQDN 3 | username = "administrator@vsphere.local" # vCenter username 4 | password = "Gr8tP@sSw0rd1!" # vCenter password 5 | datastore = "datastore2" # datastore 6 | folder = "templates" # VM folder 7 | host = "esxi00.lab.k8" # ESXi host targeted for build 8 | cluster = "clus01" # ESXi CLuster 9 | network = "vm_network" # VM Network 10 | 11 | #VM Specs 12 | vm_name = "opensuse_15_4_golden_image" # Virtual Machine Name 13 | ssh_username = "root" # Proviledged User post deployment scripts 14 | ssh_password = "toor" # Priviledged user password (hashed in autoinst.xml) 15 | cpus = 2 # vCPUs for the VM 16 | cores = 2 # Cores per vCPU 17 | ram = 8192 # RAM to be assigned to VM 18 | disk0_size = 56320 # Disk 0 size 19 | disk1_size = 76800 # Disk 1 size (XFS mounted in /var/lib/rancher) 20 | iso_url = "http://reposrv.lab.k8/openSUSE-Leap-15.4-CR-DVD-x86_64-Media.iso" # ISO image checksum 21 | iso_checksum = "f38572d2419a0a64715fd33b4b3f867d69dfcd0cb8727196a5f71621d8c69ccf" # ISO image URL 22 | 23 | -------------------------------------------------------------------------------- /.github/cloud-init.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | labels: 5 | app: cloudinit-host 6 | name: cloudinit-host 7 | namespace: default 8 | spec: 9 | rules: 10 | - host: cloudinit-service.virtualthoughts.co.uk 11 | http: 12 | paths: 13 | - backend: 14 | service: 15 | name: cloudinit-host 16 | port: 17 | number: 80 18 | path: / 19 | pathType: ImplementationSpecific 20 | status: 21 | loadBalancer: 22 | ingress: 23 | - ip: 172.16.10.121 24 | --- 25 | kind: Service 26 | apiVersion: v1 27 | metadata: 28 | name: cloudinit-host 29 | spec: 30 | selector: 31 | app: cloudinit-host 32 | ports: 33 | - protocol: TCP 34 | port: 80 35 | targetPort: 80 36 | --- 37 | apiVersion: apps/v1 38 | kind: Deployment 39 | metadata: 40 | name: cloudinit-host 41 | labels: 42 | app: nginx 43 | spec: 44 | replicas: 1 45 | selector: 46 | matchLabels: 47 | app: cloudinit-host 48 | template: 49 | metadata: 50 | labels: 51 | app: cloudinit-host 52 | spec: 53 | containers: 54 | - name: cloudinit-host 55 | image: nginx:1.20.1 56 | ports: 57 | - containerPort: 80 58 | volumeMounts: 59 | - name: cloudinit 60 | mountPath: /usr/share/nginx/html/ 61 | volumes: 62 | - name: cloudinit 63 | configMap: 64 | name: dir -------------------------------------------------------------------------------- /vSphere/ubuntu_1804/preseed.cfg: -------------------------------------------------------------------------------- 1 | d-i passwd/user-fullname string packerbuilt 2 | d-i passwd/username string packerbuilt 3 | d-i passwd/user-password password PackerBuilt! 4 | d-i passwd/user-password-again password PackerBuilt! 5 | d-i user-setup/allow-password-weak boolean true 6 | 7 | d-i partman-auto/disk string /dev/sda 8 | d-i partman-auto/method string regular 9 | d-i partman-basicfilesystems/no_swap boolean false 10 | d-i partman-swapfile/size string 0 11 | d-i partman-auto/expert_recipe string root :: 1000 50 -1 ext4 \ 12 | $primary{ } $bootable{ } method{ format } \ 13 | format{ } use_filesystem{ } filesystem{ ext4 } \ 14 | mountpoint{ / } \ 15 | . 16 | d-i partman-auto/choose_recipe select root 17 | d-i partman/choose_partition select Finish partitioning and write changes to disk 18 | d-i partman/confirm boolean true 19 | d-i partman/confirm_write_new_label boolean true 20 | d-i partman/choose_partition select finish 21 | d-i partman/confirm boolean true 22 | d-i partman/confirm_nooverwrite boolean true 23 | 24 | d-i passwd/root-login boolean true 25 | d-i passwd/root-password password PackerBuilt! 26 | d-i passwd/root-password-again password PackerBuilt! 27 | 28 | 29 | d-i pkgsel/include string open-vm-tools openssh-server cloud-init 30 | 31 | d-i grub-installer/only_debian boolean true 32 | 33 | d-i preseed/late_command string \ 34 | echo 'packerbuilt ALL=(ALL) NOPASSWD: ALL' > /target/etc/sudoers.d/packerbuilt ; \ 35 | in-target chmod 440 /etc/sudoers.d/packerbuilt ; 36 | 37 | d-i finish-install/reboot_in_progress note 38 | -------------------------------------------------------------------------------- /vSphere/rhel_8/rhel8.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "CPUs": 2, 5 | "RAM": 3192, 6 | "RAM_reserve_all": true, 7 | "boot_command": [ 8 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 9 | ], 10 | "boot_order": "disk,cdrom", 11 | "cluster": "{{user `cluster`}}", 12 | "convert_to_template": "true", 13 | "datastore": "{{user `datastore`}}", 14 | "disk_controller_type": "pvscsi", 15 | "folder": "{{user `folder`}}", 16 | "guest_os_type": "centos7_64Guest", 17 | "host": "{{user `host`}}", 18 | "http_directory": "./http", 19 | "insecure_connection": "true", 20 | "iso_checksum": "SHA256:7fdfed9c7cced4e526a362e64ed06bcdc6ce0394a98625a40e7d05db29bf7b86", 21 | "iso_urls": "http://<>/iso/rhel-8.2-x86_64-dvd.iso", 22 | "network_adapters": [ 23 | { 24 | "network": "{{user `network`}}", 25 | "network_card": "vmxnet3" 26 | } 27 | ], 28 | "password": "{{user `password`}}", 29 | "ssh_password": "{{user `ssh_password`}}", 30 | "ssh_username": "{{user `ssh_username`}}", 31 | "storage": [ 32 | { 33 | "disk_size": 20480, 34 | "disk_thin_provisioned": true 35 | } 36 | ], 37 | "type": "vsphere-iso", 38 | "username": "{{user `username`}}", 39 | "vcenter_server": "{{user `vcenter_server`}}", 40 | "vm_name": "{{user `vm_image_name`}}" 41 | } 42 | ], 43 | "provisioners": [ 44 | { 45 | "execute_command": "echo '{{user `ssh_password`}}' | sudo -S -E bash '{{.Path}}'", 46 | "scripts": [ 47 | "script.sh" 48 | ], 49 | "type": "shell" 50 | } 51 | ] 52 | } 53 | 54 | -------------------------------------------------------------------------------- /vSphere/rhel_7/rhel7.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "CPUs": 2, 5 | "RAM": 3192, 6 | "RAM_reserve_all": true, 7 | "boot_command": [ 8 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 9 | ], 10 | "boot_order": "disk,cdrom", 11 | "cluster": "{{user `cluster`}}", 12 | "convert_to_template": "true", 13 | "datastore": "{{user `datastore`}}", 14 | "disk_controller_type": "pvscsi", 15 | "folder": "{{user `folder`}}", 16 | "guest_os_type": "centos7_64Guest", 17 | "host": "{{user `host`}}", 18 | "http_directory": "./http", 19 | "insecure_connection": "true", 20 | "iso_checksum": "SHA256:3ca2017f12392fc8acad435c05a941bb88620ece8eb5740278ffa61d8340792d", 21 | "iso_urls": "http://<>/iso/rhel-server-7.8-x86_64-dvd.iso", 22 | "network_adapters": [ 23 | { 24 | "network": "{{user `network`}}", 25 | "network_card": "vmxnet3" 26 | } 27 | ], 28 | "password": "{{user `password`}}", 29 | "ssh_password": "{{user `ssh_password`}}", 30 | "ssh_username": "{{user `ssh_username`}}", 31 | "storage": [ 32 | { 33 | "disk_size": 20480, 34 | "disk_thin_provisioned": true 35 | } 36 | ], 37 | "type": "vsphere-iso", 38 | "username": "{{user `username`}}", 39 | "vcenter_server": "{{user `vcenter_server`}}", 40 | "vm_name": "{{user `vm_image_name`}}" 41 | } 42 | ], 43 | "provisioners": [ 44 | { 45 | "execute_command": "echo '{{user `ssh_password`}}' | sudo -S -E bash '{{.Path}}'", 46 | "scripts": [ 47 | "script.sh" 48 | ], 49 | "type": "shell" 50 | } 51 | ] 52 | } 53 | 54 | -------------------------------------------------------------------------------- /vSphere/centos_7/centos7.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "CPUs": 2, 5 | "RAM": 2048, 6 | "RAM_reserve_all": true, 7 | "boot_command": [ 8 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 9 | ], 10 | "boot_order": "disk,cdrom", 11 | "cluster": "{{user `cluster`}}", 12 | "convert_to_template": "true", 13 | "datastore": "{{user `datastore`}}", 14 | "disk_controller_type": "pvscsi", 15 | "folder": "{{user `folder`}}", 16 | "guest_os_type": "centos7_64Guest", 17 | "host": "{{user `host`}}", 18 | "http_directory": "./http", 19 | "insecure_connection": "true", 20 | "iso_checksum": "SHA256:07b94e6b1a0b0260b94c83d6bb76b26bf7a310dc78d7a9c7432809fb9bc6194a", 21 | "iso_urls": "http://mirror.bytemark.co.uk/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso", 22 | "network_adapters": [ 23 | { 24 | "network": "{{user `network`}}", 25 | "network_card": "vmxnet3" 26 | } 27 | ], 28 | "password": "{{user `password`}}", 29 | "ssh_password": "{{user `ssh_password`}}", 30 | "ssh_username": "{{user `ssh_username`}}", 31 | "storage": [ 32 | { 33 | "disk_size": 8192, 34 | "disk_thin_provisioned": true 35 | } 36 | ], 37 | "type": "vsphere-iso", 38 | "username": "{{user `username`}}", 39 | "vcenter_server": "{{user `vcenter_server`}}", 40 | "vm_name": "template_centos7" 41 | } 42 | ], 43 | "provisioners": [ 44 | { 45 | "execute_command": "echo '{{user `ssh_password`}}' | sudo -S -E bash '{{.Path}}'", 46 | "scripts": [ 47 | "script.sh" 48 | ], 49 | "type": "shell" 50 | } 51 | ] 52 | } 53 | 54 | -------------------------------------------------------------------------------- /vSphere/ubuntu_2004/ubuntu-2004.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "name": "ubuntu-2004", 5 | "type": "vsphere-iso", 6 | "guest_os_type": "ubuntu64Guest", 7 | "RAM": 2048, 8 | "CPUs": 4, 9 | "boot_order": "disk,cdrom", 10 | "cluster": "{{user `cluster`}}", 11 | "convert_to_template": "true", 12 | "datastore": "{{user `datastore`}}", 13 | "disk_controller_type": "pvscsi", 14 | "host": "{{user `host`}}", 15 | "folder": "{{user `folder`}}", 16 | "iso_url": "https://releases.ubuntu.com/20.04/ubuntu-20.04.4-live-server-amd64.iso", 17 | "iso_checksum": "28ccdb56450e643bad03bb7bcf7507ce3d8d90e8bf09e38f6bd9ac298a98eaad", 18 | 19 | "network_adapters": [ 20 | { 21 | "network": "{{user `network`}}", 22 | "network_card": "vmxnet3" 23 | } 24 | ], 25 | 26 | "storage": [ 27 | { 28 | "disk_size": 8192, 29 | "disk_thin_provisioned": true 30 | } 31 | ], 32 | 33 | "ssh_password": "{{user `ssh_password`}}", 34 | "ssh_username": "{{user `ssh_username`}}", 35 | "ssh_handshake_attempts": "50", 36 | "ssh_timeout": "1h", 37 | "http_directory": "http", 38 | 39 | "boot_wait": "5s", 40 | "boot_command": [ 41 | " ", 42 | "autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/", 43 | "" 44 | ], 45 | 46 | "insecure_connection": "true", 47 | "username": "{{user `username`}}", 48 | "password": "{{user `password`}}", 49 | "vcenter_server": "{{user `vcenter_server`}}", 50 | "vm_name": "{{user `template_name`}}" 51 | } 52 | ], 53 | 54 | "provisioners": [ 55 | { 56 | "execute_command": "echo '{{user `ssh_password`}}' | sudo -S -E bash '{{.Path}}'", 57 | "scripts": [ 58 | "script.sh" 59 | ], 60 | "type": "shell" 61 | } 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /vSphere/ubuntu_2204/ubuntu-2204.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "name": "ubuntu-2204", 5 | "type": "vsphere-iso", 6 | "guest_os_type": "ubuntu64Guest", 7 | "RAM": 4092, 8 | "CPUs": 4, 9 | "boot_order": "disk,cdrom", 10 | "cluster": "{{user `cluster`}}", 11 | "convert_to_template": "true", 12 | "datastore": "{{user `datastore`}}", 13 | "disk_controller_type": "pvscsi", 14 | "host": "{{user `host`}}", 15 | "folder": "{{user `folder`}}", 16 | "iso_url": "https://releases.ubuntu.com/22.04.1/ubuntu-22.04.1-live-server-amd64.iso", 17 | "iso_checksum": "10f19c5b2b8d6db711582e0e27f5116296c34fe4b313ba45f9b201a5007056cb", 18 | 19 | "network_adapters": [ 20 | { 21 | "network": "{{user `network`}}", 22 | "network_card": "vmxnet3" 23 | } 24 | ], 25 | 26 | "storage": [ 27 | { 28 | "disk_size": 50000, 29 | "disk_thin_provisioned": true 30 | } 31 | ], 32 | 33 | "ssh_password": "{{user `ssh_password`}}", 34 | "ssh_username": "{{user `ssh_username`}}", 35 | "ssh_handshake_attempts": "50", 36 | "ssh_timeout": "1h", 37 | "http_directory": "http", 38 | 39 | "boot_wait": "5s", 40 | "boot_command": [ 41 | "c", 42 | "linux /casper/vmlinuz --- autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/' ", 43 | "", 44 | "initrd /casper/initrd", 45 | "boot" 46 | ], 47 | 48 | "insecure_connection": "true", 49 | "username": "{{user `username`}}", 50 | "password": "{{user `password`}}", 51 | "vcenter_server": "{{user `vcenter_server`}}", 52 | "vm_name": "{{user `template_name`}}" 53 | } 54 | ], 55 | 56 | "provisioners": [ 57 | { 58 | "execute_command": "echo '{{user `ssh_password`}}' | sudo -S -E bash '{{.Path}}'", 59 | "scripts": [ 60 | "script.sh" 61 | ], 62 | "type": "shell" 63 | } 64 | ] 65 | } 66 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp2/sles-15sp2.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "boot_command": [ 5 | "", 6 | "linux ", 7 | "biosdevname=0 ", 8 | "net.ifnames=0 ", 9 | "netdevice=eth0 ", 10 | "netsetup=dhcp ", 11 | "lang=en_US ", 12 | "textmode=1 ", 13 | "self_update=1 ", 14 | "autoyast=device://fd0/autoinst.xml", 15 | "" 16 | ], 17 | "boot_wait": "5s", 18 | "cpus": 2, 19 | "ram": 2048, 20 | "ram_reserve_all": true, 21 | "floppy_files": [ 22 | "./autoinst.xml" 23 | ], 24 | "guest_os_type": "sles15_64Guest", 25 | "iso_checksum": "6ac1d233aaeca29e7237ee462badeb8d2becc11dc508317cb27702a50f855541", 26 | "iso_urls": "./SLE-15-SP2-Online-x86_64-GM-Media1.iso", 27 | "ssh_username": "{{user `ssh_username`}}", 28 | "ssh_password": "{{ user `ssh_password` }}", 29 | "ssh_port": 22, 30 | "ssh_timeout": "10000s", 31 | "type": "vsphere-iso", 32 | "host": "{{user `host`}}", 33 | "username": "{{user `username`}}", 34 | "password": "{{user `password`}}", 35 | "vcenter_server": "{{user `vcenter_server`}}", 36 | "folder": "{{user `folder`}}", 37 | "vm_name": "Sles_15_SP2", 38 | "cluster": "{{user `cluster`}}", 39 | "convert_to_template": "true", 40 | "datastore": "{{user `datastore`}}", 41 | "disk_controller_type": "pvscsi", 42 | "insecure_connection": "true", 43 | "network_adapters": [ 44 | { 45 | "network": "{{user `network`}}", 46 | "network_card": "vmxnet3" 47 | } 48 | ], 49 | "storage": [ 50 | { 51 | "disk_size": 8192, 52 | "disk_thin_provisioned": true 53 | } 54 | ] 55 | } 56 | ], 57 | "provisioners": [ 58 | { 59 | "execute_command": "echo '{{user `ssh_password`}}' | sudo -S -E bash '{{.Path}}'", 60 | "scripts": [ 61 | "install.sh" 62 | ], 63 | "type": "shell" 64 | } 65 | ] 66 | } 67 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp3/sles-15sp3.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "boot_command": [ 5 | "", 6 | "linux ", 7 | "biosdevname=0 ", 8 | "net.ifnames=0 ", 9 | "netdevice=eth0 ", 10 | "netsetup=dhcp ", 11 | "lang=en_US ", 12 | "textmode=1 ", 13 | "self_update=1 ", 14 | "autoyast=device://fd0/autoinst.xml", 15 | "" 16 | ], 17 | "boot_wait": "5s", 18 | "cpus": 2, 19 | "ram": 2048, 20 | "ram_reserve_all": true, 21 | "floppy_files": [ 22 | "./autoinst.xml" 23 | ], 24 | "guest_os_type": "sles15_64Guest", 25 | "iso_checksum": "17889288074e3270026c2c344c2699eae0b30fe92e2b5cd462f56e2fb686a03d", 26 | "iso_urls": "./SLE-15-SP3-Online-x86_64-QU1-Media1.iso", 27 | "ssh_username": "{{user `ssh_username`}}", 28 | "ssh_password": "{{ user `ssh_password` }}", 29 | "ssh_port": 22, 30 | "ssh_timeout": "10000s", 31 | "type": "vsphere-iso", 32 | "host": "{{user `host`}}", 33 | "username": "{{user `username`}}", 34 | "password": "{{user `password`}}", 35 | "vcenter_server": "{{user `vcenter_server`}}", 36 | "folder": "{{user `folder`}}", 37 | "vm_name": "Sles_15_SP3", 38 | "cluster": "{{user `cluster`}}", 39 | "convert_to_template": "true", 40 | "datastore": "{{user `datastore`}}", 41 | "disk_controller_type": "pvscsi", 42 | "insecure_connection": "true", 43 | "network_adapters": [ 44 | { 45 | "network": "{{user `network`}}", 46 | "network_card": "vmxnet3" 47 | } 48 | ], 49 | "storage": [ 50 | { 51 | "disk_size": 8192, 52 | "disk_thin_provisioned": true 53 | } 54 | ] 55 | } 56 | ], 57 | "provisioners": [ 58 | { 59 | "execute_command": "echo '{{user `ssh_password`}}' | sudo -S -E bash '{{.Path}}'", 60 | "scripts": [ 61 | "install.sh" 62 | ], 63 | "type": "shell" 64 | } 65 | ] 66 | } 67 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp4/sles-15sp4.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "boot_command": [ 5 | "", 6 | "linux ", 7 | "biosdevname=0 ", 8 | "net.ifnames=0 ", 9 | "netdevice=eth0 ", 10 | "netsetup=dhcp ", 11 | "lang=en_US ", 12 | "textmode=1 ", 13 | "self_update=1 ", 14 | "autoyast=device://fd0/autoinst.xml", 15 | "" 16 | ], 17 | "boot_wait": "5s", 18 | "cpus": 4, 19 | "ram": 4096, 20 | "ram_reserve_all": true, 21 | "floppy_files": [ 22 | "./autoinst.xml" 23 | ], 24 | "guest_os_type": "sles15_64Guest", 25 | "iso_checksum": "c0ceebe14d23c6c9484a1594fc5159225292f0847f7f15046f45a83319536d0e", 26 | "iso_urls": "./SLE-15-SP4-Online-x86_64-GM-Media1.iso", 27 | "ssh_username": "{{user `ssh_username`}}", 28 | "ssh_password": "{{ user `ssh_password` }}", 29 | "ssh_port": 22, 30 | "ssh_timeout": "10000s", 31 | "type": "vsphere-iso", 32 | "host": "{{user `host`}}", 33 | "username": "{{user `username`}}", 34 | "password": "{{user `password`}}", 35 | "vcenter_server": "{{user `vcenter_server`}}", 36 | "folder": "{{user `folder`}}", 37 | "vm_name": "Sles_15_SP4", 38 | "cluster": "{{user `cluster`}}", 39 | "convert_to_template": "true", 40 | "datastore": "{{user `datastore`}}", 41 | "disk_controller_type": "pvscsi", 42 | "insecure_connection": "true", 43 | "network_adapters": [ 44 | { 45 | "network": "{{user `network`}}", 46 | "network_card": "vmxnet3" 47 | } 48 | ], 49 | "storage": [ 50 | { 51 | "disk_size": 8192, 52 | "disk_thin_provisioned": true 53 | } 54 | ] 55 | } 56 | ], 57 | "provisioners": [ 58 | { 59 | "execute_command": "echo '{{user `ssh_password`}}' | sudo -S -E bash '{{.Path}}'", 60 | "scripts": [ 61 | "install.sh" 62 | ], 63 | "type": "shell" 64 | } 65 | ] 66 | } 67 | -------------------------------------------------------------------------------- /vSphere/centos_7/http/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | cdrom 3 | lang en_GB 4 | network --bootproto=dhcp --activate 5 | rootpw PackerBuilt! 6 | firewall --disabled 7 | selinux --permissive 8 | timezone Europe/London --isUtc 9 | url --url=http://mirror.centos.org/centos/7/os/x86_64/ 10 | repo --name=centos7-x86_64-extras --baseurl=http://mirror.centos.org/centos/7/extras/x86_64/ 11 | bootloader --location=mbr 12 | text 13 | skipx 14 | zerombr 15 | clearpart --all --initlabel 16 | part / --asprimary --fstype ext4 --label=root --fsprofile=ext4 --size 1024 --grow 17 | auth --enableshadow --passalgo=sha512 --kickstart 18 | firstboot --disabled 19 | eula --agreed 20 | services --enabled=NetworkManager,sshd 21 | reboot 22 | user --name=packerbuilt --plaintext --password=PackerBuilt! --groups=wheel 23 | 24 | %packages --ignoremissing --excludedocs 25 | @core 26 | sudo 27 | net-tools 28 | ntp 29 | ntpdate 30 | vim 31 | wget 32 | curl 33 | cloud-init 34 | cloud-utils-growpart 35 | 36 | # unnecessary firmware 37 | -aic94xx-firmware 38 | -atmel-firmware 39 | -b43-openfwwf 40 | -bfa-firmware 41 | -ipw2100-firmware 42 | -ipw2200-firmware 43 | -ivtv-firmware 44 | -iwl100-firmware 45 | -iwl1000-firmware 46 | -iwl3945-firmware 47 | -iwl4965-firmware 48 | -iwl5000-firmware 49 | -iwl5150-firmware 50 | -iwl6000-firmware 51 | -iwl6000g2a-firmware 52 | -iwl6050-firmware 53 | -libertas-usb8388-firmware 54 | -ql2100-firmware 55 | -ql2200-firmware 56 | -ql23xx-firmware 57 | -ql2400-firmware 58 | -ql2500-firmware 59 | -rt61pci-firmware 60 | -rt73usb-firmware 61 | -xorg-x11-drv-ati-firmware 62 | -zd1211-firmware 63 | %end 64 | 65 | %post 66 | yum update -y 67 | 68 | fallocate -l 2G /.swap 69 | chmod 0600 /.swap 70 | mkswap /.swap 71 | echo '/.swap swap swap default 0 0' >> /etc/fstab 72 | 73 | sed "s/^ssh_pwauth.*/ssh_pwauth: True/g" -i /etc/cloud/cloud.cfg 74 | sed "s/PasswordAuthentication no/PasswordAuthentication yes/g" -i /etc/ssh/sshd_config 75 | echo "packerbuilt ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/packerbuilt 76 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 77 | 78 | yum clean all 79 | %end 80 | -------------------------------------------------------------------------------- /vSphere/opensuse_leap_15.2/opensuse-leap-15.2-x86_64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "boot_command": [ 5 | "", 6 | "linux ", 7 | "biosdevname=0 ", 8 | "net.ifnames=0 ", 9 | "netdevice=eth0 ", 10 | "netsetup=dhcp ", 11 | "lang=en_US ", 12 | "textmode=1 ", 13 | "autoyast=device://fd0/autoinst.xml", 14 | "" 15 | ], 16 | "boot_wait": "5s", 17 | "cpus": 2, 18 | "ram": 2048, 19 | "ram_reserve_all": true, 20 | "floppy_files": [ 21 | "./autoinst.xml" 22 | ], 23 | "guest_os_type": "sles15_64Guest", 24 | "iso_checksum": "02a77812443dd3e47c36611c8837bf8d1659aea6b4d16c9db6841c564d59b7af", 25 | "iso_urls": "https://download.opensuse.org/distribution/leap/15.2/iso/openSUSE-Leap-15.2-NET-x86_64.iso", 26 | "ssh_username": "{{user `ssh_username`}}", 27 | "ssh_password": "{{ user `ssh_password` }}", 28 | "ssh_port": 22, 29 | "ssh_timeout": "10000s", 30 | "type": "vsphere-iso", 31 | "host": "{{user `host`}}", 32 | "username": "{{user `username`}}", 33 | "password": "{{user `password`}}", 34 | "vcenter_server": "{{user `vcenter_server`}}", 35 | "folder": "{{user `folder`}}", 36 | "vm_name": "opensuse_leap_15.2", 37 | "cluster": "{{user `cluster`}}", 38 | "convert_to_template": "true", 39 | "datastore": "{{user `datastore`}}", 40 | "disk_controller_type": "pvscsi", 41 | "insecure_connection": "true", 42 | "network_adapters": [ 43 | { 44 | "network": "{{user `network`}}", 45 | "network_card": "vmxnet3" 46 | } 47 | ], 48 | "storage": [ 49 | { 50 | "disk_size": 8192, 51 | "disk_thin_provisioned": true 52 | } 53 | ] 54 | } 55 | ], 56 | "provisioners": [ 57 | { 58 | "execute_command": "echo '{{user `ssh_password`}}' | sudo -S -E bash '{{.Path}}'", 59 | "scripts": [ 60 | "install.sh" 61 | ], 62 | "type": "shell" 63 | } 64 | ] 65 | } 66 | -------------------------------------------------------------------------------- /vSphere/opensuse_leap_15.3/opensuse-leap-15.3-x86_64.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "boot_command": [ 5 | "", 6 | "linux ", 7 | "biosdevname=0 ", 8 | "net.ifnames=0 ", 9 | "netdevice=eth0 ", 10 | "netsetup=dhcp ", 11 | "lang=en_US ", 12 | "textmode=1 ", 13 | "autoyast=device://fd0/autoinst.xml", 14 | "" 15 | ], 16 | "boot_wait": "5s", 17 | "cpus": 2, 18 | "ram": 2048, 19 | "ram_reserve_all": true, 20 | "floppy_files": [ 21 | "./autoinst.xml" 22 | ], 23 | "guest_os_type": "sles15_64Guest", 24 | "iso_checksum": "54fb3a488e0fececf45cdaeefaccfb64437745da4b1ca444662e3aac20cf37b5", 25 | "iso_urls": "https://download.opensuse.org/distribution/leap/15.3/iso/openSUSE-Leap-15.3-NET-x86_64.iso", 26 | "ssh_username": "{{user `ssh_username`}}", 27 | "ssh_password": "{{ user `ssh_password` }}", 28 | "ssh_port": 22, 29 | "ssh_timeout": "10000s", 30 | "type": "vsphere-iso", 31 | "host": "{{user `host`}}", 32 | "username": "{{user `username`}}", 33 | "password": "{{user `password`}}", 34 | "vcenter_server": "{{user `vcenter_server`}}", 35 | "folder": "{{user `folder`}}", 36 | "vm_name": "opensuse_leap_15.3", 37 | "cluster": "{{user `cluster`}}", 38 | "convert_to_template": "true", 39 | "datastore": "{{user `datastore`}}", 40 | "disk_controller_type": "pvscsi", 41 | "insecure_connection": "true", 42 | "network_adapters": [ 43 | { 44 | "network": "{{user `network`}}", 45 | "network_card": "vmxnet3" 46 | } 47 | ], 48 | "storage": [ 49 | { 50 | "disk_size": 8192, 51 | "disk_thin_provisioned": true 52 | } 53 | ] 54 | } 55 | ], 56 | "provisioners": [ 57 | { 58 | "execute_command": "echo '{{user `ssh_password`}}' | sudo -S -E bash '{{.Path}}'", 59 | "scripts": [ 60 | "install.sh" 61 | ], 62 | "type": "shell" 63 | } 64 | ] 65 | } 66 | -------------------------------------------------------------------------------- /vSphere/ubuntu_1804/ubuntu-18.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "CPUs": 2, 5 | "RAM": 2048, 6 | "RAM_reserve_all": true, 7 | "boot_command": [ 8 | "", 9 | "", 10 | "", 11 | "", 12 | "", 13 | "", 14 | "", 15 | "", 16 | "", 17 | "", 18 | "/install/vmlinuz", 19 | " initrd=/install/initrd.gz", 20 | " priority=critical", 21 | " locale=en_US", 22 | " file=/media/preseed.cfg", 23 | "" 24 | ], 25 | "boot_order": "disk,cdrom", 26 | "cluster": "{{user `cluster`}}", 27 | "convert_to_template": "true", 28 | "datastore": "{{user `datastore`}}", 29 | "disk_controller_type": "pvscsi", 30 | "floppy_files": [ 31 | "./preseed.cfg" 32 | ], 33 | "folder": "{{user `folder`}}", 34 | "guest_os_type": "ubuntu64Guest", 35 | "host": "{{user `host`}}", 36 | "insecure_connection": "true", 37 | "iso_checksum": "8c5fc24894394035402f66f3824beb7234b757dd2b5531379cb310cedfdf0996", 38 | "iso_urls": "http://cdimage.ubuntu.com/releases/18.04/release/ubuntu-18.04.5-server-amd64.iso", 39 | "network_adapters": [ 40 | { 41 | "network": "{{user `network`}}", 42 | "network_card": "vmxnet3" 43 | } 44 | ], 45 | "password": "{{user `password`}}", 46 | "ssh_password": "{{user `ssh_password`}}", 47 | "ssh_username": "{{user `ssh_username`}}", 48 | "storage": [ 49 | { 50 | "disk_size": 8192, 51 | "disk_thin_provisioned": true 52 | } 53 | ], 54 | "type": "vsphere-iso", 55 | "username": "{{user `username`}}", 56 | "vcenter_server": "{{user `vcenter_server`}}", 57 | "vm_name": "template_ubuntu_1804" 58 | } 59 | ], 60 | "provisioners": [ 61 | { 62 | "execute_command": "echo '{{user `ssh_password`}}' | sudo -S -E bash '{{.Path}}'", 63 | "scripts": [ 64 | "script.sh" 65 | ], 66 | "type": "shell" 67 | } 68 | ] 69 | } 70 | 71 | -------------------------------------------------------------------------------- /vSphere/rhel_7/script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # purge files to make sure since we are going to recreate them 4 | rm /etc/rhsm/facts/katello.facts 5 | rm /etc/yum.repos.d/docker.repo 6 | rm /etc/environment 7 | rm /etc/systemd/system/docker.service.d/https-proxy.conf 8 | rm /etc/profile.d/proxy.sh 9 | 10 | # Proxy stuff 11 | cat <> /etc/profile.d/proxy.sh 12 | export HTTP_PROXY=http://<>:8080 13 | export HTTPS_PROXY=http://<>:8080 14 | export http_proxy=http://<>:8080 15 | export https_proxy=http://<>:8080 16 | EOT 17 | 18 | cat <> /etc/environment 19 | http_proxy=http://<>:8080 20 | https_proxy=http://<>:8080 21 | HTTP_PROXY=http://<>:8080 22 | HTTPS_PROXY=http://<>:8080 23 | EOT 24 | 25 | mkdir /etc/systemd/system/docker.service.d 26 | cat <> /etc/systemd/system/docker.service.d/https-proxy.conf 27 | [Service] 28 | Environment="HTTP_PROXY=http://<>:8080/" 29 | Environment="HTTPS_PROXY=http://<>:8080/" 30 | Environment="NO_PROXY=<>,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16" 31 | EOT 32 | 33 | # Do subscription manager stuff and update packages 34 | cat <> /etc/rhsm/facts/katello.facts 35 | {"network.hostname-override":"<>.local"} 36 | EOT 37 | 38 | rpm -Uvh http://<>/pub/katello-ca-consumer-latest.noarch.rpm 39 | subscription-manager register --org="<>" --activationkey='<>' 40 | subscription-manager repos --enable=rhel-7-server-extras-rpms 41 | yum -y install vim nano net-tools bind-utils 42 | yum -y update 43 | 44 | cat <> /etc/yum.repos.d/docker.repo 45 | [docker-ce-stable] 46 | name=Docker CE Stable - $basearch 47 | baseurl=http://<>/docker-ce-stable-upstream/ 48 | failovermethod=priority 49 | enabled=1 50 | gpgcheck=0 51 | EOT 52 | 53 | yum clean packages 54 | yum clean metadata 55 | yum clean all 56 | 57 | yum -y install container-selinux 58 | #yum -y install containerd.io 59 | #The upstream has an issue where containerd.io is hidden from the system in yum 60 | yum -y --disablerepo="*" --enablerepo=docker-ce-stable install http://<>/docker-ce-stable/Packages/containerd.io-1.2.13-3.2.el7.x86_64.rpm 61 | yum -y install docker-ce docker-ce-selinux 62 | systemctl daemon-reload 63 | service docker restart 64 | systemctl enable docker 65 | 66 | subscription-manager unregister 67 | 68 | docker run hello-world 69 | docker rm $(docker ps -a -f status=exited -f status=created -q) 70 | docker rmi $(docker images -a -q) 71 | 72 | # Reset the machine-id value. This has known to cause issues with DHCP 73 | # 74 | echo -n > /etc/machine-id 75 | 76 | # Reset any existing cloud-init state 77 | # 78 | cloud-init clean -s -l 79 | 80 | -------------------------------------------------------------------------------- /vSphere/rhel_8/script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # purge files to make sure since we are going to recreate them 4 | rm /etc/rhsm/facts/katello.facts 5 | rm /etc/yum.repos.d/docker.repo 6 | rm /etc/environment 7 | rm /etc/systemd/system/docker.service.d/https-proxy.conf 8 | rm /etc/profile.d/proxy.sh 9 | 10 | # Proxy stuff 11 | cat <> /etc/profile.d/proxy.sh 12 | export HTTP_PROXY=http://<>:8080 13 | export HTTPS_PROXY=http://<>:8080 14 | export http_proxy=http://<>:8080 15 | export https_proxy=http://<>:8080 16 | EOT 17 | 18 | cat <> /etc/environment 19 | http_proxy=http://<>:8080 20 | https_proxy=http://<>:8080 21 | HTTP_PROXY=http://<>:8080 22 | HTTPS_PROXY=http://<>:8080 23 | EOT 24 | 25 | mkdir /etc/systemd/system/docker.service.d 26 | cat <> /etc/systemd/system/docker.service.d/https-proxy.conf 27 | [Service] 28 | Environment="HTTP_PROXY=http://<>:8080/" 29 | Environment="HTTPS_PROXY=http://<>:8080/" 30 | Environment="NO_PROXY=<>,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16" 31 | EOT 32 | 33 | # Do subscription manager stuff and update packages 34 | cat <> /etc/rhsm/facts/katello.facts 35 | {"network.hostname-override":"<>.local"} 36 | EOT 37 | 38 | rpm -Uvh http://<>/pub/katello-ca-consumer-latest.noarch.rpm 39 | subscription-manager register --org="<>" --activationkey='<>' 40 | subscription-manager repos --enable=rhel-8-for-x86_64-appstream-rpms 41 | yum -y install vim nano net-tools bind-utils 42 | yum -y update 43 | 44 | cat <> /etc/yum.repos.d/docker.repo 45 | [docker-ce-stable] 46 | name=Docker CE Stable - $basearch 47 | baseurl=http://<>/docker-ce-stable-upstream/ 48 | failovermethod=priority 49 | enabled=1 50 | gpgcheck=0 51 | EOT 52 | 53 | yum clean packages 54 | yum clean metadata 55 | yum clean all 56 | 57 | yum -y install container-selinux 58 | #The upstream has an issue where containerd.io is hidden from the system in dnf 59 | #yum -y install containerd.io 60 | yum -y --disablerepo="*" --enablerepo=docker-ce-stable install http://<>/docker-ce-stable/Packages/containerd.io-1.2.13-3.2.el7.x86_64.rpm 61 | yum -y install docker-ce docker-ce-selinux 62 | systemctl daemon-reload 63 | service docker restart 64 | systemctl enable docker 65 | 66 | subscription-manager unregister 67 | 68 | docker run hello-world 69 | docker rm $(docker ps -a -f status=exited -f status=created -q) 70 | docker rmi $(docker images -a -q) 71 | 72 | # Reset the machine-id value. This has known to cause issues with DHCP 73 | # 74 | echo -n > /etc/machine-id 75 | 76 | # Reset any existing cloud-init state 77 | # 78 | cloud-init clean -s -l 79 | 80 | -------------------------------------------------------------------------------- /vSphere/rhel_7/http/ks.cfg: -------------------------------------------------------------------------------- 1 | #version=RHEL8 2 | ignoredisk --only-use=sda 3 | # Partition clearing information 4 | clearpart --none --initlabel 5 | # Use graphical install 6 | graphical 7 | # Use CDROM installation media 8 | cdrom 9 | # Keyboard layouts 10 | keyboard --vckeymap=us --xlayouts='us' 11 | # System language 12 | lang en_US.UTF-8 13 | # Network information 14 | network --bootproto=dhcp --device=ens192 --ipv6=auto --activate 15 | network --hostname=localhost.localdomain 16 | #Repo 17 | repo --name="AppStream" --baseurl=file:///run/install/repo/AppStream 18 | # Root password 19 | rootpw packerbuilt! 20 | # Run the Setup Agent on first boot 21 | firstboot --disable 22 | # Eula 23 | eula --agreed 24 | # Do not configure the X Window System 25 | skipx 26 | # Disable Firewall 27 | firewall --disabled 28 | # Selinux permissive 29 | selinux --permissive 30 | # System services 31 | services --enabled="chronyd,sshd" 32 | # System timezone 33 | timezone America/New_York --isUtc 34 | # Disk partitioning information 35 | part / --fstype="xfs" --ondisk=sda --size=20000 36 | reboot 37 | user --name=packerbuilt --plaintext --password=packerbuilt! --groups=wheel 38 | 39 | %packages 40 | @^minimal 41 | @core 42 | kexec-tools 43 | chrony 44 | sudo 45 | net-tools 46 | vim 47 | wget 48 | curl 49 | cloud-init 50 | cloud-utils-growpart 51 | 52 | # unnecessary firmware 53 | -aic94xx-firmware 54 | -atmel-firmware 55 | -b43-openfwwf 56 | -bfa-firmware 57 | -ipw2100-firmware 58 | -ipw2200-firmware 59 | -ivtv-firmware 60 | -iwl100-firmware 61 | -iwl1000-firmware 62 | -iwl3945-firmware 63 | -iwl4965-firmware 64 | -iwl5000-firmware 65 | -iwl5150-firmware 66 | -iwl6000-firmware 67 | -iwl6000g2a-firmware 68 | -iwl6050-firmware 69 | -libertas-usb8388-firmware 70 | -ql2100-firmware 71 | -ql2200-firmware 72 | -ql23xx-firmware 73 | -ql2400-firmware 74 | -ql2500-firmware 75 | -rt61pci-firmware 76 | -rt73usb-firmware 77 | -xorg-x11-drv-ati-firmware 78 | -zd1211-firmware 79 | %end 80 | 81 | %addon com_redhat_kdump --enable --reserve-mb='auto' 82 | %end 83 | 84 | %anaconda 85 | pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty 86 | pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok 87 | pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty 88 | %end 89 | 90 | %post 91 | yum update -y 92 | 93 | fallocate -l 2G /.swap 94 | chmod 0600 /.swap 95 | mkswap /.swap 96 | echo '/.swap swap swap default 0 0' >> /etc/fstab 97 | 98 | sed "s/^ssh_pwauth.*/ssh_pwauth: True/g" -i /etc/cloud/cloud.cfg 99 | sed "s/PasswordAuthentication no/PasswordAuthentication yes/g" -i /etc/ssh/sshd_config 100 | echo "packerbuilt ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/packerbuilt 101 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 102 | 103 | yum clean all 104 | %end 105 | -------------------------------------------------------------------------------- /vSphere/rhel_8/http/ks.cfg: -------------------------------------------------------------------------------- 1 | #version=RHEL8 2 | ignoredisk --only-use=sda 3 | # Partition clearing information 4 | clearpart --none --initlabel 5 | # Use graphical install 6 | graphical 7 | # Use CDROM installation media 8 | cdrom 9 | # Keyboard layouts 10 | keyboard --vckeymap=us --xlayouts='us' 11 | # System language 12 | lang en_US.UTF-8 13 | # Network information 14 | network --bootproto=dhcp --device=ens192 --ipv6=auto --activate 15 | network --hostname=localhost.localdomain 16 | #Repo 17 | #url --url=http://mirror.centos.org/centos/7/os/x86_64/ 18 | repo --name="AppStream" --baseurl=file:///run/install/repo/AppStream 19 | # Root password 20 | rootpw packerbuilt! 21 | # Run the Setup Agent on first boot 22 | firstboot --disable 23 | # Eula 24 | eula --agreed 25 | # Do not configure the X Window System 26 | skipx 27 | # Disable Firewall 28 | firewall --disabled 29 | # Selinux permissive 30 | selinux --permissive 31 | # System services 32 | services --enabled="chronyd,sshd" 33 | # System timezone 34 | timezone America/New_York --isUtc 35 | # Disk partitioning information 36 | part / --fstype="xfs" --ondisk=sda --size=20000 37 | reboot 38 | user --name=packerbuilt --plaintext --password=packerbuilt! --groups=wheel 39 | 40 | %packages 41 | @^minimal-environment 42 | kexec-tools 43 | sudo 44 | net-tools 45 | vim 46 | wget 47 | curl 48 | cloud-init 49 | cloud-utils-growpart 50 | 51 | # unnecessary firmware 52 | -aic94xx-firmware 53 | -atmel-firmware 54 | -b43-openfwwf 55 | -bfa-firmware 56 | -ipw2100-firmware 57 | -ipw2200-firmware 58 | -ivtv-firmware 59 | -iwl100-firmware 60 | -iwl1000-firmware 61 | -iwl3945-firmware 62 | -iwl4965-firmware 63 | -iwl5000-firmware 64 | -iwl5150-firmware 65 | -iwl6000-firmware 66 | -iwl6000g2a-firmware 67 | -iwl6050-firmware 68 | -libertas-usb8388-firmware 69 | -ql2100-firmware 70 | -ql2200-firmware 71 | -ql23xx-firmware 72 | -ql2400-firmware 73 | -ql2500-firmware 74 | -rt61pci-firmware 75 | -rt73usb-firmware 76 | -xorg-x11-drv-ati-firmware 77 | -zd1211-firmware 78 | %end 79 | 80 | %addon com_redhat_kdump --enable --reserve-mb='auto' 81 | %end 82 | 83 | %anaconda 84 | pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty 85 | pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok 86 | pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty 87 | %end 88 | 89 | %post 90 | #yum update -y 91 | 92 | fallocate -l 2G /.swap 93 | chmod 0600 /.swap 94 | mkswap /.swap 95 | echo '/.swap swap swap default 0 0' >> /etc/fstab 96 | 97 | sed "s/^ssh_pwauth.*/ssh_pwauth: True/g" -i /etc/cloud/cloud.cfg 98 | sed "s/PasswordAuthentication no/PasswordAuthentication yes/g" -i /etc/ssh/sshd_config 99 | echo "packerbuilt ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/packerbuilt 100 | sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers 101 | 102 | #yum clean all 103 | %end 104 | -------------------------------------------------------------------------------- /vSphere/opensuse_leap_15.4/opensuse_leap15_4_x86_64.pkr.hcl: -------------------------------------------------------------------------------- 1 | 2 | variable "cluster" { 3 | type = string 4 | } 5 | 6 | variable "datastore" { 7 | type = string 8 | } 9 | 10 | variable "folder" { 11 | type = string 12 | } 13 | 14 | variable "network" { 15 | type = string 16 | } 17 | 18 | variable "password" { 19 | type = string 20 | } 21 | 22 | variable "ssh_password" { 23 | type = string 24 | } 25 | 26 | variable "ssh_username" { 27 | type = string 28 | } 29 | 30 | variable "vcenter_server" { 31 | type = string 32 | } 33 | 34 | variable "host" { 35 | type = string 36 | } 37 | 38 | variable "iso_url" { 39 | type = string 40 | } 41 | 42 | variable "iso_checksum" { 43 | type = string 44 | } 45 | 46 | variable "cpus" { 47 | type = number 48 | } 49 | 50 | variable "cores" { 51 | type = number 52 | } 53 | 54 | variable "ram" { 55 | type = number 56 | } 57 | 58 | variable "disk0_size" { 59 | type = number 60 | } 61 | 62 | variable "disk1_size" { 63 | type = number 64 | } 65 | 66 | variable "vm_name" { 67 | type = string 68 | } 69 | 70 | # 71 | # LOCALS 72 | # 73 | 74 | locals { 75 | buildtime = formatdate("YYYY-MM-DD", timestamp()) 76 | } 77 | 78 | source "vsphere-iso" "opensuse_goldenimage" { 79 | boot_command = ["", "linux ", "biosdevname=0 ", "net.ifnames=0 ", "netdevice=eth0 ", "netsetup=dhcp ", "lang=en_US ", "textmode=1 ", "autoyast=device://fd0/autoinst.xml", ""] 80 | boot_wait = "5s" 81 | cluster = "${var.cluster}" 82 | convert_to_template = "true" 83 | CPUs = "${var.cpus}" 84 | cpu_cores = "${var.cores}" 85 | firmware = "bios" 86 | datastore = "${var.datastore}" 87 | floppy_files = ["./autoinst.xml"] 88 | folder = "${var.folder}" 89 | guest_os_type = "sles15_64Guest" 90 | host = "${var.host}" 91 | insecure_connection = "true" 92 | iso_checksum = "${var.iso_checksum}" 93 | iso_url = "${var.iso_url}" 94 | password = "${var.password}" 95 | RAM = "${var.ram}" 96 | RAM_reserve_all = true 97 | ssh_password = "${var.ssh_password}" 98 | ssh_port = 22 99 | ssh_timeout = "10000s" 100 | ssh_username = "${var.ssh_username}" 101 | disk_controller_type = ["pvscsi"] 102 | storage { 103 | disk_size = "${var.disk0_size}" 104 | disk_controller_index = 0 105 | disk_thin_provisioned = true 106 | } 107 | storage { 108 | disk_size = "${var.disk1_size}" 109 | disk_thin_provisioned = true 110 | } 111 | network_adapters { 112 | network = "${var.network}" 113 | network_card = "vmxnet3" 114 | } 115 | 116 | username = "${var.username}" 117 | vcenter_server = "${var.vcenter_server}" 118 | vm_name = "${var.vm_name}-${local.buildtime}" 119 | } 120 | 121 | build { 122 | sources = ["source.vsphere-iso.opensuse_goldenimage"] 123 | 124 | provisioner "shell" { 125 | execute_command = "echo '${var.ssh_password}' | sudo -S -E bash '{{ .Path }}'" 126 | scripts = ["install.sh"] 127 | expect_disconnect = true 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | [![Build Templates v2](https://github.com/David-VTUK/Rancher-Packer/actions/workflows/mainv2.yml/badge.svg)](https://github.com/David-VTUK/Rancher-Packer/actions/workflows/mainv2.yml) 2 | 3 | # Packer Templates for Rancher 4 | 5 | This repo contains Packer templates suitable to create RKE VM's for a number of IaaS providers. These can be used as-is or used as a basis for further customisation 6 | 7 | ## How to use 8 | 9 | * Clone the repo 10 | * Rename `variables.json.example` to `variables.json` 11 | * Populate `variables.json` with information specific to your environment 12 | * If desired, replace `script.sh` with one of the variants located in the corresponding `customisation_scripts` folder. 13 | * Build with the template and variables files. For example : `packer build -var-file=variables.json ubuntu-18.json` 14 | 15 | ## Current Templates 16 | 17 | ### vSphere 18 | 19 | | OS | Version | Base Install Script | Additional Install Script Variants | 20 | |---------------|---------|------------------------------------------------|-------------------------------------------------------------------------------------------| 21 | | Centos | 7 | [Link](/vSphere/centos_7/script.sh) | None | 22 | | OpenSuse Leap | 15.2 | [Link](/vSphere/opensuse_leap_15.2/install.sh) | None | 23 | | OpenSuse Leap | 15.3 | [Link](/vSphere/opensuse_leap_15.3/install.sh) | None | 24 | | RHEL | 7 | [Link](/vSphere/rhel_7/script.sh) | None | 25 | | RHEL | 8 | [Link](/vSphere/rhel_8/script.sh) | None | 26 | | SLES | 15 SP 2 | [Link](/vSphere/sles_15_sp2/install.sh) | None | 27 | | SLES | 15 SP 3 | [Link](/vSphere/sles_15_sp3/install.sh) | None | 28 | | SLES | 15 SP 4 | [Link](/vSphere/sles_15_sp4/install.sh) | None | 29 | | Ubuntu | 18.04 | [Link](/vSphere/ubuntu_1804/script.sh) | [Disable DHCP](/vSphere/ubuntu_1804/customisation_scripts/script-no-dhcp.sh) | 30 | | Ubuntu | 20.04 | [Link](/vSphere/ubuntu_2004/script.sh) | [Disable DHCP](/vSphere/ubuntu_2004/customisation_scripts/script-no-dhcp.sh) | 31 | | | | | [Guestinfo OVF](/vSphere/ubuntu_2004/customisation_scripts/script-cloudinit-guestinfo.sh) | 32 | | | | | [Longhorn](/vSphere/ubuntu_2004/customisation_scripts/script-longhorn.sh) | 33 | | Ubuntu | 22.04 | [Link](/vSphere/ubuntu_2204/script.sh) | | 34 | 35 | ## To do 36 | 37 | * CentOS 8 38 | -------------------------------------------------------------------------------- /vSphere/opensuse_leap_15.3/autoinst.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 18 | 19 | 20 | 21 | 22 | false 23 | true 24 | false 25 | 26 | 27 | 28 | 29 | false 30 | 10 31 | true 32 | 33 | 34 | false 35 | 10 36 | true 37 | 38 | 39 | false 40 | 10 41 | true 42 | 43 | 44 | 45 | english-us 46 | 47 | 48 | en_US 49 | en_US 50 | 51 | 52 | UTC 53 | Etc/UTC 54 | 55 | 56 | 57 | false 58 | true 59 | 60 | 61 | true 62 | false 63 | ext4 64 | true 65 | false 66 | / 67 | device 68 | 131 69 | 2 70 | 71 | false 72 | max 73 | 74 | boot/grub2/i386-pc 75 | boot/grub2/x86_64-efi 76 | home 77 | opt 78 | srv 79 | tmp 80 | usr/local 81 | var/crash 82 | var/log 83 | var/opt 84 | var/spool 85 | var/tmp 86 | 87 | 88 | 89 | 90 | CT_DISK 91 | all 92 | 93 | 94 | 95 | grub2 96 | 97 | true 98 | 1 99 | true 100 | 101 | 102 | 103 | false 104 | true 105 | 106 | true 107 | auto 108 | vagrantup.com 109 | opensuse-leap-x64 110 | 111 | 112 | 113 | dhcp 114 | eth0 115 | auto 116 | no 117 | 118 | 119 | 120 | 121 | false 122 | false 123 | 124 | 125 | 126 | apparmor-parser 127 | grub2 128 | glibc-locale 129 | iputils 130 | kernel-default 131 | sudo 132 | yast2 133 | yast2-firstboot 134 | zypper 135 | yast2-trans-en_US 136 | wget 137 | curl 138 | grub2-branding-openSUSE 139 | less 140 | growpart 141 | open-vm-tools 142 | open-iscsi 143 | insserv-compat 144 | cloud-init 145 | docker 146 | 147 | 148 | sw_management 149 | yast2_install_wf 150 | minimal_base 151 | devel_basis 152 | 153 | 154 | bash-completion 155 | telnet 156 | virtualbox-guest-kmp-default 157 | virtualbox-guest-tools 158 | snapper 159 | snapper-zypp-plugin 160 | 161 | 162 | 163 | multi-user 164 | 165 | 166 | 167 | sshd 168 | docker 169 | cloud-init 170 | cloud-config 171 | cloud-final 172 | 173 | 174 | 175 | 176 | 177 | 100 178 | users 179 | 180 | 181 | 182 | 183 | 184 | 100 185 | 186 | /home 187 | -1 188 | true 189 | /bin/bash 190 | /etc/skel 191 | 022 192 | 193 | 194 | 195 | vagrant 196 | root 197 | 198 | 199 | Built by Packer 200 | 100 201 | /home/packerbuilt 202 | 203 | 204 | 205 | -1 206 | 99999 207 | 0 208 | 7 209 | 210 | /bin/bash 211 | 1000 212 | PackerBuilt! 213 | packerbuilt 214 | 215 | 216 | 217 | false 218 | 219 | 220 | -------------------------------------------------------------------------------- /vSphere/opensuse_leap_15.2/autoinst.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 20 | 21 | 22 | 23 | 24 | false 25 | true 26 | false 27 | 28 | 29 | 30 | 31 | false 32 | 10 33 | true 34 | 35 | 36 | false 37 | 10 38 | true 39 | 40 | 41 | false 42 | 10 43 | true 44 | 45 | 46 | 47 | english-us 48 | 49 | 50 | en_US 51 | en_US 52 | 53 | 54 | UTC 55 | Etc/UTC 56 | 57 | 58 | 59 | false 60 | true 61 | 62 | 63 | true 64 | false 65 | ext4 66 | true 67 | false 68 | / 69 | device 70 | 131 71 | 2 72 | 73 | false 74 | max 75 | 76 | boot/grub2/i386-pc 77 | boot/grub2/x86_64-efi 78 | home 79 | opt 80 | srv 81 | tmp 82 | usr/local 83 | var/crash 84 | var/log 85 | var/opt 86 | var/spool 87 | var/tmp 88 | 89 | 90 | 91 | 92 | CT_DISK 93 | all 94 | 95 | 96 | 97 | grub2 98 | 99 | true 100 | 1 101 | true 102 | 103 | 104 | 105 | false 106 | true 107 | 108 | true 109 | true 110 | vagrantup.com 111 | opensuse-leap-x64 112 | 113 | 114 | 115 | dhcp 116 | eth0 117 | auto 118 | no 119 | 120 | 121 | 122 | 123 | false 124 | false 125 | 126 | 127 | 128 | 129 | 130 | grub2 131 | glibc-locale 132 | iputils 133 | kernel-default 134 | sudo 135 | yast2 136 | yast2-firstboot 137 | zypper 138 | yast2-trans-en_US 139 | wget 140 | curl 141 | grub2-branding-openSUSE 142 | less 143 | growpart 144 | open-vm-tools 145 | open-iscsi 146 | insserv-compat 147 | cloud-init 148 | docker 149 | 150 | 151 | sw_management 152 | yast2_install_wf 153 | minimal_base 154 | devel_basis 155 | 156 | 157 | bash-completion 158 | telnet 159 | virtualbox-guest-kmp-default 160 | virtualbox-guest-tools 161 | snapper 162 | snapper-zypp-plugin 163 | 164 | 165 | 166 | multi-user 167 | 168 | 169 | 170 | sshd 171 | docker 172 | cloud-init 173 | cloud-config 174 | cloud-final 175 | 176 | 177 | 178 | 179 | 180 | 100 181 | users 182 | 183 | 184 | 185 | 186 | 187 | 100 188 | 189 | /home 190 | -1 191 | true 192 | /bin/bash 193 | /etc/skel 194 | 022 195 | 196 | 197 | 198 | vagrant 199 | root 200 | 201 | 202 | Built by Packer 203 | 100 204 | /home/packerbuilt 205 | 206 | 207 | 208 | -1 209 | 99999 210 | 0 211 | 7 212 | 213 | /bin/bash 214 | 1000 215 | PackerBuilt! 216 | packerbuilt 217 | 218 | 219 | 220 | false 221 | 222 | 223 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp4/autoinst.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | true 7 | splash=silent quiet showopts 8 | showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe 9 | false 10 | false 11 | false 12 | true 13 | 0 14 | SLES15 15 | true 16 | auto 17 | false 18 | 8 19 | 20 | 21 | 22 | ahci 23 | 24 | 25 | ata_piix 26 | 27 | 28 | ata_generic 29 | 30 | 31 | jbd 32 | 33 | 34 | mbcache 35 | 36 | 37 | grub2 38 | 39 | 40 | false 41 | 42 | 43 | false 44 | false 45 | 46 | 47 | 48 | 49 | false 50 | 51 | 52 | 53 | true 54 | true 55 | true 56 | true 57 | false 58 | true 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | AUTO 67 | 68 | 69 | true 70 | auto 71 | local 72 | packer-sles-15-x64 73 | 74 | 75 | 76 | dhcp 77 | eth0 78 | yes 79 | auto 80 | no 81 | 82 | 83 | true 84 | false 85 | 86 | 87 | 88 | false 89 | true 90 | 91 | 92 | true 93 | false 94 | swap 95 | true 96 | defaults 97 | false 98 | swap 99 | device 100 | 130 101 | 1 102 | 103 | false 104 | 1561492992 105 | 106 | 107 | true 108 | false 109 | btrfs 110 | true 111 | false 112 | / 113 | device 114 | 131 115 | 2 116 | 117 | false 118 | max 119 | 120 | boot/grub2/i386-pc 121 | boot/grub2/x86_64-efi 122 | home 123 | opt 124 | srv 125 | tmp 126 | usr/local 127 | var/crash 128 | var/log 129 | var/opt 130 | var/spool 131 | var/tmp 132 | 133 | 134 | 135 | 136 | CT_DISK 137 | all 138 | 139 | 140 | 141 | 142 | true 143 | true 144 | 0 145 | 146 | 147 | true 148 | true 149 | 0 150 | 151 | 152 | true 153 | true 154 | 0 155 | 156 | 157 | true 158 | true 159 | 0 160 | 161 | 162 | 163 | multi-user 164 | 165 | 166 | 167 | sshd 168 | cloud-init 169 | 170 | 171 | 172 | 173 | 174 | SLES 175 | 176 | 177 | apparmor-parser 178 | glibc 179 | openssh 180 | kexec-tools 181 | kernel-default-devel 182 | sudo 183 | gcc 184 | wget 185 | perl 186 | make 187 | bzip2 188 | tar 189 | open-vm-tools 190 | iputils 191 | open-iscsi 192 | cloud-init 193 | 194 | 195 | base 196 | 197 | 198 | adaptec-firmware 199 | atmel-firmware 200 | bash-completion 201 | bash-doc 202 | cifs-utils 203 | cups-libs 204 | ipw-firmware 205 | mpt-firmware 206 | postfix 207 | samba-libs 208 | ucode-intel 209 | snapper 210 | snapper-zypp-plugin 211 | 212 | 213 | 214 | UTC 215 | UTC 216 | 217 | 218 | 219 | 100 220 | video,dialout 221 | /home 222 | -1 223 | /bin/bash 224 | /etc/skel 225 | 022 226 | 227 | 228 | 229 | Built by Packer 230 | 100 231 | /home/packerbuilt 232 | 233 | 234 | 235 | 236 | 99999 237 | 0 238 | 7 239 | 240 | /bin/bash 241 | 1000 242 | PackerBuilt! 243 | packerbuilt 244 | 245 | 246 | true 247 | root 248 | 0 249 | /root 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | /bin/bash 259 | 0 260 | $6$UgKtUD0AUMIA$VWLyc2Uvl0Lk6xxfTuoRb0/jrhZ9IJG/Gtx/DkZUEWZm.JYO1Q1fvPo6gDxQAHp38kQ1DG1vNGRgu2T/z/vih. 261 | root 262 | 263 | 264 | 265 | true 266 | YOUR_CODE_HERE 267 | true 268 | 269 | 270 | sle-module-basesystem 271 | 15.4 272 | x86_64 273 | 274 | 275 | sle-module-development-tools 276 | 15.4 277 | x86_64 278 | 279 | 280 | sle-module-public-cloud 281 | 15.4 282 | x86_64 283 | 284 | 285 | sle-module-containers 286 | 15.4 287 | x86_64 288 | 289 | 290 | 291 | 292 | 293 | 305 | 306 | 307 | 308 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp3/autoinst.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | true 7 | splash=silent quiet showopts 8 | showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe 9 | false 10 | false 11 | false 12 | true 13 | 0 14 | SLES15 15 | true 16 | auto 17 | false 18 | 8 19 | 20 | 21 | 22 | ahci 23 | 24 | 25 | ata_piix 26 | 27 | 28 | ata_generic 29 | 30 | 31 | jbd 32 | 33 | 34 | mbcache 35 | 36 | 37 | grub2 38 | 39 | 40 | false 41 | 42 | 43 | false 44 | false 45 | 46 | 47 | 48 | 49 | false 50 | 51 | 52 | 53 | true 54 | true 55 | true 56 | true 57 | false 58 | true 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | AUTO 67 | 68 | 69 | true 70 | auto 71 | local 72 | packer-sles-15-x64 73 | 74 | 75 | 76 | dhcp 77 | eth0 78 | yes 79 | auto 80 | no 81 | 82 | 83 | true 84 | false 85 | 86 | 87 | 88 | false 89 | true 90 | 91 | 92 | true 93 | false 94 | swap 95 | true 96 | defaults 97 | false 98 | swap 99 | device 100 | 130 101 | 1 102 | 103 | false 104 | 1561492992 105 | 106 | 107 | true 108 | false 109 | btrfs 110 | true 111 | false 112 | / 113 | device 114 | 131 115 | 2 116 | 117 | false 118 | max 119 | 120 | boot/grub2/i386-pc 121 | boot/grub2/x86_64-efi 122 | home 123 | opt 124 | srv 125 | tmp 126 | usr/local 127 | var/crash 128 | var/log 129 | var/opt 130 | var/spool 131 | var/tmp 132 | var/lib/docker 133 | 134 | 135 | 136 | 137 | CT_DISK 138 | all 139 | 140 | 141 | 142 | 143 | true 144 | true 145 | 0 146 | 147 | 148 | true 149 | true 150 | 0 151 | 152 | 153 | true 154 | true 155 | 0 156 | 157 | 158 | true 159 | true 160 | 0 161 | 162 | 163 | 164 | multi-user 165 | 166 | 167 | 168 | sshd 169 | cloud-init 170 | docker 171 | 172 | 173 | 174 | 175 | 176 | SLES 177 | 178 | 179 | apparmor-parser 180 | glibc 181 | openssh 182 | kexec-tools 183 | kernel-default-devel 184 | sudo 185 | gcc 186 | wget 187 | perl 188 | make 189 | bzip2 190 | tar 191 | open-vm-tools 192 | iputils 193 | open-iscsi 194 | cloud-init 195 | docker 196 | 197 | 198 | base 199 | 200 | 201 | adaptec-firmware 202 | atmel-firmware 203 | bash-completion 204 | bash-doc 205 | cifs-utils 206 | cups-libs 207 | ipw-firmware 208 | mpt-firmware 209 | postfix 210 | samba-libs 211 | ucode-intel 212 | snapper 213 | snapper-zypp-plugin 214 | 215 | 216 | 217 | UTC 218 | UTC 219 | 220 | 221 | 222 | 100 223 | video,dialout 224 | /home 225 | -1 226 | /bin/bash 227 | /etc/skel 228 | 022 229 | 230 | 231 | 232 | Built by Packer 233 | 100 234 | /home/packerbuilt 235 | 236 | 237 | 238 | 239 | 99999 240 | 0 241 | 7 242 | 243 | /bin/bash 244 | 1000 245 | PackerBuilt! 246 | packerbuilt 247 | 248 | 249 | true 250 | root 251 | 0 252 | /root 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | /bin/bash 262 | 0 263 | $6$UgKtUD0AUMIA$VWLyc2Uvl0Lk6xxfTuoRb0/jrhZ9IJG/Gtx/DkZUEWZm.JYO1Q1fvPo6gDxQAHp38kQ1DG1vNGRgu2T/z/vih. 264 | root 265 | 266 | 267 | 268 | true 269 | YOUR_CODE_HERE 270 | true 271 | 272 | 273 | sle-module-basesystem 274 | 15.3 275 | x86_64 276 | 277 | 278 | sle-module-development-tools 279 | 15.3 280 | x86_64 281 | 282 | 283 | sle-module-public-cloud 284 | 15.3 285 | x86_64 286 | 287 | 288 | sle-module-containers 289 | 15.3 290 | x86_64 291 | 292 | 293 | 294 | 295 | 296 | 308 | 309 | 310 | 311 | -------------------------------------------------------------------------------- /vSphere/sles_15_sp2/autoinst.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | true 7 | splash=silent quiet showopts 8 | showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe 9 | false 10 | false 11 | false 12 | true 13 | 0 14 | SLES15 15 | true 16 | auto 17 | false 18 | 8 19 | 20 | 21 | 22 | ahci 23 | 24 | 25 | ata_piix 26 | 27 | 28 | ata_generic 29 | 30 | 31 | jbd 32 | 33 | 34 | mbcache 35 | 36 | 37 | grub2 38 | 39 | 40 | 41 | false 42 | 43 | 44 | false 45 | false 46 | 47 | 48 | 49 | 50 | false 51 | 52 | 53 | none 54 | 55 | 56 | 57 | true 58 | true 59 | true 60 | true 61 | false 62 | true 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | AUTO 71 | 72 | 73 | true 74 | true 75 | local 76 | packer-sles-15-x64 77 | 78 | 79 | 80 | dhcp 81 | eth0 82 | yes 83 | auto 84 | no 85 | 86 | 87 | true 88 | false 89 | 90 | 91 | 92 | false 93 | true 94 | 95 | 96 | true 97 | false 98 | swap 99 | true 100 | defaults 101 | false 102 | swap 103 | device 104 | 130 105 | 1 106 | 107 | false 108 | 1561492992 109 | 110 | 111 | true 112 | false 113 | btrfs 114 | true 115 | false 116 | / 117 | device 118 | 131 119 | 2 120 | 121 | false 122 | max 123 | 124 | boot/grub2/i386-pc 125 | boot/grub2/x86_64-efi 126 | home 127 | opt 128 | srv 129 | tmp 130 | usr/local 131 | var/crash 132 | var/log 133 | var/opt 134 | var/spool 135 | var/tmp 136 | var/lib/docker 137 | 138 | 139 | 140 | 141 | CT_DISK 142 | all 143 | 144 | 145 | 146 | 147 | true 148 | true 149 | 0 150 | 151 | 152 | true 153 | true 154 | 0 155 | 156 | 157 | true 158 | true 159 | 0 160 | 161 | 162 | true 163 | true 164 | 0 165 | 166 | 167 | 168 | multi-user 169 | 170 | 171 | 172 | sshd 173 | cloud-init 174 | docker 175 | 176 | 177 | 178 | 179 | 180 | SLES 181 | 182 | 183 | glibc 184 | openssh 185 | kexec-tools 186 | kernel-default-devel 187 | sudo 188 | gcc 189 | wget 190 | perl 191 | make 192 | bzip2 193 | tar 194 | open-vm-tools 195 | iputils 196 | open-iscsi 197 | cloud-init 198 | docker 199 | 200 | 201 | base 202 | 203 | 204 | adaptec-firmware 205 | atmel-firmware 206 | bash-completion 207 | bash-doc 208 | cifs-utils 209 | cups-libs 210 | ipw-firmware 211 | mpt-firmware 212 | postfix 213 | samba-libs 214 | ucode-intel 215 | snapper 216 | snapper-zypp-plugin 217 | 218 | 219 | 220 | UTC 221 | UTC 222 | 223 | 224 | 225 | 100 226 | video,dialout 227 | /home 228 | -1 229 | /bin/bash 230 | /etc/skel 231 | 022 232 | 233 | 234 | 235 | Built by Packer 236 | 100 237 | /home/packerbuilt 238 | 239 | 240 | 241 | 242 | 99999 243 | 0 244 | 7 245 | 246 | /bin/bash 247 | 1000 248 | PackerBuilt! 249 | packerbuilt 250 | 251 | 252 | true 253 | root 254 | 0 255 | /root 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | /bin/bash 265 | 0 266 | $6$UgKtUD0AUMIA$VWLyc2Uvl0Lk6xxfTuoRb0/jrhZ9IJG/Gtx/DkZUEWZm.JYO1Q1fvPo6gDxQAHp38kQ1DG1vNGRgu2T/z/vih. 267 | root 268 | 269 | 270 | 271 | true 272 | YOUR_REG_CODE_HERE 273 | true 274 | 275 | 276 | sle-module-basesystem 277 | 15.2 278 | x86_64 279 | 280 | 281 | sle-module-development-tools 282 | 15.2 283 | x86_64 284 | 285 | 286 | sle-module-public-cloud 287 | 15.2 288 | x86_64 289 | 290 | 291 | sle-module-containers 292 | 15.2 293 | x86_64 294 | 295 | 296 | 297 | 298 | 299 | 311 | 312 | 313 | 314 | -------------------------------------------------------------------------------- /.github/workflows/mainv2.yml: -------------------------------------------------------------------------------- 1 | name: Build Packer Templates 2 | 3 | on: [workflow_dispatch] 4 | 5 | env: 6 | GITHUB_JOB: ${{ github.job }} 7 | 8 | jobs: 9 | build-centos-7: 10 | runs-on: self-hosted 11 | name: Build Centos 7 12 | 13 | steps: 14 | - name: Checkout Repository 15 | uses: actions/checkout@v2 16 | 17 | # fix backwards incompatibilities in template 18 | - name: Fix Template 19 | uses: hashicorp/packer-github-actions@master 20 | with: 21 | working_directory: ./vSphere/centos_7/ 22 | command: fix 23 | target: centos7.json 24 | 25 | # Grab config file 26 | - name: Generate variables.json 27 | run : echo ${{ secrets.PACKER_CONFIG_BASE64 }} | base64 -d > ./vSphere/centos_7/variables.json 28 | 29 | # validate templates 30 | - name: Validate Template 31 | uses: hashicorp/packer-github-actions@master 32 | with: 33 | working_directory: ./vSphere/centos_7/ 34 | command: validate 35 | arguments: -syntax-only 36 | target: centos7.json 37 | 38 | # Replace References 39 | - name: Replace References 40 | run : | 41 | sed -i 's/{{ .HTTPIP }}:{{ .HTTPPort }}/'"$GITHUB_JOB"'.cloudinit-service.virtualthoughts.co.uk/g' ./vSphere/centos_7/centos7.json 42 | sed -i 's/cloudinit-service.virtualthoughts.co.uk/'"$GITHUB_JOB"'.cloudinit-service.virtualthoughts.co.uk/g' ./.github/cloud-init.yaml 43 | sed -i 's/cloudinit-host/'"$GITHUB_JOB"'/g' ./.github/cloud-init.yaml 44 | sed -i 's/dir/'"$GITHUB_JOB"'-dir/g' ./.github/cloud-init.yaml 45 | 46 | # Upload Configmap 47 | - name: Upload Configmap & Publish Cloud-Init Data 48 | uses: steebchen/kubectl@v2.0.0 49 | with: # defaults to latest kubectl binary version 50 | config: ${{ secrets.KUBE_CONFIG_DATA }} 51 | command: create configmap ${{ env.GITHUB_JOB }}-dir --from-file=./vSphere/centos_7/http && kubectl apply -f .github/cloud-init.yaml 52 | 53 | # Build Template 54 | - name: Build Template 55 | uses: hashicorp/packer-github-actions@master 56 | with: 57 | working_directory: ./vSphere/centos_7/ 58 | command: build 59 | arguments: "-color=false -on-error=abort --var-file=variables.json -force" 60 | target: centos7.json 61 | 62 | # cleanup 63 | - name: Delete Configmap & Remove Cloud-Init Data 64 | uses: steebchen/kubectl@v2.0.0 65 | with: 66 | config: ${{ secrets.KUBE_CONFIG_DATA }} 67 | command: delete configmap ${{ env.GITHUB_JOB }}-dir && kubectl delete -f .github/cloud-init.yaml 68 | 69 | # --------------------------------------------------------------------------------------------------------------- 70 | 71 | build-opensuse-leap-15-2: 72 | runs-on: self-hosted 73 | name: Build Opensuse Leap 15.2 74 | 75 | steps: 76 | - name: Checkout Repository 77 | uses: actions/checkout@v2 78 | 79 | # fix backwards incompatibilities in template 80 | - name: Fix Template 81 | uses: hashicorp/packer-github-actions@master 82 | with: 83 | working_directory: ./vSphere/opensuse_leap_15.2/ 84 | command: fix 85 | target: opensuse-leap-15.2-x86_64.json 86 | 87 | # Grab config file 88 | - name: Generate variables.json 89 | run : echo ${{ secrets.PACKER_CONFIG_BASE64 }} | base64 -d > ./vSphere/opensuse_leap_15.2/variables.json 90 | 91 | # validate templates 92 | - name: Validate Template 93 | uses: hashicorp/packer-github-actions@master 94 | with: 95 | working_directory: ./vSphere/opensuse_leap_15.2/ 96 | command: validate 97 | arguments: -syntax-only 98 | target: opensuse-leap-15.2-x86_64.json 99 | 100 | # Build Template 101 | - name: Build Template 102 | uses: hashicorp/packer-github-actions@master 103 | with: 104 | working_directory: ./vSphere/opensuse_leap_15.2/ 105 | command: build 106 | arguments: "-color=false -on-error=abort --var-file=variables.json -force" 107 | target: opensuse-leap-15.2-x86_64.json 108 | 109 | # --------------------------------------------------------------------------------------------------------------- 110 | 111 | build-opensuse-leap-15-3: 112 | runs-on: self-hosted 113 | name: Build Opensuse Leap 15.3 114 | 115 | steps: 116 | - name: Checkout Repository 117 | uses: actions/checkout@v2 118 | 119 | # fix backwards incompatibilities in template 120 | - name: Fix Template 121 | uses: hashicorp/packer-github-actions@master 122 | with: 123 | working_directory: ./vSphere/opensuse_leap_15.3/ 124 | command: fix 125 | target: opensuse-leap-15.3-x86_64.json 126 | 127 | # Grab config file 128 | - name: Generate variables.json 129 | run : echo ${{ secrets.PACKER_CONFIG_BASE64 }} | base64 -d > ./vSphere/opensuse_leap_15.3/variables.json 130 | 131 | # validate templates 132 | - name: Validate Template 133 | uses: hashicorp/packer-github-actions@master 134 | with: 135 | working_directory: ./vSphere/opensuse_leap_15.3/ 136 | command: validate 137 | arguments: -syntax-only 138 | target: opensuse-leap-15.3-x86_64.json 139 | 140 | # Build Template 141 | - name: Build Template 142 | uses: hashicorp/packer-github-actions@master 143 | with: 144 | working_directory: ./vSphere/opensuse_leap_15.3/ 145 | command: build 146 | arguments: "-color=false -on-error=abort --var-file=variables.json -force" 147 | target: opensuse-leap-15.3-x86_64.json 148 | 149 | # ------------------------------------------------------------------------------------------------------------------ 150 | 151 | build-sles-15-sp2: 152 | runs-on: self-hosted 153 | name: Build SLES 15 SP2 154 | 155 | steps: 156 | - name: Checkout Repository 157 | uses: actions/checkout@v2 158 | 159 | # fix backwards incompatibilities in template 160 | - name: Fix Template 161 | uses: hashicorp/packer-github-actions@master 162 | with: 163 | working_directory: ./vSphere/sles_15_sp2/ 164 | command: fix 165 | target: sles-15sp2.json 166 | 167 | # Grab config file 168 | - name: Generate variables.json 169 | run : echo ${{ secrets.PACKER_CONFIG_BASE64 }} | base64 -d > ./vSphere/sles_15_sp2/variables.json 170 | 171 | # Replace ISO reference 172 | - name: Replace ISO reference 173 | run : sed -i 's,"./SLE-15-SP2-Online-x86_64-GM-Media1.iso","https://minio.virtualthoughts.co.uk:9000/iso/SLE-15-SP2-Online-x86_64-GM-Media1.iso",g' ./vSphere/sles_15_sp2/sles-15sp2.json 174 | 175 | # Replace Reg Code reference 176 | - name: Replace Reg Code reference 177 | run : sed -i "s/YOUR_REG_CODE_HERE/${{ secrets.SCC_CODE }}/g" ./vSphere/sles_15_sp2/autoinst.xml 178 | 179 | # validate templates 180 | - name: Validate Template 181 | uses: hashicorp/packer-github-actions@master 182 | with: 183 | working_directory: ./vSphere/sles_15_sp2/ 184 | command: validate 185 | arguments: -syntax-only 186 | target: sles-15sp2.json 187 | 188 | # Build Template 189 | - name: Build Template 190 | uses: hashicorp/packer-github-actions@master 191 | with: 192 | working_directory: ./vSphere/sles_15_sp2/ 193 | command: build 194 | arguments: "-color=false -on-error=abort --var-file=variables.json -force" 195 | target: sles-15sp2.json 196 | 197 | # -------------------------------------------------------------------------------------------------------------------- 198 | build-ubuntu-1804: 199 | runs-on: self-hosted 200 | name: Build Ubuntu 18.04 201 | 202 | steps: 203 | - name: Checkout Repository 204 | uses: actions/checkout@v2 205 | 206 | # fix backwards incompatibilities in template 207 | - name: Fix Template 208 | uses: hashicorp/packer-github-actions@master 209 | with: 210 | working_directory: ./vSphere/ubuntu_1804/ 211 | command: fix 212 | target: ubuntu-18.json 213 | 214 | # Grab config file 215 | - name: Generate variables.json 216 | run : echo ${{ secrets.PACKER_CONFIG_BASE64 }} | base64 -d > ./vSphere/ubuntu_1804/variables.json 217 | 218 | # validate templates 219 | - name: Validate Template 220 | uses: hashicorp/packer-github-actions@master 221 | with: 222 | working_directory: ./vSphere/ubuntu_1804/ 223 | command: validate 224 | arguments: -syntax-only 225 | target: ubuntu-18.json 226 | 227 | # Build Template 228 | - name: Build Template 229 | uses: hashicorp/packer-github-actions@master 230 | with: 231 | working_directory: ./vSphere/ubuntu_1804/ 232 | command: build 233 | arguments: "-color=false -on-error=abort --var-file=variables.json -force" 234 | target: ubuntu-18.json 235 | 236 | # --------------------------------------------------------------------------------------------------------------- 237 | 238 | build-ubuntu-2004: 239 | runs-on: self-hosted 240 | name: Build Ubuntu 20.04 241 | env: 242 | GITHUB_JOB: ${{ github.job }} 243 | 244 | steps: 245 | - name: Checkout Repository 246 | uses: actions/checkout@v2 247 | 248 | # fix backwards incompatibilities in template 249 | - name: Fix Template 250 | uses: hashicorp/packer-github-actions@master 251 | with: 252 | working_directory: ./vSphere/ubuntu_2004/ 253 | command: fix 254 | target: ubuntu-2004.json 255 | 256 | # Grab config file 257 | - name: Generate variables.json 258 | run : echo ${{ secrets.PACKER_CONFIG_BASE64 }} | base64 -d > ./vSphere/ubuntu_2004/variables.json 259 | 260 | # validate templates 261 | - name: Validate Template 262 | uses: hashicorp/packer-github-actions@master 263 | with: 264 | working_directory: ./vSphere/ubuntu_2004/ 265 | command: validate 266 | arguments: -syntax-only 267 | target: ubuntu-2004.json 268 | 269 | # Replace References 270 | - name: Replace References 271 | run : | 272 | sed -i 's/{{ .HTTPIP }}:{{ .HTTPPort }}/'"$GITHUB_JOB"'.cloudinit-service.virtualthoughts.co.uk/g' ./vSphere/ubuntu_2004/ubuntu-2004.json 273 | sed -i 's/cloudinit-service.virtualthoughts.co.uk/'"$GITHUB_JOB"'.cloudinit-service.virtualthoughts.co.uk/g' ./.github/cloud-init.yaml 274 | sed -i 's/cloudinit-host/'"$GITHUB_JOB"'/g' ./.github/cloud-init.yaml 275 | sed -i 's/dir/'"$GITHUB_JOB"'-dir/g' ./.github/cloud-init.yaml 276 | 277 | # Upload Configmap 278 | - name: Upload Configmap & Publish Cloud-Init Data 279 | uses: steebchen/kubectl@v2.0.0 280 | with: # defaults to latest kubectl binary version 281 | config: ${{ secrets.KUBE_CONFIG_DATA }} 282 | command: create configmap ${{ env.GITHUB_JOB }}-dir --from-file=./vSphere/ubuntu_2004/http && kubectl apply -f .github/cloud-init.yaml 283 | 284 | # Build Template 285 | - name: Build Template 286 | uses: hashicorp/packer-github-actions@master 287 | with: 288 | working_directory: ./vSphere/ubuntu_2004/ 289 | command: build 290 | arguments: "-color=false -on-error=abort --var-file=variables.json -force" 291 | target: ubuntu-2004.json 292 | 293 | # cleanup 294 | - name: Delete Configmap & Remove Cloud-Init Data 295 | uses: steebchen/kubectl@v2.0.0 296 | with: 297 | config: ${{ secrets.KUBE_CONFIG_DATA }} 298 | command: delete configmap ${{ env.GITHUB_JOB }}-dir && kubectl delete -f .github/cloud-init.yaml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /vSphere/opensuse_leap_15.4/autoinst.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | repo-backports-update 8 | http://download.opensuse.org/update/leap/15.4/backports/ 9 | Update repository of openSUSE Backports 10 | 99 11 | / 12 | 13 | 14 | repo-non-oss 15 | http://download.opensuse.org/distribution/leap/15.4/repo/non-oss/ 16 | Non-OSS Repository 17 | 99 18 | / 19 | 20 | 21 | repo-oss 22 | http://download.opensuse.org/distribution/leap/15.4/repo/oss/ 23 | OSS Repository 24 | 99 25 | / 26 | 27 | 28 | repo-sle-update 29 | http://download.opensuse.org/update/leap/15.4/sle/ 30 | Update repository with updates from SUSE Linux Enterprise 15 31 | 99 32 | / 33 | 34 | 35 | repo-update-non-oss 36 | http://download.opensuse.org/update/leap/15.4/non-oss/ 37 | Update Repository (Non-Oss) 38 | 99 39 | / 40 | 41 | 42 | 43 | 44 | 45 | splash=silent preempt=full mitigations=auto quiet security=apparmor 46 | auto 47 | auto 48 | false 49 | true 50 | true 51 | gfxterm 52 | 8 53 | false 54 | true 55 | vga=gfx-1024x768x16 56 | 57 | grub2 58 | 59 | 60 | public 61 | false 62 | off 63 | false 64 | 65 | 66 | Unsolicited incoming network packets are rejected. Incoming packets that are related to outgoing network connections are accepted. Outgoing network connections are allowed. 67 | 68 | false 69 | block 70 | 71 | 72 | 73 | Block 74 | %%REJECT%% 75 | 76 | 77 | For computers in your demilitarized zone that are publicly-accessible with limited access to your internal network. Only selected incoming connections are accepted. 78 | 79 | false 80 | dmz 81 | 82 | 83 | 84 | ssh 85 | 86 | DMZ 87 | default 88 | 89 | 90 | All network connections are accepted. 91 | 92 | docker0 93 | 94 | false 95 | docker 96 | 97 | 98 | 99 | docker 100 | ACCEPT 101 | 102 | 103 | Unsolicited incoming network packets are dropped. Incoming packets that are related to outgoing network connections are accepted. Outgoing network connections are allowed. 104 | 105 | false 106 | drop 107 | 108 | 109 | 110 | Drop 111 | DROP 112 | 113 | 114 | For use on external networks. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted. 115 | 116 | true 117 | external 118 | 119 | 120 | 121 | ssh 122 | 123 | External 124 | default 125 | 126 | 127 | For use in home areas. You mostly trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted. 128 | 129 | false 130 | home 131 | 132 | 133 | 134 | dhcpv6-client 135 | mdns 136 | samba-client 137 | ssh 138 | 139 | Home 140 | default 141 | 142 | 143 | For use on internal networks. You mostly trust the other computers on the networks to not harm your computer. Only selected incoming connections are accepted. 144 | 145 | false 146 | internal 147 | 148 | 149 | 150 | dhcpv6-client 151 | mdns 152 | samba-client 153 | ssh 154 | 155 | Internal 156 | default 157 | 158 | 159 | For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted. 160 | 161 | false 162 | public 163 | 164 | 165 | 166 | dhcpv6-client 167 | ssh 168 | 169 | Public 170 | default 171 | 172 | 173 | All network connections are accepted. 174 | 175 | false 176 | trusted 177 | 178 | 179 | 180 | Trusted 181 | ACCEPT 182 | 183 | 184 | For use in work areas. You mostly trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted. 185 | 186 | false 187 | work 188 | 189 | 190 | 191 | dhcpv6-client 192 | ssh 193 | 194 | Work 195 | default 196 | 197 | 198 | 199 | 200 | 201 | false 202 | 203 | 204 | 205 | 206 | 100 207 | users 208 | 209 | 210 | 211 | 65534 212 | nobody 213 | 214 | 215 | 216 | 480 217 | audit 218 | 219 | 220 | 221 | 492 222 | audio 223 | 224 | 225 | 226 | 491 227 | cdrom 228 | 229 | 230 | 231 | 486 232 | render 233 | 234 | 235 | 236 | 489 237 | disk 238 | 239 | 240 | 241 | 490 242 | dialout 243 | 244 | 245 | 246 | 71 247 | ntadmin 248 | 249 | 250 | 251 | 479 252 | nscd 253 | 254 | 255 | 256 | 485 257 | sgx 258 | 259 | 260 | 261 | 476 262 | polkitd 263 | 264 | 265 | 266 | 2 267 | daemon 268 | 269 | 270 | 271 | 484 272 | tape 273 | 274 | 275 | 276 | 481 277 | mail 278 | postfix 279 | 280 | 281 | 15 282 | shadow 283 | 284 | 285 | 286 | 496 287 | systemd-timesync 288 | 289 | 290 | 291 | 42 292 | trusted 293 | 294 | 295 | 296 | 487 297 | lp 298 | 299 | 300 | 301 | 488 302 | input 303 | 304 | 305 | 306 | 0 307 | root 308 | 309 | 310 | 311 | 498 312 | systemd-journal 313 | 314 | 315 | 316 | 51 317 | postfix 318 | 319 | 320 | 321 | 59 322 | maildrop 323 | postfix 324 | 325 | 326 | 495 327 | kmem 328 | 329 | 330 | 331 | 483 332 | video 333 | 334 | 335 | 336 | 36 337 | kvm 338 | 339 | 340 | 341 | 478 342 | sshd 343 | 344 | 345 | 346 | 5 347 | tty 348 | 349 | 350 | 351 | 1 352 | bin 353 | daemon 354 | 355 | 356 | 65533 357 | nogroup 358 | 359 | 360 | 361 | 497 362 | systemd-network 363 | 364 | 365 | 366 | 499 367 | messagebus 368 | 369 | 370 | 371 | 494 372 | lock 373 | 374 | 375 | 376 | 482 377 | chrony 378 | 379 | 380 | 381 | 493 382 | utmp 383 | 384 | 385 | 386 | 62 387 | man 388 | 389 | 390 | 391 | 477 392 | wheel 393 | 394 | 395 | 396 | 397 | 398 | 399 | 127.0.0.1 400 | 401 | localhost 402 | 403 | 404 | 405 | ::1 406 | 407 | localhost ipv6-localhost ipv6-loopback 408 | 409 | 410 | 411 | fe00::0 412 | 413 | ipv6-localnet 414 | 415 | 416 | 417 | ff00::0 418 | 419 | ipv6-mcastprefix 420 | 421 | 422 | 423 | ff02::1 424 | 425 | ipv6-allnodes 426 | 427 | 428 | 429 | ff02::2 430 | 431 | ipv6-allrouters 432 | 433 | 434 | 435 | ff02::3 436 | 437 | ipv6-allhosts 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | AUTO 446 | 447 | 448 | true 449 | localhost 450 | auto 451 | 452 | 453 | 454 | dhcp 455 | eth0 456 | auto 457 | 458 | 459 | true 460 | true 461 | false 462 | 463 | true 464 | true 465 | 466 | 467 | 468 | auto 469 | 470 | 471 |
1.opensuse.pool.ntp.org
472 | true 473 | false 474 |
475 |
476 | systemd 477 |
478 | 479 | 480 | /dev/sda 481 | gpt 482 | true 483 | 484 | 485 | true 486 | false 487 | 263 488 | 1 489 | false 490 | 8388608 491 | 492 | 493 | true 494 | true 495 | btrfs 496 | true 497 | / 498 | uuid 499 | 131 500 | 2 501 | true 502 | false 503 | 32202800640 504 | 505 | 506 | false 507 | var 508 | 509 | 510 | true 511 | usr/local 512 | 513 | 514 | true 515 | tmp 516 | 517 | 518 | true 519 | srv 520 | 521 | 522 | true 523 | root 524 | 525 | 526 | true 527 | opt 528 | 529 | 530 | true 531 | home 532 | 533 | 534 | true 535 | boot/grub2/x86_64-efi 536 | 537 | 538 | true 539 | boot/grub2/i386-pc 540 | 541 | 542 | @ 543 | 544 | 545 | CT_DISK 546 | all 547 | 548 | 549 | /dev/sdb 550 | gpt 551 | 552 | 553 | true 554 | xfs 555 | true 556 | /var/lib/rancher 557 | uuid 558 | 131 559 | 1 560 | false 561 | 40801123840 562 | 563 | 564 | CT_DISK 565 | all 566 | 567 | 568 | 569 | false 570 | 571 | 572 | multi-user 573 | 574 | 575 | apparmor 576 | auditd 577 | klog 578 | chronyd 579 | cron 580 | cups 581 | wickedd-auto4 582 | wickedd-dhcp4 583 | wickedd-dhcp6 584 | wickedd-nanny 585 | haveged 586 | irqbalance 587 | iscsi 588 | iscsid 589 | issue-generator 590 | kbdsettings 591 | mcelog 592 | wicked 593 | cloud-config 594 | cloud-final 595 | cloud-init 596 | cloud-init-local 597 | nscd 598 | postfix 599 | purge-kernels 600 | rsyslog 601 | smartd 602 | sshd 603 | systemd-remount-fs 604 | vgauthd 605 | vmtoolsd 606 | 607 | 608 | 609 | 610 | true 611 | 612 | 613 | xfsprogs 614 | wicked 615 | snapper 616 | os-prober 617 | openssh 618 | openSUSE-release 619 | open-iscsi 620 | cloud-init 621 | numactl 622 | kexec-tools 623 | irqbalance 624 | grub2 625 | glibc 626 | e2fsprogs 627 | chrony 628 | btrfsprogs 629 | autoyast2 630 | 631 | 632 | apparmor 633 | base 634 | documentation 635 | enhanced_base 636 | minimal_base 637 | sw_management 638 | yast2_basis 639 | 640 | 641 | Leap 642 | 643 | 644 | 645 | false 646 | false 647 | 648 | 649 | Europe/Amsterdam 650 | 651 | 652 | 653 | 100 654 | /home 655 | -1 656 | /bin/bash 657 | 022 658 | 659 | 660 | 661 | 662 | true 663 | root 664 | 0 665 | /root 666 | false 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | /bin/bash 676 | 0 677 | $6$183W04LFzlyQYsEZ$V5aGYXwnNGU0Gu5kj85K4hA0YiZMRL8BauKb1Mhv4z0YkhLbwNtzXeAbVIr20d.asnhmtu1iotzzQLCM/sj.q. 678 | root 679 | 680 | 681 | true 682 | nobody 683 | 65534 684 | /var/lib/nobody 685 | false 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | /bin/bash 695 | 65534 696 | ! 697 | nobody 698 | 699 | 700 | true 701 | Postfix Daemon 702 | 51 703 | /var/spool/postfix 704 | false 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | /usr/sbin/nologin 714 | 51 715 | ! 716 | postfix 717 | 718 | 719 | true 720 | NFS statd daemon 721 | 65533 722 | /var/lib/nfs 723 | false 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | /sbin/nologin 733 | 488 734 | ! 735 | statd 736 | 737 | 738 | true 739 | User for nscd 740 | 479 741 | /run/nscd 742 | false 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | /sbin/nologin 752 | 493 753 | ! 754 | nscd 755 | 756 | 757 | true 758 | SSH daemon 759 | 478 760 | /var/lib/sshd 761 | false 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | /usr/sbin/nologin 771 | 492 772 | ! 773 | sshd 774 | 775 | 776 | true 777 | User for D-Bus 778 | 499 779 | /run/dbus 780 | false 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | /usr/bin/false 790 | 499 791 | ! 792 | messagebus 793 | 794 | 795 | true 796 | Chrony Daemon 797 | 482 798 | /var/lib/chrony 799 | false 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | /usr/sbin/nologin 809 | 495 810 | ! 811 | chrony 812 | 813 | 814 | true 815 | User for polkitd 816 | 476 817 | /var/lib/polkit 818 | false 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | /sbin/nologin 828 | 489 829 | ! 830 | polkitd 831 | 832 | 833 | true 834 | systemd Network Management 835 | 497 836 | / 837 | false 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | /usr/sbin/nologin 847 | 497 848 | !* 849 | systemd-network 850 | 851 | 852 | true 853 | bin 854 | 1 855 | /bin 856 | false 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | /usr/sbin/nologin 866 | 1 867 | ! 868 | bin 869 | 870 | 871 | true 872 | Daemon 873 | 2 874 | /sbin 875 | false 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | /usr/sbin/nologin 885 | 2 886 | ! 887 | daemon 888 | 889 | 890 | true 891 | Mailer daemon 892 | 481 893 | /var/spool/clientmqueue 894 | false 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | /usr/sbin/nologin 904 | 494 905 | ! 906 | mail 907 | 908 | 909 | true 910 | Printing daemon 911 | 487 912 | /var/spool/lpd 913 | false 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | /usr/sbin/nologin 923 | 491 924 | ! 925 | lp 926 | 927 | 928 | true 929 | Manual pages viewer 930 | 62 931 | /var/lib/empty 932 | false 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | /usr/sbin/nologin 942 | 13 943 | ! 944 | man 945 | 946 | 947 | true 948 | systemd Time Synchronization 949 | 496 950 | / 951 | false 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | /usr/sbin/nologin 961 | 496 962 | !* 963 | systemd-timesync 964 | 965 | 966 | true 967 | user for rpcbind 968 | 65534 969 | /var/lib/empty 970 | false 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | /sbin/nologin 980 | 490 981 | ! 982 | rpc 983 | 984 | 985 |
986 | --------------------------------------------------------------------------------