143 lines
5.4 KiB
JSON
143 lines
5.4 KiB
JSON
{
|
|
"builders": [
|
|
{
|
|
"boot_type": "{{user `boot_type`}}",
|
|
"cluster_name": "{{user `nutanix_cluster_name`}}",
|
|
"cpu": "{{user `cpus`}}",
|
|
"force_deregister": "{{user `force_deregister`}}",
|
|
"image_description": "kube image-builder packer",
|
|
"image_name": "{{user `image_name`}}",
|
|
"memory_mb": "{{user `memory`}}",
|
|
"nutanix_endpoint": "{{user `nutanix_endpoint`}}",
|
|
"nutanix_insecure": "{{user `nutanix_insecure`}}",
|
|
"nutanix_password": "{{user `nutanix_password`}}",
|
|
"nutanix_port": "{{user `nutanix_port`}}",
|
|
"nutanix_username": "{{user `nutanix_username`}}",
|
|
"os_type": "{{user `guest_os_type`}}",
|
|
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c 'usermod -L {{user `ssh_username`}} && {{user `shutdown_command`}}'",
|
|
"ssh_handshake_attempts": "100",
|
|
"ssh_password": "{{user `ssh_password`}}",
|
|
"ssh_timeout": "20m",
|
|
"ssh_username": "{{user `ssh_username`}}",
|
|
"type": "nutanix",
|
|
"user_data": "{{user `user_data`}}",
|
|
"vm_disks": {
|
|
"disk_size_gb": "{{user `disk_size_gb`}}",
|
|
"image_type": "DISK_IMAGE",
|
|
"source_image_uri": "{{user `image_url`}}"
|
|
},
|
|
"vm_name": "{{user `build_name`}}-kube-{{user `kubernetes_semver`}}",
|
|
"vm_nics": {
|
|
"subnet_name": "{{user `nutanix_subnet_name`}}"
|
|
}
|
|
}
|
|
],
|
|
"post-processors": [
|
|
{
|
|
"environment_vars": [
|
|
"CUSTOM_POST_PROCESSOR={{user `custom_post_processor`}}"
|
|
],
|
|
"inline": [
|
|
"if [ \"$CUSTOM_POST_PROCESSOR\" != \"true\" ]; then exit 0; fi",
|
|
"{{user `custom_post_processor_command`}}"
|
|
],
|
|
"name": "custom-post-processor",
|
|
"type": "shell-local"
|
|
}
|
|
],
|
|
"provisioners": [
|
|
{
|
|
"environment_vars": [
|
|
"BUILD_NAME={{user `build_name`}}"
|
|
],
|
|
"execute_command": "BUILD_NAME={{user `build_name`}}; if [[ \"${BUILD_NAME}\" == *\"flatcar\"* ]]; then sudo {{.Vars}} -S -E bash '{{.Path}}'; fi",
|
|
"script": "./packer/files/flatcar/scripts/bootstrap-flatcar.sh",
|
|
"type": "shell"
|
|
},
|
|
{
|
|
"ansible_env_vars": [
|
|
"ANSIBLE_SSH_ARGS='{{user `existing_ansible_ssh_args`}} -o IdentitiesOnly=yes'"
|
|
],
|
|
"extra_arguments": [
|
|
"--extra-vars",
|
|
"{{user `ansible_common_vars`}}",
|
|
"--extra-vars",
|
|
"{{user `ansible_extra_vars`}}",
|
|
"--extra-vars",
|
|
"{{user `ansible_user_vars`}}",
|
|
"--scp-extra-args={{user `scp_extra_vars`}}"
|
|
],
|
|
"playbook_file": "./ansible/node.yml",
|
|
"type": "ansible",
|
|
"user": "builder"
|
|
},
|
|
{
|
|
"arch": "{{user `goss_arch`}}",
|
|
"format": "{{user `goss_format`}}",
|
|
"format_options": "{{user `goss_format_options`}}",
|
|
"goss_file": "{{user `goss_entry_file`}}",
|
|
"inspect": "{{user `goss_inspect_mode`}}",
|
|
"tests": [
|
|
"{{user `goss_tests_dir`}}"
|
|
],
|
|
"type": "goss",
|
|
"url": "{{user `goss_url`}}",
|
|
"use_sudo": true,
|
|
"vars_file": "{{user `goss_vars_file`}}",
|
|
"vars_inline": {
|
|
"ARCH": "amd64",
|
|
"OS": "{{user `distro_name` | lower}}",
|
|
"PROVIDER": "nutanix",
|
|
"containerd_version": "{{user `containerd_version`}}",
|
|
"kubernetes_cni_deb_version": "{{ user `kubernetes_cni_deb_version` }}",
|
|
"kubernetes_cni_rpm_version": "{{ split (user `kubernetes_cni_rpm_version`) \"-\" 0 }}",
|
|
"kubernetes_cni_source_type": "{{user `kubernetes_cni_source_type`}}",
|
|
"kubernetes_cni_version": "{{user `kubernetes_cni_semver` | replace \"v\" \"\" 1}}",
|
|
"kubernetes_deb_version": "{{ user `kubernetes_deb_version` }}",
|
|
"kubernetes_rpm_version": "{{ split (user `kubernetes_rpm_version`) \"-\" 0 }}",
|
|
"kubernetes_source_type": "{{user `kubernetes_source_type`}}",
|
|
"kubernetes_version": "{{user `kubernetes_semver` | replace \"v\" \"\" 1}}"
|
|
},
|
|
"version": "{{user `goss_version`}}"
|
|
}
|
|
],
|
|
"variables": {
|
|
"ansible_common_vars": "",
|
|
"ansible_extra_vars": "",
|
|
"ansible_user_vars": "",
|
|
"build_timestamp": "{{timestamp}}",
|
|
"containerd_sha256": null,
|
|
"containerd_url": "https://github.com/containerd/containerd/releases/download/v{{user `containerd_version`}}/cri-containerd-cni-{{user `containerd_version`}}-linux-amd64.tar.gz",
|
|
"containerd_version": null,
|
|
"cpus": "1",
|
|
"crictl_url": "https://github.com/kubernetes-sigs/cri-tools/releases/download/v{{user `crictl_version`}}/crictl-v{{user `crictl_version`}}-linux-amd64.tar.gz",
|
|
"crictl_version": null,
|
|
"disk_size_gb": "10",
|
|
"existing_ansible_ssh_args": "{{env `ANSIBLE_SSH_ARGS`}}",
|
|
"image_name": "{{user `build_name`}}-kube-{{user `kubernetes_semver`}}",
|
|
"kubernetes_cni_deb_version": null,
|
|
"kubernetes_cni_http_source": null,
|
|
"kubernetes_cni_semver": null,
|
|
"kubernetes_cni_source_type": null,
|
|
"kubernetes_container_registry": null,
|
|
"kubernetes_deb_gpg_key": null,
|
|
"kubernetes_deb_repo": null,
|
|
"kubernetes_deb_version": null,
|
|
"kubernetes_http_source": null,
|
|
"kubernetes_load_additional_imgs": null,
|
|
"kubernetes_rpm_gpg_check": null,
|
|
"kubernetes_rpm_gpg_key": null,
|
|
"kubernetes_rpm_repo": null,
|
|
"kubernetes_rpm_version": null,
|
|
"kubernetes_semver": null,
|
|
"kubernetes_series": null,
|
|
"kubernetes_source_type": null,
|
|
"machine_id_mode": "444",
|
|
"memory": "2048",
|
|
"python_path": "",
|
|
"scp_extra_vars": "",
|
|
"ssh_password": "builder",
|
|
"ssh_username": "builder"
|
|
}
|
|
}
|