blob: 1f12c3a480300bffdd92f54cbdd9d4b317577e71 [file] [log] [blame]
{
"variables": {
"user": "root",
"password": "r00tme",
"do_api_token": "{{ env `DO_API_TOKEN` }}",
"image_name": "{{ env `IMAGE_NAME` }}",
"disk_size": "150000",
"cluster_model": "{{ env `CLUSTER_MODEL` }}",
"cluster_model_ref": "{{ env `CLUSTER_MODEL_REF` }}",
"cluster_name": "{{ env `CLUSTER_NAME` }}",
"formula_version": "{{ env `FORMULA_VERSION` }}",
"mcp_version": "{{ env `MCP_VERSION` }}",
"ubuntu_baseurl": "{{ env `UBUNTU_BASEURL` }}",
"saltstack_gpg": "{{ env `SALTSTACK_GPG` }}",
"saltstack_repo": "{{ env `SALTSTACK_REPO` }}",
"apt_mirantis_gpg": "{{ env `APT_MIRANTIS_GPG` }}",
"apt_mirantis_salt_repo": "{{ env `APT_MIRANTIS_SALT_REPO` }}",
"git_salt_formulas_scripts": "{{ env `GIT_SALT_FORMULAS_SCRIPTS` }}",
"apt_repository": "{{ env `APT_REPOSITORY` }}",
"apt_repository_gpg": "{{ env `APT_REPOSITORY_GPG` }}",
"os_endpoint": "https://cloud-cz.bud.mirantis.net:5000/v2.0",
"os_flavor": "56c551be-41c0-49a4-b367-9b31691c32c3",
"os_username": "{{ env `OS_USERNAME` }}",
"os_password": "{{ env `OS_PASSWORD` }}",
"os_image": "60878bd4-cb4a-4d71-ae02-2a8ee4476d10",
"os_zone": "mcp-mk",
"os_floating_ip_pool": "public",
"os_tenant": "26e4dd19485249608ee3685f254f3909",
"os_network": "772f8ca6-1f4a-4535-99d0-880d6ead9a82"
},
"provisioners": [
{
"type": "file",
"source": "files/root/interfaces",
"destination": "/root/interfaces"
},
{
"type": "file",
"source": "files/root/minion.conf",
"destination": "/root/minion.conf"
},
{
"type": "file",
"source": "files/tmp/bootstrap.saltstack.com.sh",
"destination": "/tmp/bootstrap.saltstack.com.sh"
},
{
"environment_vars": [
"CLUSTER_MODEL={{ user `cluster_model` }}",
"CLUSTER_MODEL_REF={{ user `cluster_model_ref` }}",
"CLUSTER_NAME={{ user `cluster_name` }}",
"FORMULA_VERSION={{ user `formula_version` }}",
"UBUNTU_BASEURL={{ user `ubuntu_baseurl` }}",
"SALTSTACK_GPG={{ user `saltstack_gpg` }}",
"SALTSTACK_REPO={{ user `saltstack_repo` }}",
"APT_MIRANTIS_GPG={{ user `apt_mirantis_gpg` }}",
"APT_MIRANTIS_SALT_REPO={{ user `apt_mirantis_salt_repo` }}",
"GIT_SALT_FORMULAS_SCRIPTS={{ user `git_salt_formulas_scripts` }}",
"APT_REPOSITORY={{ user `apt_repository` }}",
"APT_REPOSITORY_GPG={{ user `apt_repository_gpg` }}",
"PACKER_OFFLINE_BUILD=true"
],
"type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
"expect_disconnect": "true",
"scripts": [
"scripts/base.sh",
"scripts/network.sh",
"scripts/salt_bootstrap.sh",
"scripts/reboot.sh"
]
},
{
"environment_vars": [
"APT_MIRANTIS_SALT_REPO={{ user `apt_mirantis_salt_repo` }}"
],
"pause_before": "120s",
"type": "shell",
"expect_disconnect": "true",
"scripts": [
"scripts/salt.sh"
]
},
{
"environment_vars": [
"HOME=/root",
"MCP_VERSION={{ user `mcp_version` }}"
],
"type": "shell",
"pause_before": "120s",
"scripts": [
"scripts/mirrors.sh",
"scripts/security.sh",
"scripts/cleanup.sh"
]
},
{
"type": "file",
"source": "files/etc/cloud/cloud.cfg.d/99_tcp.cfg",
"destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg"
},
{
"type": "file",
"source": "files/etc/cloud/cloud.cfg",
"destination": "/etc/cloud/cloud.cfg"
}
],
"builders": [
{
"type": "openstack",
"ssh_username": "{{user `user`}}",
"ssh_password": "{{user `password`}}",
"image_name": "{{user `image_name`}}",
"floating_ip_pool": "{{user `os_floating_ip_pool`}}",
"reuse_ips": "true",
"source_image": "{{ user `os_image` }}",
"flavor": "{{ user `os_flavor` }}",
"user_data_file": "config-drive/user-data.yaml",
"tenant_id": "{{ user `os_tenant` }}",
"networks": ["{{ user `os_network` }}"],
"availability_zone": "{{user `os_zone`}}",
"identity_endpoint": "{{user `os_endpoint`}}",
"username": "{{user `os_username`}}",
"password": "{{user `os_password`}}"
},
{
"type": "qemu",
"qemuargs": [
[
"-m",
"8096M"
],
[
"-fda",
"config-drive/cloudata.iso"
],
[
"-smp",
"4"
]
],
"vm_name": "{{ user `image_name` }}-{{ isotime \"200601021504\" }}",
"output_directory": "images/{{ user `image_name`}}",
"format": "qcow2",
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
"iso_url": "http://cloud-images.ubuntu.com/releases/xenial/release-20180306/ubuntu-16.04-server-cloudimg-amd64-disk1.img",
"iso_target_path": "/root/isos/xenial-server-cloudimg-amd64-disk1.img",
"iso_checksum_type": "md5",
"disk_image": true,
"iso_checksum": "566efef1d6f12e7d3a994c2405bdb642",
"http_directory": "http",
"headless": true,
"ssh_username": "{{user `user`}}",
"ssh_password": "{{user `password`}}",
"shutdown_command": "sync; shutdown -P now",
"vnc_bind_address": "0.0.0.0",
"vnc_port_max": "5956",
"vnc_port_min": "5956",
"ssh_host_port_min": 2223,
"ssh_host_port_max": 2223,
"boot_wait": "2s",
"ssh_wait_timeout": "360s"
}
]
}