Add proper qemu-caching for source image
* Require command at slaves:
'mkdir -p "${HOME}/packer_images_cache/"'
since packer not able to do it.
* set SALT_STOPSTART_WAIT=10 for salt bootstrap
* Dd iptables to base installation
Change-Id: Icc5a50a21e848b93660aa80483b6fdd3e27de243
diff --git a/mirror-image/run.example.sh b/mirror-image/run.example.sh
index 3f7328c..f1161ac 100644
--- a/mirror-image/run.example.sh
+++ b/mirror-image/run.example.sh
@@ -12,6 +12,8 @@
# http/bootstrap.saltstack.com.sh https://github.com/saltstack/salt-bootstrap
#
+export PACKER_IMAGES_CACHE="${HOME}/packer_images_cache/"
+#
export CLUSTER_MODEL="https://github.com/Mirantis/mcp-offline-model.git"
export CLUSTER_MODEL_REF="master"
export CLUSTER_NAME="mcp-offline"
@@ -32,20 +34,20 @@
export APT_REPOSITORY_GPG=${APT_MIRANTIS_GPG}
# Openstack-related variables
-export VM_FLAVOR="3c4fe514-3eb6-464d-a419-7be09d72cf1e"
-export VM_FLOATING_IP_POOL="095f43ed-65ba-48ce-8185-d4080e430a88"
-export IMAGE_NAME="mcp-offline-mirror-$(date '+%Y-%m-%d-%H-%M-%S')"
-export VM_IMAGE="9953a40d-1fa2-4f26-b146-0507dbc912dc" # ubuntu cloud img
+#export VM_FLAVOR="3c4fe514-3eb6-464d-a419-7be09d72cf1e"
+#export VM_FLOATING_IP_POOL="095f43ed-65ba-48ce-8185-d4080e430a88"
+#export IMAGE_NAME="mcp-offline-mirror-$(date '+%Y-%m-%d-%H-%M-%S')"
+#export VM_IMAGE="9953a40d-1fa2-4f26-b146-0507dbc912dc" # ubuntu cloud img
# May be need, if cloud with keystone v3 used
#export OS_TENANT_ID=$OS_PROJECT_ID
#export OS_DOMAIN_NAME="xxxx"
#export OS_TENANT_NAME="xxxxx"
+# Hard-coded folder in template
+mkdir -p "${PACKER_IMAGES_CACHE}"
+
export PACKER_LOG=1
# For qemu test-build:
-#cloud-localds --hostname ubuntu --dsmode local config-drive/cloudata.iso config-drive/user-data.yaml
-# packer build -only=qemu -parallel=false -on-error=ask template.json
+cloud-localds --hostname ubuntu --dsmode local config-drive/cloudata.iso config-drive/user-data.yaml
+packer build -only=qemu -parallel=false -on-error=ask template.json
# rm -rf ~/.packer.d/
-
-# For openstack test-build
-packer build -only=openstack -parallel=false -on-error=ask template.json