galvanize 0.1.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 +7 -0
- data/.gitignore +13 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +17 -0
- data/Gemfile.lock +242 -0
- data/LICENSE.txt +21 -0
- data/README.md +64 -0
- data/Rakefile +6 -0
- data/bin/console +12 -0
- data/bin/gal +10 -0
- data/bin/galvanize +10 -0
- data/bin/setup +8 -0
- data/galvanize.gemspec +25 -0
- data/lib/chef-dk/command/generator_commands/habichef.rb +82 -0
- data/lib/chef-dk/configurable-patch.rb +15 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/Berksfile +4 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/build_cookbook/README.md +146 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/build_cookbook/kitchen.yml +21 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/build_cookbook/test-fixture-recipe.rb +9 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/chefignore +109 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/cookbook_readmes/README-policy.md +9 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/cookbook_readmes/README.md +66 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/delivery-config.json +17 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/delivery-project.toml +36 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/gitignore +22 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/README.md +24 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/README.md +27 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/attributes/default.rb +8 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/metadata.rb +7 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/recipes/default.rb +9 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/data_bags/README.md +56 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/data_bags/example/example_item.json +4 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/dot-chef-repo.txt +6 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/environments/README.md +9 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/environments/example.json +13 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/policyfiles/README.md +24 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/roles/README.md +9 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/roles/example.json +13 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/spec_helper.rb +3 -0
- data/lib/chef-dk/skeletons/code_generator/files/default/spec_helper_policyfile.rb +3 -0
- data/lib/chef-dk/skeletons/code_generator/metadata.rb +8 -0
- data/lib/chef-dk/skeletons/code_generator/recipes/attribute.rb +13 -0
- data/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb +177 -0
- data/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb +161 -0
- data/lib/chef-dk/skeletons/code_generator/recipes/cookbook_file.rb +25 -0
- data/lib/chef-dk/skeletons/code_generator/recipes/habichef.rb +92 -0
- data/lib/chef-dk/skeletons/code_generator/recipes/helpers.rb +21 -0
- data/lib/chef-dk/skeletons/code_generator/recipes/policyfile.rb +9 -0
- data/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb +52 -0
- data/lib/chef-dk/skeletons/code_generator/recipes/repo.rb +68 -0
- data/lib/chef-dk/skeletons/code_generator/recipes/resource.rb +13 -0
- data/lib/chef-dk/skeletons/code_generator/recipes/template.rb +32 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/CHANGELOG.md.erb +11 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/LICENSE.all_rights.erb +3 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/LICENSE.apachev2.erb +201 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/LICENSE.gplv2.erb +339 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/LICENSE.gplv3.erb +674 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/LICENSE.mit.erb +21 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/Policyfile.rb.erb +25 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/README.md.erb +4 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/attribute.rb.erb +0 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/build_cookbook/Berksfile.erb +7 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/build_cookbook/metadata.rb.erb +10 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/build_cookbook/recipe.rb.erb +8 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/cookbook_file.erb +0 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/gitignore +28 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/habitat/README.md.erb +96 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/habitat/default.toml.erb +18 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/habitat/plan.sh.erb +16 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/helpers.rb.erb +39 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/inspec_default_test.rb.erb +16 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/kitchen.yml.erb +26 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/kitchen_dokken.yml.erb +31 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/kitchen_policyfile.yml.erb +33 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/metadata.rb.erb +20 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/policyfiles/base.rb.erb +30 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/recipe.rb.erb +5 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/recipe_spec.rb.erb +35 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/repo/gitignore.erb +128 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/resource.rb.erb +1 -0
- data/lib/chef-dk/skeletons/code_generator/templates/default/template.erb +0 -0
- data/lib/galvanize.rb +7 -0
- data/lib/galvanize/version.rb +3 -0
- metadata +130 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) <%= year %> <%= copyright_holder %>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Policyfile.rb - Describe how you want Chef to build your system.
|
|
2
|
+
#
|
|
3
|
+
# For more information on the Policyfile feature, visit
|
|
4
|
+
# https://docs.chef.io/policyfile.html
|
|
5
|
+
|
|
6
|
+
# A name that describes what the system you're building with Chef does.
|
|
7
|
+
name '<%= policy_name %>'
|
|
8
|
+
|
|
9
|
+
<% if include_chef_repo_source %>
|
|
10
|
+
# This lets you source cookbooks from your chef-repo.
|
|
11
|
+
default_source :chef_repo, '../'
|
|
12
|
+
|
|
13
|
+
<% end -%>
|
|
14
|
+
# Where to find external cookbooks:
|
|
15
|
+
default_source :supermarket
|
|
16
|
+
|
|
17
|
+
# run_list: chef-client will run these recipes in the order specified.
|
|
18
|
+
run_list '<%= policy_run_list %>'
|
|
19
|
+
|
|
20
|
+
# Specify a custom source for a single cookbook:
|
|
21
|
+
<% if policy_local_cookbook.nil? %>
|
|
22
|
+
# cookbook 'example_cookbook', path: '../cookbooks/example_cookbook'
|
|
23
|
+
<% else %>
|
|
24
|
+
cookbook '<%= cookbook_name %>', path: '.'
|
|
25
|
+
<% end %>
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.vagrant
|
|
2
|
+
*~
|
|
3
|
+
*#
|
|
4
|
+
.#*
|
|
5
|
+
\#*#
|
|
6
|
+
.*.sw[a-z]
|
|
7
|
+
*.un~
|
|
8
|
+
|
|
9
|
+
# Bundler
|
|
10
|
+
Gemfile.lock
|
|
11
|
+
gems.locked
|
|
12
|
+
bin/*
|
|
13
|
+
.bundle/*
|
|
14
|
+
|
|
15
|
+
# test kitchen
|
|
16
|
+
.kitchen/
|
|
17
|
+
.kitchen.local.yml
|
|
18
|
+
|
|
19
|
+
# Chef
|
|
20
|
+
Berksfile.lock
|
|
21
|
+
.zero-knife.rb
|
|
22
|
+
Policyfile.lock.json
|
|
23
|
+
|
|
24
|
+
# Habitat
|
|
25
|
+
results
|
|
26
|
+
|
|
27
|
+
# HabiChef Policyfiles
|
|
28
|
+
policyfiles/*.lock.json
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# <%= cookbook_name %>
|
|
2
|
+
|
|
3
|
+
Brief description of habichef_skel
|
|
4
|
+
|
|
5
|
+
## Maintainers
|
|
6
|
+
|
|
7
|
+
Names of plan maintainers (The Habitat Maintainers humans@habitat.sh is usually sufficient)
|
|
8
|
+
|
|
9
|
+
## Type of Package
|
|
10
|
+
|
|
11
|
+
This should state whether the package is a service package or a binary package.
|
|
12
|
+
|
|
13
|
+
A service package is something that will be run by the Habitat supervisor (i.e. core/postgresql). A service package must always have a run file or define pkg_svc_run in the plan.sh file.
|
|
14
|
+
|
|
15
|
+
A binary package is something that packages up a standalone binary, something that does not need to run under the Habitat supervisor (i.e. core/dep). They are often used as dependencies of other packages. Binary packages do not have a run file and do not need to define pkg_svc_run in the plan.sh file.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
How would a user use this package? i.e. can a user simply call the package as a dependency of their application? Or is there more they need to do?
|
|
20
|
+
|
|
21
|
+
## Bindings
|
|
22
|
+
|
|
23
|
+
*(This is only required for service packages, not [binary wrapper packages](https://www.habitat.sh/docs/best-practices/#binary-wrapper-packages))*
|
|
24
|
+
|
|
25
|
+
How do other services that want to consume this service bind to it?
|
|
26
|
+
|
|
27
|
+
Checkout [the core/postgresql](https://github.com/habitat-sh/core-plans/tree/master/postgresql) README for a good example of this.
|
|
28
|
+
|
|
29
|
+
## Topologies
|
|
30
|
+
|
|
31
|
+
*(This is only required for service packages, not [binary wrapper packages](https://www.habitat.sh/docs/best-practices/#binary-wrapper-packages))*
|
|
32
|
+
|
|
33
|
+
What topologies does this plan support?
|
|
34
|
+
|
|
35
|
+
### Standalone
|
|
36
|
+
|
|
37
|
+
*(This is only required for service packages, not [binary wrapper packages](https://www.habitat.sh/docs/best-practices/#binary-wrapper-packages))*
|
|
38
|
+
|
|
39
|
+
Check out [the Habitat docs on standalone](https://www.habitat.sh/docs/using-habitat/#standalone) for more details on what the standalone topology is and what it does.
|
|
40
|
+
|
|
41
|
+
If this plan can be used with the standalone topology, how do you do it?
|
|
42
|
+
|
|
43
|
+
Checkout [the core/postgresql](https://github.com/habitat-sh/core-plans/tree/master/postgresql) README for a good example of this.
|
|
44
|
+
|
|
45
|
+
### Leader-Follower
|
|
46
|
+
|
|
47
|
+
*(This is only required for service packages, not [binary wrapper packages](https://www.habitat.sh/docs/best-practices/#binary-wrapper-packages))*
|
|
48
|
+
|
|
49
|
+
If this plan can be used with the leader/follower topology, how do you do it?
|
|
50
|
+
|
|
51
|
+
Check out [the Habitat docs on Leader-Follower](https://www.habitat.sh/docs/using-habitat/#leader-follower-topology) for more details on what the leader-follower topology is and what it does.
|
|
52
|
+
|
|
53
|
+
Checkout [the core/postgresql](https://github.com/habitat-sh/core-plans/tree/master/postgresql) README for a good example of this (look under the Clustering heading)
|
|
54
|
+
|
|
55
|
+
## Update Strategies
|
|
56
|
+
|
|
57
|
+
*(This is only required for service packages, not [binary wrapper packages](https://www.habitat.sh/docs/best-practices/#binary-wrapper-packages))*
|
|
58
|
+
|
|
59
|
+
What update strategies would work best for this plan?
|
|
60
|
+
|
|
61
|
+
Checkout [the update strategy documentation](https://www.habitat.sh/docs/using-habitat/#update-strategy) for information on the strategies Habitat supports.
|
|
62
|
+
|
|
63
|
+
### Configuration Updates
|
|
64
|
+
|
|
65
|
+
*(This is only required for service packages, not [binary wrapper packages](https://www.habitat.sh/docs/best-practices/#binary-wrapper-packages))*
|
|
66
|
+
|
|
67
|
+
Checkout the [configuration update](https://www.habitat.sh/docs/using-habitat/#configuration-updates) documentation for more information on what configuration updates are and how they are executed.
|
|
68
|
+
|
|
69
|
+
Link to the plan's default.toml file to list all the configurable values of the plan.
|
|
70
|
+
|
|
71
|
+
If your plan has configuration values that require a complete rebuild when updated, note those here.
|
|
72
|
+
|
|
73
|
+
## Scaling
|
|
74
|
+
*(This is only required for service packages, not [binary wrapper packages](https://www.habitat.sh/docs/best-practices/#binary-wrapper-packages))*
|
|
75
|
+
|
|
76
|
+
(Optional, but recommended)
|
|
77
|
+
|
|
78
|
+
How would a user scale this service?
|
|
79
|
+
|
|
80
|
+
Can this service be run in a cluster and/or as high availability?
|
|
81
|
+
|
|
82
|
+
## Monitoring
|
|
83
|
+
|
|
84
|
+
*(This is only required for service packages, not [binary wrapper packages](https://www.habitat.sh/docs/best-practices/#binary-wrapper-packages))*
|
|
85
|
+
|
|
86
|
+
(Optional, but recommended)
|
|
87
|
+
|
|
88
|
+
How would a user monitor the health of this surface at the application layer?
|
|
89
|
+
|
|
90
|
+
This is separate from information about Habitat's HTTP API monitoring service. This section should include some suggestions about how someone could monitor the application or service outside of Habitat - i.e. using something like sumologic, logstash, etc. It does not need to be prescriptive, but should include some suggestions of where someone might start.
|
|
91
|
+
|
|
92
|
+
## Notes
|
|
93
|
+
|
|
94
|
+
(Optional)
|
|
95
|
+
|
|
96
|
+
Anything that does not fit in the above sections should go here - i.e. how does this fit into a user's development workflow?
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
log_level = "warn"
|
|
2
|
+
# All times are in seconds
|
|
3
|
+
interval = "1800"
|
|
4
|
+
splay = "300"
|
|
5
|
+
splay_first_run = "10"
|
|
6
|
+
run_lock_timeout = "30"
|
|
7
|
+
|
|
8
|
+
[data_collector]
|
|
9
|
+
enable = false
|
|
10
|
+
# Set this to true to enable data collection
|
|
11
|
+
# enable = "true"
|
|
12
|
+
# uncomment and set to your automate sever URL
|
|
13
|
+
# server_url = "https://automate.mydomain.com/data-collector/v0"
|
|
14
|
+
# For instructions on generating tokens refer to: https://automate.chef.io/docs/api-tokens/
|
|
15
|
+
# token = "anactualtoken="
|
|
16
|
+
|
|
17
|
+
# Set cookbook specific attributes
|
|
18
|
+
[attributes]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
if [ -z ${CHEF_POLICYFILE+x} ]; then
|
|
2
|
+
policy_name="base"
|
|
3
|
+
else
|
|
4
|
+
policy_name="${CHEF_POLICYFILE}"
|
|
5
|
+
fi
|
|
6
|
+
|
|
7
|
+
scaffold_policy_name="$policy_name"
|
|
8
|
+
pkg_name="<%= cookbook_name %>-${policy_name}"
|
|
9
|
+
pkg_origin="<%= defined?(hab_origin) ? hab_origin : (ENV['HAB_ORIGIN'] || 'you must specify your origin') %>"
|
|
10
|
+
pkg_version="0.1.0"
|
|
11
|
+
pkg_maintainer="<%= copyright_holder %> <<%= email %>>"
|
|
12
|
+
pkg_description="The Chef $scaffold_policy_name Policy"
|
|
13
|
+
pkg_upstream_url="http://chef.io"
|
|
14
|
+
pkg_scaffolding="core/scaffolding-chef"
|
|
15
|
+
pkg_svc_user="root"
|
|
16
|
+
pkg_svc_group="root"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Chef Documentation
|
|
3
|
+
# https://docs.chef.io/libraries.html
|
|
4
|
+
#
|
|
5
|
+
|
|
6
|
+
#
|
|
7
|
+
# This module name was auto-generated from the cookbook name. This name is a
|
|
8
|
+
# single word that starts with a capital letter and then continues to use
|
|
9
|
+
# camel-casing throughout the remainder of the name.
|
|
10
|
+
#
|
|
11
|
+
module <%= @cookbook_class_name %>
|
|
12
|
+
module <%= @helper_class_name %>
|
|
13
|
+
#
|
|
14
|
+
# Define the methods that you would like to assist the work you do in recipes,
|
|
15
|
+
# resources, or templates.
|
|
16
|
+
#
|
|
17
|
+
# def my_helper_method
|
|
18
|
+
# # help method implementation
|
|
19
|
+
# end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
#
|
|
24
|
+
# The module you have defined may be extended within the recipe to grant the
|
|
25
|
+
# recipe the helper methods you define.
|
|
26
|
+
#
|
|
27
|
+
# Within your recipe you would write:
|
|
28
|
+
#
|
|
29
|
+
# extend <%= @cookbook_class_name %>::<%= @helper_class_name %>
|
|
30
|
+
#
|
|
31
|
+
# my_helper_method
|
|
32
|
+
#
|
|
33
|
+
# You may also add this to a single resource within a recipe:
|
|
34
|
+
#
|
|
35
|
+
# template '/etc/app.conf' do
|
|
36
|
+
# extend <%= @cookbook_class_name %>::<%= @helper_class_name %>
|
|
37
|
+
# variables specific_key: my_helper_method
|
|
38
|
+
# end
|
|
39
|
+
#
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# InSpec test for recipe <%= cookbook_name %>::<%= recipe_name %>
|
|
2
|
+
|
|
3
|
+
# The InSpec reference, with examples and extensive documentation, can be
|
|
4
|
+
# found at http://inspec.io/docs/reference/resources/
|
|
5
|
+
|
|
6
|
+
unless os.windows?
|
|
7
|
+
# This is an example test, replace with your own test.
|
|
8
|
+
describe user('root'), :skip do
|
|
9
|
+
it { should exist }
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# This is an example test, replace it with your own test.
|
|
14
|
+
describe port(80), :skip do
|
|
15
|
+
it { should_not be_listening }
|
|
16
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
driver:
|
|
3
|
+
name: vagrant
|
|
4
|
+
|
|
5
|
+
provisioner:
|
|
6
|
+
name: chef_zero
|
|
7
|
+
# You may wish to disable always updating cookbooks in CI or other testing environments.
|
|
8
|
+
# For example:
|
|
9
|
+
# always_update_cookbooks: <%%= !ENV['CI'] %>
|
|
10
|
+
always_update_cookbooks: true
|
|
11
|
+
|
|
12
|
+
verifier:
|
|
13
|
+
name: inspec
|
|
14
|
+
|
|
15
|
+
platforms:
|
|
16
|
+
- name: ubuntu-18.04
|
|
17
|
+
- name: centos-7
|
|
18
|
+
|
|
19
|
+
suites:
|
|
20
|
+
- name: default
|
|
21
|
+
run_list:
|
|
22
|
+
- recipe[<%= cookbook_name %>::default]
|
|
23
|
+
verifier:
|
|
24
|
+
inspec_tests:
|
|
25
|
+
- test/integration/default
|
|
26
|
+
attributes:
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
driver:
|
|
3
|
+
name: dokken
|
|
4
|
+
|
|
5
|
+
provisioner:
|
|
6
|
+
name: dokken
|
|
7
|
+
|
|
8
|
+
transport:
|
|
9
|
+
name: dokken
|
|
10
|
+
|
|
11
|
+
verifier:
|
|
12
|
+
name: inspec
|
|
13
|
+
|
|
14
|
+
platforms:
|
|
15
|
+
# @see https://github.com/someara/dokken-images
|
|
16
|
+
# @see https://hub.docker.com/r/dokken/
|
|
17
|
+
- name: ubuntu-18.04
|
|
18
|
+
driver:
|
|
19
|
+
image: dokken/ubuntu-18.04
|
|
20
|
+
- name: centos-7
|
|
21
|
+
driver:
|
|
22
|
+
image: dokken/centos-7
|
|
23
|
+
|
|
24
|
+
suites:
|
|
25
|
+
- name: default
|
|
26
|
+
run_list:
|
|
27
|
+
- recipe[<%= cookbook_name %>::default]
|
|
28
|
+
verifier:
|
|
29
|
+
inspec_tests:
|
|
30
|
+
- test/integration/default
|
|
31
|
+
attributes:
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
driver:
|
|
3
|
+
name: vagrant
|
|
4
|
+
|
|
5
|
+
## The forwarded_port port feature lets you connect to ports on the VM guest via
|
|
6
|
+
## localhost on the host.
|
|
7
|
+
## see also: https://docs.vagrantup.com/v2/networking/forwarded_ports.html
|
|
8
|
+
|
|
9
|
+
# network:
|
|
10
|
+
# - ["forwarded_port", {guest: 80, host: 8080}]
|
|
11
|
+
|
|
12
|
+
provisioner:
|
|
13
|
+
name: chef_zero
|
|
14
|
+
|
|
15
|
+
## require_chef_omnibus specifies a specific chef version to install. You can
|
|
16
|
+
## also set this to `true` to always use the latest version.
|
|
17
|
+
## see also: https://docs.chef.io/config_yml_kitchen.html
|
|
18
|
+
|
|
19
|
+
# require_chef_omnibus: 12.8.1
|
|
20
|
+
|
|
21
|
+
verifier:
|
|
22
|
+
name: inspec
|
|
23
|
+
|
|
24
|
+
platforms:
|
|
25
|
+
- name: ubuntu-18.04
|
|
26
|
+
- name: centos-7
|
|
27
|
+
|
|
28
|
+
suites:
|
|
29
|
+
- name: default
|
|
30
|
+
verifier:
|
|
31
|
+
inspec_tests:
|
|
32
|
+
- test/integration/default
|
|
33
|
+
attributes:
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name '<%= cookbook_name %>'
|
|
2
|
+
maintainer '<%= copyright_holder %>'
|
|
3
|
+
maintainer_email '<%= email %>'
|
|
4
|
+
license '<%= @spdx_license %>'
|
|
5
|
+
description 'Installs/Configures <%= cookbook_name %>'
|
|
6
|
+
long_description 'Installs/Configures <%= cookbook_name %>'
|
|
7
|
+
version '0.1.0'
|
|
8
|
+
chef_version '>= 13.0'
|
|
9
|
+
|
|
10
|
+
# The `issues_url` points to the location where issues for this cookbook are
|
|
11
|
+
# tracked. A `View Issues` link will be displayed on this cookbook's page when
|
|
12
|
+
# uploaded to a Supermarket.
|
|
13
|
+
#
|
|
14
|
+
# issues_url 'https://github.com/<insert_org_here>/<%= cookbook_name %>/issues'
|
|
15
|
+
|
|
16
|
+
# The `source_url` points to the development repository for this cookbook. A
|
|
17
|
+
# `View Source` link will be displayed on this cookbook's page when uploaded to
|
|
18
|
+
# a Supermarket.
|
|
19
|
+
#
|
|
20
|
+
# source_url 'https://github.com/<insert_org_here>/<%= cookbook_name %>'
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Policyfile.rb - Describe how you want Chef to build your system.
|
|
2
|
+
#
|
|
3
|
+
# For more information on the Policyfile feature, visit
|
|
4
|
+
# https://docs.chef.io/policyfile.html
|
|
5
|
+
|
|
6
|
+
# A name that describes what the system you're building with Chef does.
|
|
7
|
+
name 'base'
|
|
8
|
+
|
|
9
|
+
# Where to find external cookbooks:
|
|
10
|
+
default_source :supermarket
|
|
11
|
+
|
|
12
|
+
# Refer to https://docs.chef.io/config_rb_policyfile.html
|
|
13
|
+
# For exhaustive options.
|
|
14
|
+
#
|
|
15
|
+
# Use an internal SuperMarket
|
|
16
|
+
# default_source :supermarket, 'https://supermarket.mydomain.com' do
|
|
17
|
+
# Chef::Config.ssl_verify_mode = :verify_none
|
|
18
|
+
# end
|
|
19
|
+
#
|
|
20
|
+
# Specify your chef repo as the preferred source for the Apache cookbook.
|
|
21
|
+
# default_source :chef_repo, '../' do |s|
|
|
22
|
+
# s.preferred_for 'ntp'
|
|
23
|
+
# end
|
|
24
|
+
|
|
25
|
+
# Your Run List
|
|
26
|
+
# run_list [
|
|
27
|
+
# "<%= cookbook_name %>::default"
|
|
28
|
+
# ]
|
|
29
|
+
|
|
30
|
+
run_list [ ]
|