sambot 0.1.182 → 0.1.183
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/lib/sambot/docs/build.txt +8 -13
- data/lib/sambot/docs/bump.txt +3 -1
- data/lib/sambot/docs/clean.txt +4 -0
- data/lib/sambot/docs/populate.txt +7 -0
- data/lib/sambot/docs/version.txt +3 -3
- data/lib/sambot/templates/.config.yml.erb +78 -11
- data/lib/sambot/templates/.gitignore.sample +2 -0
- data/lib/sambot/templates/.rubocop.yml +1 -1
- data/lib/sambot/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca69087e447dc0a85bdaae031310f343dcd3312d
|
4
|
+
data.tar.gz: 79762870407593affaa76306276a77c0c69c9534
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1d32393bcf6a9ee217cce5026e4dffd73591a43ef78aee4b4775049f69450a5aeca4bdb88421b971702210094fa886b756abbcf074faef92b4912f0edf1bd1b
|
7
|
+
data.tar.gz: 7807e06b48c2dbe195289b1918d87ba18edfd465677bf7a61404b18ce9ae430bb14701da83ca2d365ac5800e09512bea91dafff4ce41c074bdf894e9f896cfaa
|
data/lib/sambot/docs/build.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
#################################################################################
|
2
|
+
# <SAMBOT> BUILD COMMAND #
|
3
|
+
#################################################################################
|
4
|
+
|
1
5
|
This command will generate all the files required for the functioning of a Chef
|
2
6
|
cookbook from aconfiguration file. The motivation behind this setup is to
|
3
7
|
standardize and simplify the Chef cookbook creation workflow.
|
@@ -6,19 +10,10 @@ The configuration file should be called .config.yml and stored in the root of
|
|
6
10
|
the Chef cookbook. After the command is run, all the files required to author
|
7
11
|
a cookbook will be placed in the same directory as the .config.yml file.
|
8
12
|
|
9
|
-
The .config.yml has the following structure:
|
10
|
-
|
11
|
-
* name - the name of the cookbook
|
12
|
-
|
13
|
-
* version - the version of the cookbook
|
14
|
-
|
15
|
-
* platforms - the different platforms the cookbook can run on, centos and/or windows
|
16
|
-
|
17
|
-
* description - a description for the cookbook
|
18
|
-
|
19
|
-
* suites - the suites attribute that would go into the .kitchen.yml files and should follow exactly that structure
|
20
|
-
|
21
13
|
Furthermore, a pre-push Git hook will be generated which will check the cookbook
|
22
14
|
files before allowing the origin repository to be updated.
|
23
15
|
|
24
|
-
The build command will fail if the file is not present or isn't
|
16
|
+
The build command will fail if the .config.yml file is not present or isn't
|
17
|
+
properly formatted. To understand the structure of a .config.yml file,
|
18
|
+
simply create a new cookbook or take a look at the comments in the
|
19
|
+
template file templates/.config.yml.
|
data/lib/sambot/docs/bump.txt
CHANGED
data/lib/sambot/docs/clean.txt
CHANGED
@@ -1,2 +1,6 @@
|
|
1
|
+
#################################################################################
|
2
|
+
# <SAMBOT> CLEAN COMMAND #
|
3
|
+
#################################################################################
|
4
|
+
|
1
5
|
This command will remove all files generated by `sambot cookbook build`.
|
2
6
|
This is required to ensure the generated files are not stored in source control.
|
@@ -0,0 +1,7 @@
|
|
1
|
+
#################################################################################
|
2
|
+
# <SAMBOT> VERSION COMMAND #
|
3
|
+
#################################################################################
|
4
|
+
|
5
|
+
This command will output the version of the cookbook in the current directory.
|
6
|
+
|
7
|
+
It is mostly used for CI in order to give TeamCity builds their correct version number.
|
data/lib/sambot/docs/version.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
#################################################################################
|
2
|
+
# <SAMBOT> POPULATE COMMAND #
|
3
|
+
#################################################################################
|
@@ -1,23 +1,50 @@
|
|
1
|
-
|
2
|
-
#
|
1
|
+
#################################################################################
|
2
|
+
# COOKBOOK CONFIGURATION #
|
3
|
+
#################################################################################
|
4
|
+
---
|
5
|
+
#################################################################################
|
6
|
+
# The name of the role or wrapper cookbook. Should be of the form #
|
7
|
+
# as-role-name if a role cookbook and as-name if a wrapper cookbook. #
|
8
|
+
#################################################################################
|
3
9
|
name: <%= @config.name %>
|
4
|
-
|
5
|
-
#
|
10
|
+
#################################################################################
|
11
|
+
# The cookbook version. It will be added to the metadata.rb and needs to be #
|
12
|
+
# incremented whenever a new cookbook version needs to be pushed to the Chef #
|
13
|
+
# Server. #
|
14
|
+
#################################################################################
|
6
15
|
version: 0.0.1
|
7
|
-
|
8
|
-
#
|
16
|
+
#################################################################################
|
17
|
+
# The different platforms on which this cookbook can run. This dictates the #
|
18
|
+
# contents of the .kitchen files and which files are generated for the #
|
19
|
+
# cookbook. The values can be 'centos', 'windows' or both. #
|
20
|
+
#################################################################################
|
9
21
|
platforms:
|
10
22
|
<% @config.available_platforms.each do |platform| %>
|
11
23
|
- <%= platform %>
|
12
24
|
<% end %>
|
13
|
-
|
25
|
+
#################################################################################
|
26
|
+
# An array of gems to be added to the metadata.rb file. #
|
27
|
+
#################################################################################
|
14
28
|
gems:
|
15
|
-
|
16
|
-
# identifier
|
29
|
+
#################################################################################
|
30
|
+
# The identifier used when generating instance names. Not yet implemented but #
|
31
|
+
# in future, if the identifier is OCTPS for example, a typical instance name #
|
32
|
+
# would be OCTPS03-W8. #
|
33
|
+
#################################################################################
|
17
34
|
identifier: <%= @config.identifier %>
|
18
|
-
|
35
|
+
#################################################################################
|
36
|
+
# The cookbooks on which this cookbook depends. #
|
37
|
+
#################################################################################
|
38
|
+
dependencies:
|
39
|
+
#################################################################################
|
40
|
+
# The description for the cookbook that will go into the metadata.rb. #
|
41
|
+
#################################################################################
|
19
42
|
description: <%= @config.description %>
|
20
|
-
|
43
|
+
#################################################################################
|
44
|
+
# TEST-KITCHEN SUITES #
|
45
|
+
# The content underneath will be added as-is to the Test-Kitchen configuration #
|
46
|
+
# file i.e. .kitchen.yml. #
|
47
|
+
#################################################################################
|
21
48
|
suites:
|
22
49
|
- name: default
|
23
50
|
# The runlist for a specific suite can either be the same across all environments i.e. cloud or local or can
|
@@ -42,3 +69,43 @@ suites:
|
|
42
69
|
inspec_tests:
|
43
70
|
- name: <%= @config.name %>-profile
|
44
71
|
git: git@github.exacttarget.com:ads-chef-profiles/<%= @name %>-profile.git
|
72
|
+
#################################################################################
|
73
|
+
# LOCAL TESTING CONFIGURATION #
|
74
|
+
#################################################################################
|
75
|
+
local_testing:
|
76
|
+
###############################################################################
|
77
|
+
# Provides a list of recipes which will be run before the normal run-list #
|
78
|
+
# when testing locally. These recipes are not run when testing in the DEV #
|
79
|
+
# environment or when deploying a real instance so should only be used for #
|
80
|
+
# setting things up locally.
|
81
|
+
###############################################################################
|
82
|
+
recipes:
|
83
|
+
###############################################################################
|
84
|
+
# Provides a a set of attributes which will be applied when running Chef #
|
85
|
+
# locally. The following attributes are automatically added to the Chef run #
|
86
|
+
# when using Test-Kitchen file: #
|
87
|
+
# node['default']['cloud_platform'] = '$PLATFORM' #
|
88
|
+
# where $PLATFORM is either LOCAL, GCP or RACKSPACE, depending on the #
|
89
|
+
# environment where Test-Kitchen is running. #
|
90
|
+
###############################################################################
|
91
|
+
attributes:
|
92
|
+
# some:
|
93
|
+
# attribute: value
|
94
|
+
###############################################################################
|
95
|
+
# Provides secrets to be stored in the Docker Vault instance. Make sure the #
|
96
|
+
# paths you set below are congruent with any attribute overrides you've set #
|
97
|
+
# above. These secrets can be added to the Docker Vault instance by running #
|
98
|
+
# `sambot populate`. #
|
99
|
+
# To read a file and store it in Vault i.e. a SSH key, prefix the value #
|
100
|
+
# with 'file::' and place the file in the 'local_testing' folder of the #
|
101
|
+
# cookbook. #
|
102
|
+
###############################################################################
|
103
|
+
secrets:
|
104
|
+
# - description: A random secret example
|
105
|
+
# path: dev/nightswatch/my/secret
|
106
|
+
# keys:
|
107
|
+
# - value: my-data
|
108
|
+
# - description: Another random secret example
|
109
|
+
# path: dev/nightswatch/my/file_secret
|
110
|
+
# keys:
|
111
|
+
# - value: file::privatekey.pem
|
data/lib/sambot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sambot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.183
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olivier Kouame
|
@@ -400,6 +400,7 @@ files:
|
|
400
400
|
- lib/sambot/docs/bump.txt
|
401
401
|
- lib/sambot/docs/clean.txt
|
402
402
|
- lib/sambot/docs/create.txt
|
403
|
+
- lib/sambot/docs/populate.txt
|
403
404
|
- lib/sambot/docs/version.txt
|
404
405
|
- lib/sambot/fs.rb
|
405
406
|
- lib/sambot/runtime.rb
|