cleanup and reorg

This commit is contained in:
John Bowdre 2022-12-04 17:37:00 -06:00
parent 9485894b71
commit c9e016586d
4 changed files with 45 additions and 62 deletions

View file

@ -3,4 +3,3 @@ echo '>> Configuring SSH'
sudo sed -i 's/.*PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
sudo sed -i 's/.*PubkeyAuthentication.*/PubkeyAuthentication yes/' /etc/ssh/sshd_config
sudo sed -i 's/.*PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config

View file

@ -1,5 +1,4 @@
#!/bin/bash -eu
echo '>> Installing custom certificates...'
sudo cp /tmp/certs/* /usr/local/share/ca-certificates/
cd /usr/local/share/ca-certificates/
@ -7,4 +6,3 @@ for file in *.cer; do
sudo mv -- "$file" "${file%.cer}.crt"
done
sudo /usr/sbin/update-ca-certificates

View file

@ -1,5 +1,4 @@
#!/bin/bash -eu
chmod 600 ~/.ssh/id_ed25519
echo ">> Installing Kubernetes components..."

View file

@ -3,12 +3,39 @@
Ubuntu Server 20.04 LTS Kubernetes node variables used by the Packer Plugin for VMware vSphere (vsphere-iso).
*/
// Default Account Credentials
build_username = "admin"
build_password = "VMware1!"
build_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOpLvpxilPjpCahAQxs4RQgv+Lb5xObULXtwEoimEBpA builder"
// vSphere Credentials
vsphere_endpoint = "vcenter.lab.local"
vsphere_username = "packer"
vsphere_password = "VMware1!"
vsphere_insecure_connection = true
// Virtual Machine Settings
// vSphere Settings
vsphere_datacenter = "Datacenter 01"
vsphere_cluster = "cluster-01"
vsphere_datastore = "datastore-01"
vsphere_network = "network-01"
vsphere_folder = "_Templates"
// Guest Operating System Settings
vm_guest_os_language = "en_US"
vm_guest_os_keyboard = "us"
vm_guest_os_timezone = "America/Chicago"
vm_guest_os_family = "linux"
vm_guest_os_type = "ubuntu64Guest"
// Virtual Machine Hardware Settings
vm_name = "k8s-u2004"
vm_firmware = "efi-secure"
vm_cdrom_type = "sata"
vm_cpu_count = 2
vm_cpu_cores = 1
vm_cpu_hot_add = true
vm_mem_size = 2048
vm_mem_hot_add = true
vm_disk_size = 30720
vm_disk_controller_type = ["pvscsi"]
vm_disk_thin_provisioned = true
vm_network_card = "vmxnet3"
common_vm_version = 19
common_tools_upgrade_policy = true
common_remove_cdrom = true
@ -27,48 +54,6 @@ common_ovf_export_path = ""
// Removable Media Settings
common_iso_datastore = "datastore-01"
// Boot and Provisioning Settings
common_ip_wait_timeout = "20m"
common_shutdown_timeout = "15m"
// vSphere Credentials
vsphere_endpoint = "vcenter.lab.local"
vsphere_username = "packer"
vsphere_password = "VMware1!"
vsphere_insecure_connection = true
// vSphere Settings
vsphere_datacenter = "Datacenter 01"
vsphere_cluster = "cluster-01"
vsphere_datastore = "datastore-01"
vsphere_network = "network-01"
vsphere_folder = "_Templates"
// Guest Operating System Metadata
vm_guest_os_language = "en_US"
vm_guest_os_keyboard = "us"
vm_guest_os_timezone = "America/Chicago"
vm_guest_os_family = "linux"
// Virtual Machine Guest Operating System Setting
vm_guest_os_type = "ubuntu64Guest"
// Virtual Machine Hardware Settings
vm_name = "k8s-u2004"
vm_firmware = "efi-secure"
vm_cdrom_type = "sata"
vm_cpu_count = 2
vm_cpu_cores = 1
vm_cpu_hot_add = true
vm_mem_size = 2048
vm_mem_hot_add = true
vm_disk_size = 30720
vm_disk_controller_type = ["pvscsi"]
vm_disk_thin_provisioned = true
vm_network_card = "vmxnet3"
// Removable Media Settings
iso_url = null
iso_path = "_ISO"
iso_file = "ubuntu-20.04.5-live-server-amd64.iso"
@ -91,7 +76,12 @@ vm_boot_command = [
// Communicator Settings
communicator_port = 22
communicator_timeout = "20m"
common_ip_wait_timeout = "20m"
common_shutdown_timeout = "15m"
build_remove_keys = false
build_username = "admin"
build_password = "VMware1!"
build_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOpLvpxilPjpCahAQxs4RQgv+Lb5xObULXtwEoimEBpA builder"
// Provisioner Settings
post_install_scripts = [
@ -115,6 +105,3 @@ pre_final_scripts = [
// Kubernetes Settings
k8s_version = "1.25.3"