├── .codeclimate.yml
├── .github
├── PULL_REQUEST_TEMPLATE.md
└── workflows
│ └── create-gh-release.yml
├── .gitignore
├── .kitchen.appveyor.yml
├── .kitchen.yml
├── .rubocop.yml
├── .ruby-version
├── .travis.yml
├── Berksfile
├── CHANGELOG.md
├── CONTRIBUTING.md
├── Gemfile
├── Gemfile.lock
├── LICENSE
├── README.md
├── Rakefile
├── TESTING.md
├── appveyor.yml
├── chefignore
├── libraries
├── server.rb
├── server_scripts.rb
├── shared.rb
├── template_scripts.rb
└── tentacle.rb
├── metadata.rb
├── resources
├── server.rb
├── tentacle.rb
└── tools.rb
├── spec
├── spec_helper.rb
└── unit
│ ├── lib_server_scripts_spec.rb
│ ├── lib_server_spec.rb
│ ├── lib_shared_spec.rb
│ ├── lib_template_scripts_spec.rb
│ └── lib_tentacle_spec.rb
├── tasks
└── changelog.rake
└── test
├── cookbooks
└── octopus-deploy-test
│ ├── attributes
│ └── default.rb
│ ├── files
│ └── default
│ │ └── cert.txt
│ ├── metadata.rb
│ └── recipes
│ ├── server.rb
│ ├── tentacle.rb
│ └── tools.rb
└── integration
├── server
└── server_spec.rb
├── tentacle
└── tentacle_spec.rb
└── tools
└── tools_spec.rb
/.codeclimate.yml:
--------------------------------------------------------------------------------
1 | ---
2 | engines:
3 | bundler-audit:
4 | enabled: true
5 | duplication:
6 | enabled: true
7 | config:
8 | languages:
9 | - ruby
10 | fixme:
11 | enabled: true
12 | rubocop:
13 | enabled: true
14 | foodcritic:
15 | enabled: true
16 | ratings:
17 | paths:
18 | - Gemfile.lock
19 | - "**.rb"
20 | exclude_paths:
21 | - test/
22 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ### Description
2 |
3 | [Describe what this change achieves along with any notes about the change that are relevant]
4 |
5 | ### Issues Resolved
6 |
7 | [List any existing issues this PR resolves]
8 |
9 | ### Contribution Check List
10 | - [ ] All tests pass.
11 | - [ ] New functionality includes testing.
12 | - [ ] New functionality has been documented in the README.
13 |
--------------------------------------------------------------------------------
/.github/workflows/create-gh-release.yml:
--------------------------------------------------------------------------------
1 | on:
2 | push:
3 | # Sequence of patterns matched against refs/tags
4 | tags:
5 | - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6 |
7 | name: Create Release
8 |
9 | jobs:
10 | build:
11 | name: Create Release
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Checkout code
15 | uses: actions/checkout@v2
16 | - name: Create Release
17 | id: create_release
18 | uses: actions/create-release@v1
19 | env:
20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
21 | with:
22 | tag_name: ${{ github.ref }}
23 | release_name: Release ${{ github.ref }}
24 | body_path: CHANGELOG.md
25 | draft: false
26 | prerelease: false
27 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vagrant
2 | /cookbooks
3 |
4 | # Bundler
5 | bin/*
6 | .bundle/*
7 |
8 | # Chef Files
9 | Berksfile.lock
10 | .kitchen/
11 | .kitchen.local.yml
12 | vendor/
13 | .rubocop-http*
14 | coverage/
15 |
16 | .idea
17 |
--------------------------------------------------------------------------------
/.kitchen.appveyor.yml:
--------------------------------------------------------------------------------
1 | ---
2 | driver:
3 | name: proxy
4 | host: localhost
5 | reset_command: "exit 0"
6 | port: 5985
7 | username: <%= ENV["machine_user"] %>
8 | password: <%= ENV["machine_pass"] %>
9 |
10 | provisioner:
11 | name: chef_zero
12 | require_chef_omnibus: latest
13 | log_level: info
14 | chef_license: accept
15 |
16 | verifier:
17 | name: inspec
18 | format: documentation
19 |
20 | platforms:
21 | - name: windows
22 |
23 | suites:
24 | - name: appveyor
25 | run_list:
26 | - recipe[octopus-deploy-test::server]
27 | - recipe[octopus-deploy-test::tentacle]
28 | - recipe[octopus-deploy-test::tools]
29 | attributes:
30 | octopus-deploy-test:
31 | server:
32 | create-database: true
33 | start-service: true
34 |
--------------------------------------------------------------------------------
/.kitchen.yml:
--------------------------------------------------------------------------------
1 | ---
2 | driver:
3 | name: vagrant
4 |
5 | provisioner:
6 | name: chef_zero
7 | require_chef_omnibus: latest
8 | log_level: info
9 |
10 | verifier:
11 | name: inspec
12 | format: documentation
13 |
14 | platforms:
15 | - name: windows-2008R2-cvent
16 |
17 | suites:
18 | - name: server
19 | run_list:
20 | - recipe[octopus-deploy-test::server]
21 | attributes:
22 | octopus-deploy-test:
23 | server:
24 | create-database: false
25 | start-service: false
26 | - name: tentacle
27 | run_list:
28 | - recipe[octopus-deploy-test::tentacle]
29 | - name: tools
30 | run_list:
31 | - recipe[octopus-deploy-test::tools]
32 |
--------------------------------------------------------------------------------
/.rubocop.yml:
--------------------------------------------------------------------------------
1 | ---
2 | AllCops:
3 | Exclude:
4 | - Gemfile
5 | - Rakefile
6 | - 'vendor/**/*'
7 | Metrics/LineLength:
8 | Max: 160
9 | ChefModernize/WindowsZipfileUsage:
10 | Enabled: false
11 |
--------------------------------------------------------------------------------
/.ruby-version:
--------------------------------------------------------------------------------
1 | 2.6.4
2 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | branches:
3 | only:
4 | - master
5 | cache: bundler
6 | language: ruby
7 | before_install:
8 | - gem install bundler -v '1.17.3'
9 | script:
10 | - bundle exec rake travis
11 |
--------------------------------------------------------------------------------
/Berksfile:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | source 'https://supermarket.chef.io/'
3 |
4 | metadata
5 |
6 | group :test do
7 | cookbook 'windows', '~> 3.0.5'
8 | cookbook 'octopus-deploy-test', path: './test/cookbooks/octopus-deploy-test'
9 | end
10 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## [v0.13.3](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.13.3) (2020-08-27)
4 |
5 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.13.2...v0.13.3)
6 |
7 | **Implemented enhancements:**
8 |
9 | - Support the force registration of tentacles [\#153](https://github.com/cvent/octopus-deploy-cookbook/pull/153) ([JamieH89](https://github.com/JamieH89))
10 |
11 | **Fixed bugs:**
12 |
13 | - Fix tentacle registration for newer tentacles by generating cert after instance creation [\#173](https://github.com/cvent/octopus-deploy-cookbook/pull/173) ([NamanKumarCvent](https://github.com/NamanKumarCvent))
14 |
15 | ## [v0.13.2](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.13.2) (2019-04-09)
16 |
17 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.13.1...v0.13.2)
18 |
19 | **Implemented enhancements:**
20 |
21 | - Disable tentacle proxy [\#140](https://github.com/cvent/octopus-deploy-cookbook/pull/140) ([gdavison](https://github.com/gdavison))
22 | - Move the server scripts into a library generated by ERB [\#126](https://github.com/cvent/octopus-deploy-cookbook/pull/126) ([brentm5](https://github.com/brentm5))
23 |
24 | **Fixed bugs:**
25 |
26 | - Escape spaces in certificate file [\#142](https://github.com/cvent/octopus-deploy-cookbook/pull/142) ([FireEater64](https://github.com/FireEater64))
27 |
28 | **Merged pull requests:**
29 |
30 | - Add contributing documentation for supermarket [\#138](https://github.com/cvent/octopus-deploy-cookbook/pull/138) ([brentm5](https://github.com/brentm5))
31 | - Add testing documentation for supermarket [\#137](https://github.com/cvent/octopus-deploy-cookbook/pull/137) ([brentm5](https://github.com/brentm5))
32 |
33 | ## [v0.13.1](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.13.1) (2018-03-06)
34 |
35 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.13.0...v0.13.1)
36 |
37 | **Fixed bugs:**
38 |
39 | - Fix an issue with registering tentacles with tenated\_deployment\_participation not specified [\#136](https://github.com/cvent/octopus-deploy-cookbook/pull/136) ([brentm5](https://github.com/brentm5))
40 |
41 | **Merged pull requests:**
42 |
43 | - Correct readme database instructions [\#133](https://github.com/cvent/octopus-deploy-cookbook/pull/133) ([spuder](https://github.com/spuder))
44 |
45 | ## [v0.13.0](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.13.0) (2018-03-05)
46 |
47 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.12.0...v0.13.0)
48 |
49 | **Implemented enhancements:**
50 |
51 | - Allow tentacle to run as untenanted [\#130](https://github.com/cvent/octopus-deploy-cookbook/pull/130) ([spuder](https://github.com/spuder))
52 | - Make cookbook works for chef 13+ [\#125](https://github.com/cvent/octopus-deploy-cookbook/pull/125) ([brentm5](https://github.com/brentm5))
53 | - Bump chef\_version in metadata to 12.6.0 [\#116](https://github.com/cvent/octopus-deploy-cookbook/pull/116) ([spuder](https://github.com/spuder))
54 | - Adds chef\_version requirement to metadata.rb [\#106](https://github.com/cvent/octopus-deploy-cookbook/pull/106) ([spuder](https://github.com/spuder))
55 |
56 | **Fixed bugs:**
57 |
58 | - Adds default node name for server resource [\#108](https://github.com/cvent/octopus-deploy-cookbook/pull/108) ([spuder](https://github.com/spuder))
59 | - Validate connection\_string in configure service resource [\#103](https://github.com/cvent/octopus-deploy-cookbook/pull/103) ([spuder](https://github.com/spuder))
60 |
61 | ## [v0.12.0](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.12.0) (2017-05-25)
62 |
63 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.11.0...v0.12.0)
64 |
65 | **Implemented enhancements:**
66 |
67 | - Update the server resource to use the new style in resources [\#96](https://github.com/cvent/octopus-deploy-cookbook/pull/96) ([brentm5](https://github.com/brentm5))
68 | - Update tentacle resource to work with new resource declarations [\#94](https://github.com/cvent/octopus-deploy-cookbook/pull/94) ([brentm5](https://github.com/brentm5))
69 | - Update tools resource to work with new resource declarations [\#93](https://github.com/cvent/octopus-deploy-cookbook/pull/93) ([brentm5](https://github.com/brentm5))
70 |
71 | ## [v0.11.0](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.11.0) (2017-05-08)
72 |
73 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.10.1...v0.11.0)
74 |
75 | **Implemented enhancements:**
76 |
77 | - Use sensitive attribute for server resource instead of debug [\#89](https://github.com/cvent/octopus-deploy-cookbook/pull/89) ([brentm5](https://github.com/brentm5))
78 |
79 | **Fixed bugs:**
80 |
81 | - Removes the Server resources delayed restart [\#83](https://github.com/cvent/octopus-deploy-cookbook/pull/83) ([brentm5](https://github.com/brentm5))
82 |
83 | ## [v0.10.1](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.10.1) (2017-04-13)
84 |
85 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.10.0...v0.10.1)
86 |
87 | **Implemented enhancements:**
88 |
89 | - This adds a debug parameter to the server resource [\#81](https://github.com/cvent/octopus-deploy-cookbook/pull/81) ([brentm5](https://github.com/brentm5))
90 |
91 | ## [v0.10.0](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.10.0) (2017-01-05)
92 |
93 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.9.0...v0.10.0)
94 |
95 | **Implemented enhancements:**
96 |
97 | - Add tools resource to allow installing of octopus deploy tools [\#77](https://github.com/cvent/octopus-deploy-cookbook/pull/77) ([brentm5](https://github.com/brentm5))
98 |
99 | ## [v0.9.0](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.9.0) (2016-11-10)
100 |
101 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.8.0...v0.9.0)
102 |
103 | **Implemented enhancements:**
104 |
105 | - Add attribute to allow public hostname to be specified on tentacle register [\#74](https://github.com/cvent/octopus-deploy-cookbook/pull/74) ([Draftkings](https://github.com/Draftkings))
106 | - Update README with correct capitalization of Tentacle [\#73](https://github.com/cvent/octopus-deploy-cookbook/pull/73) ([vanessalove](https://github.com/vanessalove))
107 |
108 | ## [v0.8.0](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.8.0) (2016-11-01)
109 |
110 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.7.0...v0.8.0)
111 |
112 | **Implemented enhancements:**
113 |
114 | - Add ability to run tentacle as a specific AD user [\#71](https://github.com/cvent/octopus-deploy-cookbook/pull/71) ([gdavison](https://github.com/gdavison))
115 | - Add attribute to allow tentacle name to be changed on register [\#70](https://github.com/cvent/octopus-deploy-cookbook/pull/70) ([gdavison](https://github.com/gdavison))
116 |
117 | ## [v0.7.0](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.7.0) (2016-10-04)
118 |
119 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.6.5...v0.7.0)
120 |
121 | **Implemented enhancements:**
122 |
123 | - Loosen up dependency version locking [\#68](https://github.com/cvent/octopus-deploy-cookbook/pull/68) ([blairham](https://github.com/blairham))
124 | - Updates readme to clarify tenant tag grouping [\#67](https://github.com/cvent/octopus-deploy-cookbook/pull/67) ([spuder](https://github.com/spuder))
125 |
126 | ## [v0.6.5](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.6.5) (2016-09-21)
127 |
128 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.6.4...v0.6.5)
129 |
130 | **Implemented enhancements:**
131 |
132 | - Allow multiple environments when registering tentacles [\#65](https://github.com/cvent/octopus-deploy-cookbook/pull/65) ([gdavison](https://github.com/gdavison))
133 |
134 | ## [v0.6.4](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.6.4) (2016-09-07)
135 |
136 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.6.3...v0.6.4)
137 |
138 | **Implemented enhancements:**
139 |
140 | - Adds tenant and tentanttag support [\#61](https://github.com/cvent/octopus-deploy-cookbook/pull/61) ([spuder](https://github.com/spuder))
141 |
142 | **Fixed bugs:**
143 |
144 | - Fix option\_list methods handling of nils [\#60](https://github.com/cvent/octopus-deploy-cookbook/pull/60) ([spuder](https://github.com/spuder))
145 |
146 | ## [v0.6.3](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.6.3) (2016-08-18)
147 |
148 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.6.2...v0.6.3)
149 |
150 | **Fixed bugs:**
151 |
152 | - Fix issue in notifying tentacle service restart on tentacle register [\#57](https://github.com/cvent/octopus-deploy-cookbook/pull/57) ([spuder](https://github.com/spuder))
153 | - Restarts tentacle service when registering [\#56](https://github.com/cvent/octopus-deploy-cookbook/pull/56) ([spuder](https://github.com/spuder))
154 |
155 | ## [v0.6.2](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.6.2) (2016-08-16)
156 |
157 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.6.1...v0.6.2)
158 |
159 | **Fixed bugs:**
160 |
161 | - Change tentacle install parameters to be more quiet [\#52](https://github.com/cvent/octopus-deploy-cookbook/pull/52) ([brentm5](https://github.com/brentm5))
162 |
163 | ## [v0.6.1](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.6.1) (2016-08-15)
164 |
165 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.6.0...v0.6.1)
166 |
167 | **Implemented enhancements:**
168 |
169 | - Add unit test to validate library assumptions [\#49](https://github.com/cvent/octopus-deploy-cookbook/pull/49) ([brentm5](https://github.com/brentm5))
170 | - Refactor registering tentacle resource [\#47](https://github.com/cvent/octopus-deploy-cookbook/pull/47) ([brentm5](https://github.com/brentm5))
171 |
172 | ## [v0.6.0](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.6.0) (2016-08-08)
173 |
174 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.5.1...v0.6.0)
175 |
176 | **Implemented enhancements:**
177 |
178 | - Set tentacle register environment default to be the chef environment [\#45](https://github.com/cvent/octopus-deploy-cookbook/pull/45) ([spuder](https://github.com/spuder))
179 | - Add ability for the tentacle resource to setup firewall rule for listening tentacles [\#43](https://github.com/cvent/octopus-deploy-cookbook/pull/43) ([spuder](https://github.com/spuder))
180 | - Add changelog generator and first changelog file [\#39](https://github.com/cvent/octopus-deploy-cookbook/pull/39) ([brentm5](https://github.com/brentm5))
181 | - Add ability to register tentacle with server through tentacle resource [\#33](https://github.com/cvent/octopus-deploy-cookbook/pull/33) ([spuder](https://github.com/spuder))
182 | - Include optional master key attribute for configuring a server instance [\#25](https://github.com/cvent/octopus-deploy-cookbook/pull/25) ([brentm5](https://github.com/brentm5))
183 |
184 | ## [v0.5.1](https://github.com/cvent/octopus-deploy-cookbook/tree/v0.5.1) (2016-04-04)
185 |
186 | [Full Changelog](https://github.com/cvent/octopus-deploy-cookbook/compare/v0.5.0...v0.5.1)
187 |
188 | **Fixed bugs:**
189 |
190 | - Fix issue with notifying service to restart when its disabled! [\#22](https://github.com/cvent/octopus-deploy-cookbook/pull/22) ([brentm5](https://github.com/brentm5))
191 |
192 |
193 |
194 | \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
195 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contributing
2 | ============
3 | 1. Fork it
4 | 2. Create your feature branch (`git checkout -b my-new-feature`)
5 | 3. Commit your changes (`git commit -am 'Add some feature'`)
6 | 4. [**Add tests!**](TESTING.md)
7 | 5. Push to the branch (`git push origin my-new-feature`)
8 | 6. Create new Pull Request
9 |
10 | Contributions will only be accepted if they are fully tested as specified in [TESTING.md](TESTING.md)
11 |
12 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | group :development do
4 | gem 'stove'
5 | gem 'chef'
6 | gem 'github_changelog_generator'
7 | gem 'rake', '< 13'
8 | gem 'cookstyle'
9 | gem 'kitchen-vagrant'
10 | gem 'kitchen-inspec'
11 | gem 'rspec'
12 | gem 'berkshelf'
13 | gem 'codecov'
14 | gem 'webmock'
15 | gem 'nokogiri'
16 | end
17 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | activesupport (6.0.3.2)
5 | concurrent-ruby (~> 1.0, >= 1.0.2)
6 | i18n (>= 0.7, < 2)
7 | minitest (~> 5.1)
8 | tzinfo (~> 1.1)
9 | zeitwerk (~> 2.2, >= 2.2.2)
10 | addressable (2.7.0)
11 | public_suffix (>= 2.0.2, < 5.0)
12 | ast (2.4.1)
13 | aws-eventstream (1.1.0)
14 | aws-partitions (1.360.0)
15 | aws-sdk-apigateway (1.51.0)
16 | aws-sdk-core (~> 3, >= 3.99.0)
17 | aws-sigv4 (~> 1.1)
18 | aws-sdk-apigatewayv2 (1.25.0)
19 | aws-sdk-core (~> 3, >= 3.99.0)
20 | aws-sigv4 (~> 1.1)
21 | aws-sdk-athena (1.31.0)
22 | aws-sdk-core (~> 3, >= 3.99.0)
23 | aws-sigv4 (~> 1.1)
24 | aws-sdk-autoscaling (1.22.0)
25 | aws-sdk-core (~> 3, >= 3.52.1)
26 | aws-sigv4 (~> 1.1)
27 | aws-sdk-budgets (1.33.0)
28 | aws-sdk-core (~> 3, >= 3.99.0)
29 | aws-sigv4 (~> 1.1)
30 | aws-sdk-cloudformation (1.42.0)
31 | aws-sdk-core (~> 3, >= 3.99.0)
32 | aws-sigv4 (~> 1.1)
33 | aws-sdk-cloudfront (1.37.0)
34 | aws-sdk-core (~> 3, >= 3.99.0)
35 | aws-sigv4 (~> 1.1)
36 | aws-sdk-cloudhsm (1.25.0)
37 | aws-sdk-core (~> 3, >= 3.99.0)
38 | aws-sigv4 (~> 1.1)
39 | aws-sdk-cloudhsmv2 (1.28.0)
40 | aws-sdk-core (~> 3, >= 3.99.0)
41 | aws-sigv4 (~> 1.1)
42 | aws-sdk-cloudtrail (1.27.0)
43 | aws-sdk-core (~> 3, >= 3.99.0)
44 | aws-sigv4 (~> 1.1)
45 | aws-sdk-cloudwatch (1.43.0)
46 | aws-sdk-core (~> 3, >= 3.99.0)
47 | aws-sigv4 (~> 1.1)
48 | aws-sdk-cloudwatchlogs (1.36.0)
49 | aws-sdk-core (~> 3, >= 3.99.0)
50 | aws-sigv4 (~> 1.1)
51 | aws-sdk-codecommit (1.38.0)
52 | aws-sdk-core (~> 3, >= 3.99.0)
53 | aws-sigv4 (~> 1.1)
54 | aws-sdk-codedeploy (1.35.0)
55 | aws-sdk-core (~> 3, >= 3.99.0)
56 | aws-sigv4 (~> 1.1)
57 | aws-sdk-codepipeline (1.35.0)
58 | aws-sdk-core (~> 3, >= 3.99.0)
59 | aws-sigv4 (~> 1.1)
60 | aws-sdk-configservice (1.50.0)
61 | aws-sdk-core (~> 3, >= 3.99.0)
62 | aws-sigv4 (~> 1.1)
63 | aws-sdk-core (3.105.0)
64 | aws-eventstream (~> 1, >= 1.0.2)
65 | aws-partitions (~> 1, >= 1.239.0)
66 | aws-sigv4 (~> 1.1)
67 | jmespath (~> 1.0)
68 | aws-sdk-costandusagereportservice (1.25.0)
69 | aws-sdk-core (~> 3, >= 3.99.0)
70 | aws-sigv4 (~> 1.1)
71 | aws-sdk-dynamodb (1.52.0)
72 | aws-sdk-core (~> 3, >= 3.99.0)
73 | aws-sigv4 (~> 1.1)
74 | aws-sdk-ec2 (1.190.0)
75 | aws-sdk-core (~> 3, >= 3.99.0)
76 | aws-sigv4 (~> 1.1)
77 | aws-sdk-ecr (1.37.0)
78 | aws-sdk-core (~> 3, >= 3.99.0)
79 | aws-sigv4 (~> 1.1)
80 | aws-sdk-ecs (1.68.0)
81 | aws-sdk-core (~> 3, >= 3.99.0)
82 | aws-sigv4 (~> 1.1)
83 | aws-sdk-efs (1.34.0)
84 | aws-sdk-core (~> 3, >= 3.99.0)
85 | aws-sigv4 (~> 1.1)
86 | aws-sdk-eks (1.41.0)
87 | aws-sdk-core (~> 3, >= 3.99.0)
88 | aws-sigv4 (~> 1.1)
89 | aws-sdk-elasticache (1.41.0)
90 | aws-sdk-core (~> 3, >= 3.99.0)
91 | aws-sigv4 (~> 1.1)
92 | aws-sdk-elasticbeanstalk (1.36.0)
93 | aws-sdk-core (~> 3, >= 3.99.0)
94 | aws-sigv4 (~> 1.1)
95 | aws-sdk-elasticloadbalancing (1.27.0)
96 | aws-sdk-core (~> 3, >= 3.99.0)
97 | aws-sigv4 (~> 1.1)
98 | aws-sdk-elasticloadbalancingv2 (1.49.0)
99 | aws-sdk-core (~> 3, >= 3.99.0)
100 | aws-sigv4 (~> 1.1)
101 | aws-sdk-elasticsearchservice (1.40.0)
102 | aws-sdk-core (~> 3, >= 3.99.0)
103 | aws-sigv4 (~> 1.1)
104 | aws-sdk-firehose (1.33.0)
105 | aws-sdk-core (~> 3, >= 3.99.0)
106 | aws-sigv4 (~> 1.1)
107 | aws-sdk-iam (1.44.0)
108 | aws-sdk-core (~> 3, >= 3.99.0)
109 | aws-sigv4 (~> 1.1)
110 | aws-sdk-kafka (1.26.0)
111 | aws-sdk-core (~> 3, >= 3.99.0)
112 | aws-sigv4 (~> 1.1)
113 | aws-sdk-kinesis (1.28.0)
114 | aws-sdk-core (~> 3, >= 3.99.0)
115 | aws-sigv4 (~> 1.1)
116 | aws-sdk-kms (1.37.0)
117 | aws-sdk-core (~> 3, >= 3.99.0)
118 | aws-sigv4 (~> 1.1)
119 | aws-sdk-lambda (1.49.0)
120 | aws-sdk-core (~> 3, >= 3.99.0)
121 | aws-sigv4 (~> 1.1)
122 | aws-sdk-organizations (1.17.0)
123 | aws-sdk-core (~> 3, >= 3.39.0)
124 | aws-sigv4 (~> 1.0)
125 | aws-sdk-rds (1.97.0)
126 | aws-sdk-core (~> 3, >= 3.99.0)
127 | aws-sigv4 (~> 1.1)
128 | aws-sdk-redshift (1.47.0)
129 | aws-sdk-core (~> 3, >= 3.99.0)
130 | aws-sigv4 (~> 1.1)
131 | aws-sdk-route53 (1.41.0)
132 | aws-sdk-core (~> 3, >= 3.99.0)
133 | aws-sigv4 (~> 1.1)
134 | aws-sdk-route53domains (1.26.0)
135 | aws-sdk-core (~> 3, >= 3.99.0)
136 | aws-sigv4 (~> 1.1)
137 | aws-sdk-route53resolver (1.19.0)
138 | aws-sdk-core (~> 3, >= 3.99.0)
139 | aws-sigv4 (~> 1.1)
140 | aws-sdk-s3 (1.79.1)
141 | aws-sdk-core (~> 3, >= 3.104.3)
142 | aws-sdk-kms (~> 1)
143 | aws-sigv4 (~> 1.1)
144 | aws-sdk-securityhub (1.32.0)
145 | aws-sdk-core (~> 3, >= 3.99.0)
146 | aws-sigv4 (~> 1.1)
147 | aws-sdk-ses (1.34.0)
148 | aws-sdk-core (~> 3, >= 3.99.0)
149 | aws-sigv4 (~> 1.1)
150 | aws-sdk-sms (1.25.0)
151 | aws-sdk-core (~> 3, >= 3.99.0)
152 | aws-sigv4 (~> 1.1)
153 | aws-sdk-sns (1.30.0)
154 | aws-sdk-core (~> 3, >= 3.99.0)
155 | aws-sigv4 (~> 1.1)
156 | aws-sdk-sqs (1.31.0)
157 | aws-sdk-core (~> 3, >= 3.99.0)
158 | aws-sigv4 (~> 1.1)
159 | aws-sdk-ssm (1.88.0)
160 | aws-sdk-core (~> 3, >= 3.99.0)
161 | aws-sigv4 (~> 1.1)
162 | aws-sigv4 (1.2.2)
163 | aws-eventstream (~> 1, >= 1.0.2)
164 | azure_graph_rbac (0.17.2)
165 | ms_rest_azure (~> 0.12.0)
166 | azure_mgmt_key_vault (0.17.6)
167 | ms_rest_azure (~> 0.12.0)
168 | azure_mgmt_resources (0.18.0)
169 | ms_rest_azure (~> 0.12.0)
170 | bcrypt_pbkdf (1.1.0.rc1)
171 | berkshelf (7.1.0)
172 | chef (>= 15.7.32)
173 | chef-config
174 | cleanroom (~> 1.0)
175 | concurrent-ruby (~> 1.0)
176 | minitar (>= 0.6)
177 | mixlib-archive (>= 0.4, < 2.0)
178 | mixlib-config (>= 2.2.5)
179 | mixlib-shellout (>= 2.0, < 4.0)
180 | octokit (~> 4.0)
181 | retryable (>= 2.0, < 4.0)
182 | solve (~> 4.0)
183 | thor (>= 0.20)
184 | builder (3.2.4)
185 | chef (16.4.41)
186 | addressable
187 | bcrypt_pbkdf (= 1.1.0.rc1)
188 | bundler (>= 1.10)
189 | chef-config (= 16.4.41)
190 | chef-utils (= 16.4.41)
191 | chef-vault
192 | chef-zero (>= 14.0.11)
193 | diff-lcs (>= 1.2.4, < 1.4.0)
194 | ed25519 (~> 1.2)
195 | erubis (~> 2.7)
196 | ffi (>= 1.9.25)
197 | ffi-libarchive (~> 1.0, >= 1.0.3)
198 | ffi-yajl (~> 2.2)
199 | highline (>= 1.6.9, < 3)
200 | iniparse (~> 1.4)
201 | license-acceptance (~> 1.0, >= 1.0.5)
202 | mixlib-archive (>= 0.4, < 2.0)
203 | mixlib-authentication (>= 2.1, < 4)
204 | mixlib-cli (>= 2.1.1, < 3.0)
205 | mixlib-log (>= 2.0.3, < 4.0)
206 | mixlib-shellout (>= 3.1.1, < 4.0)
207 | net-sftp (>= 2.1.2, < 4.0)
208 | net-ssh (>= 4.2, < 7)
209 | net-ssh-multi (~> 1.2, >= 1.2.1)
210 | ohai (~> 16.0)
211 | pastel
212 | plist (~> 3.2)
213 | proxifier (~> 1.0)
214 | syslog-logger (~> 1.6)
215 | train-core (~> 3.2, >= 3.2.28)
216 | train-winrm (>= 0.2.5)
217 | tty-prompt (~> 0.21)
218 | tty-screen (~> 0.6)
219 | uuidtools (~> 2.1.5)
220 | chef-api (0.10.10)
221 | mime-types
222 | mixlib-log (>= 1, < 4)
223 | chef-config (16.4.41)
224 | addressable
225 | chef-utils (= 16.4.41)
226 | fuzzyurl
227 | mixlib-config (>= 2.2.12, < 4.0)
228 | mixlib-shellout (>= 2.0, < 4.0)
229 | tomlrb (~> 1.2)
230 | chef-telemetry (1.0.14)
231 | chef-config
232 | concurrent-ruby (~> 1.0)
233 | ffi-yajl (~> 2.2)
234 | chef-utils (16.4.41)
235 | chef-vault (4.0.11)
236 | chef-zero (15.0.2)
237 | ffi-yajl (~> 2.2)
238 | hashie (>= 2.0, < 5.0)
239 | mixlib-log (>= 2.0, < 4.0)
240 | rack (~> 2.0, >= 2.0.6)
241 | uuidtools (~> 2.1)
242 | cleanroom (1.0.0)
243 | codecov (0.2.8)
244 | json
245 | simplecov
246 | coderay (1.1.3)
247 | concurrent-ruby (1.1.7)
248 | cookstyle (6.15.9)
249 | rubocop (= 0.89.1)
250 | crack (0.4.3)
251 | safe_yaml (~> 1.0.0)
252 | declarative (0.0.20)
253 | declarative-option (0.1.0)
254 | diff-lcs (1.3)
255 | docile (1.3.2)
256 | docker-api (1.34.2)
257 | excon (>= 0.47.0)
258 | multi_json
259 | domain_name (0.5.20190701)
260 | unf (>= 0.0.5, < 1.0.0)
261 | ecma-re-validator (0.2.1)
262 | regexp_parser (~> 1.2)
263 | ed25519 (1.2.4)
264 | equatable (0.6.1)
265 | erubi (1.9.0)
266 | erubis (2.7.0)
267 | excon (0.76.0)
268 | faraday (0.17.3)
269 | multipart-post (>= 1.2, < 3)
270 | faraday-cookie_jar (0.0.6)
271 | faraday (>= 0.7.4)
272 | http-cookie (~> 1.0.0)
273 | faraday-http-cache (2.2.0)
274 | faraday (>= 0.8)
275 | faraday_middleware (0.12.2)
276 | faraday (>= 0.7.4, < 1.0)
277 | ffi (1.13.1)
278 | ffi-libarchive (1.0.4)
279 | ffi (~> 1.0)
280 | ffi-yajl (2.3.4)
281 | libyajl2 (~> 1.2)
282 | fuzzyurl (0.9.0)
283 | github_changelog_generator (1.15.2)
284 | activesupport
285 | faraday-http-cache
286 | multi_json
287 | octokit (~> 4.6)
288 | rainbow (>= 2.2.1)
289 | rake (>= 10.0)
290 | retriable (~> 3.0)
291 | google-api-client (0.23.9)
292 | addressable (~> 2.5, >= 2.5.1)
293 | googleauth (>= 0.5, < 0.7.0)
294 | httpclient (>= 2.8.1, < 3.0)
295 | mime-types (~> 3.0)
296 | representable (~> 3.0)
297 | retriable (>= 2.0, < 4.0)
298 | signet (~> 0.9)
299 | googleauth (0.6.7)
300 | faraday (~> 0.12)
301 | jwt (>= 1.4, < 3.0)
302 | memoist (~> 0.16)
303 | multi_json (~> 1.11)
304 | os (>= 0.9, < 2.0)
305 | signet (~> 0.7)
306 | gssapi (1.3.0)
307 | ffi (>= 1.0.1)
308 | gyoku (1.3.1)
309 | builder (>= 2.1.2)
310 | hana (1.3.6)
311 | hashdiff (1.0.1)
312 | hashie (3.6.0)
313 | highline (2.0.3)
314 | http-cookie (1.0.3)
315 | domain_name (~> 0.5)
316 | httpclient (2.8.3)
317 | i18n (1.8.5)
318 | concurrent-ruby (~> 1.0)
319 | inifile (3.0.0)
320 | iniparse (1.5.0)
321 | inspec (4.22.22)
322 | faraday_middleware (~> 0.12.2)
323 | inspec-core (= 4.22.22)
324 | train (~> 3.0)
325 | train-aws (~> 0.1)
326 | train-habitat (~> 0.1)
327 | train-winrm (~> 0.2)
328 | inspec-core (4.22.22)
329 | addressable (~> 2.4)
330 | chef-telemetry (~> 1.0)
331 | faraday (>= 0.9.0)
332 | hashie (~> 3.4)
333 | json_schemer (>= 0.2.1, < 0.2.12)
334 | license-acceptance (>= 0.2.13, < 2.0)
335 | method_source (>= 0.8, < 2.0)
336 | mixlib-log (~> 3.0)
337 | multipart-post (~> 2.0)
338 | parallel (~> 1.9)
339 | parslet (~> 1.5)
340 | pry (~> 0.13)
341 | rspec (~> 3.9)
342 | rspec-its (~> 1.2)
343 | rubyzip (~> 1.2, >= 1.2.2)
344 | semverse (~> 3.0)
345 | sslshake (~> 1.2)
346 | thor (>= 0.20, < 2.0)
347 | tomlrb (~> 1.2.0)
348 | train-core (~> 3.0)
349 | tty-prompt (~> 0.17)
350 | tty-table (~> 0.10)
351 | ipaddress (0.8.3)
352 | jmespath (1.4.0)
353 | json (2.3.1)
354 | json_schemer (0.2.11)
355 | ecma-re-validator (~> 0.2)
356 | hana (~> 1.3)
357 | regexp_parser (~> 1.5)
358 | uri_template (~> 0.7)
359 | jwt (2.2.2)
360 | kitchen-inspec (2.0.0)
361 | hashie (~> 3.4)
362 | inspec (>= 2.2.64, < 5.0)
363 | test-kitchen (>= 1.6, < 3)
364 | kitchen-vagrant (1.7.0)
365 | test-kitchen (>= 1.4, < 3)
366 | libyajl2 (1.2.0)
367 | license-acceptance (1.0.19)
368 | pastel (~> 0.7)
369 | tomlrb (~> 1.2)
370 | tty-box (~> 0.3)
371 | tty-prompt (~> 0.18)
372 | little-plugger (1.1.4)
373 | logging (2.3.0)
374 | little-plugger (~> 1.1)
375 | multi_json (~> 1.14)
376 | memoist (0.16.2)
377 | method_source (1.0.0)
378 | mime-types (3.3.1)
379 | mime-types-data (~> 3.2015)
380 | mime-types-data (3.2020.0512)
381 | mini_portile2 (2.4.0)
382 | minitar (0.9)
383 | minitest (5.14.1)
384 | mixlib-archive (1.0.7)
385 | mixlib-log
386 | mixlib-authentication (3.0.7)
387 | mixlib-cli (2.1.8)
388 | mixlib-config (3.0.9)
389 | tomlrb
390 | mixlib-install (3.12.3)
391 | mixlib-shellout
392 | mixlib-versioning
393 | thor
394 | mixlib-log (3.0.9)
395 | mixlib-shellout (3.1.4)
396 | chef-utils
397 | mixlib-versioning (1.2.12)
398 | molinillo (0.6.6)
399 | ms_rest (0.7.6)
400 | concurrent-ruby (~> 1.0)
401 | faraday (>= 0.9, < 2.0.0)
402 | timeliness (~> 0.3.10)
403 | ms_rest_azure (0.12.0)
404 | concurrent-ruby (~> 1.0)
405 | faraday (>= 0.9, < 2.0.0)
406 | faraday-cookie_jar (~> 0.0.6)
407 | ms_rest (~> 0.7.6)
408 | multi_json (1.15.0)
409 | multipart-post (2.1.1)
410 | necromancer (0.5.1)
411 | net-scp (2.0.0)
412 | net-ssh (>= 2.6.5, < 6.0.0)
413 | net-sftp (3.0.0)
414 | net-ssh (>= 5.0.0, < 7.0.0)
415 | net-ssh (5.2.0)
416 | net-ssh-gateway (2.0.0)
417 | net-ssh (>= 4.0.0)
418 | net-ssh-multi (1.2.1)
419 | net-ssh (>= 2.6.5)
420 | net-ssh-gateway (>= 1.2.0)
421 | nokogiri (1.10.10)
422 | mini_portile2 (~> 2.4.0)
423 | nori (2.6.0)
424 | octokit (4.18.0)
425 | faraday (>= 0.9)
426 | sawyer (~> 0.8.0, >= 0.5.3)
427 | ohai (16.4.12)
428 | chef-config (>= 12.8, < 17)
429 | chef-utils (>= 16.0, < 17)
430 | ffi (~> 1.9)
431 | ffi-yajl (~> 2.2)
432 | ipaddress
433 | mixlib-cli (>= 1.7.0)
434 | mixlib-config (>= 2.0, < 4.0)
435 | mixlib-log (>= 2.0.1, < 4.0)
436 | mixlib-shellout (>= 2.0, < 4.0)
437 | plist (~> 3.1)
438 | wmi-lite (~> 1.0)
439 | os (1.1.1)
440 | parallel (1.19.2)
441 | parser (2.7.1.4)
442 | ast (~> 2.4.1)
443 | parslet (1.8.2)
444 | pastel (0.7.4)
445 | equatable (~> 0.6)
446 | tty-color (~> 0.5)
447 | plist (3.5.0)
448 | proxifier (1.0.3)
449 | pry (0.13.1)
450 | coderay (~> 1.1)
451 | method_source (~> 1.0)
452 | public_suffix (4.0.5)
453 | rack (2.2.3)
454 | rainbow (3.0.0)
455 | rake (12.3.3)
456 | regexp_parser (1.7.1)
457 | representable (3.0.4)
458 | declarative (< 0.1.0)
459 | declarative-option (< 0.2.0)
460 | uber (< 0.2.0)
461 | retriable (3.1.2)
462 | retryable (3.0.5)
463 | rexml (3.2.4)
464 | rspec (3.9.0)
465 | rspec-core (~> 3.9.0)
466 | rspec-expectations (~> 3.9.0)
467 | rspec-mocks (~> 3.9.0)
468 | rspec-core (3.9.2)
469 | rspec-support (~> 3.9.3)
470 | rspec-expectations (3.9.2)
471 | diff-lcs (>= 1.2.0, < 2.0)
472 | rspec-support (~> 3.9.0)
473 | rspec-its (1.3.0)
474 | rspec-core (>= 3.0.0)
475 | rspec-expectations (>= 3.0.0)
476 | rspec-mocks (3.9.1)
477 | diff-lcs (>= 1.2.0, < 2.0)
478 | rspec-support (~> 3.9.0)
479 | rspec-support (3.9.3)
480 | rubocop (0.89.1)
481 | parallel (~> 1.10)
482 | parser (>= 2.7.1.1)
483 | rainbow (>= 2.2.2, < 4.0)
484 | regexp_parser (>= 1.7)
485 | rexml
486 | rubocop-ast (>= 0.3.0, < 1.0)
487 | ruby-progressbar (~> 1.7)
488 | unicode-display_width (>= 1.4.0, < 2.0)
489 | rubocop-ast (0.3.0)
490 | parser (>= 2.7.1.4)
491 | ruby-progressbar (1.10.1)
492 | rubyntlm (0.6.2)
493 | rubyzip (1.3.0)
494 | safe_yaml (1.0.5)
495 | sawyer (0.8.2)
496 | addressable (>= 2.3.5)
497 | faraday (> 0.8, < 2.0)
498 | semverse (3.0.0)
499 | signet (0.14.0)
500 | addressable (~> 2.3)
501 | faraday (>= 0.17.3, < 2.0)
502 | jwt (>= 1.5, < 3.0)
503 | multi_json (~> 1.10)
504 | simplecov (0.19.0)
505 | docile (~> 1.1)
506 | simplecov-html (~> 0.11)
507 | simplecov-html (0.12.2)
508 | solve (4.0.4)
509 | molinillo (~> 0.6)
510 | semverse (>= 1.1, < 4.0)
511 | sslshake (1.3.1)
512 | stove (7.1.6)
513 | chef-api (~> 0.5)
514 | mixlib-log (>= 2.0)
515 | strings (0.1.8)
516 | strings-ansi (~> 0.1)
517 | unicode-display_width (~> 1.5)
518 | unicode_utils (~> 1.4)
519 | strings-ansi (0.2.0)
520 | syslog-logger (1.6.8)
521 | test-kitchen (2.6.0)
522 | bcrypt_pbkdf (~> 1.0)
523 | ed25519 (~> 1.2)
524 | license-acceptance (>= 1.0.11, < 3.0)
525 | mixlib-install (~> 3.6)
526 | mixlib-shellout (>= 1.2, < 4.0)
527 | net-scp (>= 1.1, < 4.0)
528 | net-ssh (>= 2.9, < 7.0)
529 | net-ssh-gateway (>= 1.2, < 3.0)
530 | thor (>= 0.19, < 2.0)
531 | winrm (~> 2.0)
532 | winrm-elevated (~> 1.0)
533 | winrm-fs (~> 1.1)
534 | thor (1.0.1)
535 | thread_safe (0.3.6)
536 | timeliness (0.3.10)
537 | tomlrb (1.2.9)
538 | train (3.1.4)
539 | azure_graph_rbac (~> 0.16)
540 | azure_mgmt_key_vault (~> 0.17)
541 | azure_mgmt_resources (~> 0.15)
542 | docker-api (~> 1.26)
543 | google-api-client (~> 0.23.9)
544 | googleauth (~> 0.6.6)
545 | inifile
546 | json (>= 1.8, < 3.0)
547 | mixlib-shellout (>= 2.0, < 4.0)
548 | net-scp (>= 1.2, < 3.0)
549 | net-ssh (>= 2.9, < 6.0)
550 | train-aws (0.1.17)
551 | aws-sdk-apigateway (~> 1.0)
552 | aws-sdk-apigatewayv2 (~> 1.0)
553 | aws-sdk-athena (~> 1.0)
554 | aws-sdk-autoscaling (~> 1.22.0)
555 | aws-sdk-budgets (~> 1.0)
556 | aws-sdk-cloudformation (~> 1.0)
557 | aws-sdk-cloudfront (~> 1.0)
558 | aws-sdk-cloudhsm (~> 1.0)
559 | aws-sdk-cloudhsmv2 (~> 1.0)
560 | aws-sdk-cloudtrail (~> 1.8)
561 | aws-sdk-cloudwatch (~> 1.13)
562 | aws-sdk-cloudwatchlogs (~> 1.13)
563 | aws-sdk-codecommit (~> 1.0)
564 | aws-sdk-codedeploy (~> 1.0)
565 | aws-sdk-codepipeline (~> 1.0)
566 | aws-sdk-configservice (~> 1.21)
567 | aws-sdk-core (~> 3.0)
568 | aws-sdk-costandusagereportservice (~> 1.6)
569 | aws-sdk-dynamodb (~> 1.31)
570 | aws-sdk-ec2 (~> 1.70)
571 | aws-sdk-ecr (~> 1.18)
572 | aws-sdk-ecs (~> 1.30)
573 | aws-sdk-efs (~> 1.0)
574 | aws-sdk-eks (~> 1.9)
575 | aws-sdk-elasticache (~> 1.0)
576 | aws-sdk-elasticbeanstalk (~> 1.0)
577 | aws-sdk-elasticloadbalancing (~> 1.8)
578 | aws-sdk-elasticloadbalancingv2 (~> 1.0)
579 | aws-sdk-elasticsearchservice (~> 1.0)
580 | aws-sdk-firehose (~> 1.0)
581 | aws-sdk-iam (~> 1.13)
582 | aws-sdk-kafka (~> 1.0)
583 | aws-sdk-kinesis (~> 1.0)
584 | aws-sdk-kms (~> 1.13)
585 | aws-sdk-lambda (~> 1.0)
586 | aws-sdk-organizations (~> 1.17.0)
587 | aws-sdk-rds (~> 1.43)
588 | aws-sdk-redshift (~> 1.0)
589 | aws-sdk-route53 (~> 1.0)
590 | aws-sdk-route53domains (~> 1.0)
591 | aws-sdk-route53resolver (~> 1.0)
592 | aws-sdk-s3 (~> 1.30)
593 | aws-sdk-securityhub (~> 1.0)
594 | aws-sdk-ses (~> 1.0)
595 | aws-sdk-sms (~> 1.0)
596 | aws-sdk-sns (~> 1.9)
597 | aws-sdk-sqs (~> 1.10)
598 | aws-sdk-ssm (~> 1.0)
599 | train-core (3.3.16)
600 | addressable (~> 2.5)
601 | ffi (!= 1.13.0)
602 | json (>= 1.8, < 3.0)
603 | mixlib-shellout (>= 2.0, < 4.0)
604 | net-scp (>= 1.2, < 4.0)
605 | net-ssh (>= 2.9, < 7.0)
606 | train-habitat (0.2.13)
607 | train-winrm (0.2.6)
608 | winrm (~> 2.0)
609 | winrm-fs (~> 1.0)
610 | tty-box (0.5.0)
611 | pastel (~> 0.7.2)
612 | strings (~> 0.1.6)
613 | tty-cursor (~> 0.7)
614 | tty-color (0.5.2)
615 | tty-cursor (0.7.1)
616 | tty-prompt (0.21.0)
617 | necromancer (~> 0.5.0)
618 | pastel (~> 0.7.0)
619 | tty-reader (~> 0.7.0)
620 | tty-reader (0.7.0)
621 | tty-cursor (~> 0.7)
622 | tty-screen (~> 0.7)
623 | wisper (~> 2.0.0)
624 | tty-screen (0.8.1)
625 | tty-table (0.11.0)
626 | equatable (~> 0.6)
627 | necromancer (~> 0.5)
628 | pastel (~> 0.7.2)
629 | strings (~> 0.1.5)
630 | tty-screen (~> 0.7)
631 | tzinfo (1.2.7)
632 | thread_safe (~> 0.1)
633 | uber (0.1.0)
634 | unf (0.1.4)
635 | unf_ext
636 | unf_ext (0.0.7.7)
637 | unicode-display_width (1.7.0)
638 | unicode_utils (1.4.0)
639 | uri_template (0.7.0)
640 | uuidtools (2.1.5)
641 | webmock (3.8.3)
642 | addressable (>= 2.3.6)
643 | crack (>= 0.3.2)
644 | hashdiff (>= 0.4.0, < 2.0.0)
645 | winrm (2.3.4)
646 | builder (>= 2.1.2)
647 | erubi (~> 1.8)
648 | gssapi (~> 1.2)
649 | gyoku (~> 1.0)
650 | httpclient (~> 2.2, >= 2.2.0.2)
651 | logging (>= 1.6.1, < 3.0)
652 | nori (~> 2.0)
653 | rubyntlm (~> 0.6.0, >= 0.6.1)
654 | winrm-elevated (1.2.1)
655 | erubi (~> 1.8)
656 | winrm (~> 2.0)
657 | winrm-fs (~> 1.0)
658 | winrm-fs (1.3.3)
659 | erubi (~> 1.8)
660 | logging (>= 1.6.1, < 3.0)
661 | rubyzip (~> 1.1)
662 | winrm (~> 2.0)
663 | wisper (2.0.1)
664 | wmi-lite (1.0.5)
665 | zeitwerk (2.4.0)
666 |
667 | PLATFORMS
668 | ruby
669 |
670 | DEPENDENCIES
671 | berkshelf
672 | chef
673 | codecov
674 | cookstyle
675 | github_changelog_generator
676 | kitchen-inspec
677 | kitchen-vagrant
678 | nokogiri
679 | rake (< 13)
680 | rspec
681 | stove
682 | webmock
683 |
684 | BUNDLED WITH
685 | 1.17.3
686 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2015, Cvent, Inc.
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Octopus Deploy Cookbook
2 | =======================
3 |
4 | [](https://ci.appveyor.com/project/bigbam505/octopus-deploy-cookbook) [](https://travis-ci.org/cvent/octopus-deploy-cookbook) [](https://codeclimate.com/github/cvent/octopus-deploy-cookbook) [](https://supermarket.chef.io/cookbooks/octopus-deploy) [](https://github.com/cvent/octopus-deploy-cookbook/blob/master/LICENSE)
5 |
6 | This cookbook is used for installing the [Octopus Deploy](http://octopusdeploy.com) server and Tentacle on Microsoft Windows machines.
7 |
8 |
9 | **\*\*NOTE:** This cookbook is managed by Cvent and not by the Octopus Deploy team.
10 |
11 |
12 | ## NOTICE: Pre-Release
13 | This is pre release and there will be major changes to this before its final release. The recipes for installation and configuration will be switched into resources so people can use the library easier. Once this is found stable it will be released as version 1.0.0, until this point lock down to any minor version that you use.
14 |
15 | ## Resource/Provider
16 | ### octopus_deploy_server
17 | #### Actions
18 | - :install: Install a version of Octopus Deploy server
19 | - :configure: Install a version of Octopus Deploy server and configure it
20 | - :remove: Uninstall a version of the Octopus Deploy Server if it is installed
21 |
22 | #### Attribute Parameters
23 | - :instance: Name attribute. The Octopus Deploy Server instance name (used for configuring the instance not install)
24 | - :version: Required. The version of Octopus Deploy Server to install
25 | - :checksum: The SHA256 checksum of the Octopus Deploy Server msi file to verify download
26 | - :home_path: The Octopus Deploy Server home directory (Defaults to C:\Octopus)
27 | - :install_url: The url for the installer to download.
28 | - :config_path: The Octopus Deploy Server config file path (Defaults to C:\Octopus\OctopusServer.config)
29 | - :connection_string: The Octopus Deploy Server connection string to the MSSQL Server instance. Required for `:configure` action.
30 | - :master_key: The Octopus Deploy Server master key for encryption, leave blank to generate one at creation
31 | - :node_name: The Octopus Deploy Server Node Name, will default to chef node name
32 | - :create_database: Whether Octopus Deploy Server should create the database with the connection string provided (Defaults to false)
33 | - :admin_user: A default admin user for Octopus Deploy Server to create. Requires machine to be joined to active directory, and `admin_user` must be an AD user
34 | - :license: The raw license key for Octopus Deploy Server to use
35 | - :start_service: Whether to start the Octopus Deploy Server service after creation of the instance (Defaults to True)
36 |
37 | #### Example
38 | Install version 3.17.1 of Octopus Deploy Server
39 |
40 |
41 | ```ruby
42 | octopus_deploy_server 'OctopusServer' do
43 | action :install
44 | version '3.17.1'
45 | checksum ''
46 | end
47 | ```
48 |
49 | **This cookbook does not setup the database. You will need a preexisting SQLEXPRESS/MSSQL database instance**
50 |
51 | ```ruby
52 | octopus_database = "OctopusDeploy"
53 |
54 | octopus_deploy_server 'OctopusServer' do
55 | action [:install, :configure]
56 | version '3.17.1'
57 | checksum'cee5ef29d6e517d197687c50a041be47a3bd56a65010051ddc53dc0c515d39e5'
58 | connection_string "Data Source=(local)\\SQLEXPRESS;Initial Catalog=#{octopus_database};Integrated Security=True"
59 | node_name node.name
60 | create_database true
61 | license '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ'
62 | start_service true
63 | end
64 | ```
65 |
66 |
67 | ### octopus_deploy_tentacle
68 | #### Actions
69 | - :install: Install a version of Octopus Deploy Tentacle (Default)
70 | - :configure: Configure an instance of the octopus Deploy Tentacle
71 | - :register: Register Tentacle with Octopus Deploy Server
72 | - :remove: Remove an instance of the Octopus Deploy Tentacle
73 | - :uninstall: Uninstall a version of the Octopus Deploy Tentacle if it is installed
74 |
75 | #### Attribute Parameters
76 | - :instance: Name attribute. The Octopus Deploy Tentacle instance name (used for configuring the instance not install)
77 | - :version: Required. The version of Octopus Deploy Tentacle to install
78 | - :checksum: The SHA256 checksum of the Octopus Deploy Tentacle msi file to verify download
79 | - :home_path: The Octopus Deploy Instance home directory (Defaults to C:\Octopus)
80 | - :config_path: The Octopus Deploy Instance config file path (Defaults to C:\Octopus\Tentacle.config)
81 | - :app_path: The Octopus Deploy Instance application directory (Defaults to C:\Octopus\Applications)
82 | - :trusted_cert: The Octopus Deploy Instance trusted Server cert
83 | - :port: The Octopus Deploy Instance port to listen on for listening Tentacle (Defaults to 10933)
84 | - :configure_firewall: Whether cookbook will open firewall on listen Tentacles (Defaults to false)
85 | - :polling: Whether this Octopus Deploy Instance is a polling Tentacle (Defaults to False)
86 | - :cert_file: Where to export the Octopus Deploy Instance cert (Defaults to C:\Octopus\tentacle_cert.txt)
87 | - :upgrades_enabled: Whether to upgrade or downgrade the Tentacle version if the windows installer version does not match what is provided in the resource. (Defaults to True)
88 | - :server: Url to Octopus Deploy Server (e.g https://octopus.example.com)
89 | - :api_key: Api Key used to register Tentacle to Octopus Server
90 | - :roles: Array of roles to apply to Tentacle when registering with Octopus Deploy Server (e.g ["web-server","app-server"])
91 | - :environment: Which environment or environments the Tentacle will become part of when registering with Octopus Deploy Server (Defaults to node.chef_environment). Accepts string or array.
92 | - :forced_registration: Whether the command should include `--force` to support overwriting tentacle references that already exist in Octopus Server
93 | - :tenants: Optional array of tenants to add to the Tentacle. Tenant must already exist on Octopus Deploy Server. Requires Octopus 3.4
94 | - :tenant_tags: Optional array of tenant tags to add to the Tentacle. Tags must already exist on Octopus Deploy Server. If tag is part of a tag group, include the group name followed by a slash `/`. e.g ( Priority/VIP, Datacenter/US ).. Requires Octopus 3.4
95 | - :tentacle_name: Optional custom name for Tentacle. Defaults to the Chef node name
96 | - :service_user: Optional service user name. Defaults to Local System
97 | - :service_password: Password for service user
98 | - :public_dns: Optional DNS/IP value to use when registring with the octopus server. Defaults to node['fqdn']
99 | - :tenated_deployment_participation: Optional type of deployments allowed [:Untenanted, :Tenanted, :TenantedOrUntenanted] (requires tentacle 3.19.0 or newer)
100 |
101 | #### Examples
102 |
103 | ##### Install version 3.2.24 of Octopus Deploy Tentacle
104 |
105 | This will simply install the version of the Tentacle that is specified.
106 |
107 | ```ruby
108 | octopus_deploy_tentacle 'Tentacle' do
109 | action :install
110 | version '3.2.24'
111 | checksum '147f84241c912da1c8fceaa6bda6c9baf980a77e55e61537880238feb3b7000a'
112 | end
113 | ```
114 |
115 | ##### Install version 3.2.24 of Octopus Deploy Tentacle and configure it
116 |
117 | This will install the Tentacle and then configure the Tentacle on the machine to communicate with the Octopus Deploy server. It can also update firewall rules if enabled.
118 |
119 | ```ruby
120 | octopus_deploy_tentacle 'Tentacle' do
121 | action [:install, :configure]
122 | version '3.2.24'
123 | checksum '147f84241c912da1c8fceaa6bda6c9baf980a77e55e61537880238feb3b7000a'
124 | trusted_cert 'b5b7ea6537852fb5b7ea6537852f3428'
125 | # You can enable this resource to update firewall rules as well
126 | configure_firewall true
127 | end
128 | ```
129 |
130 | ##### Register Listening Tentacle with the Octopus Deploy Server
131 |
132 | This will check if the Tentacle is registered on the Octopus Deploy server and if it is not will register the Tentacle in the environment with the tags that are specified.
133 |
134 | ```ruby
135 | # You will first need to generate an api key
136 | # In Octopus Deploy Server GUI click your Name -> Profile -> API keys
137 | octopus_deploy_tentacle 'Tentacle' do
138 | action :register
139 | server 'https://octopus.example.com'
140 | api_key '12345678910'
141 | roles ['database']
142 | # You can set polling to true for a polling Tentacle setup
143 | # polling true
144 | end
145 | ```
146 |
147 |
148 | ### octopus_deploy_tools
149 | #### Actions
150 | - :install: Install a version of Octopus Deploy tools (Default)
151 |
152 | #### Attribute Parameters
153 | - :path: The Octopus Deploy tools directory (Defaults to C:\Octopus)
154 | - :source: Required. The url to download the tools from
155 | - :checksum: The SHA256 checksum of the Octopus Deploy tools zip file to verify download
156 |
157 | #### Examples
158 |
159 | ##### Install version 4.5.1 of Octopus Deploy tools
160 |
161 | This will simply install the version of the tools that is specified to the `C:\fun` folder
162 |
163 | ```ruby
164 | octopus_deploy_tools 'C:\fun' do
165 | action :install
166 | source 'https://download.octopusdeploy.com/octopus-tools/4.5.1/OctopusTools.4.5.1.zip'
167 | checksum 'd6794027d413764e7a892547fba9ed410bfa0a53425b178f628128d2b1aebb5f' # sha256 checksum
168 | end
169 | ```
170 |
171 |
172 | ## Assumptions
173 |
174 | One major assumption of this cookbook is that you already have .net40 installed on your server. If you do not then you might need to do that before this cookbook. In addition, some of the resources in here require Chef version 12 in order to work.
175 |
176 |
177 | ## Known Issues
178 | This does not work with Octopus Deploy versions less than 3.2.3 because of a bug in [exporting Tentacle certificates](https://github.com/OctopusDeploy/Issues/issues/2143)
179 |
180 | Tentacle roles are only used the first time a Tentacle is registered with an Octopus Deploy Server. Updating Tentacle roles in cookbook will not update roles on Octopus Deploy Server.
181 |
182 | Registering multiple Tentacles on the same machine is not supported.
183 |
184 | Switching Tentacle modes between 'polling' & 'listening' is not currently supported.
185 |
186 |
187 | License and Author
188 | ==================
189 |
190 | * Author:: Brent Montague ()
191 |
192 | Copyright:: 2015, Cvent, Inc.
193 |
194 | Licensed under the Apache License, Version 2.0 (the "License");
195 | you may not use this file except in compliance with the License.
196 | You may obtain a copy of the License at
197 |
198 | http://www.apache.org/licenses/LICENSE-2.0
199 |
200 | Unless required by applicable law or agreed to in writing, software
201 | distributed under the License is distributed on an "AS IS" BASIS,
202 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
203 | See the License for the specific language governing permissions and
204 | limitations under the License.
205 |
206 | Please refer to the [license](LICENSE) file for more license information.
207 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 |
2 | # Import other external rake tasks
3 | Dir.glob('tasks/*.rake').each { |r| import r }
4 |
5 | # Import dependencies
6 | require 'stove/rake_task'
7 | require 'cookstyle'
8 | require 'rubocop/rake_task'
9 | require 'rspec/core/rake_task'
10 |
11 | # Publish This cookbook
12 | Stove::RakeTask.new
13 |
14 | # Style tests. Rubocop and Foodcritic
15 | namespace :style do
16 | desc 'Run style checks'
17 | RuboCop::RakeTask.new(:chef)
18 | end
19 |
20 | # Style tests. Rubocop and Foodcritic
21 | namespace :test do
22 | desc 'Run rspec'
23 | RSpec::Core::RakeTask.new(:unit)
24 | end
25 |
26 | desc 'Run all style checks'
27 | task style: ['style:chef']
28 |
29 | desc 'Run all test'
30 | task test: ['test:unit']
31 |
32 | desc 'Run all tests on Travis'
33 | task travis: ['style', 'test']
34 |
35 | # Default
36 | task default: :travis
37 |
--------------------------------------------------------------------------------
/TESTING.md:
--------------------------------------------------------------------------------
1 | Testing this cookbook
2 | =====
3 |
4 | This cookbook includes the following tests:
5 |
6 | * Unit tests via Rspec
7 | * Static Code analysis via Cookstyle / Rubocop
8 | * Linting via Foodcritic
9 | * Integration tests via Test Kitchen
10 |
11 | Contributions to this cookbook will only be accepted if all tests pass successfully
12 |
13 |
14 | Running Tests
15 | -----
16 |
17 | In order to run all the tests (except integration tests) you can run the following:
18 |
19 | ```bash
20 | bundle exec rake
21 | ```
22 |
23 |
24 | Running Test Kitchen
25 | -----
26 |
27 | In order to run test kitchen locally you need to have access to a windows virtualbox
28 | image. Until there is an easier way to test locally it's fine to only be
29 | tested on appveyor during PR's.
30 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | branches:
2 | only:
3 | - master
4 |
5 | version: 1.0.{build}
6 |
7 | environment:
8 | machine_user: test_user
9 | machine_pass: Pass@word1
10 |
11 | pull_requests:
12 | do_not_increment_build_number: true
13 |
14 | skip_tags: true
15 |
16 | build:
17 | verbosity: minimal
18 |
19 | deploy: off
20 |
21 | services:
22 | - mssql2016
23 |
24 | cache:
25 | - '%TEMP%\verifier\gems'
26 |
27 | init:
28 | - ps: $PSVersionTable
29 |
30 | install:
31 | - ps: . { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -channel stable -project chefdk -version 4.6.35
32 | - SET PATH=C:\opscode\chefdk\bin;%PATH%
33 | - ps: secedit /export /cfg $env:temp/export.cfg
34 | - ps: ((get-content $env:temp/export.cfg) -replace ('PasswordComplexity = 1', 'PasswordComplexity = 0')) | Out-File $env:temp/export.cfg
35 | - ps: ((get-content $env:temp/export.cfg) -replace ('MinimumPasswordLength = 8', 'MinimumPasswordLength = 0')) | Out-File $env:temp/export.cfg
36 | - ps: secedit /configure /db $env:windir/security/new.sdb /cfg $env:temp/export.cfg /areas SECURITYPOLICY
37 | - ps: net user /add $env:machine_user $env:machine_pass
38 | - ps: net localgroup administrators $env:machine_user /add
39 | - SET CHEF_LICENSE=accept-silent
40 |
41 | before_build:
42 | - copy .kitchen.appveyor.yml .kitchen.yml
43 |
44 | build_script:
45 | - chef exec kitchen converge
46 |
47 | test_script:
48 | - chef exec inspec exec test/integration/**/*.rb
49 |
--------------------------------------------------------------------------------
/chefignore:
--------------------------------------------------------------------------------
1 | # OS generated files #
2 | ######################
3 | .DS_Store
4 | Icon?
5 | nohup.out
6 | ehthumbs.db
7 | Thumbs.db
8 |
9 | # SASS #
10 | ########
11 | .sass-cache
12 |
13 | # EDITORS #
14 | ###########
15 | \#*
16 | .#*
17 | *~
18 | *.sw[a-z]
19 | *.bak
20 | REVISION
21 | TAGS*
22 | tmtags
23 | *_flymake.*
24 | *_flymake
25 | *.tmproj
26 | .project
27 | .settings
28 | mkmf.log
29 |
30 | ## COMPILED ##
31 | ##############
32 | a.out
33 | *.o
34 | *.pyc
35 | *.so
36 | *.com
37 | *.class
38 | *.dll
39 | *.exe
40 | */rdoc/
41 |
42 | # Testing #
43 | ###########
44 | .watchr
45 | .rspec
46 | spec/*
47 | spec/fixtures/*
48 | test/*
49 | features/*
50 | Guardfile
51 | Procfile
52 | .travis.yml
53 | appveyor.yml
54 | .codeclimate.yml
55 | .kitchen.yml
56 | .kitchen.appveyor.yml
57 | .rubocop.yml
58 | .rubocop_todo.yml
59 | .kitchen/*
60 |
61 | # Tasks #
62 | #########
63 | Rakfile
64 | tasks/*
65 |
66 | # bundler #
67 | ###########
68 | .bundle/
69 | Gemfile
70 | Gemfile.lock
71 | .ruby-version
72 |
73 | # SCM #
74 | #######
75 | .git
76 | */.git
77 | .gitignore
78 | .gitmodules
79 | .gitconfig
80 | .gitattributes
81 | .svn
82 | */.bzr/*
83 | */.hg/*
84 | */.svn/*
85 |
86 | # github #
87 | #######
88 | .github/
89 |
90 | # Berkshelf #
91 | #############
92 | Berksfile
93 | Berksfile.lock
94 | cookbooks/*
95 | tmp
96 |
97 | # Cookbooks #
98 | #############
99 | CONTRIBUTING
100 |
101 | # Vagrant #
102 | ###########
103 | .vagrant
104 | Vagrantfile
105 |
--------------------------------------------------------------------------------
/libraries/server.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | # Cookbook:: octopus-deploy
5 | # Library:: server
6 | #
7 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
8 | #
9 | # Licensed under the Apache License, Version 2.0 (the "License");
10 | # you may not use this file except in compliance with the License.
11 | # You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 | #
21 |
22 | require_relative 'shared'
23 | require_relative 'server_scripts'
24 |
25 | module OctopusDeploy
26 | # A container to hold the server values instead of attributes
27 | module Server
28 | include OctopusDeploy::Shared
29 |
30 | def display_name
31 | 'Octopus Deploy Server'
32 | end
33 |
34 | def service_name
35 | 'OctopusDeploy'
36 | end
37 |
38 | def server_install_location
39 | 'C:\Program Files\Octopus Deploy\Octopus'
40 | end
41 |
42 | def installer_url(version)
43 | "https://download.octopusdeploy.com/octopus/Octopus.#{version}-x64.msi"
44 | end
45 |
46 | def scripts
47 | @scripts ||= ServerScripts.new
48 | end
49 | end
50 | end
51 |
--------------------------------------------------------------------------------
/libraries/server_scripts.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | # Cookbook:: octopus-deploy
5 | # Library:: ServerScripts
6 | #
7 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
8 | #
9 | # Licensed under the Apache License, Version 2.0 (the "License");
10 | # you may not use this file except in compliance with the License.
11 | # You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 | #
21 |
22 | require_relative 'template_scripts'
23 |
24 | # Scripts to install the server wrapped in an ERB
25 | class ServerScripts < TemplateScripts
26 | def create_instance(resource)
27 | generate_script(create, binding)
28 | end
29 |
30 | def configure_instance(resource)
31 | generate_script(configure, binding)
32 | end
33 |
34 | def delete_instance(resource)
35 | generate_script(delete, binding)
36 | end
37 |
38 | private
39 |
40 | def create
41 | @create || <<-SCRIPT
42 | .\\Octopus.Server.exe create-instance `
43 | <%= option('instance', resource.instance) %> `
44 | <%= option('config', resource.config_path) %> `
45 | --console
46 | <%= catch_powershell_error('Creating instance') %>
47 | SCRIPT
48 | end
49 |
50 | def delete
51 | @delete || <<-SCRIPT
52 | .\\Octopus.Server.exe service `
53 | <%= option('instance', resource.instance) %> `
54 | --stop `
55 | --uninstall `
56 | --console
57 | <%= catch_powershell_error('Uninstalling Octopus Server Service') %>
58 |
59 | .\\Octopus.Server.exe delete-instance `
60 | <%= option('instance', resource.instance) %> `
61 | --console
62 | <%= catch_powershell_error('Deleting instance from the node') %>
63 | SCRIPT
64 | end
65 |
66 | def configure
67 | @configure || <<-SCRIPT
68 | .\\Octopus.Server.exe configure `
69 | <%= option('instance', resource.instance) %> `
70 | <%= option('home', resource.home_path) %> `
71 | --console
72 | <%= catch_powershell_error('Configuring Home Dir') %>
73 |
74 | .\\Octopus.Server.exe configure `
75 | <%= option('instance', resource.instance) %> `
76 | <%= option('storageConnectionString', resource.connection_string) %> `
77 | --console
78 | <%= catch_powershell_error('Configuring Database Connection') %>
79 |
80 | .\\Octopus.Server.exe configure `
81 | <%= option('instance', resource.instance) %> `
82 | --upgradeCheck "True" `
83 | --upgradeCheckWithStatistics "True" `
84 | --console
85 | <%= catch_powershell_error('Configuring Upgrade Checks') %>
86 |
87 | .\\Octopus.Server.exe configure `
88 | <%= option('instance', resource.instance) %> `
89 | --webAuthenticationMode "Domain" `
90 | --console
91 | <%= catch_powershell_error('Configuring authentication') %>
92 |
93 | .\\Octopus.Server.exe configure `
94 | <%= option('instance', resource.instance) %> `
95 | <%= option('serverNodeName', resource.node_name) %> `
96 | --console
97 | <%= catch_powershell_error('Configuring Cluster Node Name') %>
98 |
99 | .\\Octopus.Server.exe configure `
100 | <%= option('instance', resource.instance) %> `
101 | --webForceSSL "False" `
102 | --webListenPrefixes "http://localhost:80/" `
103 | --commsListenPort "10943" `
104 | --console
105 | <%= catch_powershell_error('Configuring Listen Ports') %>
106 |
107 | <% if resource.master_key %>
108 | .\\Octopus.Server.exe configure `
109 | <%= option('instance', resource.instance) %> `
110 | <%= option('masterkey', resource.master_key) %> `
111 | --console
112 | <%= catch_powershell_error('Configuring Master Key') %>
113 | <% end %>
114 |
115 | <% if resource.create_database %>
116 | .\\Octopus.Server.exe database `
117 | <%= option('instance', resource.instance) %> `
118 | --create `
119 | --console
120 | <%= catch_powershell_error('Create Database') %>
121 | <% end %>
122 |
123 | .\\Octopus.Server.exe service `
124 | <%= option('instance', resource.instance) %> `
125 | --stop `
126 | --console
127 | <%= catch_powershell_error('Stop Service') %>
128 |
129 | <% if resource.admin_user %>
130 | .\\Octopus.Server.exe admin `
131 | <%= option('instance', resource.instance) %> `
132 | <%= option('username', resource.admin_user) %> `
133 | --console
134 | <%= catch_powershell_error('Set Administrator') %>
135 | <% end %>
136 |
137 | <% if resource.license %>
138 | .\\Octopus.Server.exe license `
139 | <%= option('instance', resource.instance) %> `
140 | <%= option('licenseBase64', Base64.encode64(resource.license)) %> `
141 | --console
142 | <%= catch_powershell_error('Configuraing License') %>
143 | <% end %>
144 |
145 | .\\Octopus.Server.exe service `
146 | <%= option('instance', resource.instance) %> `
147 | --install `
148 | --reconfigure `
149 | --console
150 | <%= catch_powershell_error('Create Service') %>
151 | SCRIPT
152 | end
153 | end
154 |
--------------------------------------------------------------------------------
/libraries/shared.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | # Cookbook:: octopus-deploy
5 | # Library:: shared
6 | #
7 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
8 | #
9 | # Licensed under the Apache License, Version 2.0 (the "License");
10 | # you may not use this file except in compliance with the License.
11 | # You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 | #
21 |
22 | require 'chef/http'
23 |
24 | module OctopusDeploy
25 | # A container to hold the shared logic instead of attributes
26 | module Shared
27 | def powershell_boolean(bool)
28 | bool.to_s.capitalize
29 | end
30 |
31 | # Iterate over every option and make a big long string like:
32 | # --role "web" --role "database" --role "app-server"
33 | def option_list(name, options)
34 | options.map { |option| option(name, option) }.join(' ') if name && options
35 | end
36 |
37 | # Includes the named option based on boolean input
38 | def option_flag(name, value)
39 | name && !name.empty? && value ? "--#{name} " : ''
40 | end
41 |
42 | def option(name, option)
43 | "--#{name} \"#{option}\"" if name && option
44 | end
45 |
46 | def installer_options
47 | '/qn /norestart'
48 | end
49 |
50 | def api_client(server, api_key)
51 | options = { headers: { 'X-Octopus-ApiKey' => api_key } }
52 | Chef::HTTP.new("#{server}/api", options)
53 | end
54 |
55 | def catch_powershell_error(error_text)
56 | "if ( ! $? ) { throw \"ERROR: Command returned $LastExitCode #{error_text}\" }"
57 | end
58 | end
59 | end
60 |
--------------------------------------------------------------------------------
/libraries/template_scripts.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | # Cookbook:: octopus-deploy
5 | # Library:: TemplateScripts
6 | #
7 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
8 | #
9 | # Licensed under the Apache License, Version 2.0 (the "License");
10 | # you may not use this file except in compliance with the License.
11 | # You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 | #
21 |
22 | require_relative 'shared'
23 |
24 | class TemplateScripts
25 | include OctopusDeploy::Shared
26 |
27 | def create_instance(_resource)
28 | raise 'Method not overwritten'
29 | end
30 |
31 | def configure_instance(_resource)
32 | raise 'Method not overwritten'
33 | end
34 |
35 | def delete_instance(_resource)
36 | raise 'Method not overwritten'
37 | end
38 |
39 | def generate_script(template, binder)
40 | ERB.new(template).result(binder)
41 | end
42 |
43 | def catch_powershell_error(error_text)
44 | "if ( ! $? ) { throw \"ERROR: Command returned $LastExitCode #{error_text}\" }"
45 | end
46 | end
47 |
--------------------------------------------------------------------------------
/libraries/tentacle.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | # Cookbook:: octopus-deploy
5 | # Library:: tentacle
6 | #
7 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
8 | #
9 | # Licensed under the Apache License, Version 2.0 (the "License");
10 | # you may not use this file except in compliance with the License.
11 | # You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 | #
21 |
22 | require_relative 'shared'
23 |
24 | module OctopusDeploy
25 | # A container to hold the tentacle values instead of attributes
26 | module Tentacle
27 | include OctopusDeploy::Shared
28 |
29 | def display_name
30 | 'Octopus Deploy Tentacle'
31 | end
32 |
33 | def service_name(name)
34 | if name == 'Tentacle'
35 | 'OctopusDeploy Tentacle'
36 | else
37 | "OctopusDeploy Tentacle: #{name}"
38 | end
39 | end
40 |
41 | def tentacle_install_location
42 | 'C:\Program Files\Octopus Deploy\Tentacle'
43 | end
44 |
45 | def installer_url(version, url)
46 | return url if url
47 |
48 | "https://download.octopusdeploy.com/octopus/Octopus.Tentacle.#{version}-x64.msi"
49 | end
50 |
51 | def tentacle_exists?(server, api_key, thumbprint)
52 | ::JSON.parse(api_client(server, api_key).get("/machines/all?thumbprint=#{thumbprint}")).any? do |machine|
53 | machine['Thumbprint'] == thumbprint
54 | end
55 | end
56 |
57 | def tentacle_thumbprint(config)
58 | return unless ::File.exist?(config)
59 |
60 | matcher = ::File.read(config).match(/Tentacle\.CertificateThumbprint">(.*))
61 | return matcher[1].upcase if matcher
62 | end
63 |
64 | def resolve_port(polling, port = nil)
65 | port || default_port(polling)
66 | end
67 |
68 | def register_comm_config(polling, port = nil)
69 | if polling
70 | "--comms-style \"TentacleActive\" --server-comms-port \"#{port}\" --force"
71 | else
72 | '--comms-style "TentaclePassive"'
73 | end
74 | end
75 |
76 | def default_port(polling)
77 | if polling
78 | 10_943
79 | else
80 | 10_933
81 | end
82 | end
83 |
84 | def proxy_command(polling)
85 | if polling
86 | 'polling-proxy'
87 | else
88 | 'proxy'
89 | end
90 | end
91 | end
92 | end
93 |
--------------------------------------------------------------------------------
/metadata.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | name 'octopus-deploy'
3 | maintainer 'Montague, Brent'
4 | maintainer_email 'BMontague@cvent.com'
5 | license 'Apache-2.0'
6 | description 'Handles installing Octopus Deploy Server &| Tentacle'
7 | source_url 'https://github.com/cvent/octopus-deploy-cookbook'
8 | issues_url 'https://github.com/cvent/octopus-deploy-cookbook/issues'
9 | version '0.13.3'
10 |
11 | depends 'windows'
12 | depends 'windows_firewall', '~> 3.0'
13 | supports 'windows'
14 |
15 | chef_version '>= 12.6.0'
16 |
--------------------------------------------------------------------------------
/resources/server.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | # Cookbook:: octopus-deploy
5 | # Resource:: server
6 | #
7 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
8 | #
9 | # Licensed under the Apache License, Version 2.0 (the "License");
10 | # you may not use this file except in compliance with the License.
11 | # You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 | #
21 |
22 | include OctopusDeploy::Server
23 |
24 | resource_name 'octopus_deploy_server'
25 |
26 | property :instance, String, default: 'OctopusServer'
27 | property :version, String, required: true
28 | property :checksum, String
29 | property :home_path, String, default: 'C:\Octopus'
30 | property :config_path, String, default: 'C:\Octopus\OctopusServer.config'
31 | property :connection_string, String
32 | property :master_key, String
33 | property :node_name, String, default: node.name
34 | property :create_database, [true, false], default: false
35 | property :admin_user, String
36 | property :license, String
37 | property :start_service, [true, false], default: true
38 |
39 | default_action :install
40 |
41 | action :install do
42 | verify_version(new_resource.version)
43 | verify_checksum(new_resource.checksum)
44 |
45 | server_installer = ::File.join(Chef::Config[:file_cache_path], 'octopus-server.msi')
46 | install_url = installer_url(new_resource.version)
47 |
48 | remote_file server_installer do
49 | action :create
50 | source install_url
51 | checksum new_resource.checksum if new_resource.checksum
52 | end
53 |
54 | windows_package display_name do
55 | action :install
56 | source server_installer
57 | version new_resource.version
58 | installer_type :msi
59 | options '/passive /norestart'
60 | end
61 | end
62 |
63 | action :configure do
64 | action_install
65 | verify_connection_string(new_resource.connection_string)
66 |
67 | powershell_script "create-instance-#{new_resource.instance}" do
68 | action :run
69 | cwd server_install_location
70 | code scripts.create_instance(new_resource)
71 | not_if { ::File.exist?(new_resource.config_path) }
72 | end
73 |
74 | powershell_script "configure-server-#{new_resource.instance}" do
75 | action :run
76 | cwd server_install_location
77 | sensitive new_resource.sensitive
78 | code scripts.configure_instance(new_resource)
79 | not_if { ::Win32::Service.exists?(service_name) }
80 | end
81 |
82 | # Make sure enabled and started
83 | windows_service service_name do
84 | if new_resource.start_service
85 | action [:enable, :start]
86 | else
87 | action [:stop, :disable]
88 | end
89 | end
90 | end
91 |
92 | action :remove do
93 | powershell_script "remove-server-instance-#{new_resource.instance}" do
94 | action :run
95 | cwd server_install_location
96 | code scripts.delete_instance(new_resource)
97 | only_if { ::Win32::Service.exists?(service_name) && ::File.exist?(server_install_location) }
98 | end
99 |
100 | file new_resource.config_path do
101 | action :delete
102 | end
103 | end
104 |
105 | action :uninstall do
106 | windows_package display_name do
107 | action :remove
108 | source 'nothing'
109 | end
110 |
111 | file ::File.join(Chef::Config[:file_cache_path], 'octopus-server.msi') do
112 | action :delete
113 | end
114 | end
115 |
116 | def verify_version(version)
117 | raise 'A version is required in order to install Octopus Deploy Server' unless version
118 | end
119 |
120 | def verify_connection_string(connection_string)
121 | raise 'A connection string is required in order to configure Octopus Deploy Server' unless connection_string
122 | end
123 |
124 | def verify_checksum(checksum)
125 | Chef::Log.warn 'You should include a checksum in the octopus_deploy_server resource for security and performance reasons' unless checksum
126 | end
127 |
--------------------------------------------------------------------------------
/resources/tentacle.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | # Cookbook:: octopus-deploy
5 | # Resource:: tentacle
6 | #
7 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
8 | #
9 | # Licensed under the Apache License, Version 2.0 (the "License");
10 | # you may not use this file except in compliance with the License.
11 | # You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 | #
21 |
22 | include OctopusDeploy::Tentacle
23 |
24 | resource_name 'octopus_deploy_tentacle'
25 |
26 | property :instance, String, default: 'Tentacle'
27 | property :version, String
28 | property :checksum, String
29 | property :home_path, String, default: 'C:\Octopus'
30 | property :install_url, [String, nil]
31 | property :config_path, String, default: 'C:\Octopus\Tentacle.config'
32 | property :app_path, String, default: 'C:\Octopus\Applications'
33 | property :trusted_cert, String
34 | property :polling, [true, false], default: false
35 | property :configure_firewall, [true, false], default: false
36 | property :port, [Integer, nil], default: nil
37 | property :cert_file, String, default: 'C:\Octopus\tentacle_cert.txt'
38 | property :upgrades_enabled, [true, false], default: true
39 | property :server, String
40 | property :api_key, String
41 | property :roles, Array
42 | property :environment, [String, Array], default: node.chef_environment
43 | property :tenants, [Array, nil], default: nil
44 | property :tenant_tags, [Array, nil], default: nil
45 | property :tentacle_name, String, default: node.name
46 | property :forced_registration, [true, false], default: false
47 | property :service_user, [String, nil]
48 | property :service_password, [String, nil]
49 | property :public_dns, String, default: lazy { node['fqdn'] }
50 | property :tenated_deployment_participation, [Symbol, nil], equal_to: [nil, :Untenanted, :Tenanted, :TenantedOrUntenanted], default: nil
51 |
52 | default_action :install
53 |
54 | action :install do
55 | verify_version(new_resource.version, new_resource.install_url)
56 | verify_checksum(new_resource.checksum)
57 |
58 | tentacle_installer = ::File.join(Chef::Config[:file_cache_path], 'octopus-tentacle.msi')
59 | install_url = installer_url(new_resource.version, new_resource.install_url)
60 |
61 | remote_file tentacle_installer do
62 | action :create
63 | source install_url
64 | checksum new_resource.checksum if new_resource.checksum
65 | end
66 |
67 | windows_package display_name do
68 | action :install
69 | source tentacle_installer
70 | version new_resource.version if new_resource.version && new_resource.upgrades_enabled
71 | installer_type :msi
72 | options installer_options
73 | end
74 | end
75 |
76 | action :configure do
77 | action_install
78 |
79 | port = resolve_port(new_resource.polling, new_resource.port)
80 | service_name = service_name(new_resource.instance)
81 |
82 | directory new_resource.home_path do
83 | action :create
84 | recursive true
85 | end
86 |
87 | powershell_script "create-instance-#{new_resource.instance}" do
88 | action :run
89 | cwd tentacle_install_location
90 | code <<-EOH
91 | .\\Tentacle.exe create-instance --instance="#{new_resource.instance}" --config="#{new_resource.config_path}" --console
92 | #{catch_powershell_error('Creating instance')}
93 | EOH
94 | not_if { ::File.exist?(new_resource.config_path) }
95 | end
96 |
97 | powershell_script "generate-tentacle-cert-#{new_resource.instance}" do
98 | action :run
99 | cwd tentacle_install_location
100 | code <<-EOH
101 | .\\Tentacle.exe new-certificate -e "#{new_resource.cert_file}" --console
102 | #{catch_powershell_error('Generating Cert for the machine')}
103 | EOH
104 | not_if { new_resource.cert_file.nil? || ::File.exist?(new_resource.cert_file) }
105 | end
106 |
107 | powershell_script "configure-tentacle-#{new_resource.instance}" do
108 | action :run
109 | cwd tentacle_install_location
110 | sensitive new_resource.sensitive
111 | code <<-EOH
112 | .\\Tentacle.exe import-certificate --instance="#{new_resource.instance}" --from-file="#{new_resource.cert_file}" --console
113 | #{catch_powershell_error('Importing Certificate that was generated for the machine')}
114 | .\\Tentacle.exe new-certificate --instance="#{new_resource.instance}" --if-blank --console
115 | #{catch_powershell_error('Generating Certificate if the Import failed')}
116 | .\\Tentacle.exe configure --instance="#{new_resource.instance}" --reset-trust --console
117 | #{catch_powershell_error('Reseting Trust')}
118 | .\\Tentacle.exe configure --instance="#{new_resource.instance}" --home="#{new_resource.home_path}" --app="#{new_resource.app_path}" --port="#{port}" --noListen="#{powershell_boolean(new_resource.polling)}" --console
119 | #{catch_powershell_error('Configuring instance')}
120 | .\\Tentacle.exe configure --instance="#{new_resource.instance}" --trust="#{new_resource.trusted_cert}" --console
121 | #{catch_powershell_error('Trusting Octopus Deploy Server')}
122 | .\\Tentacle.exe #{proxy_command(new_resource.polling)} --instance="#{new_resource.instance}" --proxyEnable=False
123 | #{catch_powershell_error('Configuring proxy')}
124 | .\\Tentacle.exe service --instance="#{new_resource.instance}" --install --console
125 | #{catch_powershell_error('Installing Service')}
126 | EOH
127 | not_if { ::Win32::Service.exists?(service_name) }
128 | end
129 |
130 | windows_firewall_rule 'Octopus Deploy Tentacle' do
131 | action :create
132 | localport port.to_s
133 | dir :in
134 | protocol 'TCP'
135 | firewall_action :allow
136 | only_if { new_resource.configure_firewall }
137 | not_if { new_resource.polling }
138 | end
139 |
140 | # Make sure enabled and started
141 | windows_service service_name do
142 | action [:enable, :start]
143 | run_as_user new_resource.service_user if new_resource.service_user
144 | run_as_password new_resource.service_password if new_resource.service_password
145 | sensitive new_resource.sensitive
146 | end
147 | end
148 |
149 | action :register do
150 | port = resolve_port(new_resource.polling, new_resource.port)
151 | environment = Array(new_resource.environment)
152 | service_name = service_name(new_resource.instance)
153 |
154 | verify_server(new_resource.server)
155 | verify_api_key(new_resource.api_key)
156 | verify_roles(new_resource.roles)
157 | verify_environment(new_resource.environment)
158 |
159 | powershell_script "register-#{new_resource.instance}-tentacle" do
160 | action :run
161 | cwd tentacle_install_location
162 | code <<-EOH
163 | .\\Tentacle.exe register-with --instance "#{new_resource.instance}" `
164 | --server "#{new_resource.server}" `
165 | --name "#{new_resource.tentacle_name}" `
166 | --publicHostName "#{new_resource.public_dns}" `
167 | --apiKey "#{new_resource.api_key}" `
168 | #{register_comm_config(new_resource.polling, port)} `
169 | #{option_list('environment', environment)} `
170 | #{option_list('role', new_resource.roles)} `
171 | #{option_list('tenant', new_resource.tenants)} `
172 | #{option_list('tenanttag', new_resource.tenant_tags)} `
173 | #{option('tenanted-deployment-participation', new_resource.tenated_deployment_participation)} `
174 | #{option_flag('force', new_resource.forced_registration)} `
175 | --console
176 | #{catch_powershell_error('Registering Tentacle')}
177 | EOH
178 | # This is sort of a hack, you need to specify the config_path on register if it is not default
179 | # The other option is to read the registry key but the helpers are not available in 12.4.1
180 | not_if { tentacle_exists?(new_resource.server, new_resource.api_key, tentacle_thumbprint(new_resource.config_path)) }
181 | notifies :restart, "windows_service[#{service_name}]", :delayed
182 | end
183 |
184 | windows_service service_name do
185 | action :nothing
186 | end
187 | end
188 |
189 | action :remove do
190 | service_name = service_name(new_resource.instance)
191 |
192 | powershell_script "remove-tentacle-instance-#{new_resource.instance}" do
193 | action :run
194 | cwd tentacle_install_location
195 | code <<-EOH
196 | .\\Tentacle.exe service --instance "#{new_resource.instance}" --stop --uninstall --console
197 | #{catch_powershell_error('Uninstalling tentacle service')}
198 | .\\Tentacle.exe delete-instance --instance "#{new_resource.instance}" --console
199 | #{catch_powershell_error('Deleting instance from the server')}
200 | EOH
201 | only_if { ::Win32::Service.exists?(service_name) && ::File.exist?(tentacle_install_location) }
202 | end
203 |
204 | file new_resource.config_path do
205 | action :delete
206 | end
207 | end
208 |
209 | action :uninstall do
210 | windows_package display_name do
211 | action :remove
212 | source 'nothing'
213 | end
214 |
215 | file ::File.join(Chef::Config[:file_cache_path], 'octopus-tentacle.msi') do
216 | action :delete
217 | end
218 | end
219 |
220 | def verify_version(version, installer_url)
221 | raise 'A version or installer_url is required in order to install Octopus Deploy Tentacle' unless version || installer_url
222 | end
223 |
224 | def verify_checksum(checksum)
225 | Chef::Log.warn 'You should include a checksum in the octopus_deploy_tentacle resource for security and performance reasons' unless checksum
226 | end
227 |
228 | def verify_server(server)
229 | raise 'A server is required in order to register a Tentacle with Octopus Deploy Server' unless server
230 | end
231 |
232 | def verify_api_key(api_key)
233 | raise 'An API key is required in order to register a Tentacle with Octopus Deploy Server' unless api_key
234 | end
235 |
236 | def verify_roles(roles)
237 | raise 'At least 1 role is required in order to register a Tentacle with Octopus Deploy Server' if roles.nil? || roles.empty?
238 | end
239 |
240 | def verify_environment(environment)
241 | raise 'At least 1 environment is required in order to register a Tentacle with Octopus Deploy Server' if environment.nil? || environment.empty?
242 | end
243 |
--------------------------------------------------------------------------------
/resources/tools.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | # Cookbook:: octopus-deploy
5 | # Resource:: tools
6 | #
7 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
8 | #
9 | # Licensed under the Apache License, Version 2.0 (the "License");
10 | # you may not use this file except in compliance with the License.
11 | # You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 | #
21 |
22 | resource_name 'octopus_deploy_tools'
23 |
24 | property :path, String, name_property: true
25 | property :source, String, required: true
26 | property :checksum, String
27 |
28 | default_action :install
29 |
30 | action :install do
31 | tools_zip = ::File.join(Chef::Config[:file_cache_path], 'OctopusTools.zip')
32 |
33 | remote_file tools_zip do
34 | action :create
35 | source new_resource.source
36 | checksum new_resource.checksum if new_resource.checksum
37 | end
38 |
39 | directory new_resource.path do
40 | action :create
41 | recursive true
42 | end
43 |
44 | windows_zipfile new_resource.path do
45 | action :unzip
46 | source tools_zip
47 | not_if { ::File.exist?(::File.join(new_resource.path, 'Octo.exe')) }
48 | end
49 | end
50 |
--------------------------------------------------------------------------------
/spec/spec_helper.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | $LOAD_PATH.unshift File.dirname('./libraries')
3 |
4 | require 'webmock/rspec'
5 | require 'simplecov'
6 | require 'codecov'
7 |
8 | SimpleCov.start do
9 | add_filter '/spec/' # Ignore all testing files
10 | end
11 | SimpleCov.formatter = SimpleCov::Formatter::Codecov if ENV['CI'] == 'true'
12 |
--------------------------------------------------------------------------------
/spec/unit/lib_server_scripts_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | require 'spec_helper'
3 | require 'libraries/server_scripts'
4 |
5 | describe 'ServerScripts' do
6 | let(:server_scripts) { ServerScripts.new }
7 | let(:resource) do
8 | Class.new do
9 | def method_missing(method_name)
10 | method_name.to_s
11 | end
12 | end.new
13 | end
14 |
15 | describe 'create_instance' do
16 | it 'should return the script' do
17 | expect(server_scripts.create_instance(resource)).to match 'create-instance'
18 | end
19 | end
20 |
21 | describe 'configure_instance' do
22 | it 'should return the script' do
23 | expect(server_scripts.configure_instance(resource)).to match 'configure'
24 | end
25 | end
26 |
27 | describe 'delete_instance' do
28 | it 'should return the script' do
29 | expect(server_scripts.delete_instance(resource)).to match 'delete-instance'
30 | end
31 | end
32 | end
33 |
--------------------------------------------------------------------------------
/spec/unit/lib_server_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | require 'spec_helper'
3 | require 'libraries/server'
4 |
5 | describe 'OctopusDeploy::Server' do
6 | let(:server) { Class.new { include OctopusDeploy::Server }.new }
7 |
8 | describe 'display_name' do
9 | it 'should return the correct display name' do
10 | expect(server.display_name).to eq 'Octopus Deploy Server'
11 | end
12 | end
13 |
14 | describe 'service_name' do
15 | it 'should return the correct service name' do
16 | expect(server.service_name).to eq 'OctopusDeploy'
17 | end
18 | end
19 |
20 | describe 'server_install_location' do
21 | it 'should return the install location' do
22 | expect(server.server_install_location).to eq 'C:\Program Files\Octopus Deploy\Octopus'
23 | end
24 | end
25 |
26 | describe 'installer_url' do
27 | it 'should return the install url' do
28 | expect(server.installer_url('3.2.1')).to eq 'https://download.octopusdeploy.com/octopus/Octopus.3.2.1-x64.msi'
29 | end
30 | end
31 |
32 | describe 'scripts' do
33 | it 'should return the ServerScripts class' do
34 | expect(server.scripts).to be_a_kind_of(ServerScripts)
35 | end
36 | end
37 | end
38 |
--------------------------------------------------------------------------------
/spec/unit/lib_shared_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | require 'spec_helper'
3 | require 'libraries/shared'
4 |
5 | describe 'OctopusDeploy::Shared' do
6 | let(:shared) { Class.new { include OctopusDeploy::Shared }.new }
7 |
8 | describe 'powershell_boolean' do
9 | it 'should return uppercased bools' do
10 | expect(shared.powershell_boolean(true)).to eq 'True'
11 | expect(shared.powershell_boolean(false)).to eq 'False'
12 | end
13 | end
14 |
15 | describe 'option_list' do
16 | it 'should return the command line command for an options list' do
17 | name = 'name'
18 | options = %w(option1 option2)
19 | expect(shared.option_list(name, options)).to eq '--name "option1" --name "option2"'
20 | end
21 |
22 | it 'should return nil if name is nil' do
23 | name = nil
24 | options = '42'
25 | expect(shared.option_list(name, options)).to eq nil
26 | end
27 |
28 | it 'should return nil if options is nil' do
29 | name = 'foo'
30 | options = nil
31 | expect(shared.option_list(name, options)).to eq nil
32 | end
33 | end
34 |
35 | describe 'option_flag' do
36 | it 'should return --attr flag if name is valid and value is true' do
37 | name = 'attr'
38 | value = true
39 | expect(shared.option_flag(name, value)).to eq '--attr '
40 | end
41 |
42 | it 'should return empty string if name is valid and value is false' do
43 | name = 'attr'
44 | value = false
45 | expect(shared.option_flag(name, value)).to eq ''
46 | end
47 |
48 | it 'should return empty string if inputs are invalid' do
49 | expect(shared.option_flag('', false)).to eq ''
50 | expect(shared.option_flag('', true)).to eq ''
51 | expect(shared.option_flag(nil, true)).to eq ''
52 | expect(shared.option_flag(nil, false)).to eq ''
53 | expect(shared.option_flag('attr', nil)).to eq ''
54 | end
55 | end
56 |
57 | describe 'option' do
58 | it 'should return the command line command for an option' do
59 | name = 'name'
60 | option = :Test
61 | expect(shared.option(name, option)).to eq '--name "Test"'
62 | end
63 |
64 | it 'should return nil if name is nil' do
65 | name = nil
66 | option = :test
67 | expect(shared.option(name, option)).to eq nil
68 | end
69 |
70 | it 'should return nil if option is nil' do
71 | name = 'name'
72 | option = nil
73 | expect(shared.option(name, option)).to eq nil
74 | end
75 | end
76 |
77 | describe 'installer_options' do
78 | it 'should return the command line options for msiexec' do
79 | expect(shared.installer_options).to eq '/qn /norestart'
80 | end
81 | end
82 |
83 | describe 'api_client' do
84 | it 'should return an instance of the chef api client' do
85 | client = shared.api_client('https://octopus.com', 'API-blah')
86 | expect(client).to be_a Chef::HTTP
87 | expect(client.url).to eq 'https://octopus.com/api'
88 | end
89 | end
90 |
91 | describe 'catch_powershell_error' do
92 | it 'should return a error statement with the specified error text' do
93 | expect(shared.catch_powershell_error('HELLO_WORLD')).to match(/throw "ERROR: .* HELLO_WORLD.*/)
94 | end
95 | end
96 | end
97 |
--------------------------------------------------------------------------------
/spec/unit/lib_template_scripts_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | require 'spec_helper'
3 | require 'libraries/template_scripts'
4 |
5 | describe 'TemplateScripts' do
6 | let(:server_scripts) { TemplateScripts.new }
7 | let(:resource) do
8 | Class.new do
9 | def method_missing(method_name)
10 | method_name.to_s
11 | end
12 | end.new
13 | end
14 |
15 | describe 'create_instance' do
16 | it 'should return the script' do
17 | expect { server_scripts.create_instance(resource) }.to raise_error('Method not overwritten')
18 | end
19 | end
20 |
21 | describe 'configure_instance' do
22 | it 'should return the script' do
23 | expect { server_scripts.configure_instance(resource) }.to raise_error('Method not overwritten')
24 | end
25 | end
26 |
27 | describe 'delete_instance' do
28 | it 'should return the script' do
29 | expect { server_scripts.delete_instance(resource) }.to raise_error('Method not overwritten')
30 | end
31 | end
32 | end
33 |
--------------------------------------------------------------------------------
/spec/unit/lib_tentacle_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | require 'spec_helper'
3 | require 'libraries/tentacle'
4 |
5 | describe 'OctopusDeploy::Tentacle' do
6 | let(:tentacle) { Class.new { include OctopusDeploy::Tentacle }.new }
7 |
8 | describe 'display_name' do
9 | it 'should return the correct display name' do
10 | expect(tentacle.display_name).to eq 'Octopus Deploy Tentacle'
11 | end
12 | end
13 |
14 | describe 'service_name' do
15 | it 'should return the correct service name for the default instance name' do
16 | expect(tentacle.service_name('Tentacle')).to eq 'OctopusDeploy Tentacle'
17 | end
18 |
19 | it 'should return the correct service name for non a default instance name' do
20 | expect(tentacle.service_name('Instance')).to eq 'OctopusDeploy Tentacle: Instance'
21 | end
22 | end
23 |
24 | describe 'tentacle_install_location' do
25 | it 'should return the install location' do
26 | expect(tentacle.tentacle_install_location).to eq 'C:\Program Files\Octopus Deploy\Tentacle'
27 | end
28 | end
29 |
30 | describe 'tentacle_exists?' do
31 | it 'should return true if the tentacle exists' do
32 | stub_request(:get, 'https://octopus.com/api/machines/all?thumbprint=1234')
33 | .to_return(status: 200, body: '[{"Thumbprint": "1234"}]')
34 |
35 | exists = tentacle.tentacle_exists?('https://octopus.com', 'API-key', '1234')
36 | expect(exists).to eq true
37 | end
38 |
39 | it 'should return false if the tentacle doesnt exist' do
40 | stub_request(:get, 'https://octopus.com/api/machines/all?thumbprint=1234')
41 | .to_return(status: 200, body: '[]')
42 |
43 | exists = tentacle.tentacle_exists?('https://octopus.com', 'API-key', '1234')
44 | expect(exists).to eq false
45 | end
46 | end
47 |
48 | describe 'tentacle_thumbprint' do
49 | it 'should return nil if the file does not exist' do
50 | allow(::File).to receive(:exist?).with('file').and_return(false)
51 |
52 | expect(tentacle.tentacle_thumbprint('file')).to eq nil
53 | end
54 |
55 | it 'should return the thumbprint if the file exists' do
56 | allow(::File).to receive(:exist?).with('file').and_return(true)
57 | allow(::File).to receive(:read).with('file').and_return('tEst')
58 |
59 | # This also capitalizes the thumbprint in case it is not.
60 | expect(tentacle.tentacle_thumbprint('file')).to eq 'TEST'
61 | end
62 | end
63 |
64 | describe 'installer_url' do
65 | it 'should return the correct install url if no installer_url is set' do
66 | expect(tentacle.installer_url('3.2.1', nil)).to eq 'https://download.octopusdeploy.com/octopus/Octopus.Tentacle.3.2.1-x64.msi'
67 | end
68 |
69 | it 'should return the specified installer_url if one is provided' do
70 | expect(tentacle.installer_url('3.2.1', 'https://overridden.com/Octopus.Tentacle.3.2.1-x64.msi')).to eq 'https://overridden.com/Octopus.Tentacle.3.2.1-x64.msi'
71 | end
72 | end
73 |
74 | describe 'register_comm_config' do
75 | it 'should return Tentacle active for polling tentacle' do
76 | expect(tentacle.register_comm_config(true, 100)).to eq '--comms-style "TentacleActive" --server-comms-port "100" --force'
77 | end
78 |
79 | it 'should return Tentacle passive' do
80 | expect(tentacle.register_comm_config(false)).to eq '--comms-style "TentaclePassive"'
81 | end
82 | end
83 |
84 | describe 'resolve_port' do
85 | it 'should return the port that is specified' do
86 | expect(tentacle.resolve_port(true, 100)).to eq 100
87 | end
88 |
89 | it 'should return the 10943 for a polling tentacle with no port' do
90 | expect(tentacle.resolve_port(true)).to eq 10_943
91 | end
92 |
93 | it 'should return the 10933 for a listening tentacle with no port' do
94 | expect(tentacle.resolve_port(false)).to eq 10_933
95 | end
96 | end
97 |
98 | describe 'proxy_command' do
99 | it 'should return Polling proxy for polling tentacle' do
100 | expect(tentacle.proxy_command(true)).to eq 'polling-proxy'
101 | end
102 |
103 | it 'should return Proxy for non-polling tentacle' do
104 | expect(tentacle.proxy_command(false)).to eq 'proxy'
105 | end
106 | end
107 | end
108 |
--------------------------------------------------------------------------------
/tasks/changelog.rake:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | begin
3 | require 'chef/cookbook/metadata'
4 | require 'github_changelog_generator/task'
5 |
6 | metadata = Chef::Cookbook::Metadata.new
7 | metadata.from_file('metadata.rb')
8 |
9 | GitHubChangelogGenerator::RakeTask.new :changelog do |config|
10 | config.user = 'cvent'
11 | config.project = 'octopus-deploy-cookbook'
12 | config.since_tag = 'v0.5.0'
13 | config.future_release = "v#{metadata.version}"
14 | config.issues = false
15 | config.add_pr_wo_labels = false
16 | config.enhancement_labels = %w(enhancement)
17 | config.bug_labels = %w(bug)
18 | config.exclude_labels = %w(cleanup duplicate question wontfix no_changelog)
19 | end
20 | rescue LoadError
21 | puts 'Problem loading gems please install chef and github_changelog_generator'
22 | end
23 |
--------------------------------------------------------------------------------
/test/cookbooks/octopus-deploy-test/attributes/default.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | # Cookbook:: octopus-deploy-test
5 | # Attribute:: default
6 | #
7 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
8 | #
9 | # Licensed under the Apache License, Version 2.0 (the "License");
10 | # you may not use this file except in compliance with the License.
11 | # You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 | #
21 |
22 | # Server test configuration
23 | default['octopus-deploy-test']['server']['version'] = '3.2.24'
24 | default['octopus-deploy-test']['server']['checksum'] = 'fe82d0ebd4d0cc9baa38962d8224578154131856a3c3e63621e4834efa3006d7'
25 | default['octopus-deploy-test']['server']['master-key'] = 'wJ+qLI8AjSvtdtIt05eW7w=='
26 | default['octopus-deploy-test']['server']['connection-string'] = 'Server=(local)\SQL2016;Database=master;User ID=sa;Password=Password12!'
27 |
28 | # Tentacle test configuration
29 | default['octopus-deploy-test']['tentacle']['version'] = '3.19.0'
30 | default['octopus-deploy-test']['tentacle']['installer_url'] = 'https://download.octopusdeploy.com/octopus/Octopus.Tentacle.3.19.0-x64.msi'
31 | default['octopus-deploy-test']['tentacle']['checksum'] = 'a37b6c16494f16e7de03566de737a8c437267a227e287ed2f3f4d0ecab9eadee'
32 | default['octopus-deploy-test']['tentacle']['instance'] = 'Tentacle'
33 | default['octopus-deploy-test']['tentacle']['config_path'] = 'C:\\Octopus\\Tentacle.config'
34 |
--------------------------------------------------------------------------------
/test/cookbooks/octopus-deploy-test/files/default/cert.txt:
--------------------------------------------------------------------------------
1 | MIIJvgIBAzCCCX4GCSqGSIb3DQEHAaCCCW8EgglrMIIJZzCCBggGCSqGSIb3DQEHAaCCBfkEggX1MIIF8TCCBe0GCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAgZl4cQg1k2jAICB9AEggTYcqVy3s08QE4JMYeFeOXbMA9Pq2i/2IK0oP6LQOFCV21H9divJ/ekIMB6QfbdKJFbWu7vu2heE29I5tQBKvwLWfTU4PpDPo6Tld/1Stalze7+Dk0LYhCk/rbAy52TxPMFB6X7fSUmXsw4lLVE0a4sY4Y6uXE9Ngb6DVW8Gea//CHINCPuJF6y2zZllVZgxLVznOXrMfOOPPzPySjbq1UB8zEPorG0v2oB4O4l/8rmSZTn6t4BeWbbyFkat+PTKWRbS58q/EdL1bOVWgoNixQrlVm341y47nJkwniNB9brqp9Qm5nolnRkvBxTAIUtlfPg7aHdGBm3Sg/3DyLGE9q3TeK73Sb3pI12cS7W6QXMLg/qHyjV54ZEehxo98v8LHsLhBFaVhZLU5jzoFzyNXIBx4ajnD7pN7yQ6Inv4+gDjvVVpnURUuK6VZkqaHbuDanR9FzelKT6/+VhLQ3lyAGcR1HlT1NcGGIFqU70YfIocc8AygkSi/7d9KeLnuHF48f+F+N3CYSvV2Fz1p1oAZKLW23TehYk0da7Ux8v0o9REYtc6Lq3OFLlCPR7NubWUOgkxSZbsbodgN6okTR3oaH2vzVeB/gXawolhlxSxVK5A69nTYJcwtnLH1PLjvdPsa00uRrkWAIruTO+LF6zPEYKUJ4aBApQaoPDWsTQa4wqGNRfTPxLiNkDVaV720bh10C1hE46EyD5NbrFwv/Y9zr7NjKmA3t6fteWKDoaE4NF8VxJ4YnPBCbf7QPXz4vMsuTeSH+srxe/IF2D53P2yhgOg0JwDlOZJ4jlphvWTkRDRUO9/1PBpfB7akBEo792+tyMBEUsRQfuI4jIz5a/EBO1gmnsVOCZkxNG3qiSIAviIJjyW83jhfuMzDHRLejMUQSrcyc+fRrbqVpzPPZa5BW4zgdKCtWytN6ebGjYglDctKOYvb8Mht96AOr4YTbgd8RRHJRvryXRoDXRCEsxIm8ggokePWnMGAclglpkrrFgQ89p3jvdpkw09EtxRhAN6VpJCpSKl5rKhiq6FY2UpZklRE3VcSUbimQepfyxRNqO8lsp2t562uomwo3VjFKyPrMFUKQ7RyRyhD4RaJgEMXxNXISNWqxM7uSFDia8qjxrrhYUPGFVyi9zfVWdimzTprnJvRaynpOEepOhrpPc4Po3U/FB+XSG2XUa7tLeenWDUremOGStv91wNYRAyB9lMYa0uXmOLS/2+18mkNnnHzcZuPeTL8cVs3SZQ6mRXK6G7gypMkRjLG3jSWVNEtcp9LemPN5GF7FUVPlhEkJJvEe4yfzewusUx/7+jW6tlSCKHGWl0WGaG1Wti92Pb6hjer/FwwFmiIROeGaf35be++bYTv3zXiGilPK0wz32667sMdIPyt82W1SDknTy8grqGl+woh6GIPOPji+S+Lwy+B3nldBSkwC0yDN7R/t4Mkey1+ZNMQ7xhuX9jaeErKnThTzN/u1omFnD/n95QB1xeVkmujymGcFxjggeQUfSMpbuo3o8IU4W89hA+2ky3DM+yjvQbD+8Jfg9ztxRw4MmeZaCvBzHtaru2TFggjwYaX1WMKkz6EHIRB0B2Ntfk09+YjqwQjO0VgRdRQDagN4MQxAH7qih8x6jK3umaDIXGEE/BVkKBAYnkrNbrzGB2zATBgkqhkiG9w0BCRUxBgQEAQAAADBXBgkqhkiG9w0BCRQxSh5IADYAYgAzAGYAOABmADMAMQAtADkAYgBjAGQALQA0AGUANwBjAC0AYQBmAGMAYgAtADkANgBlADkAZAA1ADYANgBlAGEANwBiMGsGCSsGAQQBgjcRATFeHlwATQBpAGMAcgBvAHMAbwBmAHQAIABFAG4AaABhAG4AYwBlAGQAIABDAHIAeQBwAHQAbwBnAHIAYQBwAGgAaQBjACAAUAByAG8AdgBpAGQAZQByACAAdgAxAC4AMDCCA1cGCSqGSIb3DQEHBqCCA0gwggNEAgEAMIIDPQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQI24a7SzXgJOECAgfQgIIDEPY7h36pn6pZ2rTdxZKdhB5UYo/1Bhm9rcV5wIAtG8ZdKzbOPo7K52aqxuoadrzww2fFwXx/yHsPGG8T3SSceMd/5CiPdUV3cO4ErPBwFfqNcBRC/1bUeYrfM/deI2Kza9nprd8iZuMG4pYqysf6Chp8u739v0Usjy0Uq5N4wbIJ6qH/XJbx7hEiGTQ8Qn5XnWDw2NfD9I7kQZOLx3CYtVFBTEMG0AmvewDqVR1r8NFwKBDDquVk2HAceKdVkOdjgmT9ZZEauiixSvG023MfVlAerjo2iDxhFm/Y4DPaEqPiH5D7K6YZRLCQVF2Grwtig/02XK+mU8uILK50p8MWQhqV4BvvxK3zIA7hERWhQ9zqThcqdfnANosxZng8HvOcuFcaXsTkV8Pk43m7neM1o/cY43E/KuLLeiSN+UjcDU0t7plOpyLBaigtA+lFB3Mp+pk7HDiw7iErDqPkcRtXUl1X9crDRn8L3539SsFUbcbdun35bft7v/Z0opySSa7xafNH1JJ1hUlCqRPKQE9lY5PGwxhm6UJ//sYPOID7TV1n/ZFD1+OJKiz81JVw1RPpHQGkC2GqMM/Gxdhjl9HaM85UGER9OhTsjwHCtaqhi44Qr8OcclNCSPZHKW33MryjJxOv3kGE8CBpkL7rpRyjtlIeLiN4xmUj4FeSwOfRfPbRVrLCSBVD1QM3sGlkCcu96cGZX3Z6OUHdrAvkM14rH1FNv3fveFR3WCUN9aXZBv0/VLjCYh7IwMB73WP0WV50Era94hiH1wg5gPdYoiZnPBsuOAh42Pe56NrgX1kQkt4Pbe/vxsga/zjNX/w8tlaEWTT9z/+YyQ1bTynKrIxMQILj7yD6fq9KSHYfHSxebhLXhd0x0eQj9EKYPsf2YF64His4MN9OLaRAHPG/FCrek5DwkhC8IL9l4HHVeTzDpMTEK/kJIvQbr+6QuoSAhGcRz9qybKMAyKSWB9LeLCVWRx+QPL8/AG7jAjEUe8RKngP/TeHlXq3sHfaEGwF3qV3nX5KL+gZzADvwQb5qmwkoG6gwNzAfMAcGBSsOAwIaBBS/11IMnNmw87uDlxVKgKZdGSOd8QQU57vhgyzb7GfyDxErYPNDrtSazU0=
2 |
--------------------------------------------------------------------------------
/test/cookbooks/octopus-deploy-test/metadata.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | name 'octopus-deploy-test'
3 | license 'Apache-2.0'
4 | description 'Used in test kitchen tests to set invoke the utility resources/recipes'
5 | version '0.1.0'
6 |
7 | supports 'windows'
8 |
9 | depends 'octopus-deploy'
10 |
--------------------------------------------------------------------------------
/test/cookbooks/octopus-deploy-test/recipes/server.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | # Cookbook:: octopus-deploy-test
5 | # Recipe:: server
6 | #
7 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
8 | #
9 | # Licensed under the Apache License, Version 2.0 (the "License");
10 | # you may not use this file except in compliance with the License.
11 | # You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 | #
21 |
22 | # We remove and then configure everything everytime
23 | octopus_deploy_server 'OctopusServer' do
24 | action [:uninstall, :install, :remove, :configure]
25 | version node['octopus-deploy-test']['server']['version']
26 | checksum node['octopus-deploy-test']['server']['checksum']
27 | node_name 'octo-web-01'
28 | connection_string node['octopus-deploy-test']['server']['connection-string']
29 | master_key node['octopus-deploy-test']['server']['master-key']
30 | start_service node['octopus-deploy-test']['server']['start-service']
31 | create_database node['octopus-deploy-test']['server']['create-database']
32 | end
33 |
--------------------------------------------------------------------------------
/test/cookbooks/octopus-deploy-test/recipes/tentacle.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | # Cookbook:: octopus-deploy-test
5 | # Recipe:: tentacle
6 | #
7 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
8 | #
9 | # Licensed under the Apache License, Version 2.0 (the "License");
10 | # you may not use this file except in compliance with the License.
11 | # You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 | #
21 |
22 | tentacle = node['octopus-deploy-test']['tentacle']
23 |
24 | # This section will mock out the certificate creationa
25 | cert_directory = 'C:\Octopus Certificate'
26 | cert_file = File.join(cert_directory, 'tentacle_cert.txt')
27 |
28 | directory cert_directory
29 |
30 | cookbook_file cert_file do
31 | action :create
32 | source 'cert.txt'
33 | end
34 |
35 | # Just make sure its not installed already
36 | octopus_deploy_tentacle 'Uninstaller' do
37 | action :uninstall
38 | version tentacle['version']
39 | end
40 |
41 | # The configure action should also install the tentacle
42 | octopus_deploy_tentacle 'Tentacle' do
43 | action [:remove, :configure]
44 | version tentacle['version']
45 | checksum tentacle['checksum']
46 | trusted_cert '324JKSJKLSJ324DSFDF3423FDSF8783FDSFSDFS0'
47 | cert_file cert_file
48 | end
49 |
50 | # Create a user to run the tentacle as (the cookbook assumes the user is already present)
51 | service_user = 'octopus_user'
52 | service_password = '5up3rR@nd0m'
53 |
54 | user service_user do
55 | action :create
56 | password service_password
57 | end
58 |
59 | octopus_deploy_tentacle 'configure TentacleWithUser' do
60 | action [:remove, :configure]
61 | instance 'TentacleWithUser'
62 | install_url tentacle['installer_url']
63 | checksum tentacle['checksum']
64 | polling true
65 | trusted_cert '324JKSJKLSJ324DSFDF3423FDSF8783FDSFSDFS0'
66 | service_user ".\\#{service_user}"
67 | service_password service_password
68 | home_path 'C:\OctopusWithUser'
69 | config_path 'C:\OctopusWithUser\Tentacle.config'
70 | app_path 'C:\OctopusWithUser\Applications'
71 | cert_file cert_file
72 | tenated_deployment_participation :Untenanted
73 | end
74 |
--------------------------------------------------------------------------------
/test/cookbooks/octopus-deploy-test/recipes/tools.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | # Cookbook:: octopus-deploy-test
5 | # Recipe:: tools
6 | #
7 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
8 | #
9 | # Licensed under the Apache License, Version 2.0 (the "License");
10 | # you may not use this file except in compliance with the License.
11 | # You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 | #
21 |
22 | octopus_deploy_tools 'C:/octopus' do
23 | action :install
24 | source 'https://download.octopusdeploy.com/octopus-tools/4.2.3/OctopusTools.4.2.3.zip'
25 | checksum '668a9d379cdf40e3831cd3482bffe84efb5f5a596057dee7b88e283b9141a7c4'
26 | end
27 |
--------------------------------------------------------------------------------
/test/integration/server/server_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | #
5 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing, software
14 | # distributed under the License is distributed on an "AS IS" BASIS,
15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | # See the License for the specific language governing permissions and
17 | # limitations under the License.
18 | #
19 |
20 | control 'The Octopus Deploy Server should be installed' do
21 | describe file('C:\\Program Files\\Octopus Deploy\\Octopus\\Octopus.Server.exe') do
22 | it { should exist }
23 | it { should be_file }
24 | end
25 |
26 | # Commenting this out for now because it does not work on appveyer for some reason.
27 | # describe powershell('Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object { $_.DisplayName -eq "Octopus Deploy Server" } | Select-Object DisplayName,DisplayVersion') do
28 | # its('exit_status') { should eq 0 }
29 | # its('stdout') { should match(/Octopus Deploy Server/) }
30 | # its('stdout') { should match(/3\.2\.24/) }
31 | # end
32 | end
33 |
34 | control 'The Octopus Deploy Server should be configured' do
35 | describe file('C:\\Octopus') do
36 | it { should exist }
37 | it { should be_directory }
38 | end
39 |
40 | describe file('C:\\Octopus\\OctopusServer.config') do
41 | it { should exist }
42 | it { should be_file }
43 | end
44 |
45 | # Commenting this out for now because it does not work on appveyer for some reason.
46 | # describe powershell('Get-Service "OctopusDeploy" | Where-Object { $_.status -eq "Stopped" }') do
47 | # its('exit_status') { should eq 0 }
48 | # its('stdout') { should match(/Stopped/) }
49 | # end
50 | end
51 |
--------------------------------------------------------------------------------
/test/integration/tentacle/tentacle_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | #
5 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing, software
14 | # distributed under the License is distributed on an "AS IS" BASIS,
15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | # See the License for the specific language governing permissions and
17 | # limitations under the License.
18 | #
19 |
20 | control 'The Octopus Deploy Tentacle should be installed' do
21 | describe file('C:\\Program Files\\Octopus Deploy\\Tentacle\\Tentacle.exe') do
22 | it { should exist }
23 | it { should be_file }
24 | end
25 |
26 | # Commenting this out for now because it does not work on appveyer for some reason.
27 | # describe powershell('Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object { $_.DisplayName -eq "Octopus Deploy Tentacle" } | Select-Object DisplayName,DisplayVersion') do
28 | # its('exit_status') { should eq 0 }
29 | # its('stdout') { should match(/Octopus Deploy Tentacle/) }
30 | # its('stdout') { should match(/3\.2\.24/) }
31 | # end
32 | end
33 |
34 | control 'The Octopus Deploy Tentacle Should be configured' do
35 | describe file('C:\\Octopus\\Applications') do
36 | it { should exist }
37 | it { should be_directory }
38 | end
39 |
40 | describe file('C:\\Octopus\\Tentacle.config') do
41 | it { should exist }
42 | it { should be_file }
43 | end
44 |
45 | describe service 'OctopusDeploy Tentacle' do
46 | it { should be_installed }
47 | end
48 |
49 | describe powershell "Get-WmiObject win32_service | Where-Object { $_.Name -eq 'OctopusDeploy Tentacle' } | select startname -expandproperty startname" do
50 | it 'runs the Tentacle as the local system user' do
51 | expect(subject.strip).to eq 'LocalSystem'
52 | end
53 | its('exit_status') { should eq 0 }
54 | end
55 |
56 | # Commenting this out for now because it does not work on appveyer for some reason.
57 | # describe powershell('Get-Service "OctopusDeploy Tentacle" | Where-Object { $_.status -eq "Running" }') do
58 | # its('exit_status') { should eq 0 }
59 | # its('stdout') { should match(/Running/) }
60 | # end
61 | end
62 |
63 | control 'The Octopus Deploy Tentacle With User Should be configured' do
64 | describe file('C:\\OctopusWithUser\\Applications') do
65 | it { should exist }
66 | it { should be_directory }
67 | end
68 |
69 | describe file('C:\\OctopusWithUser\\Tentacle.config') do
70 | it { should exist }
71 | it { should be_file }
72 | end
73 |
74 | describe service 'OctopusDeploy Tentacle: TentacleWithUser' do
75 | it { should be_installed }
76 | end
77 |
78 | describe powershell "Get-WmiObject win32_service | Where-Object { $_.Name -eq 'OctopusDeploy Tentacle: TentacleWithUser' } | select startname -expandproperty startname" do
79 | it 'runs the Tentacle as a specific user' do
80 | expect(subject.strip).to eq '.\octopus_user'
81 | end
82 | its('exit_status') { should eq 0 }
83 | end
84 | end
85 |
--------------------------------------------------------------------------------
/test/integration/tools/tools_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | #
3 | # Author:: Brent Montague ()
4 | #
5 | # Copyright:: Copyright (c) 2015 Cvent, Inc.
6 | #
7 | # Licensed under the Apache License, Version 2.0 (the "License");
8 | # you may not use this file except in compliance with the License.
9 | # You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing, software
14 | # distributed under the License is distributed on an "AS IS" BASIS,
15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | # See the License for the specific language governing permissions and
17 | # limitations under the License.
18 | #
19 |
20 | control 'The Octopus Deploy Tools should be installed' do
21 | describe file('C:\\octopus') do
22 | it { should exist }
23 | it { should be_directory }
24 | end
25 |
26 | describe file('C:\\octopus\\Octo.exe') do
27 | it { should exist }
28 | it { should be_file }
29 | end
30 | end
31 |
--------------------------------------------------------------------------------