wombat-cli 0.6.1 → 0.6.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.
- 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
data/DESIGN.md
CHANGED
@@ -1,49 +1,49 @@
|
|
1
|
-
## Anatomy of a Wombat
|
2
|
-
|
3
|
-
### tl;dr
|
4
|
-
|
5
|
-
Wombat is a collection of code that builds Chef configured golden
|
6
|
-
images from packer templates that are then re-consumed by a Cloud service template such
|
7
|
-
as CloudFormation or Google Deployment Manager.
|
8
|
-
|
9
|
-
### Design Goals
|
10
|
-
|
11
|
-
* coordination without coordination
|
12
|
-
* principle of least surprise
|
13
|
-
* dynamic templates over static files
|
14
|
-
* long build times, short deploy times
|
15
|
-
|
16
|
-
### A Stroll Down Architecture Lane
|
17
|
-
|
18
|
-
The core of wombat is the binary `bin/wombat`.
|
19
|
-
|
20
|
-
|
21
|
-
`wombat build -o BUILDER TEMPLATE`
|
22
|
-
|
23
|
-
1. Generate x509 certificates for the domain and ssh keys if there are none
|
24
|
-
2. Vendor cookbooks for template
|
25
|
-
3. Build Packer images for -o BUILDER (amazon-ebs|googlecompute) with included cookbooks
|
26
|
-
|
27
|
-
* If the TEMPLATE argument is not provided it will execute against all templates in `./packer/`
|
28
|
-
|
29
|
-
`wombat update lock`
|
30
|
-
|
31
|
-
1. Create/update wombat.lock based on most recent Packer logs
|
32
|
-
|
33
|
-
`wombat update template`
|
34
|
-
|
35
|
-
1. Create cfn/gdm configuration from lock
|
36
|
-
|
37
|
-
* If no argument is provided it will update _both_ lock and template
|
38
|
-
|
39
|
-
`wombat deploy STACK`
|
40
|
-
|
41
|
-
1. Deploy cfn/gdm stack
|
42
|
-
|
43
|
-
`wombat outputs STACK`
|
44
|
-
|
45
|
-
1. List outputs, specifically Workstation IPs
|
46
|
-
|
47
|
-
`wombat delete STACK`
|
48
|
-
|
49
|
-
1. Delete stack
|
1
|
+
## Anatomy of a Wombat
|
2
|
+
|
3
|
+
### tl;dr
|
4
|
+
|
5
|
+
Wombat is a collection of code that builds Chef configured golden
|
6
|
+
images from packer templates that are then re-consumed by a Cloud service template such
|
7
|
+
as CloudFormation or Google Deployment Manager.
|
8
|
+
|
9
|
+
### Design Goals
|
10
|
+
|
11
|
+
* coordination without coordination
|
12
|
+
* principle of least surprise
|
13
|
+
* dynamic templates over static files
|
14
|
+
* long build times, short deploy times
|
15
|
+
|
16
|
+
### A Stroll Down Architecture Lane
|
17
|
+
|
18
|
+
The core of wombat is the binary `bin/wombat`.
|
19
|
+
|
20
|
+
|
21
|
+
`wombat build -o BUILDER TEMPLATE`
|
22
|
+
|
23
|
+
1. Generate x509 certificates for the domain and ssh keys if there are none
|
24
|
+
2. Vendor cookbooks for template
|
25
|
+
3. Build Packer images for -o BUILDER (amazon-ebs|googlecompute) with included cookbooks
|
26
|
+
|
27
|
+
* If the TEMPLATE argument is not provided it will execute against all templates in `./packer/`
|
28
|
+
|
29
|
+
`wombat update lock`
|
30
|
+
|
31
|
+
1. Create/update wombat.lock based on most recent Packer logs
|
32
|
+
|
33
|
+
`wombat update template`
|
34
|
+
|
35
|
+
1. Create cfn/gdm configuration from lock
|
36
|
+
|
37
|
+
* If no argument is provided it will update _both_ lock and template
|
38
|
+
|
39
|
+
`wombat deploy STACK`
|
40
|
+
|
41
|
+
1. Deploy cfn/gdm stack
|
42
|
+
|
43
|
+
`wombat outputs STACK`
|
44
|
+
|
45
|
+
1. List outputs, specifically Workstation IPs
|
46
|
+
|
47
|
+
`wombat delete STACK`
|
48
|
+
|
49
|
+
1. Delete stack
|
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
gemspec
|
4
|
-
|
5
|
-
gem "chefstyle"
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
gem "chefstyle"
|
6
6
|
gem "rspec"
|
data/README.md
CHANGED
@@ -1,146 +1,146 @@
|
|
1
|
-
[](http://badge.fury.io/rb/wombat-cli)
|
2
|
-
[](https://travis-ci.org/chef-cft/wombat)
|
3
|
-
[](https://waffle.io/chef-cft/wombat)
|
4
|
-
|
5
|
-
# Wombat
|
6
|
-
Wombat (`wombat-cli`) is a gem that builds and creates demo environments using cloud-specific deployment
|
7
|
-
tools like CloudFormation. The demo environments are comprised of instances built
|
8
|
-
from the included packer templates:
|
9
|
-
|
10
|
-
* Chef Server
|
11
|
-
* Chef Automate
|
12
|
-
* Chef Compliance
|
13
|
-
* _N_ Automate Build Node(s)
|
14
|
-
* _N_ Infrastructure Nodes
|
15
|
-
* _N_ Windows Workstation
|
16
|
-
|
17
|
-
## Pre-requisites
|
18
|
-
|
19
|
-
We'll need a few things before we can get started with Wombat.
|
20
|
-
|
21
|
-
##### Install and Configure ChefDK
|
22
|
-
|
23
|
-
Follow the instructions at https://docs.chef.io/install_dk.html to install and configure ChefDK (0.19.6+) as your default version of Ruby.
|
24
|
-
|
25
|
-
*Note:* If not using ChefDK, Ruby 2.3+ is required.
|
26
|
-
|
27
|
-
##### Install Packer
|
28
|
-
|
29
|
-
Downloads are here: https://www.packer.io/downloads.html. The binary must be in $PATH for `wombat build`
|
30
|
-
|
31
|
-
##### Download your Automate license key
|
32
|
-
Automate requires a valid license to activate successfully. **If you do
|
33
|
-
not have a license key, you can request one from your CHEF account
|
34
|
-
representative.**
|
35
|
-
|
36
|
-
You will need to have the `delivery.license` file present inside the `files/`
|
37
|
-
directory of your wombat project.
|
38
|
-
|
39
|
-
## Usage
|
40
|
-
|
41
|
-
### From Rubygems
|
42
|
-
|
43
|
-
If you are a developer or you prefer to install from Rubygems, we've got you covered.
|
44
|
-
|
45
|
-
Add Wombat to your repository's `Gemfile`:
|
46
|
-
|
47
|
-
```ruby
|
48
|
-
gem 'wombat-cli'
|
49
|
-
```
|
50
|
-
|
51
|
-
*Note:* if using Bundler, make sure to `bundle install` and prefix commands as appropriate, ex `bundle exec wombat`
|
52
|
-
|
53
|
-
|
54
|
-
Or run it as a standalone:
|
55
|
-
|
56
|
-
```shell
|
57
|
-
$ gem install wombat-cli
|
58
|
-
```
|
59
|
-
|
60
|
-
##### Get Started with Wombat
|
61
|
-
|
62
|
-
```
|
63
|
-
$ wombat init
|
64
|
-
```
|
65
|
-
|
66
|
-
This will generate a wombat skeleton project and example configuration file `wombat.yml`
|
67
|
-
|
68
|
-
*NOTE:* workstation-passwd must meet the minimum Microsoft [Complexity Requirements](https://technet.microsoft.com/en-us/library/hh994562(v=ws.11).aspx)
|
69
|
-
|
70
|
-
*NOTE:* The `googlecompute` and `azure` builders exist but not all images will build nor is there deployment support for either at this time.
|
71
|
-
|
72
|
-
##### Build images with Packer
|
73
|
-
|
74
|
-
```
|
75
|
-
# build one or more templates
|
76
|
-
$ wombat build [-o BUILDER] TEMPLATE [TEMPLATE2]
|
77
|
-
|
78
|
-
# build all templates (sequentially)
|
79
|
-
$ wombat build [-o BUILDER]
|
80
|
-
|
81
|
-
# build all images (parallel)
|
82
|
-
$ wombat build [-o BUILDER] --parallel
|
83
|
-
```
|
84
|
-
|
85
|
-
*NOTE:* If the builder is not provided it defaults to `amazon-ebs`
|
86
|
-
|
87
|
-
##### Deploy CloudFormation template
|
88
|
-
|
89
|
-
###### via AWS CloudFormation Web UI
|
90
|
-
|
91
|
-
Upload the created template from the `cloudformation` directory.
|
92
|
-
|
93
|
-
###### via CLI
|
94
|
-
|
95
|
-
```
|
96
|
-
# Deploy CloudFormation template
|
97
|
-
$ wombat deploy --update-lock --update-template
|
98
|
-
==> Updating wombat.lock
|
99
|
-
==> Generate CloudFormation JSON: STACK.json
|
100
|
-
==> Creating CloudFormation stack
|
101
|
-
Created: arn:aws:cloudformation:us-east-1:862552916454:stack/STACK/2160c580-713e-11e6-b392-50a686e4bb82
|
102
|
-
```
|
103
|
-
|
104
|
-
```
|
105
|
-
# Deploy an already generated template (pre-existing template)
|
106
|
-
# where STACK is the name of the template (w/o file extention) in the `stack_dir`
|
107
|
-
wombat deploy STACK
|
108
|
-
```
|
109
|
-
|
110
|
-
##### Login to Windows Workstation
|
111
|
-
|
112
|
-
```
|
113
|
-
# Get Windows Workstation(s) IP(s)
|
114
|
-
# where STACK is the name of the running CloudFormation stack
|
115
|
-
$ wombat outputs STACK
|
116
|
-
WindowsWorkstation (i-xxxxxxxx) => XX.XXX.XX.XXX
|
117
|
-
```
|
118
|
-
|
119
|
-
## TODO
|
120
|
-
|
121
|
-
* Complete support for Azure
|
122
|
-
* Complete support for Google Cloud Engine
|
123
|
-
|
124
|
-
From the AWS CloudFormation UI, select the Outputs tab for the desired stack.
|
125
|
-
Use an RDP compatible client to login to the workstation with the embedded credentials.
|
126
|
-
|
127
|
-
LICENSE AND AUTHORS
|
128
|
-
===================
|
129
|
-
* [Andre Elizondo](https://github.com/andrewelizondo)
|
130
|
-
* [Seth Thomas](https://github.com/cheeseplus)
|
131
|
-
|
132
|
-
```text
|
133
|
-
Copyright:: 2016 Chef Software, Inc
|
134
|
-
|
135
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
136
|
-
you may not use this file except in compliance with the License.
|
137
|
-
You may obtain a copy of the License at
|
138
|
-
|
139
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
140
|
-
|
141
|
-
Unless required by applicable law or agreed to in writing, software
|
142
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
143
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
144
|
-
See the License for the specific language governing permissions and
|
145
|
-
limitations under the License.
|
146
|
-
```
|
1
|
+
[](http://badge.fury.io/rb/wombat-cli)
|
2
|
+
[](https://travis-ci.org/chef-cft/wombat)
|
3
|
+
[](https://waffle.io/chef-cft/wombat)
|
4
|
+
|
5
|
+
# Wombat
|
6
|
+
Wombat (`wombat-cli`) is a gem that builds and creates demo environments using cloud-specific deployment
|
7
|
+
tools like CloudFormation. The demo environments are comprised of instances built
|
8
|
+
from the included packer templates:
|
9
|
+
|
10
|
+
* Chef Server
|
11
|
+
* Chef Automate
|
12
|
+
* Chef Compliance
|
13
|
+
* _N_ Automate Build Node(s)
|
14
|
+
* _N_ Infrastructure Nodes
|
15
|
+
* _N_ Windows Workstation
|
16
|
+
|
17
|
+
## Pre-requisites
|
18
|
+
|
19
|
+
We'll need a few things before we can get started with Wombat.
|
20
|
+
|
21
|
+
##### Install and Configure ChefDK
|
22
|
+
|
23
|
+
Follow the instructions at https://docs.chef.io/install_dk.html to install and configure ChefDK (0.19.6+) as your default version of Ruby.
|
24
|
+
|
25
|
+
*Note:* If not using ChefDK, Ruby 2.3+ is required.
|
26
|
+
|
27
|
+
##### Install Packer
|
28
|
+
|
29
|
+
Downloads are here: https://www.packer.io/downloads.html. The binary must be in $PATH for `wombat build`
|
30
|
+
|
31
|
+
##### Download your Automate license key
|
32
|
+
Automate requires a valid license to activate successfully. **If you do
|
33
|
+
not have a license key, you can request one from your CHEF account
|
34
|
+
representative.**
|
35
|
+
|
36
|
+
You will need to have the `delivery.license` file present inside the `files/`
|
37
|
+
directory of your wombat project.
|
38
|
+
|
39
|
+
## Usage
|
40
|
+
|
41
|
+
### From Rubygems
|
42
|
+
|
43
|
+
If you are a developer or you prefer to install from Rubygems, we've got you covered.
|
44
|
+
|
45
|
+
Add Wombat to your repository's `Gemfile`:
|
46
|
+
|
47
|
+
```ruby
|
48
|
+
gem 'wombat-cli'
|
49
|
+
```
|
50
|
+
|
51
|
+
*Note:* if using Bundler, make sure to `bundle install` and prefix commands as appropriate, ex `bundle exec wombat`
|
52
|
+
|
53
|
+
|
54
|
+
Or run it as a standalone:
|
55
|
+
|
56
|
+
```shell
|
57
|
+
$ gem install wombat-cli
|
58
|
+
```
|
59
|
+
|
60
|
+
##### Get Started with Wombat
|
61
|
+
|
62
|
+
```
|
63
|
+
$ wombat init
|
64
|
+
```
|
65
|
+
|
66
|
+
This will generate a wombat skeleton project and example configuration file `wombat.yml`
|
67
|
+
|
68
|
+
*NOTE:* workstation-passwd must meet the minimum Microsoft [Complexity Requirements](https://technet.microsoft.com/en-us/library/hh994562(v=ws.11).aspx)
|
69
|
+
|
70
|
+
*NOTE:* The `googlecompute` and `azure` builders exist but not all images will build nor is there deployment support for either at this time.
|
71
|
+
|
72
|
+
##### Build images with Packer
|
73
|
+
|
74
|
+
```
|
75
|
+
# build one or more templates
|
76
|
+
$ wombat build [-o BUILDER] TEMPLATE [TEMPLATE2]
|
77
|
+
|
78
|
+
# build all templates (sequentially)
|
79
|
+
$ wombat build [-o BUILDER]
|
80
|
+
|
81
|
+
# build all images (parallel)
|
82
|
+
$ wombat build [-o BUILDER] --parallel
|
83
|
+
```
|
84
|
+
|
85
|
+
*NOTE:* If the builder is not provided it defaults to `amazon-ebs`
|
86
|
+
|
87
|
+
##### Deploy CloudFormation template
|
88
|
+
|
89
|
+
###### via AWS CloudFormation Web UI
|
90
|
+
|
91
|
+
Upload the created template from the `cloudformation` directory.
|
92
|
+
|
93
|
+
###### via CLI
|
94
|
+
|
95
|
+
```
|
96
|
+
# Deploy CloudFormation template
|
97
|
+
$ wombat deploy --update-lock --update-template
|
98
|
+
==> Updating wombat.lock
|
99
|
+
==> Generate CloudFormation JSON: STACK.json
|
100
|
+
==> Creating CloudFormation stack
|
101
|
+
Created: arn:aws:cloudformation:us-east-1:862552916454:stack/STACK/2160c580-713e-11e6-b392-50a686e4bb82
|
102
|
+
```
|
103
|
+
|
104
|
+
```
|
105
|
+
# Deploy an already generated template (pre-existing template)
|
106
|
+
# where STACK is the name of the template (w/o file extention) in the `stack_dir`
|
107
|
+
wombat deploy STACK
|
108
|
+
```
|
109
|
+
|
110
|
+
##### Login to Windows Workstation
|
111
|
+
|
112
|
+
```
|
113
|
+
# Get Windows Workstation(s) IP(s)
|
114
|
+
# where STACK is the name of the running CloudFormation stack
|
115
|
+
$ wombat outputs STACK
|
116
|
+
WindowsWorkstation (i-xxxxxxxx) => XX.XXX.XX.XXX
|
117
|
+
```
|
118
|
+
|
119
|
+
## TODO
|
120
|
+
|
121
|
+
* Complete support for Azure
|
122
|
+
* Complete support for Google Cloud Engine
|
123
|
+
|
124
|
+
From the AWS CloudFormation UI, select the Outputs tab for the desired stack.
|
125
|
+
Use an RDP compatible client to login to the workstation with the embedded credentials.
|
126
|
+
|
127
|
+
LICENSE AND AUTHORS
|
128
|
+
===================
|
129
|
+
* [Andre Elizondo](https://github.com/andrewelizondo)
|
130
|
+
* [Seth Thomas](https://github.com/cheeseplus)
|
131
|
+
|
132
|
+
```text
|
133
|
+
Copyright:: 2016 Chef Software, Inc
|
134
|
+
|
135
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
136
|
+
you may not use this file except in compliance with the License.
|
137
|
+
You may obtain a copy of the License at
|
138
|
+
|
139
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
140
|
+
|
141
|
+
Unless required by applicable law or agreed to in writing, software
|
142
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
143
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
144
|
+
See the License for the specific language governing permissions and
|
145
|
+
limitations under the License.
|
146
|
+
```
|
data/Rakefile
CHANGED
@@ -1,26 +1,26 @@
|
|
1
|
-
require 'bundler/gem_tasks'
|
2
|
-
|
3
|
-
begin
|
4
|
-
require "rspec/core/rake_task"
|
5
|
-
|
6
|
-
RSpec::Core::RakeTask.new do |t|
|
7
|
-
t.pattern = "spec/**/*_spec.rb"
|
8
|
-
end
|
9
|
-
rescue LoadError
|
10
|
-
desc "rspec is not installed, this task is disabled"
|
11
|
-
task :spec do
|
12
|
-
abort "rspec is not installed. `(sudo) gem install rspec` to run unit tests"
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
task :default => :spec
|
17
|
-
|
18
|
-
begin
|
19
|
-
require "chefstyle"
|
20
|
-
require "rubocop/rake_task"
|
21
|
-
RuboCop::RakeTask.new(:style) do |task|
|
22
|
-
task.options += ["--display-cop-names", "--no-color"]
|
23
|
-
end
|
24
|
-
rescue LoadError
|
25
|
-
puts "chefstyle/rubocop is not available. gem install chefstyle to do style checking."
|
26
|
-
end
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
|
3
|
+
begin
|
4
|
+
require "rspec/core/rake_task"
|
5
|
+
|
6
|
+
RSpec::Core::RakeTask.new do |t|
|
7
|
+
t.pattern = "spec/**/*_spec.rb"
|
8
|
+
end
|
9
|
+
rescue LoadError
|
10
|
+
desc "rspec is not installed, this task is disabled"
|
11
|
+
task :spec do
|
12
|
+
abort "rspec is not installed. `(sudo) gem install rspec` to run unit tests"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
task :default => :spec
|
17
|
+
|
18
|
+
begin
|
19
|
+
require "chefstyle"
|
20
|
+
require "rubocop/rake_task"
|
21
|
+
RuboCop::RakeTask.new(:style) do |task|
|
22
|
+
task.options += ["--display-cop-names", "--no-color"]
|
23
|
+
end
|
24
|
+
rescue LoadError
|
25
|
+
puts "chefstyle/rubocop is not available. gem install chefstyle to do style checking."
|
26
|
+
end
|
data/bin/wombat
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# -*- encoding: utf-8 -*-
|
3
|
-
def shut_down
|
4
|
-
puts "\nShutting down gracefully..."
|
5
|
-
sleep 1
|
6
|
-
end
|
7
|
-
|
8
|
-
Signal.trap("INT") {
|
9
|
-
shut_down
|
10
|
-
exit
|
11
|
-
}
|
12
|
-
|
13
|
-
$stdout.sync = true
|
14
|
-
$stderr.sync = true
|
15
|
-
|
16
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w[.. lib])
|
17
|
-
require "wombat/cli"
|
18
|
-
|
19
|
-
begin
|
20
|
-
Wombat::Runner.new(Wombat::Options.parse(ARGV)).start
|
21
|
-
rescue => ex
|
22
|
-
$stderr.puts ">>> #{ex.message}"
|
23
|
-
exit(($? && $?.exitstatus) || 99)
|
24
|
-
end
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- encoding: utf-8 -*-
|
3
|
+
def shut_down
|
4
|
+
puts "\nShutting down gracefully..."
|
5
|
+
sleep 1
|
6
|
+
end
|
7
|
+
|
8
|
+
Signal.trap("INT") {
|
9
|
+
shut_down
|
10
|
+
exit
|
11
|
+
}
|
12
|
+
|
13
|
+
$stdout.sync = true
|
14
|
+
$stderr.sync = true
|
15
|
+
|
16
|
+
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w[.. lib])
|
17
|
+
require "wombat/cli"
|
18
|
+
|
19
|
+
begin
|
20
|
+
Wombat::Runner.new(Wombat::Options.parse(ARGV)).start
|
21
|
+
rescue => ex
|
22
|
+
$stderr.puts ">>> #{ex.message}"
|
23
|
+
exit(($? && $?.exitstatus) || 99)
|
24
|
+
end
|