vault-tree 0.3.4 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/.rspec +1 -0
- data/CHANGE_LOG.md +27 -0
- data/README.md +15 -73
- data/features/contracts/asymmetric_vault.feature +69 -2
- data/features/contracts/block_chain_key_transfer.feature +59 -0
- data/features/contracts/one_two_three.feature +109 -1
- data/features/contracts/readme.md +5 -6
- data/features/contracts_and_vaults.md +19 -24
- data/features/decision_tree.md +1 -1
- data/features/exceptions.feature +54 -43
- data/features/install_and_usage.md +38 -33
- data/features/keywords/assembled_shamir_key.feature +17 -17
- data/features/keywords/dh_key.feature +5 -5
- data/features/keywords/external_input.feature +35 -0
- data/features/keywords/external_key.feature +24 -0
- data/features/keywords/key.feature +3 -3
- data/features/keywords/random_number.feature +3 -3
- data/features/keywords/shamir_key_shares.feature +29 -0
- data/features/keywords/shamir_share.feature +40 -0
- data/features/keywords/split_key.feature +10 -9
- data/features/keywords/unlocked.feature +3 -3
- data/features/readme.md +1 -1
- data/features/steps/asymmetric_vault.steps.rb +14 -21
- data/features/steps/block_chain_key_transfer.steps.rb +17 -22
- data/features/steps/core.steps.rb +60 -71
- data/features/steps/exceptions.steps.rb +27 -64
- data/features/steps/external_input.steps.rb +17 -0
- data/features/steps/one_two_three.steps.rb +21 -27
- data/features/steps/secret_sharing.steps.rb +36 -19
- data/lib/vault-tree.rb +1 -1
- data/lib/vault-tree/contract/content_ciphertext.rb +33 -0
- data/lib/vault-tree/contract/content_plaintext.rb +33 -0
- data/lib/vault-tree/contract/contract.rb +15 -72
- data/lib/vault-tree/contract/contract_header.rb +11 -0
- data/lib/vault-tree/contract/vault.rb +24 -74
- data/lib/vault-tree/contract/vault_key.rb +21 -0
- data/lib/vault-tree/contract/vault_list.rb +56 -0
- data/lib/vault-tree/exceptions/empty_vault.rb +18 -3
- data/lib/vault-tree/exceptions/failed_lock_attempt.rb +18 -0
- data/lib/vault-tree/exceptions/failed_unlock_attempt.rb +23 -1
- data/lib/vault-tree/exceptions/invalid_external_input.rb +16 -0
- data/lib/vault-tree/exceptions/{missing_passphrase.rb → invalid_shamir_split.rb} +2 -1
- data/lib/vault-tree/exceptions/library_exception.rb +64 -0
- data/lib/vault-tree/exceptions/missing_partner_decryption_key.rb +11 -1
- data/lib/vault-tree/exceptions/unsupported_keyword.rb +17 -1
- data/lib/vault-tree/exceptions/vault_does_not_exist.rb +8 -1
- data/lib/vault-tree/keywords/assembled_shamir_key.rb +1 -1
- data/lib/vault-tree/keywords/contents.rb +1 -1
- data/lib/vault-tree/keywords/dh_key.rb +2 -2
- data/lib/vault-tree/keywords/external_input.rb +58 -0
- data/lib/vault-tree/keywords/external_key.rb +20 -0
- data/lib/vault-tree/keywords/key.rb +7 -1
- data/lib/vault-tree/keywords/keyword_interpreter.rb +5 -3
- data/lib/vault-tree/keywords/public_encryption_key.rb +1 -5
- data/lib/vault-tree/keywords/shamir_key_shares.rb +18 -0
- data/lib/vault-tree/keywords/shamir_share.rb +18 -0
- data/lib/vault-tree/keywords/split_key.rb +1 -1
- data/lib/vault-tree/lock_smith.rb +7 -8
- data/lib/vault-tree/lock_smith/{generated_shamir_key.rb → shamir_key_shares.rb} +22 -21
- data/lib/vault-tree/lock_smith/{split_key.rb → split_key_crypto.rb} +0 -0
- data/lib/vault-tree/version.rb +1 -1
- data/spec/assembled_shamir_key_spec.rb +0 -1
- data/spec/custom_exception_spec.rb +81 -0
- data/spec/lock_smith_spec.rb +0 -48
- data/spec/secret_sharing_spec.rb +0 -1
- data/spec/shamir_key_shares_spec.rb +27 -0
- data/vault-tree.gemspec +1 -1
- metadata +33 -139
- data/Gemfile.lock +0 -53
- data/VagrantFile +0 -30
- data/features/keywords/external_data.feature +0 -11
- data/features/keywords/generated_shamir_key.feature +0 -55
- data/features/keywords/master_passphrase.feature +0 -68
- data/features/manipulating_contracts.md +0 -84
- data/features/support/contract_fixtures/asymmetric_vault.0.1.0.json +0 -69
- data/features/support/contract_fixtures/blank_simple_test_contract.json +0 -14
- data/features/support/contract_fixtures/block_chain_key_transfer.0.1.0.json +0 -59
- data/features/support/contract_fixtures/broken_contract.json +0 -55
- data/features/support/contract_fixtures/one_two_three.0.7.0.json +0 -108
- data/features/support/contract_fixtures/simple_test_contract.json +0 -14
- data/features/support/contract_fixtures/template.json +0 -33
- data/lib/vault-tree/contract/close_validator.rb +0 -28
- data/lib/vault-tree/contract/doorman.rb +0 -113
- data/lib/vault-tree/contract/open_validator.rb +0 -20
- data/lib/vault-tree/exceptions/exception_template.erb +0 -0
- data/lib/vault-tree/exceptions/fill_attempt_master_password.rb +0 -6
- data/lib/vault-tree/exceptions/missing_external_data.rb +0 -6
- data/lib/vault-tree/exceptions/vault_tree_exception.rb +0 -25
- data/lib/vault-tree/keywords/external_data.rb +0 -32
- data/lib/vault-tree/keywords/generated_shamir_key.rb +0 -57
- data/lib/vault-tree/keywords/master_passphrase.rb +0 -9
- data/spec/generated_shamir_key_spec.rb +0 -52
- data/support/cookbooks/ark/.gitignore +0 -12
- data/support/cookbooks/ark/.kitchen.yml +0 -34
- data/support/cookbooks/ark/.travis.yml +0 -6
- data/support/cookbooks/ark/Berksfile +0 -9
- data/support/cookbooks/ark/CHANGELOG.md +0 -87
- data/support/cookbooks/ark/CONTRIBUTING.md +0 -257
- data/support/cookbooks/ark/README.md +0 -301
- data/support/cookbooks/ark/Rakefile +0 -36
- data/support/cookbooks/ark/TESTING.md +0 -25
- data/support/cookbooks/ark/Toftfile +0 -15
- data/support/cookbooks/ark/attributes/default.rb +0 -6
- data/support/cookbooks/ark/chefignore +0 -96
- data/support/cookbooks/ark/files/default/foo.tar.gz +0 -0
- data/support/cookbooks/ark/files/default/foo.tbz +0 -0
- data/support/cookbooks/ark/files/default/foo.tgz +0 -0
- data/support/cookbooks/ark/files/default/foo.zip +0 -0
- data/support/cookbooks/ark/files/default/tests/minitest/default_test.rb +0 -0
- data/support/cookbooks/ark/files/default/tests/minitest/support/helpers.rb +0 -0
- data/support/cookbooks/ark/files/default/tests/minitest/test_test.rb +0 -94
- data/support/cookbooks/ark/libraries/default.rb +0 -167
- data/support/cookbooks/ark/metadata.rb +0 -13
- data/support/cookbooks/ark/providers/default.rb +0 -370
- data/support/cookbooks/ark/recipes/default.rb +0 -31
- data/support/cookbooks/ark/recipes/test.rb +0 -138
- data/support/cookbooks/ark/resources/default.rb +0 -54
- data/support/cookbooks/ark/templates/default/add_to_path.sh.erb +0 -1
- data/support/cookbooks/ark/test/support/Gemfile +0 -4
- data/support/cookbooks/build-essential/README.md +0 -24
- data/support/cookbooks/build-essential/metadata.rb +0 -10
- data/support/cookbooks/build-essential/recipes/default.rb +0 -45
- data/support/cookbooks/chruby/.gitignore +0 -15
- data/support/cookbooks/chruby/.kitchen.yml +0 -26
- data/support/cookbooks/chruby/.ruby_version +0 -1
- data/support/cookbooks/chruby/Berksfile +0 -3
- data/support/cookbooks/chruby/Gemfile +0 -7
- data/support/cookbooks/chruby/LICENSE +0 -14
- data/support/cookbooks/chruby/README.md +0 -92
- data/support/cookbooks/chruby/Rakefile +0 -7
- data/support/cookbooks/chruby/Thorfile +0 -6
- data/support/cookbooks/chruby/Vagrantfile +0 -86
- data/support/cookbooks/chruby/attributes/default.rb +0 -10
- data/support/cookbooks/chruby/chefignore +0 -96
- data/support/cookbooks/chruby/metadata.rb +0 -11
- data/support/cookbooks/chruby/recipes/default.rb +0 -43
- data/support/cookbooks/chruby/recipes/system.rb +0 -25
- data/support/cookbooks/chruby/templates/default/chruby.sh.erb +0 -22
- data/support/cookbooks/chruby/test/integration/default/bash/embedded_test.sh +0 -1
- data/support/cookbooks/git/.gitignore +0 -14
- data/support/cookbooks/git/.kitchen.yml +0 -46
- data/support/cookbooks/git/Berksfile +0 -8
- data/support/cookbooks/git/CHANGELOG.md +0 -87
- data/support/cookbooks/git/CONTRIBUTING +0 -29
- data/support/cookbooks/git/Gemfile +0 -3
- data/support/cookbooks/git/LICENSE +0 -201
- data/support/cookbooks/git/README.md +0 -115
- data/support/cookbooks/git/TESTING.md +0 -25
- data/support/cookbooks/git/attributes/default.rb +0 -40
- data/support/cookbooks/git/metadata.rb +0 -35
- data/support/cookbooks/git/recipes/default.rb +0 -53
- data/support/cookbooks/git/recipes/server.rb +0 -58
- data/support/cookbooks/git/recipes/source.rb +0 -49
- data/support/cookbooks/git/recipes/windows.rb +0 -37
- data/support/cookbooks/git/templates/default/git-xinetd.d.erb +0 -10
- data/support/cookbooks/git/templates/default/sv-git-daemon-log-run.erb +0 -2
- data/support/cookbooks/git/templates/default/sv-git-daemon-run.erb +0 -3
- data/support/cookbooks/install_ruby/README.md +0 -3
- data/support/cookbooks/install_ruby/metadata.rb +0 -10
- data/support/cookbooks/install_ruby/recipes/default.rb +0 -14
- data/support/cookbooks/ruby_build/.gitignore +0 -6
- data/support/cookbooks/ruby_build/.kitchen.yml +0 -31
- data/support/cookbooks/ruby_build/.travis.yml +0 -4
- data/support/cookbooks/ruby_build/Berksfile +0 -10
- data/support/cookbooks/ruby_build/CHANGELOG.md +0 -72
- data/support/cookbooks/ruby_build/Gemfile +0 -14
- data/support/cookbooks/ruby_build/README.md +0 -338
- data/support/cookbooks/ruby_build/Rakefile +0 -21
- data/support/cookbooks/ruby_build/attributes/default.rb +0 -67
- data/support/cookbooks/ruby_build/chefignore +0 -53
- data/support/cookbooks/ruby_build/libraries/ruby_build_recipe_helpers.rb +0 -40
- data/support/cookbooks/ruby_build/metadata.rb +0 -18
- data/support/cookbooks/ruby_build/providers/ruby.rb +0 -88
- data/support/cookbooks/ruby_build/recipes/default.rb +0 -69
- data/support/cookbooks/ruby_build/resources/ruby.rb +0 -33
- data/support/cookbooks/ruby_build/test/cookbooks/alltherubies/metadata.rb +0 -10
- data/support/cookbooks/ruby_build/test/cookbooks/alltherubies/recipes/default.rb +0 -59
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/_verify_tests.bash +0 -33
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_1.8.7.bats +0 -29
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_1.9.2.bats +0 -18
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_1.9.3.bats +0 -18
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_2.0.0.bats +0 -18
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_jruby.bats +0 -20
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_rbx.bats +0 -18
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_ree.bats +0 -19
- data/support/cookbooks/ruby_build/test/integration/installation/bats/installation.bats +0 -6
- data/support/scripts/libsodium_ubuntu.sh +0 -80
- data/support/tasks/.gitkeep +0 -0
- data/support/tasks/libsodium_install.rb +0 -57
@@ -1,87 +0,0 @@
|
|
1
|
-
ark Cookbook CHANGELOG
|
2
|
-
======================
|
3
|
-
This file is used to list changes made in each version of the ark cookbook.
|
4
|
-
|
5
|
-
|
6
|
-
v0.4.0
|
7
|
-
------
|
8
|
-
### Improvement
|
9
|
-
- **[COOK-3539](https://tickets.opscode.com/browse/COOK-3539)** - Allow dumping of bz2 and gzip files
|
10
|
-
|
11
|
-
v0.3.2
|
12
|
-
------
|
13
|
-
### Bug
|
14
|
-
- **[COOK-3191](https://tickets.opscode.com/browse/COOK-3191)** - Propogate unzip failures
|
15
|
-
- **[COOK-3118](https://tickets.opscode.com/browse/COOK-3118)** - Set cookbook attribute in provider
|
16
|
-
- **[COOK-3055](https://tickets.opscode.com/browse/COOK-3055)** - Use proper scope in helper module
|
17
|
-
- **[COOK-3054](https://tickets.opscode.com/browse/COOK-3054)** - Fix notification resource updating
|
18
|
-
|
19
|
-
### Improvement
|
20
|
-
- **[COOK-3179](https://tickets.opscode.com/browse/COOK-3179)** - README updates and refactor
|
21
|
-
|
22
|
-
v0.3.0
|
23
|
-
------
|
24
|
-
### Improvement
|
25
|
-
|
26
|
-
- [COOK-3087]: Can't use ark with chef < 11
|
27
|
-
|
28
|
-
### Bug
|
29
|
-
|
30
|
-
- [COOK-3064]: `only_if` statements in ark's `install_with_make` and configure actions are not testing for file existence correctly.
|
31
|
-
- [COOK-3067]: ark kitchen test for `cherry_pick` is expecting the binary to be in the same parent folder as in the archive.
|
32
|
-
|
33
|
-
v0.2.4
|
34
|
-
------
|
35
|
-
### Bug
|
36
|
-
|
37
|
-
- [COOK-3048]: Ark provider contains a `ruby_block` resource without a block attribute
|
38
|
-
- [COOK-3063]: Ark cookbook `cherry_pick` action's unzip command does not close if statement
|
39
|
-
- [COOK-3065]: Ark install action does not symlink binaries correctly
|
40
|
-
|
41
|
-
v0.2.2
|
42
|
-
------
|
43
|
-
- Update the README to reflect the requirement for Chef 11 to use the ark resource (`use_inline_resources`).
|
44
|
-
- Making this a release so it will also appear on the community site page.
|
45
|
-
|
46
|
-
v0.2.0
|
47
|
-
------
|
48
|
-
### Bug
|
49
|
-
|
50
|
-
- [COOK-2772]: Ark cookbook has foodcritic failures in provides/default.rb
|
51
|
-
|
52
|
-
### Improvement
|
53
|
-
|
54
|
-
- [COOK-2520]: Refactor ark providers to use the '`use_inline_resources`' LWRP DSL feature
|
55
|
-
|
56
|
-
v0.1.0
|
57
|
-
------
|
58
|
-
- [COOK-2335] - ark resource broken on Chef 11
|
59
|
-
|
60
|
-
v0.0.1
|
61
|
-
------
|
62
|
-
- [COOK-2026] - Allow `cherry_pick` action to be used for directories as well as files
|
63
|
-
|
64
|
-
v0.0.1
|
65
|
-
------
|
66
|
-
- [COOK-1593] - README formatting updates for better display on Community Site
|
67
|
-
|
68
|
-
v0.0.1
|
69
|
-
------
|
70
|
-
### Bug
|
71
|
-
- dangling "unless"
|
72
|
-
|
73
|
-
### Improvement
|
74
|
-
- add `setup_py_*` actions
|
75
|
-
- add vagrantfile
|
76
|
-
- add foodcritic test
|
77
|
-
- travis.ci support
|
78
|
-
|
79
|
-
v0.0.10 (May 23, 2012
|
80
|
-
------
|
81
|
-
### Bug
|
82
|
-
- `strip_leading_dir` not working for zip files https://github.com/bryanwb/chef-ark/issues/19
|
83
|
-
|
84
|
-
### Improvement
|
85
|
-
- use autogen.sh to generate configure script for configure action https://github.com/bryanwb/chef-ark/issues/16
|
86
|
-
- support more file extensions https://github.com/bryanwb/chef-ark/pull/18
|
87
|
-
- add extension attribute which allows you to download files which do not have the file extension as part of the URL
|
@@ -1,257 +0,0 @@
|
|
1
|
-
# Contributing to Opscode Cookbooks
|
2
|
-
|
3
|
-
We are glad you want to contribute to Opscode Cookbooks! The first
|
4
|
-
step is the desire to improve the project.
|
5
|
-
|
6
|
-
You can find the answers to additional frequently asked questions
|
7
|
-
[on the wiki](http://wiki.opscode.com/display/chef/How+to+Contribute).
|
8
|
-
|
9
|
-
You can find additional information about
|
10
|
-
[contributing to cookbooks](http://wiki.opscode.com/display/chef/How+to+Contribute+to+Opscode+Cookbooks)
|
11
|
-
on the wiki as well.
|
12
|
-
|
13
|
-
## Quick-contribute
|
14
|
-
|
15
|
-
* Create an account on our [bug tracker](http://tickets.opscode.com)
|
16
|
-
* Sign our contributor agreement (CLA)
|
17
|
-
[ online](https://secure.echosign.com/public/hostedForm?formid=PJIF5694K6L)
|
18
|
-
(keep reading if you're contributing on behalf of your employer)
|
19
|
-
* Create a ticket for your change on the
|
20
|
-
[bug tracker](http://tickets.opscode.com)
|
21
|
-
* Link to your patch as a rebased git branch or pull request from the
|
22
|
-
ticket
|
23
|
-
* Resolve the ticket as fixed
|
24
|
-
|
25
|
-
We regularly review contributions and will get back to you if we have
|
26
|
-
any suggestions or concerns.
|
27
|
-
|
28
|
-
## The Apache License and the CLA/CCLA
|
29
|
-
|
30
|
-
Licensing is very important to open source projects, it helps ensure
|
31
|
-
the software continues to be available under the terms that the author
|
32
|
-
desired. Chef uses the Apache 2.0 license to strike a balance between
|
33
|
-
open contribution and allowing you to use the software however you
|
34
|
-
would like to.
|
35
|
-
|
36
|
-
The license tells you what rights you have that are provided by the
|
37
|
-
copyright holder. It is important that the contributor fully
|
38
|
-
understands what rights they are licensing and agrees to them.
|
39
|
-
Sometimes the copyright holder isn't the contributor, most often when
|
40
|
-
the contributor is doing work for a company.
|
41
|
-
|
42
|
-
To make a good faith effort to ensure these criteria are met, Opscode
|
43
|
-
requires a Contributor License Agreement (CLA) or a Corporate
|
44
|
-
Contributor License Agreement (CCLA) for all contributions. This is
|
45
|
-
without exception due to some matters not being related to copyright
|
46
|
-
and to avoid having to continually check with our lawyers about small
|
47
|
-
patches.
|
48
|
-
|
49
|
-
It only takes a few minutes to complete a CLA, and you retain the
|
50
|
-
copyright to your contribution.
|
51
|
-
|
52
|
-
You can complete our contributor agreement (CLA)
|
53
|
-
[ online](https://secure.echosign.com/public/hostedForm?formid=PJIF5694K6L).
|
54
|
-
If you're contributing on behalf of your employer, have your employer
|
55
|
-
fill out our
|
56
|
-
[Corporate CLA](https://secure.echosign.com/public/hostedForm?formid=PIE6C7AX856)
|
57
|
-
instead.
|
58
|
-
|
59
|
-
## Ticket Tracker (JIRA)
|
60
|
-
|
61
|
-
The [ticket tracker](http://tickets.opscode.com) is the most important
|
62
|
-
documentation for the code base. It provides significant historical
|
63
|
-
information, such as:
|
64
|
-
|
65
|
-
* Which release a bug fix is included in
|
66
|
-
* Discussion regarding the design and merits of features
|
67
|
-
* Error output to aid in finding similar bugs
|
68
|
-
|
69
|
-
Each ticket should aim to fix one bug or add one feature.
|
70
|
-
|
71
|
-
## Using git
|
72
|
-
|
73
|
-
You can get a quick copy of the repository for this cookbook by
|
74
|
-
running `git clone
|
75
|
-
git://github.com/opscode-coobkooks/COOKBOOKNAME.git`.
|
76
|
-
|
77
|
-
For collaboration purposes, it is best if you create a Github account
|
78
|
-
and fork the repository to your own account. Once you do this you will
|
79
|
-
be able to push your changes to your Github repository for others to
|
80
|
-
see and use.
|
81
|
-
|
82
|
-
If you have another repository in your GitHub account named the same
|
83
|
-
as the cookbook, we suggest you suffix the repository with -cookbook.
|
84
|
-
|
85
|
-
### Branches and Commits
|
86
|
-
|
87
|
-
You should submit your patch as a git branch named after the ticket,
|
88
|
-
such as COOK-1337. This is called a _topic branch_ and allows users to
|
89
|
-
associate a branch of code with the ticket.
|
90
|
-
|
91
|
-
It is a best practice to have your commit message have a _summary
|
92
|
-
line_ that includes the ticket number, followed by an empty line and
|
93
|
-
then a brief description of the commit. This also helps other
|
94
|
-
contributors understand the purpose of changes to the code.
|
95
|
-
|
96
|
-
[COOK-1757] - platform_family and style
|
97
|
-
|
98
|
-
* use platform_family for platform checking
|
99
|
-
* update notifies syntax to "resource_type[resource_name]" instead of
|
100
|
-
resources() lookup
|
101
|
-
* COOK-692 - delete config files dropped off by packages in conf.d
|
102
|
-
* dropped debian 4 support because all other platforms have the same
|
103
|
-
values, and it is older than "old stable" debian release
|
104
|
-
|
105
|
-
Remember that not all users use Chef in the same way or on the same
|
106
|
-
operating systems as you, so it is helpful to be clear about your use
|
107
|
-
case and change so they can understand it even when it doesn't apply
|
108
|
-
to them.
|
109
|
-
|
110
|
-
### Github and Pull Requests
|
111
|
-
|
112
|
-
All of Opscode's open source cookbook projects are available on
|
113
|
-
[Github](http://www.github.com/opscode-cookbooks).
|
114
|
-
|
115
|
-
We don't require you to use Github, and we will even take patch diffs
|
116
|
-
attached to tickets on the tracker. However Github has a lot of
|
117
|
-
convenient features, such as being able to see a diff of changes
|
118
|
-
between a pull request and the main repository quickly without
|
119
|
-
downloading the branch.
|
120
|
-
|
121
|
-
If you do choose to use a pull request, please provide a link to the
|
122
|
-
pull request from the ticket __and__ a link to the ticket from the
|
123
|
-
pull request. Because pull requests only have two states, open and
|
124
|
-
closed, we can't easily filter pull requests that are waiting for a
|
125
|
-
reply from the author for various reasons.
|
126
|
-
|
127
|
-
### More information
|
128
|
-
|
129
|
-
Additional help with git is available on the
|
130
|
-
[Working with Git](http://wiki.opscode.com/display/chef/Working+with+Git)
|
131
|
-
wiki page.
|
132
|
-
|
133
|
-
## Functional and Unit Tests
|
134
|
-
|
135
|
-
This cookbook is set up to run tests under
|
136
|
-
[Opscode's test-kitchen](https://github.com/opscode/test-kitchen). It
|
137
|
-
uses minitest-chef to run integration tests after the node has been
|
138
|
-
converged to verify that the state of the node.
|
139
|
-
|
140
|
-
Test kitchen should run completely without exception using the default
|
141
|
-
[baseboxes provided by Opscode](https://github.com/opscode/bento).
|
142
|
-
Because Test Kitchen creates VirtualBox machines and runs through
|
143
|
-
every configuration in the Kitchenfile, it may take some time for
|
144
|
-
these tests to complete.
|
145
|
-
|
146
|
-
If your changes are only for a specific recipe, run only its
|
147
|
-
configuration with Test Kitchen. If you are adding a new recipe, or
|
148
|
-
other functionality such as a LWRP or definition, please add
|
149
|
-
appropriate tests and ensure they run with Test Kitchen.
|
150
|
-
|
151
|
-
If any don't pass, investigate them before submitting your patch.
|
152
|
-
|
153
|
-
Any new feature should have unit tests included with the patch with
|
154
|
-
good code coverage to help protect it from future changes. Similarly,
|
155
|
-
patches that fix a bug or regression should have a _regression test_.
|
156
|
-
Simply put, this is a test that would fail without your patch but
|
157
|
-
passes with it. The goal is to ensure this bug doesn't regress in the
|
158
|
-
future. Consider a regular expression that doesn't match a certain
|
159
|
-
pattern that it should, so you provide a patch and a test to ensure
|
160
|
-
that the part of the code that uses this regular expression works as
|
161
|
-
expected. Later another contributor may modify this regular expression
|
162
|
-
in a way that breaks your use cases. The test you wrote will fail,
|
163
|
-
signalling to them to research your ticket and use case and accounting
|
164
|
-
for it.
|
165
|
-
|
166
|
-
If you need help writing tests, please ask on the Chef Developer's
|
167
|
-
mailing list, or the #chef-hacking IRC channel.
|
168
|
-
|
169
|
-
## Code Review
|
170
|
-
|
171
|
-
Opscode regularly reviews code contributions and provides suggestions
|
172
|
-
for improvement in the code itself or the implementation.
|
173
|
-
|
174
|
-
We find contributions by searching the ticket tracker for _resolved_
|
175
|
-
tickets with a status of _fixed_. If we have feedback we will reopen
|
176
|
-
the ticket and you should resolve it again when you've made the
|
177
|
-
changes or have a response to our feedback. When we believe the patch
|
178
|
-
is ready to be merged, we will tag the _Code Reviewed_ field with
|
179
|
-
_Reviewed_.
|
180
|
-
|
181
|
-
Depending on the project, these tickets are then merged within a week
|
182
|
-
or two, depending on the current release cycle.
|
183
|
-
|
184
|
-
## Release Cycle
|
185
|
-
|
186
|
-
The versioning for Opscode Cookbook projects is X.Y.Z.
|
187
|
-
|
188
|
-
* X is a major release, which may not be fully compatible with prior
|
189
|
-
major releases
|
190
|
-
* Y is a minor release, which adds both new features and bug fixes
|
191
|
-
* Z is a patch release, which adds just bug fixes
|
192
|
-
|
193
|
-
A released version of a cookbook will end in an even number, e.g.
|
194
|
-
"1.2.4" or "0.8.0". When development for the next version of the
|
195
|
-
cookbook begins, the "Z" patch number is incremented to the next odd
|
196
|
-
number, however the next release of the cookbook may be a major or
|
197
|
-
minor incrementing version.
|
198
|
-
|
199
|
-
Releases of Opscode's cookbooks are usually announced on the Chef user
|
200
|
-
mailing list. Releases of several cookbooks may be batched together
|
201
|
-
and announced on the [Opscode Blog](http://www.opscode.com/blog).
|
202
|
-
|
203
|
-
## Working with the community
|
204
|
-
|
205
|
-
These resources will help you learn more about Chef and connect to
|
206
|
-
other members of the Chef community:
|
207
|
-
|
208
|
-
* [chef](http://lists.opscode.com/sympa/info/chef) and
|
209
|
-
[chef-dev](http://lists.opscode.com/sympa/info/chef-dev) mailing
|
210
|
-
lists
|
211
|
-
* #chef and #chef-hacking IRC channels on irc.freenode.net
|
212
|
-
* [Community Cookbook site](http://community.opscode.com)
|
213
|
-
* [Chef wiki](http://wiki.opscode.com/display/chef)
|
214
|
-
* Opscode Chef [product page](http://www.opscode.com/chef)
|
215
|
-
|
216
|
-
|
217
|
-
## Cookbook Contribution Do's and Don't's
|
218
|
-
|
219
|
-
Please do include tests for your contribution. If you need help, ask
|
220
|
-
on the
|
221
|
-
[chef-dev mailing list](http://lists.opscode.com/sympa/info/chef-dev)
|
222
|
-
or the
|
223
|
-
[#chef-hacking IRC channel](http://community.opscode.com/chat/chef-hacking).
|
224
|
-
Not all platforms that a cookbook supports may be supported by Test
|
225
|
-
Kitchen. Please provide evidence of testing your contribution if it
|
226
|
-
isn't trivial so we don't have to duplicate effort in testing. Chef
|
227
|
-
10.14+ "doc" formatted output is sufficient.
|
228
|
-
|
229
|
-
Please do indicate new platform (families) or platform versions in the
|
230
|
-
commit message, and update the relevant ticket.
|
231
|
-
|
232
|
-
If a contribution adds new platforms or platform versions, indicate
|
233
|
-
such in the body of the commit message(s), and update the relevant
|
234
|
-
COOK ticket. When writing commit messages, it is helpful for others if
|
235
|
-
you indicate the COOK ticket. For example:
|
236
|
-
|
237
|
-
git commit -m '[COOK-1041] - Updated pool resource to correctly
|
238
|
-
delete.'
|
239
|
-
|
240
|
-
Please do use [foodcritic](http://acrmp.github.com/foodcritic) to
|
241
|
-
lint-check the cookbook. Except FC007, it should pass all correctness
|
242
|
-
rules. FC007 is okay as long as the dependent cookbooks are *required*
|
243
|
-
for the default behavior of the cookbook, such as to support an
|
244
|
-
uncommon platform, secondary recipe, etc.
|
245
|
-
|
246
|
-
Please do ensure that your changes do not break or modify behavior for
|
247
|
-
other platforms supported by the cookbook. For example if your changes
|
248
|
-
are for Debian, make sure that they do not break on CentOS.
|
249
|
-
|
250
|
-
Please do not modify the version number in the metadata.rb, Opscode
|
251
|
-
will select the appropriate version based on the release cycle
|
252
|
-
information above.
|
253
|
-
|
254
|
-
Please do not update the CHANGELOG.md for a new version. Not all
|
255
|
-
changes to a cookbook may be merged and released in the same versions.
|
256
|
-
Opscode will update the CHANGELOG.md when releasing a new version of
|
257
|
-
the cookbook.
|
@@ -1,301 +0,0 @@
|
|
1
|
-
# <a name="title"></a> chef-ark [![Build Status](https://secure.travis-ci.org/opscode-cookbooks/ark.png?branch=master)](https://travis-ci.org/opscode-cookbooks/ark)
|
2
|
-
|
3
|
-
Overview
|
4
|
-
========
|
5
|
-
|
6
|
-
This cookbook provides `ark`, a resource for managing software
|
7
|
-
archives. It manages the fetch-unpack-configure-build-install process
|
8
|
-
common to installing software from source, or from binary
|
9
|
-
distributions that are not fully fledged OS packages.
|
10
|
-
|
11
|
-
This is a modified verion of Infochimp's awesome
|
12
|
-
[install_from cookbook](http://github.com/infochimps-cookbooks/install_from).
|
13
|
-
It has been heavily refactored and extended to meet different use
|
14
|
-
cases.
|
15
|
-
|
16
|
-
Given a simple project archive available at a url:
|
17
|
-
|
18
|
-
ark 'pig' do
|
19
|
-
url 'http://apache.org/pig/pig-0.8.0.tar.gz'
|
20
|
-
end
|
21
|
-
|
22
|
-
The provider will:
|
23
|
-
|
24
|
-
* fetch it to to `/var/cache/chef/`
|
25
|
-
* unpack it to the default path (`/usr/local/pig-0.8.0`)
|
26
|
-
* create a symlink for `:home_dir` (`/usr/local/pig`) pointing to path
|
27
|
-
* add specified binary commands to the enviroment `PATH` variable
|
28
|
-
|
29
|
-
By default, the ark will not run again if the `:path` is not empty.
|
30
|
-
Ark provides many actions to accommodate different use cases, such as
|
31
|
-
`:dump`, `:cherry_pick`, `:put`, and `:install_with_make`.
|
32
|
-
|
33
|
-
At this time ark only handles files available from URLs. It does not
|
34
|
-
handle local files.
|
35
|
-
|
36
|
-
Requirements
|
37
|
-
============
|
38
|
-
|
39
|
-
This cookbook requires Chef 11 for the provider, as it uses the
|
40
|
-
`use_inline_resources` method.
|
41
|
-
|
42
|
-
More about
|
43
|
-
[use_inline_resources](http://docs.opscode.com/lwrp_common_inline_compile.html)
|
44
|
-
in the Chef documentation.
|
45
|
-
|
46
|
-
Should work on common Unix/Linux systems with typical userland
|
47
|
-
utilities like tar, gzip, etc. May require the installation of build
|
48
|
-
tools for compiling from source, but that installation is outside the
|
49
|
-
scope of this cookbook.
|
50
|
-
|
51
|
-
Attributes
|
52
|
-
==========
|
53
|
-
|
54
|
-
Customize the attributes to suit site specific conventions and
|
55
|
-
defaults.
|
56
|
-
|
57
|
-
* `node['ark']['apache_mirror']` - if the URL is an apache mirror,
|
58
|
-
use the attribute as the default.
|
59
|
-
* `node['ark']['prefix_root']` - default base location if the
|
60
|
-
`prefix_root` is not passed into the resource.
|
61
|
-
* `node['ark']['prefix_bin']` - default binary location if the
|
62
|
-
`prefix_bin` is not passed into the resource.
|
63
|
-
* `node['ark']['prefix_home']` - default home location if the
|
64
|
-
`prefix_home` is not passed into the resource.
|
65
|
-
|
66
|
-
Resources/Providers
|
67
|
-
===================
|
68
|
-
|
69
|
-
* `ark` - does the extract/build/configure dance
|
70
|
-
|
71
|
-
Actions
|
72
|
-
-------
|
73
|
-
|
74
|
-
- `:install`: extracts the file and creates a 'friendly' symbolic link
|
75
|
-
to the extracted directory path
|
76
|
-
- `:configure`: configure ahead of the install action
|
77
|
-
- `:install_with_make`: extracts the archive to a path, runs `make`,
|
78
|
-
and `make install`. It does _not_ run the configure step at this
|
79
|
-
time
|
80
|
-
- `:dump`: strips all directories from the archive and dumps the
|
81
|
-
contained files into a specified path
|
82
|
-
- `:cherry_pick`: extract a specified file from an archive and places
|
83
|
-
in specified path
|
84
|
-
- `:put`: extract the archive to a specified path, does not create any
|
85
|
-
symbolic links
|
86
|
-
- `:remove`: removes the extracted directory and related symlink #TODO
|
87
|
-
- `:setup_py_build`: runs the command "python setup.py build" in the
|
88
|
-
extracted directory
|
89
|
-
- `:setup_py_install`: runs the comand "python setup.py install" in
|
90
|
-
the extracted directory
|
91
|
-
|
92
|
-
## :cherry_pick
|
93
|
-
|
94
|
-
Extract a specified file from an archive and places in specified path.
|
95
|
-
|
96
|
-
### Relevant Attribute Parameters for :cherry_pick
|
97
|
-
|
98
|
-
- `path`: directory to place file in.
|
99
|
-
- `creates`: specific file to cherry-pick.
|
100
|
-
|
101
|
-
## :dump
|
102
|
-
|
103
|
-
Strips all directories from the archive and dumps the contained files
|
104
|
-
into a specified path.
|
105
|
-
|
106
|
-
NOTE: This currently only works for zip archives
|
107
|
-
|
108
|
-
### Attribute Parameters for :dump
|
109
|
-
|
110
|
-
- `path`: path to dump files to.
|
111
|
-
- `mode`: file mode for `app_home`, as an integer.
|
112
|
-
- Example: `0775`
|
113
|
-
- `creates`: if you are appending files to a given directory, ark
|
114
|
-
needs a condition to test whether the file has already been
|
115
|
-
extracted. You can specify with creates, a file whose existence
|
116
|
-
indicates the ark has previously been extracted and does not need to
|
117
|
-
be extracted again.
|
118
|
-
|
119
|
-
## :put
|
120
|
-
|
121
|
-
Extract the archive to a specified path, does not create any symbolic
|
122
|
-
links.
|
123
|
-
|
124
|
-
### Attribute Parameters for :put
|
125
|
-
|
126
|
-
- `path`: path to extract to.
|
127
|
-
- Default: `/usr/local`
|
128
|
-
- `has_binaries`: array of binary commands to symlink into
|
129
|
-
`/usr/local/bin/`, you must specify the relative path.
|
130
|
-
- Example: `[ 'bin/java', 'bin/javaws' ]`
|
131
|
-
- `append_env_path`: boolean, if true, append the `./bin` directory of
|
132
|
-
the extracted directory to the global `PATH` variable for all users.
|
133
|
-
|
134
|
-
Attribute Parameters
|
135
|
-
--------------------
|
136
|
-
|
137
|
-
- `name`: name of the package, defaults to the resource name.
|
138
|
-
- `url`: url for tarball, `.tar.gz`, `.bin` (oracle-specific), `.war`,
|
139
|
-
and `.zip` currently supported. Also supports special syntax
|
140
|
-
`:name:version:apache_mirror:` that will auto-magically construct
|
141
|
-
download url from the apache mirrors site.
|
142
|
-
- `version`: software version, defaults to `1`.
|
143
|
-
- `checksum`: sha256 checksum, used for security .
|
144
|
-
- `mode`: file mode for `app_home`, is an integer.
|
145
|
-
- `prefix_root`: default `prefix_root`, for use with `:install*`
|
146
|
-
actions.
|
147
|
-
- `prefix_home`: default directory prefix for a friendly symlink to
|
148
|
-
the path.
|
149
|
-
- Example: `/usr/local/maven` -> `/usr/local/maven-2.2.1`
|
150
|
-
- `prefix_bin`: default directory to place a symlink to a binary
|
151
|
-
command.
|
152
|
-
- Example: `/opt/bin/mvn` -> `/opt/maven-2.2.1/bin/mvn`, where the
|
153
|
-
`prefix_bin` is `/opt/bin`
|
154
|
-
- `path`: path to extract the ark to. The `:install*` actions
|
155
|
-
overwrite any user-provided values for `:path`.
|
156
|
-
- Default: `/usr/local/<name>-<version>` for the `:install`,
|
157
|
-
`:install_with_make` actions
|
158
|
-
- `home_dir`: symbolic link to the path `:prefix_root/:name-:version`,
|
159
|
-
does not apply to `:dump`, `:put`, or `:cherry_pick` actions.
|
160
|
-
- Default: `:prefix_root/:name`
|
161
|
-
- `has_binaries`: array of binary commands to symlink into
|
162
|
-
`/usr/local/bin/`, you must specify the relative path.
|
163
|
-
- Example: `[ 'bin/java', 'bin/javaws' ]`
|
164
|
-
- `append_env_path`: boolean, similar to `has_binaries` but less
|
165
|
-
granular. If true, append the `./bin` directory of the extracted
|
166
|
-
directory to. the `PATH` environment variable for all users, by
|
167
|
-
placing a file in `/etc/profile.d/`. The commands are symbolically
|
168
|
-
linked into `/usr/bin/*`. This option provides more granularity than
|
169
|
-
the boolean option.
|
170
|
-
- Example: `mvn`, `java`, `javac`, etc.
|
171
|
-
- `environment`: hash of environment variables to pass to invoked
|
172
|
-
shell commands like `tar`, `unzip`, `configure`, and `make`.
|
173
|
-
- `strip_leading_dir`: by default, ark strips the leading directory
|
174
|
-
from an archive, which is the default for both `unzip` and `tar`
|
175
|
-
commands
|
176
|
-
- `autoconf_opts`: an array of command line options for use with the
|
177
|
-
GNU `autoconf` script.
|
178
|
-
- Example: `[ '--include=/opt/local/include', '--force' ]`
|
179
|
-
- `make_opts`: an array of command line options for use with `make`.
|
180
|
-
- Example: `[ '--warn-undefined-variables', '--load-average=2' ]`
|
181
|
-
- `owner`: owner of extracted directory.
|
182
|
-
- Default: `root`
|
183
|
-
|
184
|
-
### Examples
|
185
|
-
|
186
|
-
This example copies `ivy.tar.gz` to
|
187
|
-
`/var/cache/chef/ivy-2.2.0.tar.gz`, unpacks its contents to
|
188
|
-
`/usr/local/ivy-2.2.0/` -- stripping the leading directory, and
|
189
|
-
symlinks `/usr/local/ivy` to `/usr/local/ivy-2.2.0`
|
190
|
-
|
191
|
-
# install Apache Ivy dependency resolution tool
|
192
|
-
ark "ivy" do
|
193
|
-
url 'http://someurl.example.com/ivy.tar.gz'
|
194
|
-
version '2.2.0'
|
195
|
-
checksum '89ba5fde0c596db388c3bbd265b63007a9cc3df3a8e6d79a46780c1a39408cb5'
|
196
|
-
action :install
|
197
|
-
end
|
198
|
-
|
199
|
-
This example copies `jdk-7u2-linux-x64.tar.gz` to
|
200
|
-
`/var/cache/chef/jdk-7.2.tar.gz`, unpacks its contents to
|
201
|
-
`/usr/local/jvm/jdk-7.2/` -- stripping the leading directory, symlinks
|
202
|
-
`/usr/local/jvm/default` to `/usr/local/jvm/jdk-7.2`, and adds
|
203
|
-
`/usr/local/jvm/jdk-7.2/bin/` to the global `PATH` for all users. The
|
204
|
-
user 'foobar' is the owner of the `/usr/local/jvm/jdk-7.2` directory:
|
205
|
-
|
206
|
-
ark 'jdk' do
|
207
|
-
url 'http://download.example.com/jdk-7u2-linux-x64.tar.gz'
|
208
|
-
version '7.2'
|
209
|
-
path "/usr/local/jvm/"
|
210
|
-
home_dir "/usr/local/jvm/default"
|
211
|
-
checksum '89ba5fde0c596db388c3bbd265b63007a9cc3df3a8e6d79a46780c1a39408cb5'
|
212
|
-
append_env_path true
|
213
|
-
owner 'foobar'
|
214
|
-
end
|
215
|
-
|
216
|
-
Install Apache Ivy dependency resolution tool in <path>/resource_name in this case
|
217
|
-
`/usr/local/ivy`, do not symlink, and strip any leading directory if one
|
218
|
-
exists in the tarball:
|
219
|
-
|
220
|
-
ark "ivy" do
|
221
|
-
url 'http://someurl.example.com/ivy.tar.gz'
|
222
|
-
checksum '89ba5fde0c596db388c3bbd265b63007a9cc3df3a8e6d79a46780c1a39408cb5'
|
223
|
-
action :put
|
224
|
-
end
|
225
|
-
|
226
|
-
Install Apache Ivy dependency resolution tool in /home/foobar/ivy, strip any
|
227
|
-
leading directory if one exists:
|
228
|
-
|
229
|
-
ark "ivy" do
|
230
|
-
path "/home/foobar
|
231
|
-
url 'http://someurl.example.com/ivy.tar.gz'
|
232
|
-
checksum '89ba5fde0c596db388c3bbd265b63007a9cc3df3a8e6d79a46780c1a39408cb5'
|
233
|
-
action :put
|
234
|
-
end
|
235
|
-
|
236
|
-
Strip all directories and dump files into path specified by the path attribute.
|
237
|
-
You must specify the `creates` attribute in order to keep the extraction from
|
238
|
-
running every time. The directory path will be created if it doesn't already exist:
|
239
|
-
|
240
|
-
ark "my_jars" do
|
241
|
-
url "http://example.com/bunch_of_jars.zip"
|
242
|
-
path "/usr/local/tomcat/lib"
|
243
|
-
creates "mysql.jar"
|
244
|
-
owner "tomcat"
|
245
|
-
action :dump
|
246
|
-
end
|
247
|
-
|
248
|
-
Extract specific files from a tarball (currently only handles one named file):
|
249
|
-
|
250
|
-
ark 'mysql-connector-java' do
|
251
|
-
url 'http://oracle.com/mysql-connector.zip'
|
252
|
-
creates 'mysql-connector-java-5.0.8-bin.jar'
|
253
|
-
path '/usr/local/tomcat/lib'
|
254
|
-
action :cherry_pick
|
255
|
-
end
|
256
|
-
|
257
|
-
Build and install haproxy and use alternave values for `prefix_root`, `prefix_home`, and `prefix_bin`:
|
258
|
-
|
259
|
-
ark "haproxy" do
|
260
|
-
url "http://haproxy.1wt.eu/download/1.5/src/snapshot/haproxy-ss-20120403.tar.gz"
|
261
|
-
version "1.5"
|
262
|
-
checksum 'ba0424bf7d23b3a607ee24bbb855bb0ea347d7ffde0bec0cb12a89623cbaf911'
|
263
|
-
make_opts [ 'TARGET=linux26' ]
|
264
|
-
prefix_root '/opt'
|
265
|
-
prefix_home '/opt'
|
266
|
-
prefix_bin '/opt/bin'
|
267
|
-
action :install_with_make
|
268
|
-
end
|
269
|
-
|
270
|
-
You can also pass multiple actions to ark and supply the file extension in case
|
271
|
-
the file extension can not be determined by the URL:
|
272
|
-
|
273
|
-
ark "test_autogen" do
|
274
|
-
url 'https://github.com/zeromq/libzmq/tarball/master'
|
275
|
-
extension "tar.gz"
|
276
|
-
action [ :configure, :install_with_make ]
|
277
|
-
end
|
278
|
-
|
279
|
-
License and Author
|
280
|
-
==================
|
281
|
-
|
282
|
-
- Author: Philip (flip) Kromer - Infochimps, Inc(<coders@infochimps.com>)
|
283
|
-
- Author: Bryan W. Berry (<bryan.berry@gmail.com>)
|
284
|
-
- Author: Denis Barishev (<denis.barishev@gmail.com>)
|
285
|
-
- Author: Sean OMeara (<someara@opscode.com>)
|
286
|
-
- Copyright: 2011, Philip (flip) Kromer - Infochimps, Inc
|
287
|
-
- Copyright: 2012, Bryan W. Berry
|
288
|
-
- Copyright: 2012, Denis Barishev
|
289
|
-
- Copyright: 2013, Opscode, Inc
|
290
|
-
|
291
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
292
|
-
you may not use this file except in compliance with the License.
|
293
|
-
You may obtain a copy of the License at
|
294
|
-
|
295
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
296
|
-
|
297
|
-
Unless required by applicable law or agreed to in writing, software
|
298
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
299
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
300
|
-
See the License for the specific language governing permissions and
|
301
|
-
limitations under the License.
|