Upgrade base image;Unpin ansible-core;Attempt different packer syntax
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
89532ff7fb
commit
d915c21e44
@ -3,8 +3,8 @@ packages:
|
|||||||
- jq
|
- jq
|
||||||
- python3-pip
|
- python3-pip
|
||||||
pip:
|
pip:
|
||||||
# Some change causes high load during loops of importing/pushing container images
|
# - ansible-core<2.14.0
|
||||||
- ansible-core<2.14.0
|
- ansible-core
|
||||||
- jinja2
|
- jinja2
|
||||||
- lxml
|
- lxml
|
||||||
- markupsafe
|
- markupsafe
|
||||||
|
@ -7,21 +7,6 @@ build {
|
|||||||
source "vsphere-iso.ubuntu" {
|
source "vsphere-iso.ubuntu" {
|
||||||
name = "bootstrap"
|
name = "bootstrap"
|
||||||
vm_name = "${var.vm_name}-bootstrap"
|
vm_name = "${var.vm_name}-bootstrap"
|
||||||
|
|
||||||
export {
|
|
||||||
images = false
|
|
||||||
output_directory = "/scratch/airgapped-k8s/bootstrap"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
source "vsphere-iso.ubuntu" {
|
|
||||||
name = "upgrade"
|
|
||||||
vm_name = "${var.vm_name}-upgrade"
|
|
||||||
|
|
||||||
export {
|
|
||||||
images = false
|
|
||||||
output_directory = "/scratch/airgapped-k8s/upgrade"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "ansible" {
|
provisioner "ansible" {
|
||||||
@ -46,11 +31,49 @@ build {
|
|||||||
inline = [
|
inline = [
|
||||||
"pwsh -command \"& scripts/Update-OvfConfiguration.ps1 \\",
|
"pwsh -command \"& scripts/Update-OvfConfiguration.ps1 \\",
|
||||||
" -ApplianceType '${source.name} \\",
|
" -ApplianceType '${source.name} \\",
|
||||||
" -OVFFile '/scratch/airgapped-k8s/${source.name}/${var.vm_name}-${source.name}.ovf' \"",
|
" -OVFFile '/scratch/airgapped-k8s/${var.vm_name}-${source.name}.ovf' \"",
|
||||||
"pwsh -file scripts/Update-Manifest.ps1 \\",
|
"pwsh -file scripts/Update-Manifest.ps1 \\",
|
||||||
" -ManifestFileName '/scratch/airgapped-k8s/${source.name}/${var.vm_name}-${source.name}.mf'",
|
" -ManifestFileName '/scratch/airgapped-k8s/${var.vm_name}-${source.name}.mf'",
|
||||||
"ovftool --acceptAllEulas --allowExtraConfig --overwrite \\",
|
"ovftool --acceptAllEulas --allowExtraConfig --overwrite \\",
|
||||||
" '/scratch/airgapped-k8s/${source.name}/${var.vm_name}-${source.name}.ovf' \\",
|
" '/scratch/airgapped-k8s/${var.vm_name}-${source.name}.ovf' \\",
|
||||||
|
" /output/airgapped-k8s.${source.name}.ova"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
build {
|
||||||
|
source "vsphere-iso.ubuntu" {
|
||||||
|
name = "upgrade"
|
||||||
|
vm_name = "${var.vm_name}-upgrade"
|
||||||
|
}
|
||||||
|
|
||||||
|
provisioner "ansible" {
|
||||||
|
pause_before = "2m30s"
|
||||||
|
|
||||||
|
playbook_file = "ansible/playbook.yml"
|
||||||
|
user = "ubuntu"
|
||||||
|
ansible_env_vars = [
|
||||||
|
"ANSIBLE_CONFIG=ansible/ansible.cfg",
|
||||||
|
"PYTHONUNBUFFERED=1"
|
||||||
|
]
|
||||||
|
use_proxy = "false"
|
||||||
|
extra_arguments = [
|
||||||
|
"--extra-vars", "appliancetype=${source.name}",
|
||||||
|
"--extra-vars", "ansible_ssh_pass=${var.ssh_password}"//,
|
||||||
|
// "--extra-vars", "repo_username=${var.repo_username}",
|
||||||
|
// "--extra-vars", "repo_password=${var.repo_password}"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
post-processor "shell-local" {
|
||||||
|
inline = [
|
||||||
|
"pwsh -command \"& scripts/Update-OvfConfiguration.ps1 \\",
|
||||||
|
" -ApplianceType '${source.name} \\",
|
||||||
|
" -OVFFile '/scratch/airgapped-k8s/${var.vm_name}-${source.name}.ovf' \"",
|
||||||
|
"pwsh -file scripts/Update-Manifest.ps1 \\",
|
||||||
|
" -ManifestFileName '/scratch/airgapped-k8s/${var.vm_name}-${source.name}.mf'",
|
||||||
|
"ovftool --acceptAllEulas --allowExtraConfig --overwrite \\",
|
||||||
|
" '/scratch/airgapped-k8s/${var.vm_name}-${source.name}.ovf' \\",
|
||||||
" /output/airgapped-k8s.${source.name}.ova"
|
" /output/airgapped-k8s.${source.name}.ova"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
iso_url = "sn.itch.fyi/Repository/iso/Canonical/Ubuntu%20Server%2022.04/ubuntu-22.04-live-server-amd64.iso"
|
iso_url = "sn.itch.fyi/Repository/iso/Canonical/Ubuntu%20Server%2022.04/ubuntu-22.04.1-live-server-amd64.iso"
|
||||||
iso_checksum = "sha256:84AEAF7823C8C61BAA0AE862D0A06B03409394800000B3235854A6B38EB4856F"
|
iso_checksum = "sha256:10F19C5B2B8D6DB711582E0E27F5116296C34FE4B313BA45F9B201A5007056CB"
|
||||||
// iso_url = "sn.itch.fyi/Repository/iso/Canonical/Ubuntu%20Server%2020.04/ubuntu-20.04.2-live-server-amd64.iso"
|
|
||||||
// iso_checksum = "sha256:D1F2BF834BBE9BB43FAF16F9BE992A6F3935E65BE0EDECE1DEE2AA6EB1767423"
|
// iso_url = "sn.itch.fyi/Repository/iso/Canonical/Ubuntu%20Server%2022.04/ubuntu-22.04-live-server-amd64.iso"
|
||||||
|
// iso_checksum = "sha256:84AEAF7823C8C61BAA0AE862D0A06B03409394800000B3235854A6B38EB4856F"
|
||||||
|
@ -53,4 +53,9 @@ source "vsphere-iso" "ubuntu" {
|
|||||||
shutdown_timeout = "5m"
|
shutdown_timeout = "5m"
|
||||||
|
|
||||||
remove_cdrom = true
|
remove_cdrom = true
|
||||||
|
|
||||||
|
export {
|
||||||
|
images = false
|
||||||
|
output_directory = "/scratch/airgapped-k8s"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user