blob: 9b8602e7b6b7ca5fbea191ba1870f984e2f9ec5a [file] [log] [blame]
Jiri Broulik4ea221c2018-04-10 13:48:06 +02001#!/bin/bash
2
3# pre-requirments:
4# apt-get install cloud-localds
5# Cloudimg: wget https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
6# Packer: https://releases.hashicorp.com/packer/1.1.3/packer_1.1.3_linux_amd64.zip
7
8# Those script - only example for variables, which should be passed to packer and
9# overwrite variables under /scripts/ directory
10
11# External script sources:
12# http/bootstrap.saltstack.com.sh https://github.com/saltstack/salt-bootstrap
13#
14
15export CLUSTER_MODEL="https://github.com/jiribroulik/day01.git"
16export CLUSTER_MODEL_REF="master"
17export CLUSTER_NAME="mcp-day01"
18
19export MCP_VERSION="nightly"
20export FORMULA_VERSION="nightly"
21
22BINARY_MCP_VERSION="nightly"
23export UBUNTU_BASEURL="http://mirror.mirantis.com/${BINARY_MCP_VERSION}/ubuntu/"
24export SALTSTACK_REPO="http://apt.mirantis.com/xenial/salt/2016.3/ ${BINARY_MCP_VERSION} main"
25export APT_MIRANTIS_GPG="http://apt.mirantis.com/public.gpg"
26export SALTSTACK_GPG="${APT_MIRANTIS_GPG}"
27export APT_MIRANTIS_SALT_REPO="http://apt.mirantis.com/xenial/ ${BINARY_MCP_VERSION} salt "
28#
29export GIT_SALT_FORMULAS_SCRIPTS="https://github.com/salt-formulas/salt-formulas-scripts.git"
30#
31export APT_REPOSITORY=" deb [arch=amd64] ${APT_MIRANTIS_SALT_REPO} "
32export APT_REPOSITORY_GPG=${APT_MIRANTIS_GPG}
33
34export PACKER_LOG=1
35# For qemu test-build:
36cloud-localds --hostname ubuntu --dsmode local config-drive/cloudata.iso config-drive/user-data.yaml
37./packer build -only=qemu -parallel=false -on-error=ask template.json
38rm -rf ~/.packer.d/