wombat-cli 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +23 -23
- data/.travis.yml +22 -27
- data/CHANGELOG.md +438 -423
- data/DESIGN.md +49 -49
- data/Gemfile +5 -5
- data/README.md +146 -146
- data/Rakefile +26 -26
- data/bin/wombat +24 -24
- data/generator_files/Vagrantfile +120 -120
- data/generator_files/cookbooks/automate/.gitignore +16 -16
- data/generator_files/cookbooks/automate/.kitchen.ec2.yml +34 -34
- data/generator_files/cookbooks/automate/.kitchen.yml +24 -24
- data/generator_files/cookbooks/automate/Berksfile +6 -6
- data/generator_files/cookbooks/automate/README.md +4 -4
- data/generator_files/cookbooks/automate/chefignore +102 -102
- data/generator_files/cookbooks/automate/libraries/_helper.rb +52 -52
- data/generator_files/cookbooks/automate/libraries/delivery_api.rb +204 -204
- data/generator_files/cookbooks/automate/libraries/delivery_project.rb +31 -31
- data/generator_files/cookbooks/automate/libraries/dsl.rb +4 -4
- data/generator_files/cookbooks/automate/metadata.rb +11 -11
- data/generator_files/cookbooks/automate/recipes/default.rb +118 -124
- data/generator_files/cookbooks/automate/recipes/update-users.rb +48 -48
- data/generator_files/cookbooks/automate/templates/delivery.erb +6 -6
- data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
- data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
- data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
- data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
- data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
- data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
- data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
- data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
- data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/metadata.rb +3 -3
- data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/recipes/default.rb +27 -27
- data/generator_files/cookbooks/automate/test/integration/default/automate_spec.rb +56 -56
- data/generator_files/cookbooks/build_node/.gitignore +16 -16
- data/generator_files/cookbooks/build_node/.kitchen.ec2.yml +37 -37
- data/generator_files/cookbooks/build_node/.kitchen.yml +23 -23
- data/generator_files/cookbooks/build_node/Berksfile +8 -8
- data/generator_files/cookbooks/build_node/README.md +4 -4
- data/generator_files/cookbooks/build_node/chefignore +102 -102
- data/generator_files/cookbooks/build_node/metadata.rb +12 -12
- data/generator_files/cookbooks/build_node/recipes/default.rb +38 -38
- data/generator_files/cookbooks/build_node/templates/client.erb +2 -2
- data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
- data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
- data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
- data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
- data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
- data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
- data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
- data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
- data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/metadata.rb +2 -2
- data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/recipes/default.rb +18 -18
- data/generator_files/cookbooks/build_node/test/integration/default/build-node_spec.rb +40 -40
- data/generator_files/cookbooks/chef_server/.gitignore +16 -16
- data/generator_files/cookbooks/chef_server/.kitchen.ec2.yml +34 -34
- data/generator_files/cookbooks/chef_server/.kitchen.yml +24 -24
- data/generator_files/cookbooks/chef_server/Berksfile +6 -6
- data/generator_files/cookbooks/chef_server/README.md +4 -4
- data/generator_files/cookbooks/chef_server/chefignore +102 -102
- data/generator_files/cookbooks/chef_server/metadata.rb +11 -11
- data/generator_files/cookbooks/chef_server/recipes/bootstrap_users.rb +91 -91
- data/generator_files/cookbooks/chef_server/recipes/default.rb +113 -113
- data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
- data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
- data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
- data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
- data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
- data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
- data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
- data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
- data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/metadata.rb +2 -2
- data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/recipes/default.rb +23 -23
- data/generator_files/cookbooks/chef_server/test/integration/default/chef_server_spec.rb +50 -50
- data/generator_files/cookbooks/compliance/.gitignore +16 -16
- data/generator_files/cookbooks/compliance/.kitchen.ec2.yml +34 -34
- data/generator_files/cookbooks/compliance/.kitchen.yml +24 -24
- data/generator_files/cookbooks/compliance/Berksfile +7 -7
- data/generator_files/cookbooks/compliance/README.md +4 -4
- data/generator_files/cookbooks/compliance/chefignore +102 -102
- data/generator_files/cookbooks/compliance/metadata.rb +11 -11
- data/generator_files/cookbooks/compliance/recipes/default.rb +57 -57
- data/generator_files/cookbooks/compliance/spec/spec_helper.rb +2 -2
- data/generator_files/cookbooks/compliance/spec/unit/recipes/default_spec.rb +20 -20
- data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
- data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
- data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
- data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
- data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
- data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
- data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
- data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
- data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/metadata.rb +4 -4
- data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/recipes/default.rb +21 -21
- data/generator_files/cookbooks/compliance/test/integration/default/compliance.rb +28 -28
- data/generator_files/cookbooks/infranodes/.gitignore +16 -16
- data/generator_files/cookbooks/infranodes/.kitchen.ec2.yml +48 -48
- data/generator_files/cookbooks/infranodes/.kitchen.yml +21 -21
- data/generator_files/cookbooks/infranodes/Berksfile +6 -6
- data/generator_files/cookbooks/infranodes/README.md +4 -4
- data/generator_files/cookbooks/infranodes/attributes/default.rb +2 -2
- data/generator_files/cookbooks/infranodes/chefignore +102 -102
- data/generator_files/cookbooks/infranodes/metadata.rb +13 -13
- data/generator_files/cookbooks/infranodes/recipes/default.rb +57 -57
- data/generator_files/cookbooks/infranodes/spec/spec_helper.rb +2 -2
- data/generator_files/cookbooks/infranodes/spec/unit/recipes/default_spec.rb +20 -20
- data/generator_files/cookbooks/infranodes/templates/default/client.rb.erb +5 -5
- data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
- data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
- data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
- data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
- data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
- data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
- data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
- data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
- data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/metadata.rb +3 -3
- data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/recipes/default.rb +27 -27
- data/generator_files/cookbooks/infranodes/test/integration/default/infranodes_spec.rb +22 -22
- data/generator_files/cookbooks/infranodes/test/integration/helpers/serverspec/spec_helper.rb +8 -8
- data/generator_files/cookbooks/wombat/.gitignore +16 -16
- data/generator_files/cookbooks/wombat/.kitchen.yml +43 -43
- data/generator_files/cookbooks/wombat/Berksfile +5 -5
- data/generator_files/cookbooks/wombat/README.md +4 -4
- data/generator_files/cookbooks/wombat/attributes/default.rb +79 -80
- data/generator_files/cookbooks/wombat/attributes/packer.rb +18 -18
- data/generator_files/cookbooks/wombat/chefignore +102 -102
- data/generator_files/cookbooks/wombat/metadata.rb +13 -13
- data/generator_files/cookbooks/wombat/recipes/authorized-keys.rb +20 -20
- data/generator_files/cookbooks/wombat/recipes/default.rb +111 -111
- data/generator_files/cookbooks/wombat/recipes/etc-hosts.rb +51 -51
- data/generator_files/cookbooks/workstation/.gitignore +16 -16
- data/generator_files/cookbooks/workstation/.kitchen.azure.yml +45 -0
- data/generator_files/cookbooks/workstation/.kitchen.ec2.yml +46 -30
- data/generator_files/cookbooks/workstation/.kitchen.yml +42 -22
- data/generator_files/cookbooks/workstation/Berksfile +7 -7
- data/generator_files/cookbooks/workstation/README.md +3 -3
- data/generator_files/cookbooks/workstation/chefignore +106 -102
- data/generator_files/cookbooks/workstation/files/atom.apm.list +10 -7
- data/generator_files/cookbooks/workstation/files/atom.config.cson +6 -3
- data/generator_files/cookbooks/workstation/{templates/default/ise_profile.ps1.erb → files/ise_profile.ps1} +11 -11
- data/generator_files/cookbooks/workstation/libraries/home.rb +4 -4
- data/generator_files/cookbooks/workstation/metadata.rb +14 -14
- data/generator_files/cookbooks/workstation/recipes/browser.rb +53 -58
- data/generator_files/cookbooks/workstation/recipes/certs-keys.rb +41 -45
- data/generator_files/cookbooks/workstation/recipes/chef.rb +29 -28
- data/generator_files/cookbooks/workstation/recipes/default.rb +24 -21
- data/generator_files/cookbooks/workstation/recipes/dotnet.rb +19 -17
- data/generator_files/cookbooks/workstation/recipes/editor.rb +46 -18
- data/generator_files/cookbooks/workstation/recipes/profile.rb +14 -41
- data/generator_files/cookbooks/workstation/recipes/terminal.rb +11 -11
- data/generator_files/cookbooks/workstation/templates/default/bookmarks.html.erb +23 -23
- data/generator_files/cookbooks/workstation/templates/default/data_collector.rb.erb +2 -2
- data/generator_files/cookbooks/workstation/templates/default/knife.rb.erb +10 -10
- data/generator_files/cookbooks/workstation/templates/default/master_preferences.json.erb +28 -28
- data/generator_files/cookbooks/workstation/templates/default/ssh_config.erb +16 -16
- data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
- data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
- data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/chef.crt +26 -26
- data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
- data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
- data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
- data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
- data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
- data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/metadata.rb +2 -2
- data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/recipes/default.rb +21 -21
- data/generator_files/cookbooks/workstation/test/integration/default/workstation_spec.rb +77 -37
- data/generator_files/packer/automate.json +136 -136
- data/generator_files/packer/build-node.json +142 -142
- data/generator_files/packer/chef-server.json +137 -137
- data/generator_files/packer/compliance.json +133 -133
- data/generator_files/packer/infranodes-windows.json +143 -143
- data/generator_files/packer/infranodes.json +134 -134
- data/generator_files/packer/scripts/PreSysprep.ps1 +9 -0
- data/generator_files/packer/workstation.json +160 -142
- data/generator_files/templates/arm.md.json.erb +754 -754
- data/generator_files/templates/arm.vhd.json.erb +630 -630
- data/generator_files/templates/bootstrap-aws.erb +39 -39
- data/generator_files/templates/cfn.json.erb +675 -674
- data/generator_files/wombat.yml +75 -74
- data/lib/wombat/aws.rb +67 -67
- data/lib/wombat/build.rb +392 -392
- data/lib/wombat/cli.rb +254 -254
- data/lib/wombat/common.rb +420 -420
- data/lib/wombat/crypto.rb +65 -65
- data/lib/wombat/delete.rb +67 -67
- data/lib/wombat/deploy.rb +128 -128
- data/lib/wombat/init.rb +32 -32
- data/lib/wombat/latest.rb +27 -27
- data/lib/wombat/output.rb +101 -101
- data/lib/wombat/update.rb +20 -20
- data/lib/wombat/version.rb +3 -3
- data/lib/wombat.rb +8 -8
- data/spec/functional/common_spec.rb +26 -26
- data/spec/spec_helper.rb +103 -103
- data/spec/unit/common_spec.rb +116 -116
- data/terraform/README.md +13 -13
- data/terraform/templates/terraform.tfvars.erb +12 -12
- data/terraform/wombat.tf +328 -328
- data/wombat-cli.gemspec +36 -36
- metadata +6 -4
@@ -1,102 +1,102 @@
|
|
1
|
-
# Put files/directories that should be ignored in this file when uploading
|
2
|
-
# to a chef-server or supermarket.
|
3
|
-
# Lines that start with '# ' are comments.
|
4
|
-
|
5
|
-
# OS generated files #
|
6
|
-
######################
|
7
|
-
.DS_Store
|
8
|
-
Icon?
|
9
|
-
nohup.out
|
10
|
-
ehthumbs.db
|
11
|
-
Thumbs.db
|
12
|
-
|
13
|
-
# SASS #
|
14
|
-
########
|
15
|
-
.sass-cache
|
16
|
-
|
17
|
-
# EDITORS #
|
18
|
-
###########
|
19
|
-
\#*
|
20
|
-
.#*
|
21
|
-
*~
|
22
|
-
*.sw[a-z]
|
23
|
-
*.bak
|
24
|
-
REVISION
|
25
|
-
TAGS*
|
26
|
-
tmtags
|
27
|
-
*_flymake.*
|
28
|
-
*_flymake
|
29
|
-
*.tmproj
|
30
|
-
.project
|
31
|
-
.settings
|
32
|
-
mkmf.log
|
33
|
-
|
34
|
-
## COMPILED ##
|
35
|
-
##############
|
36
|
-
a.out
|
37
|
-
*.o
|
38
|
-
*.pyc
|
39
|
-
*.so
|
40
|
-
*.com
|
41
|
-
*.class
|
42
|
-
*.dll
|
43
|
-
*.exe
|
44
|
-
*/rdoc/
|
45
|
-
|
46
|
-
# Testing #
|
47
|
-
###########
|
48
|
-
.watchr
|
49
|
-
.rspec
|
50
|
-
spec/*
|
51
|
-
spec/fixtures/*
|
52
|
-
test/*
|
53
|
-
features/*
|
54
|
-
examples/*
|
55
|
-
Guardfile
|
56
|
-
Procfile
|
57
|
-
.kitchen*
|
58
|
-
.rubocop.yml
|
59
|
-
spec/*
|
60
|
-
Rakefile
|
61
|
-
.travis.yml
|
62
|
-
.foodcritic
|
63
|
-
.codeclimate.yml
|
64
|
-
|
65
|
-
# SCM #
|
66
|
-
#######
|
67
|
-
.git
|
68
|
-
*/.git
|
69
|
-
.gitignore
|
70
|
-
.gitmodules
|
71
|
-
.gitconfig
|
72
|
-
.gitattributes
|
73
|
-
.svn
|
74
|
-
*/.bzr/*
|
75
|
-
*/.hg/*
|
76
|
-
*/.svn/*
|
77
|
-
|
78
|
-
# Berkshelf #
|
79
|
-
#############
|
80
|
-
Berksfile
|
81
|
-
Berksfile.lock
|
82
|
-
cookbooks/*
|
83
|
-
tmp
|
84
|
-
|
85
|
-
# Cookbooks #
|
86
|
-
#############
|
87
|
-
CONTRIBUTING*
|
88
|
-
CHANGELOG*
|
89
|
-
TESTING*
|
90
|
-
MAINTAINERS.toml
|
91
|
-
|
92
|
-
# Strainer #
|
93
|
-
############
|
94
|
-
Colanderfile
|
95
|
-
Strainerfile
|
96
|
-
.colander
|
97
|
-
.strainer
|
98
|
-
|
99
|
-
# Vagrant #
|
100
|
-
###########
|
101
|
-
.vagrant
|
102
|
-
Vagrantfile
|
1
|
+
# Put files/directories that should be ignored in this file when uploading
|
2
|
+
# to a chef-server or supermarket.
|
3
|
+
# Lines that start with '# ' are comments.
|
4
|
+
|
5
|
+
# OS generated files #
|
6
|
+
######################
|
7
|
+
.DS_Store
|
8
|
+
Icon?
|
9
|
+
nohup.out
|
10
|
+
ehthumbs.db
|
11
|
+
Thumbs.db
|
12
|
+
|
13
|
+
# SASS #
|
14
|
+
########
|
15
|
+
.sass-cache
|
16
|
+
|
17
|
+
# EDITORS #
|
18
|
+
###########
|
19
|
+
\#*
|
20
|
+
.#*
|
21
|
+
*~
|
22
|
+
*.sw[a-z]
|
23
|
+
*.bak
|
24
|
+
REVISION
|
25
|
+
TAGS*
|
26
|
+
tmtags
|
27
|
+
*_flymake.*
|
28
|
+
*_flymake
|
29
|
+
*.tmproj
|
30
|
+
.project
|
31
|
+
.settings
|
32
|
+
mkmf.log
|
33
|
+
|
34
|
+
## COMPILED ##
|
35
|
+
##############
|
36
|
+
a.out
|
37
|
+
*.o
|
38
|
+
*.pyc
|
39
|
+
*.so
|
40
|
+
*.com
|
41
|
+
*.class
|
42
|
+
*.dll
|
43
|
+
*.exe
|
44
|
+
*/rdoc/
|
45
|
+
|
46
|
+
# Testing #
|
47
|
+
###########
|
48
|
+
.watchr
|
49
|
+
.rspec
|
50
|
+
spec/*
|
51
|
+
spec/fixtures/*
|
52
|
+
test/*
|
53
|
+
features/*
|
54
|
+
examples/*
|
55
|
+
Guardfile
|
56
|
+
Procfile
|
57
|
+
.kitchen*
|
58
|
+
.rubocop.yml
|
59
|
+
spec/*
|
60
|
+
Rakefile
|
61
|
+
.travis.yml
|
62
|
+
.foodcritic
|
63
|
+
.codeclimate.yml
|
64
|
+
|
65
|
+
# SCM #
|
66
|
+
#######
|
67
|
+
.git
|
68
|
+
*/.git
|
69
|
+
.gitignore
|
70
|
+
.gitmodules
|
71
|
+
.gitconfig
|
72
|
+
.gitattributes
|
73
|
+
.svn
|
74
|
+
*/.bzr/*
|
75
|
+
*/.hg/*
|
76
|
+
*/.svn/*
|
77
|
+
|
78
|
+
# Berkshelf #
|
79
|
+
#############
|
80
|
+
Berksfile
|
81
|
+
Berksfile.lock
|
82
|
+
cookbooks/*
|
83
|
+
tmp
|
84
|
+
|
85
|
+
# Cookbooks #
|
86
|
+
#############
|
87
|
+
CONTRIBUTING*
|
88
|
+
CHANGELOG*
|
89
|
+
TESTING*
|
90
|
+
MAINTAINERS.toml
|
91
|
+
|
92
|
+
# Strainer #
|
93
|
+
############
|
94
|
+
Colanderfile
|
95
|
+
Strainerfile
|
96
|
+
.colander
|
97
|
+
.strainer
|
98
|
+
|
99
|
+
# Vagrant #
|
100
|
+
###########
|
101
|
+
.vagrant
|
102
|
+
Vagrantfile
|
@@ -1,13 +1,13 @@
|
|
1
|
-
name 'wombat'
|
2
|
-
maintainer 'The Authors'
|
3
|
-
maintainer_email 'you@example.com'
|
4
|
-
license 'all_rights'
|
5
|
-
description 'Installs/Configures wombat'
|
6
|
-
long_description 'Installs/Configures wombat'
|
7
|
-
version '0.2.
|
8
|
-
|
9
|
-
depends 'hostsfile'
|
10
|
-
depends 'apt'
|
11
|
-
depends 'chef-ingredient'
|
12
|
-
depends 'sudo'
|
13
|
-
depends 'line'
|
1
|
+
name 'wombat'
|
2
|
+
maintainer 'The Authors'
|
3
|
+
maintainer_email 'you@example.com'
|
4
|
+
license 'all_rights'
|
5
|
+
description 'Installs/Configures wombat'
|
6
|
+
long_description 'Installs/Configures wombat'
|
7
|
+
version '0.2.4'
|
8
|
+
|
9
|
+
depends 'hostsfile'
|
10
|
+
depends 'apt'
|
11
|
+
depends 'chef-ingredient'
|
12
|
+
depends 'sudo'
|
13
|
+
depends 'line'
|
@@ -1,20 +1,20 @@
|
|
1
|
-
#
|
2
|
-
# Cookbook Name:: wombat
|
3
|
-
# Recipe:: authorized-keys
|
4
|
-
#
|
5
|
-
# Copyright (c) 2016 The Authors, All Rights Reserved.
|
6
|
-
|
7
|
-
append_if_no_line "Add certificate to authorized_keys" do
|
8
|
-
path "/home/#{node['demo']['admin-user']}/.ssh/authorized_keys"
|
9
|
-
line lazy { IO.read('/tmp/public.pub') }
|
10
|
-
not_if { node['platform'] == 'windows' }
|
11
|
-
end
|
12
|
-
|
13
|
-
node.default['authorization']['sudo']['include_sudoers_d'] = true
|
14
|
-
|
15
|
-
sudo 'centos' do
|
16
|
-
user 'centos'
|
17
|
-
nopasswd true
|
18
|
-
defaults ['!requiretty']
|
19
|
-
only_if { node['platform'] == 'centos' }
|
20
|
-
end
|
1
|
+
#
|
2
|
+
# Cookbook Name:: wombat
|
3
|
+
# Recipe:: authorized-keys
|
4
|
+
#
|
5
|
+
# Copyright (c) 2016 The Authors, All Rights Reserved.
|
6
|
+
|
7
|
+
append_if_no_line "Add certificate to authorized_keys" do
|
8
|
+
path "/home/#{node['demo']['admin-user']}/.ssh/authorized_keys"
|
9
|
+
line lazy { IO.read('/tmp/public.pub') }
|
10
|
+
not_if { node['platform'] == 'windows' }
|
11
|
+
end
|
12
|
+
|
13
|
+
node.default['authorization']['sudo']['include_sudoers_d'] = true
|
14
|
+
|
15
|
+
sudo 'centos' do
|
16
|
+
user 'centos'
|
17
|
+
nopasswd true
|
18
|
+
defaults ['!requiretty']
|
19
|
+
only_if { node['platform'] == 'centos' }
|
20
|
+
end
|
@@ -1,112 +1,112 @@
|
|
1
|
-
# Build all the things in a vagrant box
|
2
|
-
require 'securerandom'
|
3
|
-
|
4
|
-
include_recipe 'apt'
|
5
|
-
|
6
|
-
chef_ingredient 'chefdk' do
|
7
|
-
channel node['demo']['versions']['chefdk'].split('-')[0].to_sym
|
8
|
-
version node['demo']['versions']['chefdk'].split('-')[1]
|
9
|
-
end
|
10
|
-
|
11
|
-
gem_package 'parallel' do
|
12
|
-
action :install
|
13
|
-
end
|
14
|
-
|
15
|
-
workspace_dir = "/tmp/wombat-#{SecureRandom.hex(8)}"
|
16
|
-
output_dir = "/tmp/wombat/output"
|
17
|
-
aws_settings = node['wombat']['packer']['aws']
|
18
|
-
azure_settings = node['wombat']['packer']['azure']
|
19
|
-
|
20
|
-
execute 'create workspace for wombat' do
|
21
|
-
command "cp -rf /tmp/wombat #{workspace_dir}"
|
22
|
-
creates workspace_dir
|
23
|
-
end
|
24
|
-
|
25
|
-
config_hash = {
|
26
|
-
"name" => "wombat",
|
27
|
-
"domain" => node['demo']['domain'],
|
28
|
-
"enterprise" => node['demo']['enterprise'],
|
29
|
-
"org" => node['demo']['org'],
|
30
|
-
"build-nodes" => node['demo']['build-nodes'].to_s,
|
31
|
-
"infranodes" => node['demo']['infranodes'].to_h,
|
32
|
-
"version" => '0.0.12'.to_f,
|
33
|
-
"products" => node['demo']['versions'].to_h,
|
34
|
-
"aws" => {
|
35
|
-
"region" => aws_settings['region'],
|
36
|
-
"az" => "#{aws_settings['region']}a",
|
37
|
-
"keypair" => aws_settings['keypair'],
|
38
|
-
"source_ami" => aws_settings['source_ami'].to_h
|
39
|
-
},
|
40
|
-
}
|
41
|
-
|
42
|
-
file File.join(workspace_dir, 'wombat.yml') do
|
43
|
-
content config_hash.to_yaml
|
44
|
-
end
|
45
|
-
|
46
|
-
execute 'clean packer/logs dir' do
|
47
|
-
command 'rm -rf packer/logs/*'
|
48
|
-
cwd workspace_dir
|
49
|
-
live_stream true
|
50
|
-
not_if do
|
51
|
-
Dir.glob("#{workspace_dir}/packer/logs/*.log").empty?
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
execute 'clean certs and keys' do
|
56
|
-
command 'rm -rf packer/keys/*'
|
57
|
-
cwd workspace_dir
|
58
|
-
live_stream true
|
59
|
-
not_if do
|
60
|
-
Dir.glob("#{workspace_dir}/packer/keys/*").empty?
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
execute 'generate certs and keys' do
|
65
|
-
command 'rake keys:create'
|
66
|
-
cwd workspace_dir
|
67
|
-
live_stream true
|
68
|
-
end
|
69
|
-
|
70
|
-
execute 'build amis with rake' do
|
71
|
-
command 'rake packer:build_amis_parallel'
|
72
|
-
cwd workspace_dir
|
73
|
-
live_stream true
|
74
|
-
environment(
|
75
|
-
'AWS_REGION' => aws_settings['region'],
|
76
|
-
'AWS_SECRET_ACCESS_KEY' => aws_settings['secret_key'],
|
77
|
-
'AWS_ACCESS_KEY_ID' => aws_settings['access_key'],
|
78
|
-
'AZURE_TENANT_ID' => azure_settings['tenant_id'],
|
79
|
-
'AZURE_CLIENT_ID' => azure_settings['client_id'],
|
80
|
-
'AZURE_CLIENT_SECRET' => azure_settings['client_secret'],
|
81
|
-
'AZURE_SUBSCRIPTION_ID' => azure_settings['subscription_id'],
|
82
|
-
'AZURE_RESOURCE_GROUP' => azure_settings['resource_group'],
|
83
|
-
'AZURE_STORAGE_ACCOUNT' => azure_settings['storage_account']
|
84
|
-
)
|
85
|
-
end
|
86
|
-
|
87
|
-
execute 'update lock file' do
|
88
|
-
command 'rake update_lock && cat wombat.lock'
|
89
|
-
cwd workspace_dir
|
90
|
-
live_stream true
|
91
|
-
end
|
92
|
-
|
93
|
-
execute 'create cfn template' do
|
94
|
-
command 'rake cfn:create_template'
|
95
|
-
cwd workspace_dir
|
96
|
-
live_stream true
|
97
|
-
end
|
98
|
-
|
99
|
-
directory output_dir
|
100
|
-
directory File.join(output_dir, 'keys')
|
101
|
-
|
102
|
-
file File.join(output_dir, 'wombat.lock') do
|
103
|
-
content lazy { IO.read(File.join(workspace_dir, 'wombat.lock')) }
|
104
|
-
end
|
105
|
-
|
106
|
-
file File.join(output_dir, 'cfn_template.json') do
|
107
|
-
content lazy { IO.read(File.join(workspace_dir, 'cloudformation', 'wombat.json')) }
|
108
|
-
end
|
109
|
-
|
110
|
-
file File.join(output_dir, 'private.pem') do
|
111
|
-
content lazy { IO.read(File.join(workspace_dir, 'packer', 'keys', 'private.pem'))}
|
1
|
+
# Build all the things in a vagrant box
|
2
|
+
require 'securerandom'
|
3
|
+
|
4
|
+
include_recipe 'apt'
|
5
|
+
|
6
|
+
chef_ingredient 'chefdk' do
|
7
|
+
channel node['demo']['versions']['chefdk'].split('-')[0].to_sym
|
8
|
+
version node['demo']['versions']['chefdk'].split('-')[1]
|
9
|
+
end
|
10
|
+
|
11
|
+
gem_package 'parallel' do
|
12
|
+
action :install
|
13
|
+
end
|
14
|
+
|
15
|
+
workspace_dir = "/tmp/wombat-#{SecureRandom.hex(8)}"
|
16
|
+
output_dir = "/tmp/wombat/output"
|
17
|
+
aws_settings = node['wombat']['packer']['aws']
|
18
|
+
azure_settings = node['wombat']['packer']['azure']
|
19
|
+
|
20
|
+
execute 'create workspace for wombat' do
|
21
|
+
command "cp -rf /tmp/wombat #{workspace_dir}"
|
22
|
+
creates workspace_dir
|
23
|
+
end
|
24
|
+
|
25
|
+
config_hash = {
|
26
|
+
"name" => "wombat",
|
27
|
+
"domain" => node['demo']['domain'],
|
28
|
+
"enterprise" => node['demo']['enterprise'],
|
29
|
+
"org" => node['demo']['org'],
|
30
|
+
"build-nodes" => node['demo']['build-nodes'].to_s,
|
31
|
+
"infranodes" => node['demo']['infranodes'].to_h,
|
32
|
+
"version" => '0.0.12'.to_f,
|
33
|
+
"products" => node['demo']['versions'].to_h,
|
34
|
+
"aws" => {
|
35
|
+
"region" => aws_settings['region'],
|
36
|
+
"az" => "#{aws_settings['region']}a",
|
37
|
+
"keypair" => aws_settings['keypair'],
|
38
|
+
"source_ami" => aws_settings['source_ami'].to_h
|
39
|
+
},
|
40
|
+
}
|
41
|
+
|
42
|
+
file File.join(workspace_dir, 'wombat.yml') do
|
43
|
+
content config_hash.to_yaml
|
44
|
+
end
|
45
|
+
|
46
|
+
execute 'clean packer/logs dir' do
|
47
|
+
command 'rm -rf packer/logs/*'
|
48
|
+
cwd workspace_dir
|
49
|
+
live_stream true
|
50
|
+
not_if do
|
51
|
+
Dir.glob("#{workspace_dir}/packer/logs/*.log").empty?
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
execute 'clean certs and keys' do
|
56
|
+
command 'rm -rf packer/keys/*'
|
57
|
+
cwd workspace_dir
|
58
|
+
live_stream true
|
59
|
+
not_if do
|
60
|
+
Dir.glob("#{workspace_dir}/packer/keys/*").empty?
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
execute 'generate certs and keys' do
|
65
|
+
command 'rake keys:create'
|
66
|
+
cwd workspace_dir
|
67
|
+
live_stream true
|
68
|
+
end
|
69
|
+
|
70
|
+
execute 'build amis with rake' do
|
71
|
+
command 'rake packer:build_amis_parallel'
|
72
|
+
cwd workspace_dir
|
73
|
+
live_stream true
|
74
|
+
environment(
|
75
|
+
'AWS_REGION' => aws_settings['region'],
|
76
|
+
'AWS_SECRET_ACCESS_KEY' => aws_settings['secret_key'],
|
77
|
+
'AWS_ACCESS_KEY_ID' => aws_settings['access_key'],
|
78
|
+
'AZURE_TENANT_ID' => azure_settings['tenant_id'],
|
79
|
+
'AZURE_CLIENT_ID' => azure_settings['client_id'],
|
80
|
+
'AZURE_CLIENT_SECRET' => azure_settings['client_secret'],
|
81
|
+
'AZURE_SUBSCRIPTION_ID' => azure_settings['subscription_id'],
|
82
|
+
'AZURE_RESOURCE_GROUP' => azure_settings['resource_group'],
|
83
|
+
'AZURE_STORAGE_ACCOUNT' => azure_settings['storage_account']
|
84
|
+
)
|
85
|
+
end
|
86
|
+
|
87
|
+
execute 'update lock file' do
|
88
|
+
command 'rake update_lock && cat wombat.lock'
|
89
|
+
cwd workspace_dir
|
90
|
+
live_stream true
|
91
|
+
end
|
92
|
+
|
93
|
+
execute 'create cfn template' do
|
94
|
+
command 'rake cfn:create_template'
|
95
|
+
cwd workspace_dir
|
96
|
+
live_stream true
|
97
|
+
end
|
98
|
+
|
99
|
+
directory output_dir
|
100
|
+
directory File.join(output_dir, 'keys')
|
101
|
+
|
102
|
+
file File.join(output_dir, 'wombat.lock') do
|
103
|
+
content lazy { IO.read(File.join(workspace_dir, 'wombat.lock')) }
|
104
|
+
end
|
105
|
+
|
106
|
+
file File.join(output_dir, 'cfn_template.json') do
|
107
|
+
content lazy { IO.read(File.join(workspace_dir, 'cloudformation', 'wombat.json')) }
|
108
|
+
end
|
109
|
+
|
110
|
+
file File.join(output_dir, 'private.pem') do
|
111
|
+
content lazy { IO.read(File.join(workspace_dir, 'packer', 'keys', 'private.pem'))}
|
112
112
|
end
|
@@ -1,51 +1,51 @@
|
|
1
|
-
#
|
2
|
-
# Cookbook Name:: wombat
|
3
|
-
# Recipe:: default
|
4
|
-
#
|
5
|
-
# Copyright (c) 2016 The Authors, All Rights Reserved.
|
6
|
-
|
7
|
-
all_hosts = node['demo']['hosts'].to_h
|
8
|
-
build_ip = 50
|
9
|
-
infra_ip = 100
|
10
|
-
wkstn_ip = 200
|
11
|
-
if node['platform'] == 'windows'
|
12
|
-
tmp_dir = "C:\\Windows\\Temp"
|
13
|
-
else
|
14
|
-
tmp_dir = "/tmp/"
|
15
|
-
end
|
16
|
-
|
17
|
-
infranodes_file = File.join(tmp_dir, "infranodes-info.json")
|
18
|
-
|
19
|
-
if File.exists?(infranodes_file)
|
20
|
-
infranodes = JSON(File.read(infranodes_file))
|
21
|
-
else
|
22
|
-
infranodes = {}
|
23
|
-
end
|
24
|
-
|
25
|
-
1.upto(node['demo']['build-nodes'].to_i) do |i|
|
26
|
-
build_node_name = "build-node-#{i}"
|
27
|
-
next if all_hosts.key?(build_node_name)
|
28
|
-
build_ip += 1
|
29
|
-
all_hosts[build_node_name] = "172.31.54.#{build_ip}"
|
30
|
-
end
|
31
|
-
|
32
|
-
1.upto(node['demo']['workstations'].to_i) do |i|
|
33
|
-
wkstn_name = "workstation-#{i}"
|
34
|
-
next if all_hosts.key?(wkstn_name)
|
35
|
-
wkstn_ip += 1
|
36
|
-
all_hosts[wkstn_name] = "172.31.54.#{wkstn_ip}"
|
37
|
-
end
|
38
|
-
|
39
|
-
infranodes.sort.each do |name, _info|
|
40
|
-
next if all_hosts.key?(name)
|
41
|
-
infra_ip += 1
|
42
|
-
all_hosts[name] = "172.31.54.#{infra_ip}"
|
43
|
-
end
|
44
|
-
|
45
|
-
all_hosts.each do |hostname, ipaddress|
|
46
|
-
hostsfile_entry ipaddress do
|
47
|
-
hostname "#{node['demo']['domain_prefix']}#{hostname}.#{node['demo']['domain']}"
|
48
|
-
aliases [hostname]
|
49
|
-
action :create
|
50
|
-
end
|
51
|
-
end
|
1
|
+
#
|
2
|
+
# Cookbook Name:: wombat
|
3
|
+
# Recipe:: default
|
4
|
+
#
|
5
|
+
# Copyright (c) 2016 The Authors, All Rights Reserved.
|
6
|
+
|
7
|
+
all_hosts = node['demo']['hosts'].to_h
|
8
|
+
build_ip = 50
|
9
|
+
infra_ip = 100
|
10
|
+
wkstn_ip = 200
|
11
|
+
if node['platform'] == 'windows'
|
12
|
+
tmp_dir = "C:\\Windows\\Temp"
|
13
|
+
else
|
14
|
+
tmp_dir = "/tmp/"
|
15
|
+
end
|
16
|
+
|
17
|
+
infranodes_file = File.join(tmp_dir, "infranodes-info.json")
|
18
|
+
|
19
|
+
if File.exists?(infranodes_file)
|
20
|
+
infranodes = JSON(File.read(infranodes_file))
|
21
|
+
else
|
22
|
+
infranodes = {}
|
23
|
+
end
|
24
|
+
|
25
|
+
1.upto(node['demo']['build-nodes'].to_i) do |i|
|
26
|
+
build_node_name = "build-node-#{i}"
|
27
|
+
next if all_hosts.key?(build_node_name)
|
28
|
+
build_ip += 1
|
29
|
+
all_hosts[build_node_name] = "172.31.54.#{build_ip}"
|
30
|
+
end
|
31
|
+
|
32
|
+
1.upto(node['demo']['workstations'].to_i) do |i|
|
33
|
+
wkstn_name = "workstation-#{i}"
|
34
|
+
next if all_hosts.key?(wkstn_name)
|
35
|
+
wkstn_ip += 1
|
36
|
+
all_hosts[wkstn_name] = "172.31.54.#{wkstn_ip}"
|
37
|
+
end
|
38
|
+
|
39
|
+
infranodes.sort.each do |name, _info|
|
40
|
+
next if all_hosts.key?(name)
|
41
|
+
infra_ip += 1
|
42
|
+
all_hosts[name] = "172.31.54.#{infra_ip}"
|
43
|
+
end
|
44
|
+
|
45
|
+
all_hosts.each do |hostname, ipaddress|
|
46
|
+
hostsfile_entry ipaddress do
|
47
|
+
hostname "#{node['demo']['domain_prefix']}#{hostname}.#{node['demo']['domain']}"
|
48
|
+
aliases [hostname]
|
49
|
+
action :create
|
50
|
+
end
|
51
|
+
end
|
@@ -1,16 +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
|
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,45 @@
|
|
1
|
+
|
2
|
+
---
|
3
|
+
driver:
|
4
|
+
name: azurerm
|
5
|
+
|
6
|
+
driver_config:
|
7
|
+
subscription_id: <%= ENV["AZURE_SUBSCRIPTION_ID"] %>
|
8
|
+
location: 'westus2'
|
9
|
+
machine_size: 'Standard_DS3_v2'
|
10
|
+
|
11
|
+
provisioner:
|
12
|
+
name: chef_zero
|
13
|
+
require_chef_omnibus: latest
|
14
|
+
|
15
|
+
verifier:
|
16
|
+
name: inspec
|
17
|
+
|
18
|
+
platforms:
|
19
|
+
- name: windows-2012r2
|
20
|
+
driver_config:
|
21
|
+
image_urn: MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest
|
22
|
+
os_type: windows
|
23
|
+
- name: windows-2016
|
24
|
+
driver_config:
|
25
|
+
image_urn: MicrosoftWindowsServer:WindowsServer:2016-Datacenter:latest
|
26
|
+
os_type: windows
|
27
|
+
|
28
|
+
suites:
|
29
|
+
- name: default
|
30
|
+
run_list:
|
31
|
+
- recipe[mock_data]
|
32
|
+
- recipe[workstation]
|
33
|
+
attributes:
|
34
|
+
chocolatey:
|
35
|
+
upgrade: true
|
36
|
+
demo:
|
37
|
+
domain_prefix: ''
|
38
|
+
domain: 'animals.biz'
|
39
|
+
enterprise: 'mammals'
|
40
|
+
org: 'marsupials'
|
41
|
+
hosts:
|
42
|
+
workstations: 1
|
43
|
+
workstation-number: 1
|
44
|
+
versions:
|
45
|
+
chefdk: 'stable-latest'
|