wombat-cli 0.2.0

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 (201) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/DESIGN.md +40 -0
  4. data/Gemfile +3 -0
  5. data/README.md +132 -0
  6. data/Rakefile +52 -0
  7. data/Vagrantfile +121 -0
  8. data/bin/wombat +24 -0
  9. data/cookbooks/automate/.gitignore +16 -0
  10. data/cookbooks/automate/.kitchen.ec2.yml +27 -0
  11. data/cookbooks/automate/.kitchen.yml +25 -0
  12. data/cookbooks/automate/Berksfile +6 -0
  13. data/cookbooks/automate/README.md +4 -0
  14. data/cookbooks/automate/chefignore +102 -0
  15. data/cookbooks/automate/libraries/_helper.rb +52 -0
  16. data/cookbooks/automate/libraries/delivery_api.rb +204 -0
  17. data/cookbooks/automate/libraries/delivery_project.rb +31 -0
  18. data/cookbooks/automate/libraries/dsl.rb +5 -0
  19. data/cookbooks/automate/metadata.rb +13 -0
  20. data/cookbooks/automate/recipes/default.rb +111 -0
  21. data/cookbooks/automate/recipes/update-users.rb +48 -0
  22. data/cookbooks/automate/templates/delivery.erb +5 -0
  23. data/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -0
  24. data/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/automate.key +27 -0
  25. data/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -0
  26. data/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/chef.key +27 -0
  27. data/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -0
  28. data/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -0
  29. data/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/private.pem +27 -0
  30. data/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/public.pub +1 -0
  31. data/cookbooks/automate/test/fixtures/cookbooks/mock_data/metadata.rb +3 -0
  32. data/cookbooks/automate/test/fixtures/cookbooks/mock_data/recipes/default.rb +27 -0
  33. data/cookbooks/automate/test/integration/default/automate_spec.rb +55 -0
  34. data/cookbooks/build_node/.gitignore +16 -0
  35. data/cookbooks/build_node/.kitchen.ec2.yml +30 -0
  36. data/cookbooks/build_node/.kitchen.yml +23 -0
  37. data/cookbooks/build_node/Berksfile +8 -0
  38. data/cookbooks/build_node/README.md +4 -0
  39. data/cookbooks/build_node/chefignore +102 -0
  40. data/cookbooks/build_node/metadata.rb +15 -0
  41. data/cookbooks/build_node/recipes/default.rb +35 -0
  42. data/cookbooks/build_node/templates/client.erb +3 -0
  43. data/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -0
  44. data/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/automate.key +27 -0
  45. data/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -0
  46. data/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/chef.key +27 -0
  47. data/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -0
  48. data/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -0
  49. data/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/private.pem +27 -0
  50. data/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/public.pub +1 -0
  51. data/cookbooks/build_node/test/fixtures/cookbooks/mock_data/metadata.rb +2 -0
  52. data/cookbooks/build_node/test/fixtures/cookbooks/mock_data/recipes/default.rb +18 -0
  53. data/cookbooks/build_node/test/integration/default/build-node_spec.rb +39 -0
  54. data/cookbooks/chef_server/.gitignore +16 -0
  55. data/cookbooks/chef_server/.kitchen.ec2.yml +26 -0
  56. data/cookbooks/chef_server/.kitchen.yml +25 -0
  57. data/cookbooks/chef_server/Berksfile +6 -0
  58. data/cookbooks/chef_server/README.md +4 -0
  59. data/cookbooks/chef_server/chefignore +102 -0
  60. data/cookbooks/chef_server/metadata.rb +13 -0
  61. data/cookbooks/chef_server/recipes/cheffish.rb +91 -0
  62. data/cookbooks/chef_server/recipes/default.rb +79 -0
  63. data/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -0
  64. data/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/automate.key +27 -0
  65. data/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -0
  66. data/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/chef.key +27 -0
  67. data/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -0
  68. data/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -0
  69. data/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/private.pem +27 -0
  70. data/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/public.pub +1 -0
  71. data/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/metadata.rb +2 -0
  72. data/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/recipes/default.rb +23 -0
  73. data/cookbooks/chef_server/test/integration/default/chef_server_spec.rb +47 -0
  74. data/cookbooks/compliance/.gitignore +16 -0
  75. data/cookbooks/compliance/.kitchen.ec2.yml +26 -0
  76. data/cookbooks/compliance/.kitchen.yml +24 -0
  77. data/cookbooks/compliance/Berksfile +7 -0
  78. data/cookbooks/compliance/README.md +4 -0
  79. data/cookbooks/compliance/chefignore +102 -0
  80. data/cookbooks/compliance/metadata.rb +12 -0
  81. data/cookbooks/compliance/recipes/default.rb +59 -0
  82. data/cookbooks/compliance/spec/spec_helper.rb +2 -0
  83. data/cookbooks/compliance/spec/unit/recipes/default_spec.rb +20 -0
  84. data/cookbooks/compliance/templates/default/chef-compliance.rb.erb +1 -0
  85. data/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -0
  86. data/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/automate.key +27 -0
  87. data/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -0
  88. data/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/chef.key +27 -0
  89. data/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -0
  90. data/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -0
  91. data/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/private.pem +27 -0
  92. data/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/public.pub +1 -0
  93. data/cookbooks/compliance/test/fixtures/cookbooks/mock_data/metadata.rb +4 -0
  94. data/cookbooks/compliance/test/fixtures/cookbooks/mock_data/recipes/default.rb +21 -0
  95. data/cookbooks/compliance/test/integration/default/compliance.rb +27 -0
  96. data/cookbooks/infranodes/.gitignore +16 -0
  97. data/cookbooks/infranodes/.kitchen.ec2.yml +27 -0
  98. data/cookbooks/infranodes/.kitchen.yml +21 -0
  99. data/cookbooks/infranodes/Berksfile +6 -0
  100. data/cookbooks/infranodes/README.md +4 -0
  101. data/cookbooks/infranodes/attributes/default.rb +3 -0
  102. data/cookbooks/infranodes/chefignore +102 -0
  103. data/cookbooks/infranodes/metadata.rb +13 -0
  104. data/cookbooks/infranodes/recipes/default.rb +41 -0
  105. data/cookbooks/infranodes/spec/spec_helper.rb +2 -0
  106. data/cookbooks/infranodes/spec/unit/recipes/default_spec.rb +20 -0
  107. data/cookbooks/infranodes/templates/default/client.rb.erb +5 -0
  108. data/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -0
  109. data/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/automate.key +27 -0
  110. data/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -0
  111. data/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/chef.key +27 -0
  112. data/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -0
  113. data/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -0
  114. data/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/private.pem +27 -0
  115. data/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/public.pub +1 -0
  116. data/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/metadata.rb +3 -0
  117. data/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/recipes/default.rb +21 -0
  118. data/cookbooks/infranodes/test/integration/default/infranodes_spec.rb +20 -0
  119. data/cookbooks/infranodes/test/integration/helpers/serverspec/spec_helper.rb +8 -0
  120. data/cookbooks/wombat/.gitignore +16 -0
  121. data/cookbooks/wombat/.kitchen.yml +43 -0
  122. data/cookbooks/wombat/Berksfile +6 -0
  123. data/cookbooks/wombat/README.md +4 -0
  124. data/cookbooks/wombat/attributes/default.rb +71 -0
  125. data/cookbooks/wombat/attributes/packer.rb +18 -0
  126. data/cookbooks/wombat/chefignore +102 -0
  127. data/cookbooks/wombat/metadata.rb +11 -0
  128. data/cookbooks/wombat/recipes/authorized-keys.rb +10 -0
  129. data/cookbooks/wombat/recipes/default.rb +112 -0
  130. data/cookbooks/wombat/recipes/etc-hosts.rb +51 -0
  131. data/cookbooks/workstation/.gitignore +16 -0
  132. data/cookbooks/workstation/.kitchen.ec2.yml +29 -0
  133. data/cookbooks/workstation/.kitchen.yml +22 -0
  134. data/cookbooks/workstation/Berksfile +7 -0
  135. data/cookbooks/workstation/README.md +3 -0
  136. data/cookbooks/workstation/chefignore +102 -0
  137. data/cookbooks/workstation/files/atom.apm.list +7 -0
  138. data/cookbooks/workstation/files/atom.config.cson +3 -0
  139. data/cookbooks/workstation/files/cmder.xml +605 -0
  140. data/cookbooks/workstation/metadata.rb +14 -0
  141. data/cookbooks/workstation/recipes/browser.rb +45 -0
  142. data/cookbooks/workstation/recipes/certs-keys.rb +44 -0
  143. data/cookbooks/workstation/recipes/chef.rb +29 -0
  144. data/cookbooks/workstation/recipes/default.rb +16 -0
  145. data/cookbooks/workstation/recipes/dotnet.rb +17 -0
  146. data/cookbooks/workstation/recipes/editor.rb +19 -0
  147. data/cookbooks/workstation/recipes/profile.rb +42 -0
  148. data/cookbooks/workstation/recipes/terminal.rb +13 -0
  149. data/cookbooks/workstation/templates/default/bookmarks.html.erb +23 -0
  150. data/cookbooks/workstation/templates/default/data_collector.rb.erb +2 -0
  151. data/cookbooks/workstation/templates/default/ise_profile.ps1.erb +11 -0
  152. data/cookbooks/workstation/templates/default/knife.rb.erb +10 -0
  153. data/cookbooks/workstation/templates/default/master_preferences.json.erb +28 -0
  154. data/cookbooks/workstation/templates/default/ssh_config.erb +16 -0
  155. data/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/chef-server.crt +26 -0
  156. data/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/chef-server.key +27 -0
  157. data/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -0
  158. data/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -0
  159. data/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/delivery.crt +26 -0
  160. data/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/delivery.key +27 -0
  161. data/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/private.pem +27 -0
  162. data/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/public.pub +1 -0
  163. data/cookbooks/workstation/test/fixtures/cookbooks/mock_data/metadata.rb +2 -0
  164. data/cookbooks/workstation/test/fixtures/cookbooks/mock_data/recipes/default.rb +21 -0
  165. data/cookbooks/workstation/test/integration/default/workstation_spec.rb +37 -0
  166. data/keys/.gitkeep +0 -0
  167. data/lib/wombat/build.rb +195 -0
  168. data/lib/wombat/cli.rb +169 -0
  169. data/lib/wombat/common.rb +163 -0
  170. data/lib/wombat/delete.rb +28 -0
  171. data/lib/wombat/deploy.rb +105 -0
  172. data/lib/wombat/output.rb +45 -0
  173. data/lib/wombat/version.rb +3 -0
  174. data/lib/wombat.rb +8 -0
  175. data/logs/.gitkeep +0 -0
  176. data/packer/automate.json +108 -0
  177. data/packer/build-node.json +114 -0
  178. data/packer/chef-server.json +106 -0
  179. data/packer/compliance.json +106 -0
  180. data/packer/files/.gitkeep +0 -0
  181. data/packer/infranodes.json +108 -0
  182. data/packer/mock-data/.gitignore +16 -0
  183. data/packer/mock-data/.kitchen.yml +21 -0
  184. data/packer/mock-data/Berksfile +3 -0
  185. data/packer/mock-data/README.md +4 -0
  186. data/packer/mock-data/chefignore +102 -0
  187. data/packer/mock-data/metadata.rb +7 -0
  188. data/packer/mock-data/recipes/default.rb +69 -0
  189. data/packer/mock-data/spec/spec_helper.rb +2 -0
  190. data/packer/mock-data/spec/unit/recipes/default_spec.rb +20 -0
  191. data/packer/mock-data/test/integration/default/serverspec/default_spec.rb +9 -0
  192. data/packer/mock-data/test/integration/helpers/serverspec/spec_helper.rb +8 -0
  193. data/packer/workstation.json +97 -0
  194. data/templates/bootstrap-aws.erb +36 -0
  195. data/templates/cfn.json.erb +661 -0
  196. data/terraform/README.md +13 -0
  197. data/terraform/templates/terraform.tfvars.erb +12 -0
  198. data/terraform/wombat.tf +328 -0
  199. data/wombat-cli.gemspec +32 -0
  200. data/wombat.example.yml +52 -0
  201. metadata +331 -0
@@ -0,0 +1,3 @@
1
+ module Wombat
2
+ VERSION = "0.2.0"
3
+ end
data/lib/wombat.rb ADDED
@@ -0,0 +1,8 @@
1
+
2
+ require 'wombat/common'
3
+ require 'wombat/cli'
4
+ require 'wombat/delete'
5
+ require 'wombat/build'
6
+ require 'wombat/deploy'
7
+ require 'wombat/output'
8
+ require 'wombat/version'
data/logs/.gitkeep ADDED
File without changes
@@ -0,0 +1,108 @@
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
+ "gce_account_file": "{{env `GCE_ACCOUNT_FILE`}}",
14
+ "gce_project_id": "{{env `GCE_PROJECT_ID`}}",
15
+ "gce_zone": "{{env `GCE_ZONE`}}",
16
+ "gce_source_image": "ubuntu-1404-trusty-v20160809a",
17
+ "build-nodes": "1",
18
+ "chef_channel": "stable",
19
+ "chef_install_url": "curl -L https://omnitruck.chef.io/install.sh",
20
+ "chef_ver": "latest",
21
+ "chefdk": "stable-latest",
22
+ "automate": "stable-latest",
23
+ "domain": "animals.biz",
24
+ "domain_prefix": "",
25
+ "enterprise": "mammals",
26
+ "org": "marsupials",
27
+ "workstations": "1"
28
+ },
29
+
30
+ "builders": [
31
+ { "type": "amazon-ebs",
32
+ "access_key": "{{user `aws_access_key`}}",
33
+ "secret_key": "{{user `aws_secret_key`}}",
34
+ "region": "{{user `aws_region`}}",
35
+ "source_ami": "{{user `aws_source_ami`}}",
36
+ "instance_type": "c3.xlarge",
37
+ "communicator": "ssh",
38
+ "associate_public_ip_address": true,
39
+ "ssh_private_ip": false,
40
+ "ssh_username": "ubuntu",
41
+ "ssh_pty" : true,
42
+ "ami_name": "automate-{{timestamp}}"
43
+ },
44
+ {
45
+ "type": "azure-arm",
46
+ "client_id": "{{user `azure_client_id`}}",
47
+ "client_secret": "{{user `azure_client_secret`}}",
48
+ "resource_group_name": "{{user `azure_resource_group`}}",
49
+ "storage_account": "{{user `azure_storage_account`}}",
50
+ "subscription_id": "{{user `azure_subscription_id`}}",
51
+ "tenant_id": "{{user `azure_tenant_id`}}",
52
+ "capture_container_name": "images",
53
+ "capture_name_prefix": "automate",
54
+ "image_publisher": "Canonical",
55
+ "image_offer": "UbuntuServer",
56
+ "image_sku": "14.04.3-LTS",
57
+ "location": "West US",
58
+ "vm_size": "Standard_D3_V2",
59
+ "os_type": "Linux"
60
+ },
61
+ {
62
+ "type": "googlecompute",
63
+ "account_file": "{{user `gce_account_file`}}",
64
+ "project_id": "{{user `gce_project_id`}}",
65
+ "source_image": "{{user `gce_source_image`}}",
66
+ "zone": "{{user `gce_zone`}}",
67
+ "disk_type": "pd-ssd",
68
+ "disk_size": "80",
69
+ "image_name": "automate-{{timestamp}}",
70
+ "machine_type": "n1-standard-2",
71
+ "ssh_username": "ubuntu",
72
+ "ssh_pty" : true
73
+ }
74
+ ],
75
+
76
+ "provisioners" : [
77
+ {
78
+ "type": "file",
79
+ "source": "{{template_dir}}/files/",
80
+ "destination": "/tmp"
81
+ },
82
+ {
83
+ "type": "file",
84
+ "source": "{{pwd}}/keys/",
85
+ "destination": "/tmp"
86
+ },
87
+ {
88
+ "type": "chef-solo",
89
+ "install_command": "{{user `chef_install_url`}} | sudo bash -s -- -c {{user `chef_channel`}} -v {{user `chef_ver`}}",
90
+ "cookbook_paths": [ "{{pwd}}/vendored-cookbooks/automate" ],
91
+ "run_list": [ "apt", "automate" ],
92
+ "json": {
93
+ "demo": {
94
+ "domain_prefix": "{{user `domain_prefix`}}",
95
+ "domain": "{{user `domain`}}",
96
+ "enterprise": "{{user `enterprise`}}",
97
+ "org": "{{user `org`}}",
98
+ "build-nodes": "{{user `build-nodes`}}",
99
+ "workstations": "{{user `workstations`}}",
100
+ "versions": {
101
+ "chefdk": "{{user `chefdk`}}",
102
+ "automate": "{{user `automate`}}"
103
+ }
104
+ }
105
+ }
106
+ }
107
+ ]
108
+ }
@@ -0,0 +1,114 @@
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
+ "gce_account_file": "{{env `GCE_ACCOUNT_FILE`}}",
14
+ "gce_project_id": "{{env `GCE_PROJECT_ID`}}",
15
+ "gce_zone": "{{env `GCE_ZONE`}}",
16
+ "gce_source_image": "ubuntu-1404-trusty-v20160809a",
17
+ "build-nodes": "1",
18
+ "chef_channel": "stable",
19
+ "chef_install_url": "curl -L https://omnitruck.chef.io/install.sh",
20
+ "chef_ver": "latest",
21
+ "chefdk": "stable-latest",
22
+ "domain": "animals.biz",
23
+ "domain_prefix": "",
24
+ "enterprise": "mammals",
25
+ "node-number": "1",
26
+ "org": "marsupials",
27
+ "workstations": "1"
28
+ },
29
+
30
+ "builders": [
31
+ { "type": "amazon-ebs",
32
+ "access_key": "{{user `aws_access_key`}}",
33
+ "secret_key": "{{user `aws_secret_key`}}",
34
+ "region": "{{user `aws_region`}}",
35
+ "source_ami": "{{user `aws_source_ami`}}",
36
+ "instance_type": "c3.xlarge",
37
+ "communicator": "ssh",
38
+ "associate_public_ip_address": true,
39
+ "ssh_private_ip": false,
40
+ "ssh_username": "ubuntu",
41
+ "ssh_pty" : true,
42
+ "ami_name": "build-node-{{user `node-number`}}-{{timestamp}}"
43
+ },
44
+ {
45
+ "type": "azure-arm",
46
+ "client_id": "{{user `azure_client_id`}}",
47
+ "client_secret": "{{user `azure_client_secret`}}",
48
+ "resource_group_name": "{{user `azure_resource_group`}}",
49
+ "storage_account": "{{user `azure_storage_account`}}",
50
+ "subscription_id": "{{user `azure_subscription_id`}}",
51
+ "tenant_id": "{{user `azure_tenant_id`}}",
52
+ "capture_container_name": "images",
53
+ "capture_name_prefix": "build-node",
54
+ "image_publisher": "Canonical",
55
+ "image_offer": "UbuntuServer",
56
+ "image_sku": "14.04.3-LTS",
57
+ "location": "West US",
58
+ "vm_size": "Standard_D3_V2",
59
+ "os_type": "Linux"
60
+ },
61
+ {
62
+ "type": "googlecompute",
63
+ "account_file": "{{user `gce_account_file`}}",
64
+ "project_id": "{{user `gce_project_id`}}",
65
+ "source_image": "{{user `gce_source_image`}}",
66
+ "zone": "{{user `gce_zone`}}",
67
+ "disk_type": "pd-ssd",
68
+ "disk_size": "80",
69
+ "image_name": "build-node-{{user `node-number`}}-{{timestamp}}",
70
+ "machine_type": "n1-standard-2",
71
+ "ssh_username": "ubuntu",
72
+ "ssh_pty" : true
73
+ }
74
+ ],
75
+
76
+ "provisioners" : [
77
+ {
78
+ "type": "file",
79
+ "source": "{{template_dir}}/files/",
80
+ "destination": "/tmp"
81
+ },
82
+ {
83
+ "type": "file",
84
+ "source": "{{pwd}}/keys/",
85
+ "destination": "/tmp"
86
+ },
87
+ {
88
+ "type": "chef-solo",
89
+ "install_command": "{{user `chef_install_url`}} | sudo bash -s -- -c {{user `chef_channel`}} -v {{user `chef_ver`}}",
90
+ "cookbook_paths": [ "{{pwd}}/vendored-cookbooks/build_node" ],
91
+ "run_list": [ "apt", "build_node" ],
92
+ "json": {
93
+ "demo": {
94
+ "domain_prefix": "{{user `domain_prefix`}}",
95
+ "domain": "{{user `domain`}}",
96
+ "enterprise": "{{user `enterprise`}}",
97
+ "org": "{{user `org`}}",
98
+ "node-number": "{{user `node-number`}}",
99
+ "build-nodes": "{{user `build-nodes`}}",
100
+ "workstations": "{{user `workstations`}}",
101
+ "versions": {
102
+ "chefdk": "{{user `chefdk`}}"
103
+ }
104
+ },
105
+ "delivery_build": {
106
+ "trusted_certs": {
107
+ "chef-server": "/tmp/chef.crt",
108
+ "delivery": "/tmp/automate.crt"
109
+ }
110
+ }
111
+ }
112
+ }
113
+ ]
114
+ }
@@ -0,0 +1,106 @@
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
+ "gce_account_file": "{{env `GCE_ACCOUNT_FILE`}}",
14
+ "gce_project_id": "{{env `GCE_PROJECT_ID`}}",
15
+ "gce_zone": "{{env `GCE_ZONE`}}",
16
+ "gce_source_image": "ubuntu-1404-trusty-v20160809a",
17
+ "build-nodes": "1",
18
+ "chef_channel": "stable",
19
+ "chef_install_url": "curl -L https://omnitruck.chef.io/install.sh",
20
+ "chef_ver": "latest",
21
+ "chef-server": "stable-latest",
22
+ "domain": "animals.biz",
23
+ "domain_prefix": "",
24
+ "enterprise": "mammals",
25
+ "org": "marsupials",
26
+ "workstations": "1"
27
+ },
28
+
29
+ "builders": [
30
+ { "type": "amazon-ebs",
31
+ "access_key": "{{user `aws_access_key`}}",
32
+ "secret_key": "{{user `aws_secret_key`}}",
33
+ "region": "{{user `aws_region`}}",
34
+ "source_ami": "{{user `aws_source_ami`}}",
35
+ "instance_type": "c3.xlarge",
36
+ "communicator": "ssh",
37
+ "associate_public_ip_address": true,
38
+ "ssh_private_ip": false,
39
+ "ssh_username": "ubuntu",
40
+ "ssh_pty" : true,
41
+ "ami_name": "chef-{{timestamp}}"
42
+ },
43
+ {
44
+ "type": "azure-arm",
45
+ "client_id": "{{user `azure_client_id`}}",
46
+ "client_secret": "{{user `azure_client_secret`}}",
47
+ "resource_group_name": "{{user `azure_resource_group`}}",
48
+ "storage_account": "{{user `azure_storage_account`}}",
49
+ "subscription_id": "{{user `azure_subscription_id`}}",
50
+ "tenant_id": "{{user `azure_tenant_id`}}",
51
+ "capture_container_name": "images",
52
+ "capture_name_prefix": "chef-server",
53
+ "image_publisher": "Canonical",
54
+ "image_offer": "UbuntuServer",
55
+ "image_sku": "14.04.3-LTS",
56
+ "location": "West US",
57
+ "vm_size": "Standard_D3_V2",
58
+ "os_type": "Linux"
59
+ },
60
+ {
61
+ "type": "googlecompute",
62
+ "account_file": "{{user `gce_account_file`}}",
63
+ "project_id": "{{user `gce_project_id`}}",
64
+ "source_image": "{{user `gce_source_image`}}",
65
+ "zone": "{{user `gce_zone`}}",
66
+ "disk_type": "pd-ssd",
67
+ "disk_size": "80",
68
+ "image_name": "chef-{{timestamp}}",
69
+ "machine_type": "n1-standard-2",
70
+ "ssh_username": "ubuntu",
71
+ "ssh_pty" : true
72
+ }
73
+ ],
74
+
75
+ "provisioners" : [
76
+ {
77
+ "type": "file",
78
+ "source": "{{template_dir}}/files/",
79
+ "destination": "/tmp"
80
+ },
81
+ {
82
+ "type": "file",
83
+ "source": "{{pwd}}/keys/",
84
+ "destination": "/tmp"
85
+ },
86
+ {
87
+ "type": "chef-solo",
88
+ "install_command": "{{user `chef_install_url`}} | sudo bash -s -- -c {{user `chef_channel`}} -v {{user `chef_ver`}}",
89
+ "cookbook_paths": [ "{{pwd}}/vendored-cookbooks/chef_server" ],
90
+ "run_list": [ "apt", "chef_server" ],
91
+ "json": {
92
+ "demo": {
93
+ "domain_prefix": "{{user `domain_prefix`}}",
94
+ "domain": "{{user `domain`}}",
95
+ "enterprise": "{{user `enterprise`}}",
96
+ "org": "{{user `org`}}",
97
+ "build-nodes": "{{user `build-nodes`}}",
98
+ "workstations": "{{user `workstations`}}",
99
+ "versions": {
100
+ "chef-server": "{{user `chef-server`}}"
101
+ }
102
+ }
103
+ }
104
+ }
105
+ ]
106
+ }
@@ -0,0 +1,106 @@
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
+ "gce_account_file": "{{env `GCE_ACCOUNT_FILE`}}",
14
+ "gce_project_id": "{{env `GCE_PROJECT_ID`}}",
15
+ "gce_zone": "{{env `GCE_ZONE`}}",
16
+ "gce_source_image": "ubuntu-1404-trusty-v20160809a",
17
+ "build-nodes": "1",
18
+ "chef_channel": "stable",
19
+ "chef_install_url": "curl -L https://omnitruck.chef.io/install.sh",
20
+ "chef_ver": "latest",
21
+ "compliance": "stable-latest",
22
+ "domain": "animals.biz",
23
+ "domain_prefix": "",
24
+ "enterprise": "mammals",
25
+ "org": "marsupials",
26
+ "workstations": "1"
27
+ },
28
+
29
+ "builders": [
30
+ { "type": "amazon-ebs",
31
+ "access_key": "{{user `aws_access_key`}}",
32
+ "secret_key": "{{user `aws_secret_key`}}",
33
+ "region": "{{user `aws_region`}}",
34
+ "source_ami": "{{user `aws_source_ami`}}",
35
+ "instance_type": "c3.xlarge",
36
+ "communicator": "ssh",
37
+ "associate_public_ip_address": true,
38
+ "ssh_private_ip": false,
39
+ "ssh_username": "ubuntu",
40
+ "ssh_pty" : true,
41
+ "ami_name": "compliance-{{timestamp}}"
42
+ },
43
+ {
44
+ "type": "azure-arm",
45
+ "client_id": "{{user `azure_client_id`}}",
46
+ "client_secret": "{{user `azure_client_secret`}}",
47
+ "resource_group_name": "{{user `azure_resource_group`}}",
48
+ "storage_account": "{{user `azure_storage_account`}}",
49
+ "subscription_id": "{{user `azure_subscription_id`}}",
50
+ "tenant_id": "{{user `azure_tenant_id`}}",
51
+ "capture_container_name": "images",
52
+ "capture_name_prefix": "compliance",
53
+ "image_publisher": "Canonical",
54
+ "image_offer": "UbuntuServer",
55
+ "image_sku": "14.04.3-LTS",
56
+ "location": "West US",
57
+ "vm_size": "Standard_D3_V2",
58
+ "os_type": "Linux"
59
+ },
60
+ {
61
+ "type": "googlecompute",
62
+ "account_file": "{{user `gce_account_file`}}",
63
+ "project_id": "{{user `gce_project_id`}}",
64
+ "source_image": "{{user `gce_source_image`}}",
65
+ "zone": "{{user `gce_zone`}}",
66
+ "disk_type": "pd-ssd",
67
+ "disk_size": "80",
68
+ "image_name": "compliance-{{timestamp}}",
69
+ "machine_type": "n1-standard-2",
70
+ "ssh_username": "ubuntu",
71
+ "ssh_pty" : true
72
+ }
73
+ ],
74
+
75
+ "provisioners" : [
76
+ {
77
+ "type": "file",
78
+ "source": "{{template_dir}}/files/",
79
+ "destination": "/tmp"
80
+ },
81
+ {
82
+ "type": "file",
83
+ "source": "{{pwd}}/keys/",
84
+ "destination": "/tmp"
85
+ },
86
+ {
87
+ "type": "chef-solo",
88
+ "install_command": "{{user `chef_install_url`}} | sudo bash -s -- -c {{user `chef_channel`}} -v {{user `chef_ver`}}",
89
+ "cookbook_paths": [ "{{pwd}}/vendored-cookbooks/compliance" ],
90
+ "run_list": [ "apt", "compliance" ],
91
+ "json": {
92
+ "demo": {
93
+ "domain_prefix": "{{user `domain_prefix`}}",
94
+ "domain": "{{user `domain`}}",
95
+ "enterprise": "{{user `enterprise`}}",
96
+ "org": "{{user `org`}}",
97
+ "build-nodes": "{{user `build-nodes`}}",
98
+ "workstations": "{{user `workstations`}}",
99
+ "versions": {
100
+ "compliance": "{{user `compliance`}}"
101
+ }
102
+ }
103
+ }
104
+ }
105
+ ]
106
+ }
File without changes
@@ -0,0 +1,108 @@
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
+ "gce_account_file": "{{env `GCE_ACCOUNT_FILE`}}",
14
+ "gce_project_id": "{{env `GCE_PROJECT_ID`}}",
15
+ "gce_zone": "{{env `GCE_ZONE`}}",
16
+ "gce_source_image": "ubuntu-1404-trusty-v20160809a",
17
+ "build-nodes": "1",
18
+ "chef_channel": "stable",
19
+ "chef_install_url": "curl -L https://omnitruck.chef.io/install.sh",
20
+ "chef_ver": "latest",
21
+ "domain": "animals.biz",
22
+ "domain_prefix": "",
23
+ "enterprise": "mammals",
24
+ "node-name": "acceptance",
25
+ "org": "marsupials",
26
+ "workstations": "1"
27
+ },
28
+
29
+ "builders": [
30
+ { "type": "amazon-ebs",
31
+ "access_key": "{{user `aws_access_key`}}",
32
+ "secret_key": "{{user `aws_secret_key`}}",
33
+ "region": "{{user `aws_region`}}",
34
+ "source_ami": "{{user `aws_source_ami`}}",
35
+ "instance_type": "c3.xlarge",
36
+ "communicator": "ssh",
37
+ "associate_public_ip_address": true,
38
+ "ssh_private_ip": false,
39
+ "ssh_username": "ubuntu",
40
+ "ssh_pty" : true,
41
+ "ami_name": "automate-infranode-{{user `node-name`}}-{{timestamp}}"
42
+ },
43
+ {
44
+ "type": "azure-arm",
45
+ "client_id": "{{user `azure_client_id`}}",
46
+ "client_secret": "{{user `azure_client_secret`}}",
47
+ "resource_group_name": "{{user `azure_resource_group`}}",
48
+ "storage_account": "{{user `azure_storage_account`}}",
49
+ "subscription_id": "{{user `azure_subscription_id`}}",
50
+ "tenant_id": "{{user `azure_tenant_id`}}",
51
+ "capture_container_name": "images",
52
+ "capture_name_prefix": "infranode-{{user `node-name`}}",
53
+ "image_publisher": "Canonical",
54
+ "image_offer": "UbuntuServer",
55
+ "image_sku": "14.04.3-LTS",
56
+ "location": "West US",
57
+ "vm_size": "Standard_D3_V2",
58
+ "os_type": "Linux"
59
+ },
60
+ {
61
+ "type": "googlecompute",
62
+ "account_file": "{{user `gce_account_file`}}",
63
+ "project_id": "{{user `gce_project_id`}}",
64
+ "source_image": "{{user `gce_source_image`}}",
65
+ "zone": "{{user `gce_zone`}}",
66
+ "disk_type": "pd-ssd",
67
+ "disk_size": "80",
68
+ "image_name": "automate-infranode-{{user `node-name`}}-{{timestamp}}",
69
+ "machine_type": "n1-standard-2",
70
+ "image_name": "chef-{{timestamp}}",
71
+ "ssh_username": "ubuntu",
72
+ "ssh_pty" : true
73
+ }
74
+ ],
75
+
76
+ "provisioners" : [
77
+ {
78
+ "type": "file",
79
+ "source": "{{template_dir}}/files/",
80
+ "destination": "/tmp"
81
+ },
82
+ {
83
+ "type": "file",
84
+ "source": "{{pwd}}/keys/",
85
+ "destination": "/tmp"
86
+ },
87
+ {
88
+ "type": "chef-solo",
89
+ "install_command": "{{user `chef_install_url`}} | sudo bash -s -- -c {{user `chef_channel`}} -v {{user `chef_ver`}}",
90
+ "cookbook_paths": [ "{{pwd}}/vendored-cookbooks/infranodes" ],
91
+ "run_list": [ "infranodes" ],
92
+ "json": {
93
+ "demo": {
94
+ "domain_prefix": "{{user `domain_prefix`}}",
95
+ "domain": "{{user `domain`}}",
96
+ "enterprise": "{{user `enterprise`}}",
97
+ "org": "{{user `org`}}",
98
+ "build-nodes": "{{user `build-nodes`}}",
99
+ "workstations": "{{user `workstations`}}",
100
+ "node-name": "{{user `node-name`}}",
101
+ "versions": {
102
+ "chef": "{{user `chef_channel`}}-{{user `chef_ver`}}"
103
+ }
104
+ }
105
+ }
106
+ }
107
+ ]
108
+ }
@@ -0,0 +1,16 @@
1
+ .vagrant
2
+ Berksfile.lock
3
+ *~
4
+ *#
5
+ .#*
6
+ \#*#
7
+ .*.sw[a-z]
8
+ *.un~
9
+
10
+ # Bundler
11
+ Gemfile.lock
12
+ bin/*
13
+ .bundle/*
14
+
15
+ .kitchen/
16
+ .kitchen.local.yml
@@ -0,0 +1,21 @@
1
+ ---
2
+ driver:
3
+ name: vagrant
4
+
5
+ provisioner:
6
+ name: chef_zero
7
+
8
+ # Uncomment the following verifier to leverage Inspec instead of Busser (the
9
+ # default verifier)
10
+ # verifier:
11
+ # name: inspec
12
+
13
+ platforms:
14
+ - name: ubuntu-14.04
15
+ - name: centos-7.1
16
+
17
+ suites:
18
+ - name: default
19
+ run_list:
20
+ - recipe[mock-data::default]
21
+ attributes:
@@ -0,0 +1,3 @@
1
+ source 'https://supermarket.chef.io'
2
+
3
+ metadata
@@ -0,0 +1,4 @@
1
+ # mock-data
2
+
3
+ TODO: Enter the cookbook description here.
4
+