blob: f43c0026d5fe6961d0cd1aad3cfcbd79f803a042 [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",
Jiri Broulik2c75a202018-04-10 15:05:38 +0200106 "iso_checksum": "566efef1d6f12e7d3a994c2405bdb642",
107 "iso_checksum_type": "md5",
108 "iso_url": "http://cloud-images.ubuntu.com/releases/xenial/release-20180306/ubuntu-16.04-server-cloudimg-amd64-disk1.img",
109 "disk_image": true,
Jiri Broulik4ea221c2018-04-10 13:48:06 +0200110 "accelerator": "kvm",
111 "disk_size": "{{ user `disk_size`}}",
Jiri Broulik4ea221c2018-04-10 13:48:06 +0200112 "headless": true,
113 "ssh_username": "{{user `user`}}",
114 "ssh_password": "{{user `password`}}",
Jiri Broulik2c75a202018-04-10 15:05:38 +0200115 "shutdown_command": "shutdown -P now",
Jiri Broulik4ea221c2018-04-10 13:48:06 +0200116 "boot_wait": "2s",
117 "ssh_wait_timeout": "360s"
118 }
119 ]
120}