wombat-cli 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +23 -23
  3. data/.travis.yml +27 -27
  4. data/CHANGELOG.md +77 -70
  5. data/DESIGN.md +49 -49
  6. data/Gemfile +5 -5
  7. data/README.md +146 -146
  8. data/Rakefile +26 -26
  9. data/bin/wombat +24 -24
  10. data/generator_files/Vagrantfile +120 -120
  11. data/generator_files/cookbooks/automate/.gitignore +16 -16
  12. data/generator_files/cookbooks/automate/.kitchen.ec2.yml +34 -34
  13. data/generator_files/cookbooks/automate/.kitchen.yml +24 -24
  14. data/generator_files/cookbooks/automate/Berksfile +6 -6
  15. data/generator_files/cookbooks/automate/README.md +4 -4
  16. data/generator_files/cookbooks/automate/chefignore +102 -102
  17. data/generator_files/cookbooks/automate/libraries/_helper.rb +52 -52
  18. data/generator_files/cookbooks/automate/libraries/delivery_api.rb +204 -204
  19. data/generator_files/cookbooks/automate/libraries/delivery_project.rb +31 -31
  20. data/generator_files/cookbooks/automate/libraries/dsl.rb +4 -4
  21. data/generator_files/cookbooks/automate/metadata.rb +11 -11
  22. data/generator_files/cookbooks/automate/recipes/default.rb +112 -112
  23. data/generator_files/cookbooks/automate/recipes/update-users.rb +48 -48
  24. data/generator_files/cookbooks/automate/templates/delivery.erb +6 -6
  25. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
  26. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
  27. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
  28. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
  29. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
  30. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
  31. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
  32. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
  33. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/metadata.rb +3 -3
  34. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/recipes/default.rb +27 -27
  35. data/generator_files/cookbooks/automate/test/integration/default/automate_spec.rb +56 -56
  36. data/generator_files/cookbooks/build_node/.gitignore +16 -16
  37. data/generator_files/cookbooks/build_node/.kitchen.ec2.yml +37 -37
  38. data/generator_files/cookbooks/build_node/.kitchen.yml +23 -23
  39. data/generator_files/cookbooks/build_node/Berksfile +8 -8
  40. data/generator_files/cookbooks/build_node/README.md +4 -4
  41. data/generator_files/cookbooks/build_node/chefignore +102 -102
  42. data/generator_files/cookbooks/build_node/metadata.rb +12 -12
  43. data/generator_files/cookbooks/build_node/recipes/default.rb +38 -38
  44. data/generator_files/cookbooks/build_node/templates/client.erb +2 -2
  45. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
  46. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
  47. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
  48. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
  49. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
  50. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
  51. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
  52. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
  53. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/metadata.rb +2 -2
  54. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/recipes/default.rb +18 -18
  55. data/generator_files/cookbooks/build_node/test/integration/default/build-node_spec.rb +40 -40
  56. data/generator_files/cookbooks/chef_server/.gitignore +16 -16
  57. data/generator_files/cookbooks/chef_server/.kitchen.ec2.yml +34 -34
  58. data/generator_files/cookbooks/chef_server/.kitchen.yml +24 -24
  59. data/generator_files/cookbooks/chef_server/Berksfile +6 -6
  60. data/generator_files/cookbooks/chef_server/README.md +4 -4
  61. data/generator_files/cookbooks/chef_server/chefignore +102 -102
  62. data/generator_files/cookbooks/chef_server/metadata.rb +11 -11
  63. data/generator_files/cookbooks/chef_server/recipes/bootstrap_users.rb +91 -91
  64. data/generator_files/cookbooks/chef_server/recipes/default.rb +113 -113
  65. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
  66. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
  67. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
  68. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
  69. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
  70. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
  71. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
  72. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
  73. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/metadata.rb +2 -2
  74. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/recipes/default.rb +23 -23
  75. data/generator_files/cookbooks/chef_server/test/integration/default/chef_server_spec.rb +50 -50
  76. data/generator_files/cookbooks/compliance/.gitignore +16 -16
  77. data/generator_files/cookbooks/compliance/.kitchen.ec2.yml +34 -34
  78. data/generator_files/cookbooks/compliance/.kitchen.yml +24 -24
  79. data/generator_files/cookbooks/compliance/Berksfile +7 -7
  80. data/generator_files/cookbooks/compliance/README.md +4 -4
  81. data/generator_files/cookbooks/compliance/chefignore +102 -102
  82. data/generator_files/cookbooks/compliance/metadata.rb +11 -11
  83. data/generator_files/cookbooks/compliance/recipes/default.rb +57 -57
  84. data/generator_files/cookbooks/compliance/spec/spec_helper.rb +2 -2
  85. data/generator_files/cookbooks/compliance/spec/unit/recipes/default_spec.rb +20 -20
  86. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
  87. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
  88. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
  89. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
  90. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
  91. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
  92. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
  93. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
  94. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/metadata.rb +4 -4
  95. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/recipes/default.rb +21 -21
  96. data/generator_files/cookbooks/compliance/test/integration/default/compliance.rb +28 -28
  97. data/generator_files/cookbooks/infranodes/.gitignore +16 -16
  98. data/generator_files/cookbooks/infranodes/.kitchen.ec2.yml +48 -48
  99. data/generator_files/cookbooks/infranodes/.kitchen.yml +21 -21
  100. data/generator_files/cookbooks/infranodes/Berksfile +6 -6
  101. data/generator_files/cookbooks/infranodes/README.md +4 -4
  102. data/generator_files/cookbooks/infranodes/attributes/default.rb +2 -2
  103. data/generator_files/cookbooks/infranodes/chefignore +102 -102
  104. data/generator_files/cookbooks/infranodes/metadata.rb +13 -13
  105. data/generator_files/cookbooks/infranodes/recipes/default.rb +57 -57
  106. data/generator_files/cookbooks/infranodes/spec/spec_helper.rb +2 -2
  107. data/generator_files/cookbooks/infranodes/spec/unit/recipes/default_spec.rb +20 -20
  108. data/generator_files/cookbooks/infranodes/templates/default/client.rb.erb +5 -5
  109. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
  110. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
  111. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
  112. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
  113. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
  114. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
  115. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
  116. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
  117. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/metadata.rb +3 -3
  118. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/recipes/default.rb +27 -27
  119. data/generator_files/cookbooks/infranodes/test/integration/default/infranodes_spec.rb +22 -22
  120. data/generator_files/cookbooks/infranodes/test/integration/helpers/serverspec/spec_helper.rb +8 -8
  121. data/generator_files/cookbooks/wombat/.gitignore +16 -16
  122. data/generator_files/cookbooks/wombat/.kitchen.yml +43 -43
  123. data/generator_files/cookbooks/wombat/Berksfile +5 -5
  124. data/generator_files/cookbooks/wombat/README.md +4 -4
  125. data/generator_files/cookbooks/wombat/attributes/default.rb +74 -74
  126. data/generator_files/cookbooks/wombat/attributes/packer.rb +18 -18
  127. data/generator_files/cookbooks/wombat/chefignore +102 -102
  128. data/generator_files/cookbooks/wombat/metadata.rb +13 -13
  129. data/generator_files/cookbooks/wombat/recipes/authorized-keys.rb +20 -20
  130. data/generator_files/cookbooks/wombat/recipes/default.rb +111 -111
  131. data/generator_files/cookbooks/wombat/recipes/etc-hosts.rb +51 -51
  132. data/generator_files/cookbooks/workstation/.gitignore +16 -16
  133. data/generator_files/cookbooks/workstation/.kitchen.ec2.yml +30 -30
  134. data/generator_files/cookbooks/workstation/.kitchen.yml +22 -22
  135. data/generator_files/cookbooks/workstation/Berksfile +7 -7
  136. data/generator_files/cookbooks/workstation/README.md +3 -3
  137. data/generator_files/cookbooks/workstation/chefignore +102 -102
  138. data/generator_files/cookbooks/workstation/files/atom.apm.list +7 -7
  139. data/generator_files/cookbooks/workstation/files/atom.config.cson +3 -3
  140. data/generator_files/cookbooks/workstation/metadata.rb +14 -14
  141. data/generator_files/cookbooks/workstation/recipes/browser.rb +59 -59
  142. data/generator_files/cookbooks/workstation/recipes/certs-keys.rb +45 -45
  143. data/generator_files/cookbooks/workstation/recipes/chef.rb +29 -29
  144. data/generator_files/cookbooks/workstation/recipes/default.rb +20 -20
  145. data/generator_files/cookbooks/workstation/recipes/dotnet.rb +17 -17
  146. data/generator_files/cookbooks/workstation/recipes/editor.rb +19 -19
  147. data/generator_files/cookbooks/workstation/recipes/profile.rb +42 -42
  148. data/generator_files/cookbooks/workstation/recipes/terminal.rb +13 -13
  149. data/generator_files/cookbooks/workstation/templates/default/bookmarks.html.erb +23 -23
  150. data/generator_files/cookbooks/workstation/templates/default/data_collector.rb.erb +2 -2
  151. data/generator_files/cookbooks/workstation/templates/default/ise_profile.ps1.erb +11 -11
  152. data/generator_files/cookbooks/workstation/templates/default/knife.rb.erb +10 -10
  153. data/generator_files/cookbooks/workstation/templates/default/master_preferences.json.erb +28 -28
  154. data/generator_files/cookbooks/workstation/templates/default/ssh_config.erb +16 -16
  155. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
  156. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
  157. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/chef.crt +26 -26
  158. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
  159. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
  160. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
  161. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
  162. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
  163. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/metadata.rb +2 -2
  164. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/recipes/default.rb +21 -21
  165. data/generator_files/cookbooks/workstation/test/integration/default/workstation_spec.rb +37 -37
  166. data/generator_files/packer/automate.json +131 -131
  167. data/generator_files/packer/build-node.json +137 -137
  168. data/generator_files/packer/chef-server.json +132 -132
  169. data/generator_files/packer/compliance.json +128 -128
  170. data/generator_files/packer/infranodes-windows.json +138 -138
  171. data/generator_files/packer/infranodes.json +129 -129
  172. data/generator_files/packer/workstation.json +136 -136
  173. data/generator_files/templates/arm.json.erb +575 -575
  174. data/generator_files/templates/arm.tidy.json.erb +31 -31
  175. data/generator_files/templates/bootstrap-aws.erb +36 -36
  176. data/generator_files/templates/cfn.json.erb +674 -674
  177. data/generator_files/wombat.yml +71 -71
  178. data/lib/wombat/aws.rb +67 -67
  179. data/lib/wombat/build.rb +338 -338
  180. data/lib/wombat/cli.rb +238 -238
  181. data/lib/wombat/common.rb +347 -347
  182. data/lib/wombat/crypto.rb +64 -64
  183. data/lib/wombat/delete.rb +94 -94
  184. data/lib/wombat/deploy.rb +101 -101
  185. data/lib/wombat/init.rb +32 -32
  186. data/lib/wombat/latest.rb +27 -27
  187. data/lib/wombat/output.rb +86 -86
  188. data/lib/wombat/update.rb +20 -20
  189. data/lib/wombat/version.rb +3 -3
  190. data/lib/wombat.rb +8 -8
  191. data/spec/functional/common_spec.rb +26 -26
  192. data/spec/spec_helper.rb +103 -103
  193. data/spec/unit/common_spec.rb +116 -116
  194. data/terraform/README.md +13 -13
  195. data/terraform/templates/terraform.tfvars.erb +12 -12
  196. data/terraform/wombat.tf +328 -328
  197. data/wombat-cli.gemspec +34 -34
  198. metadata +2 -2
@@ -1,130 +1,130 @@
1
- {
2
- "variables": {
3
- "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
4
- "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
5
- "aws_region": "{{env `AWS_REGION`}}",
6
- "aws_source_ami": "ami-8e0b9499",
7
- "azure_client_id": "{{env `AZURE_CLIENT_ID`}}",
8
- "azure_tenant_id": "{{env `AZURE_TENANT_ID`}}",
9
- "azure_client_secret": "{{env `AZURE_CLIENT_SECRET`}}",
10
- "azure_subscription_id": "{{env `AZURE_SUBSCRIPTION_ID`}}",
11
- "azure_storage_account": "{{env `AZURE_STORAGE_ACCOUNT`}}",
12
- "azure_resource_group": "{{env `AZURE_RESOURCE_GROUP`}}",
13
- "azure_object_id": "{{env `AZURE_OBJECT_ID`}}",
14
- "azure_location": "",
15
- "gce_account_file": "{{env `GCE_ACCOUNT_FILE`}}",
16
- "gce_project_id": "{{env `GCE_PROJECT_ID`}}",
17
- "gce_zone": "{{env `GCE_ZONE`}}",
18
- "gce_source_image": "ubuntu-1404-trusty-v20160809a",
19
- "build-nodes": "1",
20
- "chef_channel": "stable",
21
- "chef_install_url": "curl -L https://omnitruck.chef.io/install.sh",
22
- "chef_ver": "latest",
23
- "domain": "animals.biz",
24
- "domain_prefix": "",
25
- "enterprise": "mammals",
26
- "node-name": "acceptance",
27
- "org": "marsupials",
28
- "ssh_username": "{{user `ssh_username`}}",
29
- "workstations": "1"
30
- },
31
- "builders": [
32
- {
33
- "type": "amazon-ebs",
34
- "access_key": "{{user `aws_access_key`}}",
35
- "secret_key": "{{user `aws_secret_key`}}",
36
- "region": "{{user `aws_region`}}",
37
- "source_ami": "{{user `aws_source_ami`}}",
38
- "instance_type": "t2.medium",
39
- "communicator": "ssh",
40
- "associate_public_ip_address": true,
41
- "ssh_username": "{{user `ssh_username`}}",
42
- "ssh_pty": true,
43
- "ami_name": "automate-infranode-{{user `node-name`}}-{{timestamp}}"
44
- },
45
- {
46
- "type": "azure-arm",
47
- "subscription_id": "{{user `azure_subscription_id`}}",
48
- "client_id": "{{user `azure_client_id`}}",
49
- "client_secret": "{{user `azure_client_secret`}}",
50
- "tenant_id": "{{user `azure_tenant_id`}}",
51
- "resource_group_name": "{{user `azure_resource_group`}}",
52
- "storage_account": "{{user `azure_storage_account`}}",
53
- "object_id": "{{user `azure_object_id`}}",
54
- "capture_container_name": "images",
55
- "capture_name_prefix": "infranode-{{user `node-name`}}",
56
- "os_type": "Linux",
57
- "image_publisher": "Canonical",
58
- "image_offer": "UbuntuServer",
59
- "image_sku": "14.04.5-LTS",
60
- "location": "{{user `azure_location`}}",
61
- "vm_size": "Standard_DS3_v2",
62
- "ssh_username": "{{user `ssh_username`}}",
63
- "ssh_pty": true
64
- },
65
- {
66
- "type": "googlecompute",
67
- "account_file": "{{user `gce_account_file`}}",
68
- "project_id": "{{user `gce_project_id`}}",
69
- "source_image": "{{user `gce_source_image`}}",
70
- "zone": "{{user `gce_zone`}}",
71
- "disk_type": "pd-ssd",
72
- "disk_size": "80",
73
- "image_name": "chef-{{timestamp}}",
74
- "machine_type": "n1-standard-2",
75
- "ssh_username": "{{user `ssh_username`}}",
76
- "ssh_pty": true
77
- }
78
- ],
79
- "provisioners": [
80
- {
81
- "type": "file",
82
- "source": "{{pwd}}/files/",
83
- "destination": "/tmp"
84
- },
85
- {
86
- "type": "file",
87
- "source": "{{pwd}}/keys/",
88
- "destination": "/tmp"
89
- },
90
- {
91
- "type": "chef-solo",
92
- "install_command": "{{user `chef_install_url`}} | sudo bash -s -- -c {{user `chef_channel`}} -v {{user `chef_ver`}}",
93
- "cookbook_paths": [
94
- "{{pwd}}/vendored-cookbooks/infranodes"
95
- ],
96
- "run_list": [
97
- "infranodes",
98
- "wombat::authorized-keys",
99
- "wombat::etc-hosts"
100
- ],
101
- "json": {
102
- "demo": {
103
- "admin-user": "{{user `ssh_username`}}",
104
- "domain_prefix": "{{user `domain_prefix`}}",
105
- "domain": "{{user `domain`}}",
106
- "enterprise": "{{user `enterprise`}}",
107
- "org": "{{user `org`}}",
108
- "build-nodes": "{{user `build-nodes`}}",
109
- "workstations": "{{user `workstations`}}",
110
- "node-name": "{{user `node-name`}}",
111
- "versions": {
112
- "chef": "{{user `chef_channel`}}-{{user `chef_ver`}}"
113
- }
114
- }
115
- }
116
- },
117
- {
118
- "only": [
119
- "azure-arm"
120
- ],
121
- "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'",
122
- "inline": [
123
- "/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync"
124
- ],
125
- "inline_shebang": "/bin/sh -x",
126
- "type": "shell",
127
- "skip_clean": true
128
- }
129
- ]
1
+ {
2
+ "variables": {
3
+ "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
4
+ "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
5
+ "aws_region": "{{env `AWS_REGION`}}",
6
+ "aws_source_ami": "ami-8e0b9499",
7
+ "azure_client_id": "{{env `AZURE_CLIENT_ID`}}",
8
+ "azure_tenant_id": "{{env `AZURE_TENANT_ID`}}",
9
+ "azure_client_secret": "{{env `AZURE_CLIENT_SECRET`}}",
10
+ "azure_subscription_id": "{{env `AZURE_SUBSCRIPTION_ID`}}",
11
+ "azure_storage_account": "{{env `AZURE_STORAGE_ACCOUNT`}}",
12
+ "azure_resource_group": "{{env `AZURE_RESOURCE_GROUP`}}",
13
+ "azure_object_id": "{{env `AZURE_OBJECT_ID`}}",
14
+ "azure_location": "",
15
+ "gce_account_file": "{{env `GCE_ACCOUNT_FILE`}}",
16
+ "gce_project_id": "{{env `GCE_PROJECT_ID`}}",
17
+ "gce_zone": "{{env `GCE_ZONE`}}",
18
+ "gce_source_image": "ubuntu-1404-trusty-v20160809a",
19
+ "build-nodes": "1",
20
+ "chef_channel": "stable",
21
+ "chef_install_url": "curl -L https://omnitruck.chef.io/install.sh",
22
+ "chef_ver": "latest",
23
+ "domain": "animals.biz",
24
+ "domain_prefix": "",
25
+ "enterprise": "mammals",
26
+ "node-name": "acceptance",
27
+ "org": "marsupials",
28
+ "ssh_username": "{{user `ssh_username`}}",
29
+ "workstations": "1"
30
+ },
31
+ "builders": [
32
+ {
33
+ "type": "amazon-ebs",
34
+ "access_key": "{{user `aws_access_key`}}",
35
+ "secret_key": "{{user `aws_secret_key`}}",
36
+ "region": "{{user `aws_region`}}",
37
+ "source_ami": "{{user `aws_source_ami`}}",
38
+ "instance_type": "t2.medium",
39
+ "communicator": "ssh",
40
+ "associate_public_ip_address": true,
41
+ "ssh_username": "{{user `ssh_username`}}",
42
+ "ssh_pty": true,
43
+ "ami_name": "automate-infranode-{{user `node-name`}}-{{timestamp}}"
44
+ },
45
+ {
46
+ "type": "azure-arm",
47
+ "subscription_id": "{{user `azure_subscription_id`}}",
48
+ "client_id": "{{user `azure_client_id`}}",
49
+ "client_secret": "{{user `azure_client_secret`}}",
50
+ "tenant_id": "{{user `azure_tenant_id`}}",
51
+ "resource_group_name": "{{user `azure_resource_group`}}",
52
+ "storage_account": "{{user `azure_storage_account`}}",
53
+ "object_id": "{{user `azure_object_id`}}",
54
+ "capture_container_name": "images",
55
+ "capture_name_prefix": "infranode-{{user `node-name`}}",
56
+ "os_type": "Linux",
57
+ "image_publisher": "Canonical",
58
+ "image_offer": "UbuntuServer",
59
+ "image_sku": "14.04.5-LTS",
60
+ "location": "{{user `azure_location`}}",
61
+ "vm_size": "Standard_DS3_v2",
62
+ "ssh_username": "{{user `ssh_username`}}",
63
+ "ssh_pty": true
64
+ },
65
+ {
66
+ "type": "googlecompute",
67
+ "account_file": "{{user `gce_account_file`}}",
68
+ "project_id": "{{user `gce_project_id`}}",
69
+ "source_image": "{{user `gce_source_image`}}",
70
+ "zone": "{{user `gce_zone`}}",
71
+ "disk_type": "pd-ssd",
72
+ "disk_size": "80",
73
+ "image_name": "chef-{{timestamp}}",
74
+ "machine_type": "n1-standard-2",
75
+ "ssh_username": "{{user `ssh_username`}}",
76
+ "ssh_pty": true
77
+ }
78
+ ],
79
+ "provisioners": [
80
+ {
81
+ "type": "file",
82
+ "source": "{{pwd}}/files/",
83
+ "destination": "/tmp"
84
+ },
85
+ {
86
+ "type": "file",
87
+ "source": "{{pwd}}/keys/",
88
+ "destination": "/tmp"
89
+ },
90
+ {
91
+ "type": "chef-solo",
92
+ "install_command": "{{user `chef_install_url`}} | sudo bash -s -- -c {{user `chef_channel`}} -v {{user `chef_ver`}}",
93
+ "cookbook_paths": [
94
+ "{{pwd}}/vendored-cookbooks/infranodes"
95
+ ],
96
+ "run_list": [
97
+ "infranodes",
98
+ "wombat::authorized-keys",
99
+ "wombat::etc-hosts"
100
+ ],
101
+ "json": {
102
+ "demo": {
103
+ "admin-user": "{{user `ssh_username`}}",
104
+ "domain_prefix": "{{user `domain_prefix`}}",
105
+ "domain": "{{user `domain`}}",
106
+ "enterprise": "{{user `enterprise`}}",
107
+ "org": "{{user `org`}}",
108
+ "build-nodes": "{{user `build-nodes`}}",
109
+ "workstations": "{{user `workstations`}}",
110
+ "node-name": "{{user `node-name`}}",
111
+ "versions": {
112
+ "chef": "{{user `chef_channel`}}-{{user `chef_ver`}}"
113
+ }
114
+ }
115
+ }
116
+ },
117
+ {
118
+ "only": [
119
+ "azure-arm"
120
+ ],
121
+ "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'",
122
+ "inline": [
123
+ "/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync"
124
+ ],
125
+ "inline_shebang": "/bin/sh -x",
126
+ "type": "shell",
127
+ "skip_clean": true
128
+ }
129
+ ]
130
130
  }
@@ -1,137 +1,137 @@
1
- {
2
- "variables": {
3
- "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
4
- "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
5
- "aws_region": "{{env `AWS_REGION`}}",
6
- "aws_source_ami": "ami-87c037e7",
7
- "azure_client_id": "{{env `AZURE_CLIENT_ID`}}",
8
- "azure_tenant_id": "{{env `AZURE_TENANT_ID`}}",
9
- "azure_client_secret": "{{env `AZURE_CLIENT_SECRET`}}",
10
- "azure_subscription_id": "{{env `AZURE_SUBSCRIPTION_ID`}}",
11
- "azure_storage_account": "{{env `AZURE_STORAGE_ACCOUNT`}}",
12
- "azure_resource_group": "{{env `AZURE_RESOURCE_GROUP`}}",
13
- "azure_object_id": "{{env `AZURE_OBJECT_ID`}}",
14
- "azure_location": "",
15
- "gce_account_file": "{{env `GCE_ACCOUNT_FILE`}}",
16
- "gce_project_id": "{{env `GCE_PROJECT_ID`}}",
17
- "gce_zone": "{{env `GCE_ZONE`}}",
18
- "gce_source_image": "windows-server-2012-r2-dc-v20160809",
19
- "build-nodes": "1",
20
- "chefdk": "stable-latest",
21
- "domain_prefix": "",
22
- "domain": "animals.biz",
23
- "enterprise": "mammals",
24
- "org": "marsupials",
25
- "ssh_username": "ubuntu",
26
- "winrm_password": "RL9@T40BTmXh",
27
- "winrm_username": "Administrator",
28
- "workstation-number": "1",
29
- "workstations": "1"
30
- },
31
- "builders": [
32
- {
33
- "type": "amazon-ebs",
34
- "access_key": "{{user `aws_access_key`}}",
35
- "secret_key": "{{user `aws_secret_key`}}",
36
- "region": "{{user `aws_region`}}",
37
- "source_ami": "{{user `aws_source_ami`}}",
38
- "instance_type": "m4.large",
39
- "communicator": "winrm",
40
- "associate_public_ip_address": true,
41
- "winrm_port": 5985,
42
- "winrm_username": "{{user `winrm_username`}}",
43
- "winrm_password": "{{user `winrm_password`}}",
44
- "user_data_file": "{{template_dir}}/scripts/bootstrap-aws.txt",
45
- "ami_name": "workstation-{{user `workstation-number`}}-{{timestamp}}"
46
- },
47
- {
48
- "type": "azure-arm",
49
- "subscription_id": "{{user `azure_subscription_id`}}",
50
- "client_id": "{{user `azure_client_id`}}",
51
- "client_secret": "{{user `azure_client_secret`}}",
52
- "tenant_id": "{{user `azure_tenant_id`}}",
53
- "resource_group_name": "{{user `azure_resource_group`}}",
54
- "storage_account": "{{user `azure_storage_account`}}",
55
- "object_id": "{{user `azure_object_id`}}",
56
- "capture_container_name": "images",
57
- "capture_name_prefix": "workstation-{{user `workstation-number`}}-{{timestamp}}",
58
- "os_type": "Windows",
59
- "image_publisher": "MicrosoftWindowsServer",
60
- "image_offer": "WindowsServer",
61
- "image_sku": "2012-R2-Datacenter",
62
- "location": "{{user `azure_location`}}",
63
- "vm_size": "Standard_DS3_v2",
64
- "communicator": "winrm",
65
- "winrm_username": "azure",
66
- "winrm_use_ssl": "true",
67
- "winrm_insecure": "true",
68
- "winrm_port": 5986,
69
- "winrm_timeout": "5m"
70
- },
71
- {
72
- "type": "googlecompute",
73
- "account_file": "{{user `gce_account_file`}}",
74
- "project_id": "{{user `gce_project_id`}}",
75
- "source_image": "{{user `gce_source_image`}}",
76
- "zone": "{{user `gce_zone`}}",
77
- "disk_type": "pd-ssd",
78
- "disk_size": "80",
79
- "machine_type": "n1-highcpu-8",
80
- "image_name": "workstation-{{user `workstation-number`}}-{{timestamp}}",
81
- "communicator": "winrm",
82
- "winrm_port": 5985,
83
- "winrm_username": "{{user `winrm_username`}}",
84
- "winrm_password": "{{user `winrm_password`}}",
85
- "metadata": {
86
- "windows-startup-script-url": "gs://wombat-bootstrap/win-bootstrap.ps1"
87
- }
88
- }
89
- ],
90
- "provisioners": [
91
- {
92
- "type": "file",
93
- "source": "{{pwd}}/keys/",
94
- "destination": "C:\\Windows\\Temp"
95
- },
96
- {
97
- "type": "file",
98
- "source": "{{pwd}}/files/",
99
- "destination": "C:\\Windows\\Temp"
100
- },
101
- {
102
- "type": "chef-solo",
103
- "install_command": "powershell.exe -Command \". { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -channel {{user `chef_channel`}} -version {{user `chef_ver`}}\"",
104
- "guest_os_type": "windows",
105
- "cookbook_paths": [
106
- "{{pwd}}/vendored-cookbooks/workstation"
107
- ],
108
- "run_list": [
109
- "workstation",
110
- "wombat::etc-hosts"
111
- ],
112
- "json": {
113
- "demo": {
114
- "admin-user": "{{user `ssh_username`}}",
115
- "domain_prefix": "{{user `domain_prefix`}}",
116
- "domain": "{{user `domain`}}",
117
- "enterprise": "{{user `enterprise`}}",
118
- "org": "{{user `org`}}",
119
- "workstation-number": "{{user `workstation-number`}}",
120
- "build-nodes": "{{user `build-nodes`}}",
121
- "versions": {
122
- "chefdk": "{{user `chefdk`}}"
123
- }
124
- }
125
- }
126
- },
127
- {
128
- "only": [
129
- "azure-arm"
130
- ],
131
- "type": "windows-shell",
132
- "inline": [
133
- "C:\\Windows\\System32\\sysprep\\sysprep.exe /quiet /generalize /oobe /shutdown"
134
- ]
135
- }
136
- ]
1
+ {
2
+ "variables": {
3
+ "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
4
+ "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
5
+ "aws_region": "{{env `AWS_REGION`}}",
6
+ "aws_source_ami": "ami-87c037e7",
7
+ "azure_client_id": "{{env `AZURE_CLIENT_ID`}}",
8
+ "azure_tenant_id": "{{env `AZURE_TENANT_ID`}}",
9
+ "azure_client_secret": "{{env `AZURE_CLIENT_SECRET`}}",
10
+ "azure_subscription_id": "{{env `AZURE_SUBSCRIPTION_ID`}}",
11
+ "azure_storage_account": "{{env `AZURE_STORAGE_ACCOUNT`}}",
12
+ "azure_resource_group": "{{env `AZURE_RESOURCE_GROUP`}}",
13
+ "azure_object_id": "{{env `AZURE_OBJECT_ID`}}",
14
+ "azure_location": "",
15
+ "gce_account_file": "{{env `GCE_ACCOUNT_FILE`}}",
16
+ "gce_project_id": "{{env `GCE_PROJECT_ID`}}",
17
+ "gce_zone": "{{env `GCE_ZONE`}}",
18
+ "gce_source_image": "windows-server-2012-r2-dc-v20160809",
19
+ "build-nodes": "1",
20
+ "chefdk": "stable-latest",
21
+ "domain_prefix": "",
22
+ "domain": "animals.biz",
23
+ "enterprise": "mammals",
24
+ "org": "marsupials",
25
+ "ssh_username": "ubuntu",
26
+ "winrm_password": "RL9@T40BTmXh",
27
+ "winrm_username": "Administrator",
28
+ "workstation-number": "1",
29
+ "workstations": "1"
30
+ },
31
+ "builders": [
32
+ {
33
+ "type": "amazon-ebs",
34
+ "access_key": "{{user `aws_access_key`}}",
35
+ "secret_key": "{{user `aws_secret_key`}}",
36
+ "region": "{{user `aws_region`}}",
37
+ "source_ami": "{{user `aws_source_ami`}}",
38
+ "instance_type": "m4.large",
39
+ "communicator": "winrm",
40
+ "associate_public_ip_address": true,
41
+ "winrm_port": 5985,
42
+ "winrm_username": "{{user `winrm_username`}}",
43
+ "winrm_password": "{{user `winrm_password`}}",
44
+ "user_data_file": "{{template_dir}}/scripts/bootstrap-aws.txt",
45
+ "ami_name": "workstation-{{user `workstation-number`}}-{{timestamp}}"
46
+ },
47
+ {
48
+ "type": "azure-arm",
49
+ "subscription_id": "{{user `azure_subscription_id`}}",
50
+ "client_id": "{{user `azure_client_id`}}",
51
+ "client_secret": "{{user `azure_client_secret`}}",
52
+ "tenant_id": "{{user `azure_tenant_id`}}",
53
+ "resource_group_name": "{{user `azure_resource_group`}}",
54
+ "storage_account": "{{user `azure_storage_account`}}",
55
+ "object_id": "{{user `azure_object_id`}}",
56
+ "capture_container_name": "images",
57
+ "capture_name_prefix": "workstation-{{user `workstation-number`}}-{{timestamp}}",
58
+ "os_type": "Windows",
59
+ "image_publisher": "MicrosoftWindowsServer",
60
+ "image_offer": "WindowsServer",
61
+ "image_sku": "2012-R2-Datacenter",
62
+ "location": "{{user `azure_location`}}",
63
+ "vm_size": "Standard_DS3_v2",
64
+ "communicator": "winrm",
65
+ "winrm_username": "azure",
66
+ "winrm_use_ssl": "true",
67
+ "winrm_insecure": "true",
68
+ "winrm_port": 5986,
69
+ "winrm_timeout": "5m"
70
+ },
71
+ {
72
+ "type": "googlecompute",
73
+ "account_file": "{{user `gce_account_file`}}",
74
+ "project_id": "{{user `gce_project_id`}}",
75
+ "source_image": "{{user `gce_source_image`}}",
76
+ "zone": "{{user `gce_zone`}}",
77
+ "disk_type": "pd-ssd",
78
+ "disk_size": "80",
79
+ "machine_type": "n1-highcpu-8",
80
+ "image_name": "workstation-{{user `workstation-number`}}-{{timestamp}}",
81
+ "communicator": "winrm",
82
+ "winrm_port": 5985,
83
+ "winrm_username": "{{user `winrm_username`}}",
84
+ "winrm_password": "{{user `winrm_password`}}",
85
+ "metadata": {
86
+ "windows-startup-script-url": "gs://wombat-bootstrap/win-bootstrap.ps1"
87
+ }
88
+ }
89
+ ],
90
+ "provisioners": [
91
+ {
92
+ "type": "file",
93
+ "source": "{{pwd}}/keys/",
94
+ "destination": "C:\\Windows\\Temp"
95
+ },
96
+ {
97
+ "type": "file",
98
+ "source": "{{pwd}}/files/",
99
+ "destination": "C:\\Windows\\Temp"
100
+ },
101
+ {
102
+ "type": "chef-solo",
103
+ "install_command": "powershell.exe -Command \". { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -channel {{user `chef_channel`}} -version {{user `chef_ver`}}\"",
104
+ "guest_os_type": "windows",
105
+ "cookbook_paths": [
106
+ "{{pwd}}/vendored-cookbooks/workstation"
107
+ ],
108
+ "run_list": [
109
+ "workstation",
110
+ "wombat::etc-hosts"
111
+ ],
112
+ "json": {
113
+ "demo": {
114
+ "admin-user": "{{user `ssh_username`}}",
115
+ "domain_prefix": "{{user `domain_prefix`}}",
116
+ "domain": "{{user `domain`}}",
117
+ "enterprise": "{{user `enterprise`}}",
118
+ "org": "{{user `org`}}",
119
+ "workstation-number": "{{user `workstation-number`}}",
120
+ "build-nodes": "{{user `build-nodes`}}",
121
+ "versions": {
122
+ "chefdk": "{{user `chefdk`}}"
123
+ }
124
+ }
125
+ }
126
+ },
127
+ {
128
+ "only": [
129
+ "azure-arm"
130
+ ],
131
+ "type": "windows-shell",
132
+ "inline": [
133
+ "C:\\Windows\\System32\\sysprep\\sysprep.exe /quiet /generalize /oobe /shutdown"
134
+ ]
135
+ }
136
+ ]
137
137
  }