Modified OpenStack build settings for mirror-image
Change-Id: Ie59ff1de60f4807a9b39b358834f19cbfac0b652
diff --git a/mirror-image/template.json b/mirror-image/template.json
index b1a7171..f606787 100644
--- a/mirror-image/template.json
+++ b/mirror-image/template.json
@@ -4,9 +4,6 @@
"password": "r00tme",
"do_api_token": "{{ env `DO_API_TOKEN` }}",
"image_name": "{{ env `IMAGE_NAME` }}",
- "VM_IMAGE": "{{ env `VM_IMAGE` }}",
- "floating_ip_pool": "{{ env `VM_FLOATING_IP_POOL` }}",
- "VM_FLAVOR": "{{ env `VM_FLAVOR` }}",
"disk_size": "150000",
"cluster_model": "{{ env `CLUSTER_MODEL` }}",
"cluster_model_ref": "{{ env `CLUSTER_MODEL_REF` }}",
@@ -20,7 +17,17 @@
"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` }}"
+ "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": [
{
@@ -55,17 +62,20 @@
"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/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": [
@@ -102,14 +112,17 @@
"ssh_username": "{{user `user`}}",
"ssh_password": "{{user `password`}}",
"image_name": "{{user `image_name`}}",
- "floating_ip_pool": "{{user `floating_ip_pool`}}",
+ "floating_ip_pool": "{{user `os_floating_ip_pool`}}",
"reuse_ips": "true",
- "security_groups": [
- "open_all"
- ],
- "source_image": "{{ user `VM_IMAGE` }}",
- "flavor": "{{ user `VM_FLAVOR` }}",
- "user_data_file": "config-drive/user-data.yaml"
+ "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",