-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
st2.json
146 lines (146 loc) · 4.88 KB
/
st2.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
{
"variables": {
"purpose": "Packer template for building StackStorm Vagrant '.box' \u0026 '.ova' Virtual Appliance",
"st2_version": "{{env `ST2_VERSION`}}",
"box_version": "{{env `BOX_VERSION`}}",
"st2_user": "st2admin",
"st2_password": "Ch@ngeMe",
"vm_name": "st2",
"vm_description": "Box with StackStorm (aka 'IFTTT for Ops') event-driven automation platform: auto-remediation, security responses, facilitated troubleshooting, complex deployments, ChatOps and more. \n* https://stackstorm.com/ \n* Documentation: https://docs.stackstorm.com/ \n* Community: https://stackstorm.com/community-# \n* Discussions: https://github.com/StackStorm/st2/discussions"
},
"provisioners": [
{
"type": "shell",
"inline": [
"sudo mkdir -p /opt/ova",
"sudo chown -R vagrant:vagrant /opt/ova"
]
},
{
"type": "file",
"source": "opt/",
"destination": "/opt/ova/"
},
{
"type": "shell",
"execute_command": "{{.Vars}} sudo -S -E bash -eu '{{.Path}}'",
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive"
],
"scripts": [
"scripts/pre_cleanup.sh",
"scripts/vagrant.sh",
"scripts/welcome.sh",
"scripts/virtualbox.sh",
"scripts/st2-integration-tests.sh"
]
},
{
"type": "shell",
"inline": [
"echo '\\033[33mInstalling StackStorm v{{ user `st2_version` }} ...\\033[0m'",
"curl --retry 3 -fsSL https://stackstorm.com/packages/install.sh | bash -seu -- --user={{ user `st2_user` }} --password={{ user `st2_password` }} --version={{ user `st2_version` }}"
]
},
{
"type": "shell",
"execute_command": "{{.Vars}} sudo -S -E bash -eu '{{.Path}}'",
"scripts": [
"scripts/reboot.sh"
],
"expect_disconnect": true
},
{
"pause_before": "1m",
"type": "shell",
"execute_command": "{{.Vars}} sudo -S -E bash -eu '{{.Path}}'",
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive"
],
"scripts": [
"scripts/test.sh",
"scripts/post_cleanup.sh"
]
}
],
"builders": [
{
"type": "virtualbox-iso",
"format": "ova",
"boot_command": [
"<enter><wait><f6><wait><esc><wait>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs>",
"/install/vmlinuz",
" initrd=/install/initrd.gz",
" priority=critical",
" locale=en_US.UTF-8",
" netcfg/get_domain=vm",
" netcfg/get_hostname=stackstorm",
" file=/media/preseed.cfg",
" console-setup/ask_detect=false",
" console-setup/layoutcode=us",
" console-setup/modelcode=pc105",
" debconf/frontend=noninteractive",
" kbd-chooser/method=us",
" keyboard-configuration/layout=USA",
" keyboard-configuration/variant=USA",
"<enter>"
],
"floppy_files": [
"./http/preseed.cfg"
],
"boot_wait": "10s",
"disk_size": 40960,
"guest_os_type": "Ubuntu_64",
"headless": true,
"http_directory": "http",
"iso_urls": [
"https://cdimage.ubuntu.com/releases/18.04/release/ubuntu-18.04.6-server-amd64.iso"
],
"iso_checksum": "sha256:f5cbb8104348f0097a8e513b10173a07dbc6684595e331cb06f93f385d0aecf6",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_timeout": "10000s",
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"virtualbox_version_file": ".vbox_version",
"vm_name": "{{user `vm_name`}}",
"export_opts": [
"--ovf10",
"--vsys", "0",
"--version", "{{user `st2_version`}}",
"--product", "StackStorm",
"--producturl", "https://stackstorm.com/",
"--description", "{{user `vm_description`}}"
],
"vboxmanage": [
[ "modifyvm", "{{.Name}}", "--memory", "2048" ],
[ "modifyvm", "{{.Name}}", "--cpus", "2" ]
]
}
],
"post-processors": [
{
"type": "vagrant",
"vagrantfile_template": "Vagrantfile.template",
"output": "builds/{{user `vm_name`}}_v{{user `st2_version`}}-{{user `box_version`}}.box",
"keep_input_artifact": true
},
{
"type": "shell-local",
"inline": [
"mv output-virtualbox-iso/{{user `vm_name`}}.ova builds/{{user `vm_name`}}_v{{user `st2_version`}}-{{user `box_version`}}.ova",
"rm -rf output-virtualbox-iso/"
]
}
]
}