blob: adbca4e52d54269b8aae63057190e91d37fe498f [file] [log] [blame]
Jiri Broulik4ea221c2018-04-10 13:48:06 +02001{
2 "variables": {
3 "user": "root",
4 "password": "r00tme",
5 "do_api_token": "{{ env `DO_API_TOKEN` }}",
6 "image_name": "{{ env `IMAGE_NAME` }}",
7 "disk_size": "150000"
8
9 },
10 "provisioners": [
11 {
12 "type": "file",
13 "source": "files/root/interfaces",
14 "destination": "/root/interfaces"
15 },
16 {
17 "type": "file",
18 "source": "files/root/minion.conf",
19 "destination": "/root/minion.conf"
20 },
21 {
22 "type": "file",
23 "source": "files/tmp/bootstrap.saltstack.com.sh",
24 "destination": "/tmp/bootstrap.saltstack.com.sh"
25 },
26 {
27 "environment_vars": [
28 "CLUSTER_MODEL={{ user `cluster_model` }}",
29 "CLUSTER_MODEL_REF={{ user `cluster_model_ref` }}",
30 "CLUSTER_NAME={{ user `cluster_name` }}",
31 "FORMULA_VERSION={{ user `formula_version` }}",
32 "UBUNTU_BASEURL={{ user `ubuntu_baseurl` }}",
33 "SALTSTACK_GPG={{ user `saltstack_gpg` }}",
34 "SALTSTACK_REPO={{ user `saltstack_repo` }}",
35 "APT_MIRANTIS_GPG={{ user `apt_mirantis_gpg` }}",
36 "APT_MIRANTIS_SALT_REPO={{ user `apt_mirantis_salt_repo` }}",
37 "GIT_SALT_FORMULAS_SCRIPTS={{ user `git_salt_formulas_scripts` }}",
38 "APT_REPOSITORY={{ user `apt_repository` }}",
39 "APT_REPOSITORY_GPG={{ user `apt_repository_gpg` }}",
40 "APT_MIRANTIS_SALT_REPO={{ user `apt_mirantis_salt_repo` }}"
41 ],
42 "type": "shell",
43 "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
44 "expect_disconnect": "true",
45 "scripts": [
46 "scripts/base.sh",
47 "scripts/motd.sh",
48 "scripts/network.sh",
49 "scripts/salt_bootstrap.sh",
50 "scripts/salt.sh"
51 ]
52 },
53 {
54 "type": "file",
55 "source": "files/var/maas",
56 "destination": "/var/lib/maas/.maas_login.sh"
57 },
58 {
59 "type": "file",
60 "source": "files/var/jenkins",
61 "destination": "/var/lib/jenkins/org.codefirst.SimpleThemeDecorator.xml"
62 },
63 {
64 "environment_vars": [
65 "HOME=/root",
66 "MCP_VERSION={{ user `mcp_version` }}"
67 ],
68 "type": "shell",
69 "pause_before": "10s",
70 "scripts": [
71 "scripts/security.sh",
72 "scripts/cleanup.sh"
73 ]
74 },
75 {
76 "type": "file",
77 "source": "files/etc/cloud/cloud.cfg.d/99_tcp.cfg",
78 "destination": "/etc/cloud/cloud.cfg.d/99_tcp.cfg"
79 },
80 {
81 "type": "file",
82 "source": "files/etc/cloud/cloud.cfg",
83 "destination": "/etc/cloud/cloud.cfg"
84 }
85 ],
86 "builders": [
87 {
88 "type": "qemu",
89 "qemuargs": [
90 [
91 "-m",
92 "8096M"
93 ],
94 [
95 "-fda",
96 "config-drive/cloudata.iso"
97 ],
98 [
99 "-smp",
100 "4"
101 ]
102 ],
103 "vm_name": "{{ user `image_name` }}-{{ isotime \"200601021504\" }}",
104 "output_directory": "images/{{ user `image_name`}}",
105 "format": "qcow2",
106 "accelerator": "kvm",
107 "disk_size": "{{ user `disk_size`}}",
108 "iso_url": "http://cloud-images.ubuntu.com/releases/xenial/release-20180306/ubuntu-16.04-server-cloudimg-amd64-disk1.img",
109 "iso_target_path": "/root/isos/xenial-server-cloudimg-amd64-disk1.img",
110 "iso_checksum_type": "md5",
111 "disk_image": true,
112 "iso_checksum": "566efef1d6f12e7d3a994c2405bdb642",
113 "http_directory": "http",
114 "headless": true,
115 "ssh_username": "{{user `user`}}",
116 "ssh_password": "{{user `password`}}",
117 "shutdown_command": "sync; shutdown -P now",
118 "vnc_bind_address": "0.0.0.0",
119 "vnc_port_max": "5956",
120 "vnc_port_min": "5956",
121 "ssh_host_port_min": 2223,
122 "ssh_host_port_max": 2223,
123 "boot_wait": "2s",
124 "ssh_wait_timeout": "360s"
125 }
126 ]
127}