blob: e9ada77e648a4c1fa403c738f1e34bc3d5e9c5c7 [file] [log] [blame]
Jiri Broulik4ea221c2018-04-10 13:48:06 +02001#!/bin/bash
2
3# pre-requirments:
4# apt-get install cloud-localds
azvyagintsevffa75b42018-06-06 20:38:54 +03005# Cloudimg: wget https://cloud-images.ubuntu.com/xenial/XXXX/xenial-server-cloudimg-amd64-disk1.img
Jiri Broulik4ea221c2018-04-10 13:48:06 +02006# 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
azvyagintsevffa75b42018-06-06 20:38:54 +030015#
16export CLUSTER_MODEL=https://github.com/Mirantis/mcp-drivetrain-model.git
17export CLUSTER_MODEL_REF=master
18export MCP_VERSION=proposed
19export SCRIPTS_REF=master
20export CLUSTER_NAME=mcp-day01
21export FORMULA_VERSION=proposed
22export BINARY_MCP_VERSION=proposed
23export UBUNTU_BASEURL="http://mirror.mirantis.com/proposed/ubuntu/"
24export SALTSTACK_REPO="http://mirror.mirantis.com/proposed/saltstack-2016.3/xenial xenial main"
Jiri Broulik4ea221c2018-04-10 13:48:06 +020025export APT_MIRANTIS_GPG="http://apt.mirantis.com/public.gpg"
azvyagintsevffa75b42018-06-06 20:38:54 +030026export SALTSTACK_GPG="https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub"
27export APT_MIRANTIS_SALT_REPO="http://apt.mirantis.com/xenial/ proposed salt"
28export GIT_SALT_FORMULAS_SCRIPTS=https://github.com/salt-formulas/salt-formulas-scripts.git
29export APT_REPOSITORY="deb [arch=amd64] http://apt.mirantis.com/xenial/ proposed salt"
30export APT_REPOSITORY_GPG=http://apt.mirantis.com/public.gpg
31###
Jiri Broulik4ea221c2018-04-10 13:48:06 +020032
33export PACKER_LOG=1
34# For qemu test-build:
35cloud-localds --hostname ubuntu --dsmode local config-drive/cloudata.iso config-drive/user-data.yaml
azvyagintsevffa75b42018-06-06 20:38:54 +030036packer build -only=qemu -parallel=false -on-error=ask template.json
37#rm -rf ~/.packer.d/