removed vendored cookbook
This commit is contained in:
parent
adfc7f5565
commit
fc70778c35
@ -1,21 +0,0 @@
|
||||
---
|
||||
driver:
|
||||
name: vagrant
|
||||
synced_folders:
|
||||
- [<%= File.join(ENV['PWD'], '..', '..')%>, '/tmp/repo-data']
|
||||
|
||||
provisioner:
|
||||
name: chef_zero
|
||||
encrypted_data_bag_secret_key_path: 'secrets/fakey-mcfakerton'
|
||||
data_bags_path: './data_bags'
|
||||
product_name: chefdk
|
||||
|
||||
platforms:
|
||||
- name: ubuntu-16.04
|
||||
- name: centos-7
|
||||
|
||||
suites:
|
||||
- name: default
|
||||
run_list:
|
||||
- recipe[test]
|
||||
attributes:
|
@ -1,7 +0,0 @@
|
||||
source 'https://supermarket.chef.io'
|
||||
|
||||
metadata
|
||||
|
||||
group :delivery do
|
||||
cookbook 'test', path: './test/fixtures/cookbooks/test'
|
||||
end
|
@ -1,3 +0,0 @@
|
||||
Copyright 2019 The Authors
|
||||
|
||||
All rights reserved, do not redistribute.
|
@ -1,146 +0,0 @@
|
||||
# build_cookbook
|
||||
|
||||
A build cookbook for running the parent project through Chef Delivery
|
||||
|
||||
This build cookbook should be customized to suit the needs of the parent project. Using this cookbook can be done outside of Chef Delivery, too. If the parent project is a Chef cookbook, we've detected that and "wrapped" [delivery-truck](https://github.com/chef-cookbooks/delivery-truck). That means it is a dependency, and each of its pipeline phase recipes is included in the appropriate phase recipes in this cookbook. If the parent project is not a cookbook, it's left as an exercise to the reader to customize the recipes as needed for each phase in the pipeline.
|
||||
|
||||
## .delivery/config.json
|
||||
|
||||
In the parent directory to this build_cookbook, the `config.json` can be modified as necessary. For example, phases can be skipped, publishing information can be added, and so on. Refer to customer support or the Chef Delivery documentation for assistance on what options are available for this configuration.
|
||||
|
||||
## Test Kitchen - Local Verify Testing
|
||||
|
||||
This cookbook also has a `.kitchen.yml` which can be used to create local build nodes with Test Kitchen to perform the verification phases, `unit`, `syntax`, and `lint`. When running `kitchen converge`, the instances will be set up like Chef Delivery "build nodes" with the [delivery_build cookbook](https://github.com/chef-cookbooks/delivery_build). The reason for this is to make sure that the same exact kind of nodes are used by this build cookbook are run on the local workstation as would run Delivery. It will run `delivery job verify PHASE` for the parent project.
|
||||
|
||||
Modify the `.kitchen.yml` if necessary to change the platforms or other configuration to run the verify phases. After making changes in the parent project, `cd` into this directory (`.delivery/build_cookbook`), and run:
|
||||
|
||||
```
|
||||
kitchen test
|
||||
```
|
||||
|
||||
## Recipes
|
||||
|
||||
Each of the recipes in this build_cookbook are run in the named phase during the Chef Delivery pipeline. The `unit`, `syntax`, and `lint` recipes are additionally run when using Test Kitchen for local testing as noted in the above section.
|
||||
|
||||
## Making Changes - Cookbook Example
|
||||
|
||||
When making changes in the parent project (that which lives in `../..` from this directory), or in the recipes in this build cookbook, there is a bespoke workflow for Chef Delivery. As an example, we'll discuss a Chef Cookbook as the parent.
|
||||
|
||||
First, create a new branch for the changes.
|
||||
|
||||
```
|
||||
git checkout -b testing-build-cookbook
|
||||
```
|
||||
|
||||
Next, increment the version in the metadata.rb. This should be in the _parent_, not in this, the build_cookbook. If this is not done, the verify phase will fail.
|
||||
|
||||
```
|
||||
% git diff
|
||||
<SNIP>
|
||||
-version '0.1.0'
|
||||
+version '0.1.1'
|
||||
```
|
||||
|
||||
The change we'll use for an example is to install the `zsh` package. Write a failing ChefSpec in the cookbook project's `spec/unit/recipes/default_spec.rb`.
|
||||
|
||||
```ruby
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'godzilla::default' do
|
||||
context 'When all attributes are default, on Ubuntu 16.04' do
|
||||
let(:chef_run) do
|
||||
runner = ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04')
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
it 'installs zsh' do
|
||||
expect(chef_run).to install_package('zsh')
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
Commit the local changes as work in progress. The `delivery job` expects to use a clean git repository.
|
||||
|
||||
```
|
||||
git add ../..
|
||||
git commit -m 'WIP: Testing changes'
|
||||
```
|
||||
|
||||
From _this_ directory (`.delivery/build_cookbook`, relative to the parent cookbook project), run
|
||||
|
||||
```
|
||||
cd .delivery/build_cookbook
|
||||
kitchen converge
|
||||
```
|
||||
|
||||
This will take some time at first, because the VMs need to be created, Chef installed, the Delivery CLI installed, etc. Later runs will be faster until they are destroyed. It will also fail on the first VM, as expected, because we wrote the test first. Now edit the parent cookbook project's default recipe to install `zsh`.
|
||||
|
||||
```
|
||||
cd ../../
|
||||
$EDITOR/recipes/default.rb
|
||||
```
|
||||
|
||||
It should look like this:
|
||||
|
||||
```
|
||||
package 'zsh'
|
||||
```
|
||||
|
||||
Create another commit.
|
||||
|
||||
```
|
||||
git add .
|
||||
git commit -m 'WIP: Install zsh in default recipe'
|
||||
```
|
||||
|
||||
Now rerun kitchen from the build_cookbook.
|
||||
|
||||
```
|
||||
cd .delivery/build_cookbook
|
||||
kitchen converge
|
||||
```
|
||||
|
||||
This will take awhile because it will now pass on the first VM, and then create the second VM. We should have warned you this was a good time for a coffee break.
|
||||
|
||||
```
|
||||
Recipe: test::default
|
||||
|
||||
- execute HOME=/home/vagrant delivery job verify unit --server localhost --ent test --org kitchen
|
||||
* execute[HOME=/home/vagrant delivery job verify lint --server localhost --ent test --org kitchen] action run
|
||||
- execute HOME=/home/vagrant delivery job verify lint --server localhost --ent test --org kitchen
|
||||
|
||||
- execute HOME=/home/vagrant delivery job verify syntax --server localhost --ent test --org kitchen
|
||||
|
||||
Running handlers:
|
||||
Running handlers complete
|
||||
Chef Client finished, 3/32 resources updated in 54.665445968 seconds
|
||||
Finished converging <default-centos-71> (1m26.83s).
|
||||
```
|
||||
|
||||
Victory is ours! Our verify phase passed on the build nodes.
|
||||
|
||||
We are ready to run this through our Delivery pipeline. Simply run `delivery review` on the local system from the parent project, and it will open a browser window up to the change we just added.
|
||||
|
||||
```
|
||||
cd ../..
|
||||
delivery review
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
### Why don't I just run rspec and foodcritic/rubocop on my local system?
|
||||
|
||||
An objection to the Test Kitchen approach is that it is much faster to run the unit, lint, and syntax commands for the project on the local system. That is totally true, and also totally valid. Do that for the really fast feedback loop. However, the dance we do with Test Kitchen brings a much higher degree of confidence in the changes we're making, that everything will run on the build nodes in Chef Delivery. We strongly encourage this approach before actually pushing the changes to Delivery.
|
||||
|
||||
### Why do I have to make a commit every time?
|
||||
|
||||
When running `delivery job`, it expects to merge the commit for the changeset against the clean master branch. If we don't save our progress by making a commit, our local changes aren't run through `delivery job` in the Test Kitchen build instances. We can always perform an interactive rebase, and modify the original changeset message in Delivery with `delivery review --edit`. The latter won't modify the git commits, only the changeset in Delivery.
|
||||
|
||||
### What do I do next?
|
||||
|
||||
Make changes in the cookbook project as required for organizational goals and needs. Modify the `build_cookbook` as necessary for the pipeline phases that the cookbook should go through.
|
||||
|
||||
### What if I get stuck?
|
||||
|
||||
Contact Chef Support, or your Chef Customer Success team and they will help you get unstuck.
|
@ -1,104 +0,0 @@
|
||||
# Put files/directories that should be ignored in this file when uploading
|
||||
# to a chef-server or supermarket.
|
||||
# Lines that start with '# ' are comments.
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store
|
||||
Icon?
|
||||
nohup.out
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# SASS #
|
||||
########
|
||||
.sass-cache
|
||||
|
||||
# EDITORS #
|
||||
###########
|
||||
\#*
|
||||
.#*
|
||||
*~
|
||||
*.sw[a-z]
|
||||
*.bak
|
||||
REVISION
|
||||
TAGS*
|
||||
tmtags
|
||||
*_flymake.*
|
||||
*_flymake
|
||||
*.tmproj
|
||||
.project
|
||||
.settings
|
||||
mkmf.log
|
||||
|
||||
## COMPILED ##
|
||||
##############
|
||||
a.out
|
||||
*.o
|
||||
*.pyc
|
||||
*.so
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.exe
|
||||
*/rdoc/
|
||||
|
||||
# Testing #
|
||||
###########
|
||||
.watchr
|
||||
.rspec
|
||||
spec/*
|
||||
spec/fixtures/*
|
||||
test/*
|
||||
features/*
|
||||
examples/*
|
||||
Guardfile
|
||||
Procfile
|
||||
.kitchen*
|
||||
kitchen.yml*
|
||||
.rubocop.yml
|
||||
spec/*
|
||||
Rakefile
|
||||
.travis.yml
|
||||
.foodcritic
|
||||
.codeclimate.yml
|
||||
|
||||
# SCM #
|
||||
#######
|
||||
.git
|
||||
*/.git
|
||||
.gitignore
|
||||
.gitmodules
|
||||
.gitconfig
|
||||
.gitattributes
|
||||
.svn
|
||||
*/.bzr/*
|
||||
*/.hg/*
|
||||
*/.svn/*
|
||||
|
||||
# Berkshelf #
|
||||
#############
|
||||
Berksfile
|
||||
Berksfile.lock
|
||||
cookbooks/*
|
||||
tmp
|
||||
|
||||
# Bundler #
|
||||
###########
|
||||
vendor/*
|
||||
|
||||
# Policyfile #
|
||||
##############
|
||||
Policyfile.rb
|
||||
Policyfile.lock.json
|
||||
|
||||
# Cookbooks #
|
||||
#############
|
||||
CONTRIBUTING*
|
||||
CHANGELOG*
|
||||
TESTING*
|
||||
|
||||
# Vagrant #
|
||||
###########
|
||||
.vagrant
|
||||
Vagrantfile
|
@ -1 +0,0 @@
|
||||
{"id": "delivery_builder_keys"}
|
@ -1,8 +0,0 @@
|
||||
name 'build_cookbook'
|
||||
maintainer 'The Authors'
|
||||
maintainer_email 'you@example.com'
|
||||
license 'all_rights'
|
||||
version '0.1.0'
|
||||
chef_version '>= 13.0'
|
||||
|
||||
depends 'delivery-truck'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::default'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: deploy
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::deploy'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: functional
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::functional'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: lint
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::lint'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: provision
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::provision'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: publish
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::publish'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: quality
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::quality'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: security
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::security'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: smoke
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::smoke'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: syntax
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::syntax'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: unit
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::unit'
|
@ -1,2 +0,0 @@
|
||||
name 'test'
|
||||
version '0.1.0'
|
@ -1,9 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
%w(unit lint syntax).each do |phase|
|
||||
# TODO: This works on Linux/Unix. Not Windows.
|
||||
execute "HOME=/home/vagrant delivery job verify #{phase} --server localhost --ent test --org kitchen" do
|
||||
cwd '/tmp/repo-data'
|
||||
user 'vagrant'
|
||||
environment('GIT_DISCOVERY_ACROSS_FILESYSTEM' => '1')
|
||||
end
|
||||
end
|
17
ops/cookbooks/vendor/app/.delivery/config.json
vendored
17
ops/cookbooks/vendor/app/.delivery/config.json
vendored
@ -1,17 +0,0 @@
|
||||
{
|
||||
"version": "2",
|
||||
"build_cookbook": {
|
||||
"name": "build_cookbook",
|
||||
"path": ".delivery/build_cookbook"
|
||||
},
|
||||
"delivery-truck": {
|
||||
"lint": {
|
||||
"enable_cookstyle": true
|
||||
}
|
||||
},
|
||||
"skip_phases": [],
|
||||
"job_dispatch": {
|
||||
"version": "v2"
|
||||
},
|
||||
"dependencies": []
|
||||
}
|
36
ops/cookbooks/vendor/app/.delivery/project.toml
vendored
36
ops/cookbooks/vendor/app/.delivery/project.toml
vendored
@ -1,36 +0,0 @@
|
||||
# Delivery Prototype for Local Phases Execution
|
||||
#
|
||||
# The purpose of this file is to prototype a new way to execute
|
||||
# phases locally on your workstation. The delivery-cli will read
|
||||
# this file and execute the command(s) that are configured for
|
||||
# each phase. You can customize them by just modifying the phase
|
||||
# key on this file.
|
||||
#
|
||||
# By default these phases are configured for Cookbook Workflow only
|
||||
#
|
||||
# As this is still a prototype we are not modifying the current
|
||||
# config.json file and it will continue working as usual.
|
||||
|
||||
[local_phases]
|
||||
unit = "chef exec rspec spec/"
|
||||
lint = "chef exec cookstyle"
|
||||
# Foodcritic includes rules only appropriate for community cookbooks
|
||||
# uploaded to Supermarket. We turn off any rules tagged "supermarket"
|
||||
# by default. If you plan to share this cookbook you should remove
|
||||
# '-t ~supermarket' below to enable supermarket rules.
|
||||
syntax = "chef exec foodcritic . -t ~supermarket"
|
||||
provision = "chef exec kitchen create"
|
||||
deploy = "chef exec kitchen converge"
|
||||
smoke = "chef exec kitchen verify"
|
||||
# The functional phase is optional, you can define it by uncommenting
|
||||
# the line below and running the command: `delivery local functional`
|
||||
# functional = ""
|
||||
cleanup = "chef exec kitchen destroy"
|
||||
|
||||
# Remote project.toml file
|
||||
#
|
||||
# Specify a remote URI location for the `project.toml` file.
|
||||
# This is useful for teams that wish to centrally manage the behavior
|
||||
# of the `delivery local` command across many different projects.
|
||||
#
|
||||
# remote_file = "https://url/project.toml"
|
3
ops/cookbooks/vendor/app/LICENSE
vendored
3
ops/cookbooks/vendor/app/LICENSE
vendored
@ -1,3 +0,0 @@
|
||||
Copyright 2019 The Authors
|
||||
|
||||
All rights reserved, do not redistribute.
|
4
ops/cookbooks/vendor/app/README.md
vendored
4
ops/cookbooks/vendor/app/README.md
vendored
@ -1,4 +0,0 @@
|
||||
# django-backend
|
||||
|
||||
TODO: Enter the cookbook description here.
|
||||
|
104
ops/cookbooks/vendor/app/chefignore
vendored
104
ops/cookbooks/vendor/app/chefignore
vendored
@ -1,104 +0,0 @@
|
||||
# Put files/directories that should be ignored in this file when uploading
|
||||
# to a chef-server or supermarket.
|
||||
# Lines that start with '# ' are comments.
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store
|
||||
Icon?
|
||||
nohup.out
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# SASS #
|
||||
########
|
||||
.sass-cache
|
||||
|
||||
# EDITORS #
|
||||
###########
|
||||
\#*
|
||||
.#*
|
||||
*~
|
||||
*.sw[a-z]
|
||||
*.bak
|
||||
REVISION
|
||||
TAGS*
|
||||
tmtags
|
||||
*_flymake.*
|
||||
*_flymake
|
||||
*.tmproj
|
||||
.project
|
||||
.settings
|
||||
mkmf.log
|
||||
|
||||
## COMPILED ##
|
||||
##############
|
||||
a.out
|
||||
*.o
|
||||
*.pyc
|
||||
*.so
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.exe
|
||||
*/rdoc/
|
||||
|
||||
# Testing #
|
||||
###########
|
||||
.watchr
|
||||
.rspec
|
||||
spec/*
|
||||
spec/fixtures/*
|
||||
test/*
|
||||
features/*
|
||||
examples/*
|
||||
Guardfile
|
||||
Procfile
|
||||
.kitchen*
|
||||
kitchen.yml*
|
||||
.rubocop.yml
|
||||
spec/*
|
||||
Rakefile
|
||||
.travis.yml
|
||||
.foodcritic
|
||||
.codeclimate.yml
|
||||
|
||||
# SCM #
|
||||
#######
|
||||
.git
|
||||
*/.git
|
||||
.gitignore
|
||||
.gitmodules
|
||||
.gitconfig
|
||||
.gitattributes
|
||||
.svn
|
||||
*/.bzr/*
|
||||
*/.hg/*
|
||||
*/.svn/*
|
||||
|
||||
# Berkshelf #
|
||||
#############
|
||||
Berksfile
|
||||
Berksfile.lock
|
||||
cookbooks/*
|
||||
tmp
|
||||
|
||||
# Bundler #
|
||||
###########
|
||||
vendor/*
|
||||
|
||||
# Policyfile #
|
||||
##############
|
||||
Policyfile.rb
|
||||
Policyfile.lock.json
|
||||
|
||||
# Cookbooks #
|
||||
#############
|
||||
CONTRIBUTING*
|
||||
CHANGELOG*
|
||||
TESTING*
|
||||
|
||||
# Vagrant #
|
||||
###########
|
||||
.vagrant
|
||||
Vagrantfile
|
35
ops/cookbooks/vendor/app/metadata.json
vendored
35
ops/cookbooks/vendor/app/metadata.json
vendored
@ -1,35 +0,0 @@
|
||||
{
|
||||
"name": "app",
|
||||
"description": "Installs/Configures django-backend",
|
||||
"long_description": "Installs/Configures django-backend",
|
||||
"maintainer": "The Authors",
|
||||
"maintainer_email": "you@example.com",
|
||||
"license": "All Rights Reserved",
|
||||
"platforms": {
|
||||
|
||||
},
|
||||
"dependencies": {
|
||||
"t42-common": ">= 0.0.0"
|
||||
},
|
||||
"providing": {
|
||||
|
||||
},
|
||||
"recipes": {
|
||||
|
||||
},
|
||||
"version": "0.1.0",
|
||||
"source_url": "",
|
||||
"issues_url": "",
|
||||
"privacy": false,
|
||||
"chef_versions": [
|
||||
[
|
||||
">= 13.0"
|
||||
]
|
||||
],
|
||||
"ohai_versions": [
|
||||
|
||||
],
|
||||
"gems": [
|
||||
|
||||
]
|
||||
}
|
22
ops/cookbooks/vendor/app/metadata.rb
vendored
22
ops/cookbooks/vendor/app/metadata.rb
vendored
@ -1,22 +0,0 @@
|
||||
name 'app'
|
||||
maintainer 'The Authors'
|
||||
maintainer_email 'you@example.com'
|
||||
license 'All Rights Reserved'
|
||||
description 'Installs/Configures django-backend'
|
||||
long_description 'Installs/Configures django-backend'
|
||||
version '0.1.0'
|
||||
chef_version '>= 13.0'
|
||||
|
||||
depends 't42-common'
|
||||
|
||||
# The `issues_url` points to the location where issues for this cookbook are
|
||||
# tracked. A `View Issues` link will be displayed on this cookbook's page when
|
||||
# uploaded to a Supermarket.
|
||||
#
|
||||
# issues_url 'https://github.com/<insert_org_here>/django-backend/issues'
|
||||
|
||||
# The `source_url` points to the development repository for this cookbook. A
|
||||
# `View Source` link will be displayed on this cookbook's page when uploaded to
|
||||
# a Supermarket.
|
||||
#
|
||||
# source_url 'https://github.com/<insert_org_here>/django-backend'
|
1
ops/cookbooks/vendor/app/recipes/default.rb
vendored
1
ops/cookbooks/vendor/app/recipes/default.rb
vendored
@ -1 +0,0 @@
|
||||
package 'libpam0g-dev'
|
273
ops/cookbooks/vendor/ark/CHANGELOG.md
vendored
273
ops/cookbooks/vendor/ark/CHANGELOG.md
vendored
@ -1,273 +0,0 @@
|
||||
# ark Cookbook CHANGELOG
|
||||
|
||||
This file is used to list changes made in each version of the ark cookbook.
|
||||
|
||||
## 5.0.0 (2020-01-02)
|
||||
|
||||
- Require Chef Infra Client 14+ and remove the need for the build_essential dependency - [@tas50](https://github.com/tas50)
|
||||
- Use Ruby classes in resource properties - [@tas50](https://github.com/tas50)
|
||||
- Simplify the platform check logic - [@tas50](https://github.com/tas50)
|
||||
- Remove the .foocritic file - [@tas50](https://github.com/tas50)
|
||||
- Remove long_description and recipe metadata - [@tas50](https://github.com/tas50)
|
||||
- Expand testing - [@tas50](https://github.com/tas50)
|
||||
- Remove Ubuntu 14.04 testing - [@tas50](https://github.com/tas50)
|
||||
|
||||
## 4.0.0 (2018-07-25)
|
||||
|
||||
- Support append_env_path property on Windows, which increases the minimum required Chef release to Chef 13.4
|
||||
|
||||
## 3.1.1 (2018-07-24)
|
||||
|
||||
- Remove ChefSpec matchers since these are autogenerated now
|
||||
- Update specs to the latest platform versions
|
||||
- Remove template out of defaults directory
|
||||
- Remove dependency on the Windows cookbook
|
||||
|
||||
## 3.1.0 (2017-05-06)
|
||||
|
||||
- Ensure the dependencies get installed on Chef 13 Amazon Linux systems
|
||||
- Require Chef 12.7+ and remove action_class.class_eval usage
|
||||
|
||||
## 3.0.0 (2017-04-05)
|
||||
|
||||
- Rewrite of resource to custom resources.
|
||||
- Remove EOL platforms from testing.
|
||||
- Update zlib URL
|
||||
-
|
||||
## 2.2.1 (2016-12-16)
|
||||
- Use Ohai root_group attribute to avoid trying to set the group to root on BSD/macOS.
|
||||
- Add missing accessor for owner property
|
||||
|
||||
## 2.2.0 (2016-12-14)
|
||||
|
||||
- Add detection of .7z file extensions
|
||||
- Fix 7zip extraction using strip_components >= 1 to properly extract to the path instead of the user's home_dir
|
||||
- Always quote the path to the 7zip and xcopy binaries as they may have spaces
|
||||
- Clarified in the readme that the install_with_make action includes the configure action
|
||||
- Fix files with very long paths failing to extract on Windows
|
||||
- Fix default owner of 'root' failing on Windows
|
||||
- Fix 7-zip extraction with long paths when strip_components is >= 1
|
||||
- Add the group attribute parameter to README
|
||||
- Fix package installation failure on macOS systems
|
||||
- Use x to extract with 7-zip, not e. Use e only for dump, which strips directories.
|
||||
|
||||
## 2.1.0 (2016-11-15)
|
||||
|
||||
- Move tar/7zip path logic out of attributes and into helpers to prevent failures when 7zip is not installed before the chef run starts
|
||||
- Improve platform testing in Test Kitchen
|
||||
- Recognize Windows as a supported platform in the readme
|
||||
- Introduce a new attribute for overriding the 7-zip location: node['ark']['sevenzip_binary']
|
||||
|
||||
## 2.0.2 (2016-11-03)
|
||||
|
||||
- Fix suse support and centos < 6
|
||||
|
||||
## 2.1.0 (2016-11-01)
|
||||
|
||||
- Use multipackage installs to speed up installation
|
||||
- Avoid installation package dependencies on Windows entirely
|
||||
- Remove the testing bin stubs
|
||||
|
||||
## 2.0.0 (2016-09-15)
|
||||
|
||||
- Add CentOS 7.2, Fedora 23, and Suse specs
|
||||
- Add centos 5, debian, and opensuse travis testing
|
||||
- Add a contributing doc
|
||||
- Fix cookstyle warnings
|
||||
- Require Chef 12.1+
|
||||
|
||||
## [v1.2.0](https://github.com/chef-cookbooks/ark/tree/v1.2.0) (2016-07-03)
|
||||
|
||||
[Full Changelog](https://github.com/chef-cookbooks/ark/compare/v1.1.0...v1.2.0)
|
||||
|
||||
- Create seven_zip unpack command when strip_components is 0 [#155](https://github.com/chef-cookbooks/ark/pull/155) ([terkill](https://github.com/terkill))
|
||||
- Get 7zip path from the windows registry. [#153](https://github.com/chef-cookbooks/ark/pull/153) ([buri17](https://github.com/buri17))
|
||||
- Use fullpath for xcopy and icacls. [#152](https://github.com/chef-cookbooks/ark/pull/152) ([buri17](https://github.com/buri17))
|
||||
- Define custom matcher helper for notification testing, fixes #139 [#144](https://github.com/chef-cookbooks/ark/pull/144) ([szymonpk](https://github.com/szymonpk))
|
||||
|
||||
## v1.1.0 (2016-05-19)
|
||||
|
||||
- Add support for RHEL 7
|
||||
- Fixes to the readme to clarify actions / properties
|
||||
- Expose the backup property in remote file to the ark resource
|
||||
- Transfer the cookbook back to Chef
|
||||
- Resolve all rubocop warnings
|
||||
- Add maintainers files and Chef contributing docs
|
||||
- Test on the latest platforms in .kitchen.yml and update Travis to use kitchen-dokken with additional platforms
|
||||
|
||||
## v1.0.1 (2016-02-16)
|
||||
|
||||
- Remove a large number of zero byte archives that snuck into the repository
|
||||
- Remove a Chef 10 compatibility check in the custom resource
|
||||
|
||||
## v1.0.0 (2016-02-09)
|
||||
|
||||
- Added the pkg-config package to the debian platform family
|
||||
- Added tar, xz-lzma-compat, and bzip2 packages to the RHEL and fedora platform families
|
||||
- Updated FreeBSD to install gmake instead of make
|
||||
- Added OS X, SmartOS, and FreeBSD to the tar path attributes to support those platforms
|
||||
- Removed the has_binaries attribute from put action documentation in the readme file since this isn't supported there
|
||||
- Moved the libraries module locations to no longer be under Opscode:: and broke out libraries into more logical units
|
||||
- Fixed issues with spaces in Windows paths that could cause failures
|
||||
- Fixed a bad attribute for the 7zip home on windows. Instead of using a node attribute use the value directly to avoid computed attribute overiding issues
|
||||
- Switched from the 7-zip cookbook to seven_zip since the 7-zip cookbook is now deprecated
|
||||
- Changed unzip commands to not use -u so that a newer archive can overwrite an existing directory
|
||||
- Added support for actions py_setup, py_setup_install, py_setup_build
|
||||
- Fixed setting home_dir attribute
|
||||
- Added source_url and issues_url to the metadata.rb
|
||||
- Expanded the supported platforms in metadata.rb
|
||||
- Removed all references to Opscode
|
||||
- Improved error logging when an unknown extension is encountered
|
||||
- Added support for .tar files
|
||||
- Improved overall testing:
|
||||
|
||||
- Removed the kitchen.cloud.yml file and gem dependencies
|
||||
- Added integration testing in Travis with Kitchen-Docker and Travis tests now run using the nightly build of ChefDK
|
||||
- Expanded platforms tested in the .kitchen.yml file
|
||||
- Updated the Gemfile with the latest testing dependencies
|
||||
- Added full Chefspec coverage
|
||||
- Greatly expanded the ark_spec test cookbook
|
||||
- Removed the original minitests
|
||||
|
||||
- Added standard Chef .gitignore and chefignore files
|
||||
|
||||
- Resolved a large number of rubocop warnings
|
||||
|
||||
- Removed old Opscode contributing and testing docs
|
||||
|
||||
- Added a cookbook version badge to the readme
|
||||
|
||||
- Removed the Toftfile
|
||||
|
||||
## v0.9.0 (2014-06-06)
|
||||
|
||||
- [COOK-3642] Add Windows support
|
||||
|
||||
## v0.8.2 (2014-04-23)
|
||||
|
||||
- [COOK-4514] - Support for SLES with the Ark cookbook
|
||||
|
||||
## v0.8.0 (2014-04-10)
|
||||
|
||||
- [COOK-2771] - Add support for XZ compression
|
||||
|
||||
## v0.7.2 (2014-03-28)
|
||||
|
||||
- [COOK-4477] - Fix failing test suite
|
||||
- [COOK-4484] - Replace strip_leading_dir attribute with more general strip_components
|
||||
|
||||
## v0.7.0 (2014-03-18)
|
||||
|
||||
- [COOK-4437] - configure and install_with_make should chown after unpack
|
||||
|
||||
## v0.6.0 (2014-02-27)
|
||||
|
||||
[COOK-3786] - Unable to install multiple versions of archive without duplication
|
||||
|
||||
## v0.5.0 (2014-02-21)
|
||||
|
||||
### Bug
|
||||
|
||||
- **[COOK-4288](https://tickets.opscode.com/browse/COOK-4288)** - Cleanup the Kitchen
|
||||
|
||||
### Improvement
|
||||
|
||||
- **[COOK-4264](https://tickets.opscode.com/browse/COOK-4264)** - Add node['ark']['package_dependencies'] to allow tuning packages.
|
||||
|
||||
## v0.4.2
|
||||
|
||||
### Improvement
|
||||
|
||||
- **[COOK-3854](https://tickets.opscode.com/browse/COOK-3854)** - Capability with mac_os_x: '/bin/chown' - No such file or directory
|
||||
- Cleaning up some style for rubucop
|
||||
- Updating test harness
|
||||
|
||||
## v0.4.0
|
||||
|
||||
### Improvement
|
||||
|
||||
- **[COOK-3539](https://tickets.opscode.com/browse/COOK-3539)** - Allow dumping of bz2 and gzip files
|
||||
|
||||
## v0.3.2
|
||||
|
||||
### Bug
|
||||
|
||||
- **[COOK-3191](https://tickets.opscode.com/browse/COOK-3191)** - Propogate unzip failures
|
||||
- **[COOK-3118](https://tickets.opscode.com/browse/COOK-3118)** - Set cookbook attribute in provider
|
||||
- **[COOK-3055](https://tickets.opscode.com/browse/COOK-3055)** - Use proper scope in helper module
|
||||
- **[COOK-3054](https://tickets.opscode.com/browse/COOK-3054)** - Fix notification resource updating
|
||||
|
||||
### Improvement
|
||||
|
||||
- **[COOK-3179](https://tickets.opscode.com/browse/COOK-3179)** - README updates and refactor
|
||||
|
||||
## v0.3.0
|
||||
|
||||
### Improvement
|
||||
|
||||
- [COOK-3087]: Can't use ark with chef < 11
|
||||
|
||||
### Bug
|
||||
|
||||
- [COOK-3064]: `only_if` statements in ark's `install_with_make` and configure actions are not testing for file existence correctly.
|
||||
- [COOK-3067]: ark kitchen test for `cherry_pick` is expecting the binary to be in the same parent folder as in the archive.
|
||||
|
||||
## v0.2.4
|
||||
|
||||
### Bug
|
||||
|
||||
- [COOK-3048]: Ark provider contains a `ruby_block` resource without a block attribute
|
||||
- [COOK-3063]: Ark cookbook `cherry_pick` action's unzip command does not close if statement
|
||||
- [COOK-3065]: Ark install action does not symlink binaries correctly
|
||||
|
||||
## v0.2.2
|
||||
|
||||
- Update the README to reflect the requirement for Chef 11 to use the ark resource (`use_inline_resources`).
|
||||
- Making this a release so it will also appear on the community site page.
|
||||
|
||||
## v0.2.0
|
||||
|
||||
### Bug
|
||||
|
||||
- [COOK-2772]: Ark cookbook has foodcritic failures in provides/default.rb
|
||||
|
||||
### Improvement
|
||||
|
||||
- [COOK-2520]: Refactor ark providers to use the '`use_inline_resources`' LWRP DSL feature
|
||||
|
||||
## v0.1.0
|
||||
|
||||
- [COOK-2335] - ark resource broken on Chef 11
|
||||
|
||||
## v0.0.1
|
||||
|
||||
- [COOK-2026] - Allow `cherry_pick` action to be used for directories as well as files
|
||||
|
||||
## v0.0.1
|
||||
|
||||
- [COOK-1593] - README formatting updates for better display on Community Site
|
||||
|
||||
## v0.0.1
|
||||
|
||||
### Bug
|
||||
|
||||
- dangling "unless"
|
||||
|
||||
### Improvement
|
||||
|
||||
- add `setup_py_*` actions
|
||||
- add vagrantfile
|
||||
- add foodcritic test
|
||||
- travis.ci support
|
||||
|
||||
## v0.0.10 (May 23, 2012
|
||||
|
||||
### Bug
|
||||
|
||||
- `strip_leading_dir` not working for zip files <https://github.com/bryanwb/chef-ark/issues/19>
|
||||
|
||||
### Improvement
|
||||
|
||||
- use autogen.sh to generate configure script for configure action <https://github.com/bryanwb/chef-ark/issues/16>
|
||||
- support more file extensions <https://github.com/bryanwb/chef-ark/pull/18>
|
||||
- add extension attribute which allows you to download files which do not have the file extension as part of the URL
|
2
ops/cookbooks/vendor/ark/CONTRIBUTING.md
vendored
2
ops/cookbooks/vendor/ark/CONTRIBUTING.md
vendored
@ -1,2 +0,0 @@
|
||||
Please refer to
|
||||
https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD
|
297
ops/cookbooks/vendor/ark/README.md
vendored
297
ops/cookbooks/vendor/ark/README.md
vendored
@ -1,297 +0,0 @@
|
||||
# ark cookbook
|
||||
|
||||
[](https://travis-ci.org/chef-cookbooks/ark) [](https://supermarket.chef.io/cookbooks/ark)
|
||||
|
||||
## Overview
|
||||
|
||||
This cookbook provides `ark`, a resource for managing software archives. It manages the fetch-unpack-configure-build-install process common to installing software from source, or from binary distributions that are not fully fledged OS packages.
|
||||
|
||||
This cookbook started its life as a modified version of Infochimp's install_from cookbook. It has since been heavily refactored and extended to meet different use cases.
|
||||
|
||||
Given a simple project archive available at a url:
|
||||
|
||||
```ruby
|
||||
ark 'pig' do
|
||||
url 'http://apache.org/pig/pig-0.8.0.tar.gz'
|
||||
end
|
||||
```
|
||||
|
||||
The `ark` resource will:
|
||||
|
||||
- fetch it to to `/var/cache/chef/`
|
||||
- unpack it to the default path (`/usr/local/pig-0.8.0`)
|
||||
- create a symlink for `:home_dir` (`/usr/local/pig`) pointing to path
|
||||
- add specified binary commands to the environment `PATH` variable
|
||||
|
||||
By default, the ark will not run again if the `:path` is not empty. Ark provides many actions to accommodate different use cases, such as `:dump`, `:cherry_pick`, `:put`, and `:install_with_make`.
|
||||
|
||||
For remote files ark supports URLs using the [remote_file](http://docs.chef.io/resource_remote_file.html) resource. Local files are accessed with the `file://` syntax.
|
||||
|
||||
## Requirements
|
||||
|
||||
### Platforms
|
||||
|
||||
- Debian/Ubuntu
|
||||
- RHEL/CentOS/Scientific/Oracle
|
||||
- Fedora
|
||||
- FreeBSD
|
||||
- SmartOS
|
||||
- macOS
|
||||
- openSUSE / SUSE Linux Enterprises
|
||||
- Windows
|
||||
|
||||
Should work on common Unix/Linux systems with typical userland utilities like tar, gzip, etc. May require the installation of build tools for compiling from source, but that installation is outside the scope of this cookbook.
|
||||
|
||||
### Chef
|
||||
|
||||
- Chef 14+
|
||||
|
||||
### Cookbooks
|
||||
|
||||
- seven_zip
|
||||
|
||||
## Attributes
|
||||
|
||||
Customize the attributes to suit site specific conventions and defaults.
|
||||
|
||||
- `node['ark']['apache_mirror']` - if the URL is an apache mirror, use the attribute as the default. default: `http://apache.mirrors.tds.net`
|
||||
- `node['ark']['prefix_root']` - default base location if the `prefix_root` is not passed into the resource. default: `/usr/local`
|
||||
- `node['ark']['prefix_bin']` - default binary location if the `prefix_bin` is not passed into the resource. default: `/usr/local/bin`
|
||||
- `node['ark']['prefix_home']` - default home location if the `prefix_home` is not passed into the resource. default: `/usr/local`
|
||||
- `node['ark']['package_dependencies']` - prerequisite system packages that need to be installed to support ark. default: varies based on platform
|
||||
- `node['ark']['tar']` - allows overriding the default path to the tar binary, which varies based on platform
|
||||
- `node['ark']['sevenzip_binary']` - allows overriding the default path to the 7zip binary, which is determined based on registry key value
|
||||
|
||||
## Resources
|
||||
|
||||
- `ark` - does the extract/build/configure
|
||||
|
||||
### Actions
|
||||
|
||||
- `:install`: extracts the file and creates a 'friendly' symbolic link to the extracted directory path
|
||||
- `:configure`: configure ahead of the install action
|
||||
- `:install_with_make`: extracts the archive to a path, runs `configure`, `make`, and `make install`.
|
||||
- `:dump`: strips all directories from the archive and dumps the contained files into a specified path
|
||||
- `:cherry_pick`: extract a specified file from an archive and places in specified path
|
||||
- `:put`: extract the archive to a specified path, does not create any symbolic links
|
||||
- `:remove`: removes the extracted directory and related symlink #TODO
|
||||
- `:setup_py`: runs the command "python setup.py" in the extracted directory
|
||||
- `:setup_py_build`: runs the command "python setup.py build" in the extracted directory
|
||||
- `:setup_py_install`: runs the command "python setup.py install" in the extracted directory
|
||||
|
||||
### :cherry_pick
|
||||
|
||||
Extract a specified file from an archive and places in specified path.
|
||||
|
||||
#### Relevant Attribute Parameters for :cherry_pick
|
||||
|
||||
- `path`: directory to place file in.
|
||||
- `creates`: specific file to cherry-pick.
|
||||
|
||||
### :dump
|
||||
|
||||
Strips all directories from the archive and dumps the contained files into a specified path.
|
||||
|
||||
NOTE: This currently only works for zip archives
|
||||
|
||||
#### Attribute Parameters for :dump
|
||||
|
||||
- `path`: path to dump files to.
|
||||
- `mode`: file mode for `app_home`, as an integer.
|
||||
|
||||
- Example: `0775`
|
||||
|
||||
- `creates`: if you are appending files to a given directory, ark needs a condition to test whether the file has already been extracted. You can specify with creates, a file whose existence indicates the ark has previously been extracted and does not need to be extracted again.
|
||||
|
||||
### :put
|
||||
|
||||
Extract the archive to a specified path, does not create any symbolic links.
|
||||
|
||||
#### Attribute Parameters for :put
|
||||
|
||||
- `path`: path to extract to.
|
||||
|
||||
- Default: `/usr/local`
|
||||
|
||||
- `append_env_path`: boolean, if true, append the `./bin` directory of the extracted directory to the global `PATH` variable for all users.
|
||||
|
||||
### Attribute Parameters
|
||||
|
||||
- `name`: name of the package, defaults to the resource name.
|
||||
- `url`: url for tarball, `.tar.gz`, `.bin` (oracle-specific), `.war`, and `.zip` currently supported. Also supports special syntax
|
||||
- `:name:version:apache_mirror:` that will auto-magically construct download url from the apache mirrors site.
|
||||
- `version`: software version, defaults to `1`.
|
||||
- `mode`: file mode for `app_home`, is an integer.
|
||||
- `prefix_root`: default `prefix_root`, for use with `:install*` actions.
|
||||
- `prefix_home`: default directory prefix for a friendly symlink to the path.
|
||||
|
||||
- Example: `/usr/local/maven` -> `/usr/local/maven-2.2.1`
|
||||
|
||||
- `prefix_bin`: default directory to place a symlink to a binary command.
|
||||
|
||||
- Example: `/opt/bin/mvn` -> `/opt/maven-2.2.1/bin/mvn`, where the `prefix_bin` is `/opt/bin`
|
||||
|
||||
- `path`: path to extract the ark to. The `:install*` actions overwrite any user-provided values for `:path`.
|
||||
|
||||
- Default: `/usr/local/<name>-<version>` for the `:install`, `:install_with_make` actions
|
||||
|
||||
- `home_dir`: symbolic link to the path `:prefix_root/:name-:version`, does not apply to `:dump`, `:put`, or `:cherry_pick` actions.
|
||||
|
||||
- Default: `:prefix_root/:name`
|
||||
|
||||
- `has_binaries`: array of binary commands to symlink into `/usr/local/bin/`, you must specify the relative path.
|
||||
|
||||
- Example: `[ 'bin/java', 'bin/javaws' ]`
|
||||
|
||||
- `append_env_path`: boolean, similar to `has_binaries` but less granular. If true, append the `./bin` directory of the extracted directory to. the `PATH` environment variable for all users, by placing a file in `/etc/profile.d/`. The commands are symbolically linked into `/usr/bin/*`. This option provides more granularity than the boolean option.
|
||||
|
||||
- Example: `mvn`, `java`, `javac`, etc.
|
||||
|
||||
- `environment`: hash of environment variables to pass to invoked shell commands like `tar`, `unzip`, `configure`, and `make`.
|
||||
|
||||
- `strip_components`: number of components in path to strip when extracting archive. With default value of `1`, ark strips the leading directory from an archive, which is the default for both `unzip` and `tar` commands.
|
||||
|
||||
- `autoconf_opts`: an array of command line options for use with the GNU `autoconf` script.
|
||||
|
||||
- Example: `[ '--include=/opt/local/include', '--force' ]`
|
||||
|
||||
- `make_opts`: an array of command line options for use with `make`.
|
||||
|
||||
- Example: `[ '--warn-undefined-variables', '--load-average=2' ]`
|
||||
|
||||
- `owner`: owner of extracted directory.
|
||||
|
||||
- Default: `root`
|
||||
|
||||
- `group`: group of extracted directory.
|
||||
|
||||
- Default: `root`
|
||||
|
||||
- `backup`: The number of backups to be kept in /var/chef/backup (for UNIX- and Linux-based platforms) or C:/chef/backup (for the Microsoft Windows platform). Set to false to prevent backups from being kept.
|
||||
|
||||
- Default: `5`
|
||||
|
||||
#### Examples
|
||||
|
||||
This example copies `ivy.tar.gz` to `/var/cache/chef/ivy-2.2.0.tar.gz`, unpacks its contents to `/usr/local/ivy-2.2.0/` -- stripping the leading directory, and symlinks `/usr/local/ivy` to `/usr/local/ivy-2.2.0`
|
||||
|
||||
```ruby
|
||||
# install Apache Ivy dependency resolution tool
|
||||
ark "ivy" do
|
||||
url 'http://someurl.example.com/ivy.tar.gz'
|
||||
version '2.2.0'
|
||||
checksum '89ba5fde0c596db388c3bbd265b63007a9cc3df3a8e6d79a46780c1a39408cb5'
|
||||
action :install
|
||||
end
|
||||
```
|
||||
|
||||
This example copies `jdk-7u2-linux-x64.tar.gz` to `/var/cache/chef/jdk-7.2.tar.gz`, unpacks its contents to `/usr/local/jvm/jdk-7.2/` -- stripping the leading directory, symlinks `/usr/local/jvm/default` to `/usr/local/jvm/jdk-7.2`, and adds `/usr/local/jvm/jdk-7.2/bin/` to the global `PATH` for all users. The user 'foobar' is the owner of the `/usr/local/jvm/jdk-7.2` directory:
|
||||
|
||||
```ruby
|
||||
ark 'jdk' do
|
||||
url 'http://download.example.com/jdk-7u2-linux-x64.tar.gz'
|
||||
version '7.2'
|
||||
path "/usr/local/jvm/"
|
||||
home_dir "/usr/local/jvm/default"
|
||||
checksum '89ba5fde0c596db388c3bbd265b63007a9cc3df3a8e6d79a46780c1a39408cb5'
|
||||
append_env_path true
|
||||
owner 'foobar'
|
||||
end
|
||||
```
|
||||
|
||||
Install Apache Ivy dependency resolution tool in `/resource_name` in this case `/usr/local/ivy`, do not symlink, and strip any leading directory if one exists in the tarball:
|
||||
|
||||
```ruby
|
||||
ark "ivy" do
|
||||
url 'http://someurl.example.com/ivy.tar.gz'
|
||||
checksum '89ba5fde0c596db388c3bbd265b63007a9cc3df3a8e6d79a46780c1a39408cb5'
|
||||
action :put
|
||||
end
|
||||
```
|
||||
|
||||
Install Apache Ivy dependency resolution tool in `/home/foobar/ivy`, strip any leading directory if one exists, don't keep backup copies of `ivy.tar.gz`:
|
||||
|
||||
```ruby
|
||||
ark "ivy" do
|
||||
path "/home/foobar"
|
||||
url 'http://someurl.example.com/ivy.tar.gz'
|
||||
checksum '89ba5fde0c596db388c3bbd265b63007a9cc3df3a8e6d79a46780c1a39408cb5'
|
||||
action :put
|
||||
backup false
|
||||
end
|
||||
```
|
||||
|
||||
Strip all directories and dump files into path specified by the path attribute. You must specify the `creates` attribute in order to keep the extraction from running every time. The directory path will be created if it doesn't already exist:
|
||||
|
||||
```ruby
|
||||
ark "my_jars" do
|
||||
url "http://example.com/bunch_of_jars.zip"
|
||||
path "/usr/local/tomcat/lib"
|
||||
creates "mysql.jar"
|
||||
owner "tomcat"
|
||||
action :dump
|
||||
end
|
||||
```
|
||||
|
||||
Extract specific files from a tarball (currently only handles one named file):
|
||||
|
||||
```ruby
|
||||
ark 'mysql-connector-java' do
|
||||
url 'http://oracle.com/mysql-connector.zip'
|
||||
creates 'mysql-connector-java-5.0.8-bin.jar'
|
||||
path '/usr/local/tomcat/lib'
|
||||
action :cherry_pick
|
||||
end
|
||||
```
|
||||
|
||||
Build and install haproxy and use alternative values for `prefix_root`, `prefix_home`, and `prefix_bin`:
|
||||
|
||||
```ruby
|
||||
ark "haproxy" do
|
||||
url "http://haproxy.1wt.eu/download/1.5/src/snapshot/haproxy-ss-20120403.tar.gz"
|
||||
version "1.5"
|
||||
checksum 'ba0424bf7d23b3a607ee24bbb855bb0ea347d7ffde0bec0cb12a89623cbaf911'
|
||||
make_opts [ 'TARGET=linux26' ]
|
||||
prefix_root '/opt'
|
||||
prefix_home '/opt'
|
||||
prefix_bin '/opt/bin'
|
||||
action :install_with_make
|
||||
end
|
||||
```
|
||||
|
||||
You can also supply the file extension in case the file extension can not be determined by the URL:
|
||||
|
||||
```ruby
|
||||
ark "test_autogen" do
|
||||
url 'https://github.com/zeromq/libzmq/tarball/master'
|
||||
extension "tar.gz"
|
||||
action :install_with_make
|
||||
end
|
||||
```
|
||||
|
||||
## License & Authors
|
||||
|
||||
- Author: Philip (flip) Kromer - Infochimps, Inc([coders@infochimps.com](mailto:coders@infochimps.com))
|
||||
- Author: Bryan W. Berry ([bryan.berry@gmail.com](mailto:bryan.berry@gmail.com))
|
||||
- Author: Denis Barishev ([denis.barishev@gmail.com](mailto:denis.barishev@gmail.com))
|
||||
- Author: Sean OMeara ([someara@chef.io](mailto:someara@chef.io))
|
||||
- Author: John Bellone ([jbellone@bloomberg.net](mailto:jbellone@bloomberg.net))
|
||||
- Copyright: 2011, Philip (flip) Kromer - Infochimps, Inc
|
||||
- Copyright: 2012, Bryan W. Berry
|
||||
- Copyright: 2012, Denis Barishev
|
||||
- Copyright: 2013-2017, Chef Software, Inc
|
||||
- Copyright: 2014, Bloomberg L.P.
|
||||
|
||||
```
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
```
|
47
ops/cookbooks/vendor/ark/attributes/default.rb
vendored
47
ops/cookbooks/vendor/ark/attributes/default.rb
vendored
@ -1,47 +0,0 @@
|
||||
#
|
||||
# Cookbook:: ark
|
||||
# Attributes:: default
|
||||
#
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['ark']['apache_mirror'] = 'http://apache.mirrors.tds.net'
|
||||
default['ark']['prefix_root'] = '/usr/local'
|
||||
default['ark']['prefix_bin'] = '/usr/local/bin'
|
||||
default['ark']['prefix_home'] = '/usr/local'
|
||||
|
||||
# the default path will be determined based on platform, but can be overridden here
|
||||
default['ark']['tar'] = nil
|
||||
|
||||
# the default path will be determined from the registry, but you may override here
|
||||
default['ark']['sevenzip_binary'] = nil
|
||||
|
||||
pkgs = %w(libtool autoconf) unless platform_family?('mac_os_x')
|
||||
pkgs += %w(make) unless platform_family?('mac_os_x', 'freebsd')
|
||||
pkgs += %w(unzip rsync gcc) unless platform_family?('mac_os_x')
|
||||
pkgs += %w(autogen) unless platform_family?('rhel', 'fedora', 'mac_os_x', 'suse', 'amazon')
|
||||
pkgs += %w(gtar) if platform?('freebsd') || platform?('smartos')
|
||||
pkgs += %w(gmake) if platform?('freebsd')
|
||||
if platform_family?('rhel', 'suse', 'amazon')
|
||||
if node['platform_version'].to_i >= 7
|
||||
pkgs += %w(xz bzip2 tar)
|
||||
elsif node['platform_version'].to_i < 7
|
||||
pkgs += %w(xz-lzma-compat bzip2 tar)
|
||||
end
|
||||
elsif platform_family?('fedora')
|
||||
pkgs += %w(xz-lzma-compat bzip2 tar)
|
||||
end
|
||||
pkgs += %w(shtool pkg-config) if platform_family?('debian')
|
||||
|
||||
default['ark']['package_dependencies'] = pkgs
|
BIN
ops/cookbooks/vendor/ark/files/default/foo.tar.gz
vendored
BIN
ops/cookbooks/vendor/ark/files/default/foo.tar.gz
vendored
Binary file not shown.
BIN
ops/cookbooks/vendor/ark/files/default/foo.tbz
vendored
BIN
ops/cookbooks/vendor/ark/files/default/foo.tbz
vendored
Binary file not shown.
BIN
ops/cookbooks/vendor/ark/files/default/foo.txz
vendored
BIN
ops/cookbooks/vendor/ark/files/default/foo.txz
vendored
Binary file not shown.
BIN
ops/cookbooks/vendor/ark/files/default/foo.zip
vendored
BIN
ops/cookbooks/vendor/ark/files/default/foo.zip
vendored
Binary file not shown.
Binary file not shown.
BIN
ops/cookbooks/vendor/ark/files/default/foo_sub.zip
vendored
BIN
ops/cookbooks/vendor/ark/files/default/foo_sub.zip
vendored
Binary file not shown.
112
ops/cookbooks/vendor/ark/libraries/default.rb
vendored
112
ops/cookbooks/vendor/ark/libraries/default.rb
vendored
@ -1,112 +0,0 @@
|
||||
require_relative 'platform_specific_builders'
|
||||
require_relative 'resource_deprecations'
|
||||
require_relative 'resource_defaults'
|
||||
require_relative 'sevenzip_command_builder'
|
||||
require_relative 'unzip_command_builder'
|
||||
require_relative 'tar_command_builder'
|
||||
require_relative 'general_owner'
|
||||
require_relative 'windows_owner'
|
||||
|
||||
module Ark
|
||||
module ProviderHelpers
|
||||
extend ::Ark::PlatformSpecificBuilders
|
||||
|
||||
generates_archive_commands_for :seven_zip,
|
||||
when_the: -> { node['platform_family'] == 'windows' },
|
||||
with_klass: ::Ark::SevenZipCommandBuilder
|
||||
|
||||
generates_archive_commands_for :unzip,
|
||||
when_the: -> { new_resource.extension =~ /zip|war|jar/ },
|
||||
with_klass: ::Ark::UnzipCommandBuilder
|
||||
|
||||
generates_archive_commands_for :tar,
|
||||
when_the: -> { true },
|
||||
with_klass: ::Ark::TarCommandBuilder
|
||||
|
||||
generates_owner_commands_for :windows,
|
||||
when_the: -> { node['platform_family'] == 'windows' },
|
||||
with_klass: ::Ark::WindowsOwner
|
||||
|
||||
generates_owner_commands_for :all_other_platforms,
|
||||
when_the: -> { true },
|
||||
with_klass: ::Ark::GeneralOwner
|
||||
|
||||
def deprecations
|
||||
::Ark::ResourceDeprecations.on(new_resource)
|
||||
end
|
||||
|
||||
def show_deprecations
|
||||
deprecations.each { |message| Chef::Log.warn("DEPRECATED: #{message}") }
|
||||
end
|
||||
|
||||
def defaults
|
||||
@resource_defaults ||= ::Ark::ResourceDefaults.new(new_resource)
|
||||
end
|
||||
|
||||
def set_paths
|
||||
new_resource.extension = defaults.extension
|
||||
new_resource.prefix_bin = defaults.prefix_bin
|
||||
new_resource.prefix_root = defaults.prefix_root
|
||||
new_resource.home_dir = defaults.home_dir
|
||||
new_resource.version = defaults.version
|
||||
new_resource.owner = defaults.owner
|
||||
|
||||
# TODO: what happens when the path is already set --
|
||||
# with the current logic we overwrite it
|
||||
# if you are in windows we overwrite it
|
||||
# otherwise we overwrite it with the root/name-version
|
||||
new_resource.path = defaults.path
|
||||
new_resource.release_file = defaults.release_file
|
||||
end
|
||||
|
||||
def set_put_paths
|
||||
new_resource.extension = defaults.extension
|
||||
|
||||
# TODO: Should we be setting the prefix_root -
|
||||
# as the prefix_root could be used in the path_with_version
|
||||
# new_resource.prefix_root = default.prefix_root
|
||||
new_resource.path = defaults.path_without_version
|
||||
new_resource.release_file = defaults.release_file_without_version
|
||||
end
|
||||
|
||||
def set_dump_paths
|
||||
new_resource.extension = defaults.extension
|
||||
new_resource.release_file = defaults.release_file_without_version
|
||||
end
|
||||
|
||||
def unpack_command
|
||||
archive_application.unpack
|
||||
end
|
||||
|
||||
def dump_command
|
||||
archive_application.dump
|
||||
end
|
||||
|
||||
def cherry_pick_command
|
||||
archive_application.cherry_pick
|
||||
end
|
||||
|
||||
def unzip_command
|
||||
archive_application.unpack
|
||||
end
|
||||
|
||||
def owner_command
|
||||
owner_builder_klass.new(new_resource).command
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def archive_application
|
||||
@archive_application ||= archive_builder_klass.new(new_resource)
|
||||
end
|
||||
|
||||
def archive_builder_klass
|
||||
new_resource.extension ||= defaults.extension
|
||||
Ark::ProviderHelpers.archive_command_generators.find { |condition, _klass| instance_exec(&condition) }.last
|
||||
end
|
||||
|
||||
def owner_builder_klass
|
||||
Ark::ProviderHelpers.owner_command_generators.find { |condition, _klass| instance_exec(&condition) }.last
|
||||
end
|
||||
end
|
||||
end
|
@ -1,13 +0,0 @@
|
||||
module Ark
|
||||
class GeneralOwner
|
||||
def initialize(resource)
|
||||
@resource = resource
|
||||
end
|
||||
|
||||
attr_reader :resource
|
||||
|
||||
def command
|
||||
"chown -R #{resource.owner}:#{resource.group} #{resource.path}"
|
||||
end
|
||||
end
|
||||
end
|
@ -1,23 +0,0 @@
|
||||
module Ark
|
||||
module PlatformSpecificBuilders
|
||||
def generates_archive_commands_for(_name, options)
|
||||
condition = options[:when_the]
|
||||
builder = options[:with_klass]
|
||||
archive_command_generators.push [condition, builder]
|
||||
end
|
||||
|
||||
def archive_command_generators
|
||||
@archive_command_generators ||= []
|
||||
end
|
||||
|
||||
def generates_owner_commands_for(_name, options)
|
||||
condition = options[:when_the]
|
||||
builder = options[:with_klass]
|
||||
owner_command_generators.push [condition, builder]
|
||||
end
|
||||
|
||||
def owner_command_generators
|
||||
@owner_command_generators ||= []
|
||||
end
|
||||
end
|
||||
end
|
@ -1,119 +0,0 @@
|
||||
module Ark
|
||||
class ResourceDefaults
|
||||
def extension
|
||||
resource.extension || generate_extension_from_url(resource.url.clone)
|
||||
end
|
||||
|
||||
def prefix_bin
|
||||
resource.prefix_bin || prefix_bin_from_node_in_run_context
|
||||
end
|
||||
|
||||
def prefix_root
|
||||
resource.prefix_root || prefix_root_from_node_in_run_context
|
||||
end
|
||||
|
||||
def home_dir
|
||||
if resource.home_dir.nil? || resource.home_dir.empty?
|
||||
prefix_home = resource.prefix_home || prefix_home_from_node_in_run_context
|
||||
::File.join(prefix_home, resource.name)
|
||||
else
|
||||
resource.home_dir
|
||||
end
|
||||
end
|
||||
|
||||
def version
|
||||
resource.version || default_version
|
||||
end
|
||||
|
||||
def path
|
||||
if windows?
|
||||
resource.win_install_dir
|
||||
else
|
||||
::File.join(resource.prefix_root, "#{resource.name}-#{resource.version}")
|
||||
end
|
||||
end
|
||||
|
||||
def owner
|
||||
resource.owner || default_owner
|
||||
end
|
||||
|
||||
def windows?
|
||||
node_in_run_context['platform_family'] == 'windows'
|
||||
end
|
||||
|
||||
def path_without_version
|
||||
partial_path = resource.path || prefix_root_from_node_in_run_context
|
||||
::File.join(partial_path, resource.name)
|
||||
end
|
||||
|
||||
def release_file
|
||||
release_filename = "#{resource.name}-#{resource.version}.#{resource.extension}"
|
||||
::File.join(file_cache_path, release_filename)
|
||||
end
|
||||
|
||||
def release_file_without_version
|
||||
release_filename = "#{resource.name}.#{resource.extension}"
|
||||
::File.join(file_cache_path, release_filename)
|
||||
end
|
||||
|
||||
def initialize(resource)
|
||||
@resource = resource
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
attr_reader :resource
|
||||
|
||||
def generate_extension_from_url(url)
|
||||
# purge any trailing redirect
|
||||
url =~ %r{^https?:\/\/.*(.bin|bz2|gz|jar|tbz|tgz|txz|war|xz|zip|7z)(\/.*\/)}
|
||||
url.gsub!(Regexp.last_match(2), '') unless Regexp.last_match(2).nil?
|
||||
# remove trailing query string
|
||||
release_basename = ::File.basename(url.gsub(/\?.*\z/, '')).gsub(/-bin\b/, '')
|
||||
# (\?.*)? accounts for a trailing querystring
|
||||
Chef::Log.debug("DEBUG: release_basename is #{release_basename}")
|
||||
release_basename =~ /^(.+?)\.(jar|tar\.bz2|tar\.gz|tar\.xz|tbz|tgz|txz|war|zip|tar|7z)(\?.*)?/
|
||||
Chef::Log.debug("DEBUG: file_extension is #{Regexp.last_match(2)}")
|
||||
Regexp.last_match(2)
|
||||
end
|
||||
|
||||
def prefix_bin_from_node_in_run_context
|
||||
node_in_run_context['ark']['prefix_bin']
|
||||
end
|
||||
|
||||
def prefix_root_from_node_in_run_context
|
||||
node_in_run_context['ark']['prefix_root']
|
||||
end
|
||||
|
||||
def prefix_home_from_node_in_run_context
|
||||
node_in_run_context['ark']['prefix_home']
|
||||
end
|
||||
|
||||
def default_version
|
||||
'1'
|
||||
end
|
||||
|
||||
def default_owner
|
||||
if windows?
|
||||
wmi_property_from_query(:name, "select * from Win32_UserAccount where sid like 'S-1-5-21-%-500' and LocalAccount=True")
|
||||
else
|
||||
'root'
|
||||
end
|
||||
end
|
||||
|
||||
def wmi_property_from_query(wmi_property, wmi_query)
|
||||
@wmi = ::WIN32OLE.connect('winmgmts://')
|
||||
result = @wmi.ExecQuery(wmi_query)
|
||||
return nil unless result.each.count > 0
|
||||
result.each.next.send(wmi_property)
|
||||
end
|
||||
|
||||
def file_cache_path
|
||||
Chef::Config[:file_cache_path]
|
||||
end
|
||||
|
||||
def node_in_run_context
|
||||
resource.run_context.node
|
||||
end
|
||||
end
|
||||
end
|
@ -1,33 +0,0 @@
|
||||
module Ark
|
||||
class ResourceDeprecations
|
||||
def self.on(resource)
|
||||
new(resource).warnings
|
||||
end
|
||||
|
||||
def initialize(resource)
|
||||
@resource = resource
|
||||
end
|
||||
|
||||
attr_reader :resource
|
||||
|
||||
def warnings
|
||||
applicable_deprecrations.map { |_, message| message }
|
||||
end
|
||||
|
||||
def applicable_deprecrations
|
||||
deprecations.select { |condition, _| send(condition) }
|
||||
end
|
||||
|
||||
def deprecations
|
||||
{ strip_leading_dir_feature: strip_leading_dir_feature_message }
|
||||
end
|
||||
|
||||
def strip_leading_dir_feature
|
||||
[true, false].include?(resource.strip_leading_dir)
|
||||
end
|
||||
|
||||
def strip_leading_dir_feature_message
|
||||
'strip_leading_dir attribute was deprecated. Use strip_components instead.'
|
||||
end
|
||||
end
|
||||
end
|
@ -1,76 +0,0 @@
|
||||
module Ark
|
||||
class SevenZipCommandBuilder
|
||||
def unpack
|
||||
sevenzip_command
|
||||
end
|
||||
|
||||
def dump
|
||||
sevenzip_command_builder(resource.path, 'e')
|
||||
end
|
||||
|
||||
def cherry_pick
|
||||
"#{sevenzip_command_builder(resource.path, 'x')} -r #{resource.creates}"
|
||||
end
|
||||
|
||||
def initialize(resource)
|
||||
@resource = resource
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
attr_reader :resource
|
||||
|
||||
def node
|
||||
resource.run_context.node
|
||||
end
|
||||
|
||||
def sevenzip_command
|
||||
return sevenzip_command_builder(resource.path, 'x') if resource.strip_components <= 0
|
||||
|
||||
tmpdir = make_temp_directory.tr('/', '\\')
|
||||
cmd = sevenzip_command_builder(tmpdir, 'x')
|
||||
|
||||
cmd += ' && '
|
||||
currdir = tmpdir
|
||||
|
||||
1.upto(resource.strip_components).each do |count|
|
||||
cmd += "for /f %#{count} in ('dir /ad /b \"#{currdir}\"') do "
|
||||
currdir += "\\%#{count}"
|
||||
end
|
||||
|
||||
cmd += "(\"#{ENV.fetch('SystemRoot')}\\System32\\robocopy\" \"#{currdir}\" \"#{resource.path}\" /s /e) ^& IF %ERRORLEVEL% LEQ 3 cmd /c exit 0"
|
||||
end
|
||||
|
||||
def sevenzip_binary
|
||||
@tar_binary ||= "\"#{(node['ark']['sevenzip_binary'] || sevenzip_path_from_registry)}\""
|
||||
end
|
||||
|
||||
def sevenzip_path_from_registry
|
||||
begin
|
||||
basepath = ::Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\7zFM.exe').read_s('Path')
|
||||
|
||||
# users like pretty errors
|
||||
rescue ::Win32::Registry::Error
|
||||
raise 'Failed to find the path of 7zip binary by searching checking HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\7zFM.exe\Path. Make sure to install 7zip before using this resource. If 7zip is installed and you still receive this message you can also specify the 7zip binary path by setting node["ark"]["sevenzip_binary"]'
|
||||
end
|
||||
"#{basepath}7z.exe"
|
||||
end
|
||||
|
||||
def sevenzip_command_builder(dir, command)
|
||||
"#{sevenzip_binary} #{command} \"#{resource.release_file}\"#{extension_is_tar} -o\"#{dir}\" -uy"
|
||||
end
|
||||
|
||||
def extension_is_tar
|
||||
if resource.extension =~ /tar.gz|tgz|tar.bz2|tbz|tar.xz|txz/
|
||||
" -so | #{sevenzip_binary} x -aoa -si -ttar"
|
||||
else
|
||||
' -aoa' # force overwrite, Fixes #164
|
||||
end
|
||||
end
|
||||
|
||||
def make_temp_directory
|
||||
require 'tmpdir'
|
||||
Dir.mktmpdir
|
||||
end
|
||||
end
|
||||
end
|
@ -1,56 +0,0 @@
|
||||
module Ark
|
||||
class TarCommandBuilder
|
||||
def unpack
|
||||
"#{tar_binary} #{args} #{resource.release_file}#{strip_args}"
|
||||
end
|
||||
|
||||
def dump
|
||||
"tar -mxf \"#{resource.release_file}\" -C \"#{resource.path}\""
|
||||
end
|
||||
|
||||
def cherry_pick
|
||||
"#{tar_binary} #{args} #{resource.release_file} -C #{resource.path} #{resource.creates}#{strip_args}"
|
||||
end
|
||||
|
||||
def initialize(resource)
|
||||
@resource = resource
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
attr_reader :resource
|
||||
|
||||
def node
|
||||
resource.run_context.node
|
||||
end
|
||||
|
||||
def tar_binary
|
||||
@tar_binary ||= node['ark']['tar'] || case node['platform_family']
|
||||
when 'mac_os_x', 'freebsd'
|
||||
'/usr/bin/tar'
|
||||
when 'smartos'
|
||||
'/bin/gtar'
|
||||
else
|
||||
'/bin/tar'
|
||||
end
|
||||
end
|
||||
|
||||
def args
|
||||
case resource.extension
|
||||
when /^(tar)$/ then 'xf'
|
||||
when /^(tar.gz|tgz)$/ then 'xzf'
|
||||
when /^(tar.bz2|tbz)$/ then 'xjf'
|
||||
when /^(tar.xz|txz)$/ then 'xJf'
|
||||
else raise unsupported_extension
|
||||
end
|
||||
end
|
||||
|
||||
def strip_args
|
||||
resource.strip_components > 0 ? " --strip-components=#{resource.strip_components}" : ''
|
||||
end
|
||||
|
||||
def unsupported_extension
|
||||
"Don't know how to expand #{resource.url} (extension: #{resource.extension})"
|
||||
end
|
||||
end
|
||||
end
|
@ -1,48 +0,0 @@
|
||||
module Ark
|
||||
class UnzipCommandBuilder
|
||||
def unpack
|
||||
if resource.strip_components > 0
|
||||
unzip_with_strip_components
|
||||
else
|
||||
"unzip -q -o #{resource.release_file} -d #{resource.path}"
|
||||
end
|
||||
end
|
||||
|
||||
def dump
|
||||
"unzip -j -q -o \"#{resource.release_file}\" -d \"#{resource.path}\""
|
||||
end
|
||||
|
||||
def cherry_pick
|
||||
cmd = "unzip -t #{resource.release_file} \"*/#{resource.creates}\" ; stat=$? ;"
|
||||
cmd += 'if [ $stat -eq 11 ] ; then '
|
||||
cmd += "unzip -j -o #{resource.release_file} \"#{resource.creates}\" -d #{resource.path} ;"
|
||||
cmd += 'elif [ $stat -ne 0 ] ; then false ;'
|
||||
cmd += 'else '
|
||||
cmd += "unzip -j -o #{resource.release_file} \"*/#{resource.creates}\" -d #{resource.path} ;"
|
||||
cmd += 'fi'
|
||||
cmd
|
||||
end
|
||||
|
||||
def initialize(resource)
|
||||
@resource = resource
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
attr_reader :resource
|
||||
|
||||
def unzip_with_strip_components
|
||||
tmpdir = make_temp_directory
|
||||
strip_dir = '*/' * resource.strip_components
|
||||
cmd = "unzip -q -o #{resource.release_file} -d #{tmpdir}"
|
||||
cmd += " && rsync -a #{tmpdir}/#{strip_dir} #{resource.path}"
|
||||
cmd += " && rm -rf #{tmpdir}"
|
||||
cmd
|
||||
end
|
||||
|
||||
def make_temp_directory
|
||||
require 'tmpdir'
|
||||
Dir.mktmpdir
|
||||
end
|
||||
end
|
||||
end
|
@ -1,13 +0,0 @@
|
||||
module Ark
|
||||
class WindowsOwner
|
||||
def initialize(resource)
|
||||
@resource = resource
|
||||
end
|
||||
|
||||
attr_reader :resource
|
||||
|
||||
def command
|
||||
"#{ENV.fetch('SystemRoot')}\\System32\\icacls \"#{resource.path}\\*\" /setowner \"#{resource.owner}\""
|
||||
end
|
||||
end
|
||||
end
|
1
ops/cookbooks/vendor/ark/metadata.json
vendored
1
ops/cookbooks/vendor/ark/metadata.json
vendored
@ -1 +0,0 @@
|
||||
{"name":"ark","version":"5.0.0","description":"Provides a custom resource for installing runtime artifacts in a predictable fashion","long_description":"","maintainer":"Chef Software, Inc.","maintainer_email":"cookbooks@chef.io","license":"Apache-2.0","platforms":{"ubuntu":">= 0.0.0","debian":">= 0.0.0","redhat":">= 0.0.0","centos":">= 0.0.0","suse":">= 0.0.0","opensuse":">= 0.0.0","opensuseleap":">= 0.0.0","scientific":">= 0.0.0","oracle":">= 0.0.0","amazon":">= 0.0.0","windows":">= 0.0.0","mac_os_x":">= 0.0.0","smartos":">= 0.0.0","freebsd":">= 0.0.0"},"dependencies":{"seven_zip":">= 0.0.0"},"recommendations":{},"suggestions":{},"conflicting":{},"providing":{},"replacing":{},"attributes":{},"groupings":{},"recipes":{},"source_url":"https://github.com/chef-cookbooks/ark","issues_url":"https://github.com/chef-cookbooks/ark/issues","chef_version":[[">= 14.0"]],"ohai_version":[]}
|
23
ops/cookbooks/vendor/ark/recipes/default.rb
vendored
23
ops/cookbooks/vendor/ark/recipes/default.rb
vendored
@ -1,23 +0,0 @@
|
||||
#
|
||||
# Cookbook:: ark
|
||||
# Recipe:: default
|
||||
#
|
||||
# Author:: Bryan W. Berry <bryan.berry@gmail.com>
|
||||
# Copyright:: 2012-2017, Bryan W. Berry
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package node['ark']['package_dependencies'] unless platform_family?('windows', 'mac_os_x')
|
||||
|
||||
include_recipe 'seven_zip' if platform_family?('windows')
|
536
ops/cookbooks/vendor/ark/resources/default.rb
vendored
536
ops/cookbooks/vendor/ark/resources/default.rb
vendored
@ -1,536 +0,0 @@
|
||||
#
|
||||
# Cookbook:: ark
|
||||
# Resource:: Ark
|
||||
#
|
||||
# Author:: Bryan W. Berry <bryan.berry@gmail.com>
|
||||
# Copyright:: 2012-2017, Bryan W. Berry
|
||||
# Copyright:: 2016-2017, Chef Software Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
property :owner, String
|
||||
property :group, [String, Integer], default: 0
|
||||
property :url, String, required: true
|
||||
property :path, String
|
||||
property :full_path, String
|
||||
property :append_env_path, [true, false], default: false
|
||||
property :checksum, regex: /^[a-zA-Z0-9]{64}$/, default: nil
|
||||
property :has_binaries, Array, default: []
|
||||
property :creates, String
|
||||
property :release_file, String, default: ''
|
||||
property :strip_leading_dir, [true, false, NilClass]
|
||||
property :strip_components, Integer, default: 1
|
||||
property :mode, [Integer, String], default: 0755
|
||||
property :prefix_root, String
|
||||
property :prefix_home, String
|
||||
property :prefix_bin, String
|
||||
property :version, String
|
||||
property :home_dir, String
|
||||
property :win_install_dir, String
|
||||
property :environment, Hash, default: {}
|
||||
property :autoconf_opts, Array, default: []
|
||||
property :make_opts, Array, default: []
|
||||
property :home_dir, String
|
||||
property :autoconf_opts, Array, default: []
|
||||
property :extension, String
|
||||
property :backup, [FalseClass, Integer], default: 5
|
||||
|
||||
#################
|
||||
# action :install
|
||||
#################
|
||||
action :install do
|
||||
show_deprecations
|
||||
set_paths
|
||||
|
||||
directory new_resource.path do
|
||||
recursive true
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
remote_file new_resource.release_file do
|
||||
Chef::Log.debug('DEBUG: new_resource.release_file')
|
||||
source new_resource.url
|
||||
checksum new_resource.checksum if new_resource.checksum
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
backup new_resource.backup
|
||||
end
|
||||
|
||||
# unpack based on file extension
|
||||
execute "unpack #{new_resource.release_file}" do
|
||||
command unpack_command
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
notifies :run, "execute[set owner on #{new_resource.path}]"
|
||||
action :nothing
|
||||
end
|
||||
|
||||
# set_owner
|
||||
execute "set owner on #{new_resource.path}" do
|
||||
command owner_command
|
||||
action :nothing
|
||||
end
|
||||
|
||||
if platform_family?('windows')
|
||||
# usually on windows there is no central directory with executables where the applications are linked
|
||||
# so ignore has_binaries for now
|
||||
|
||||
# Add to PATH permanently on Windows if append_env_path
|
||||
windows_path "#{new_resource.path}/bin" do
|
||||
action :add
|
||||
only_if { new_resource.append_env_path }
|
||||
end
|
||||
else
|
||||
# symlink binaries
|
||||
new_resource.has_binaries.each do |bin|
|
||||
link ::File.join(new_resource.prefix_bin, ::File.basename(bin)) do
|
||||
to ::File.join(new_resource.path, bin)
|
||||
end
|
||||
end
|
||||
|
||||
# action_link_paths
|
||||
link new_resource.home_dir do
|
||||
to new_resource.path
|
||||
end
|
||||
|
||||
# Add to path for interactive bash sessions
|
||||
template "/etc/profile.d/#{new_resource.name}.sh" do
|
||||
cookbook 'ark'
|
||||
source 'add_to_path.sh.erb'
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0755'
|
||||
cookbook 'ark'
|
||||
variables(directory: "#{new_resource.path}/bin")
|
||||
only_if { new_resource.append_env_path }
|
||||
end
|
||||
end
|
||||
|
||||
# Add to path for the current chef-client converge.
|
||||
bin_path = ::File.join(new_resource.path, 'bin')
|
||||
ruby_block "adding '#{bin_path}' to chef-client ENV['PATH']" do
|
||||
block do
|
||||
ENV['PATH'] = bin_path + ':' + ENV['PATH']
|
||||
end
|
||||
only_if do
|
||||
new_resource.append_env_path && ENV['PATH'].scan(bin_path).empty?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
##############
|
||||
# action :put
|
||||
##############
|
||||
action :put do
|
||||
show_deprecations
|
||||
set_put_paths
|
||||
|
||||
directory new_resource.path do
|
||||
recursive true
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
# download
|
||||
remote_file new_resource.release_file do
|
||||
source new_resource.url
|
||||
checksum new_resource.checksum if new_resource.checksum
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
backup new_resource.backup
|
||||
end
|
||||
|
||||
# unpack based on file extension
|
||||
execute "unpack #{new_resource.release_file}" do
|
||||
command unpack_command
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
notifies :run, "execute[set owner on #{new_resource.path}]"
|
||||
action :nothing
|
||||
end
|
||||
|
||||
# set_owner
|
||||
execute "set owner on #{new_resource.path}" do
|
||||
command owner_command
|
||||
action :nothing
|
||||
end
|
||||
end
|
||||
|
||||
###########################
|
||||
# action :dump
|
||||
###########################
|
||||
action :dump do
|
||||
show_deprecations
|
||||
set_dump_paths
|
||||
|
||||
directory new_resource.path do
|
||||
recursive true
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
# download
|
||||
remote_file new_resource.release_file do
|
||||
Chef::Log.debug("DEBUG: new_resource.release_file #{new_resource.release_file}")
|
||||
source new_resource.url
|
||||
checksum new_resource.checksum if new_resource.checksum
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
# unpack based on file extension
|
||||
execute "unpack #{new_resource.release_file}" do
|
||||
command dump_command
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
notifies :run, "execute[set owner on #{new_resource.path}]"
|
||||
action :nothing
|
||||
end
|
||||
|
||||
# set_owner
|
||||
execute "set owner on #{new_resource.path}" do
|
||||
command owner_command
|
||||
action :nothing
|
||||
end
|
||||
end
|
||||
|
||||
###########################
|
||||
# action :unzip
|
||||
###########################
|
||||
action :unzip do
|
||||
show_deprecations
|
||||
set_dump_paths
|
||||
|
||||
directory new_resource.path do
|
||||
recursive true
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
# download
|
||||
remote_file new_resource.release_file do
|
||||
Chef::Log.debug("DEBUG: new_resource.release_file #{new_resource.release_file}")
|
||||
source new_resource.url
|
||||
checksum new_resource.checksum if new_resource.checksum
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
# unpack based on file extension
|
||||
execute "unpack #{new_resource.release_file}" do
|
||||
command unzip_command
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
notifies :run, "execute[set owner on #{new_resource.path}]"
|
||||
action :nothing
|
||||
end
|
||||
|
||||
# set_owner
|
||||
execute "set owner on #{new_resource.path}" do
|
||||
command owner_command
|
||||
action :nothing
|
||||
end
|
||||
end
|
||||
|
||||
#####################
|
||||
# action :cherry_pick
|
||||
#####################
|
||||
action :cherry_pick do
|
||||
show_deprecations
|
||||
set_dump_paths
|
||||
Chef::Log.debug("DEBUG: new_resource.creates #{new_resource.creates}")
|
||||
|
||||
directory new_resource.path do
|
||||
recursive true
|
||||
action :create
|
||||
notifies :run, "execute[cherry_pick #{new_resource.creates} from #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
# download
|
||||
remote_file new_resource.release_file do
|
||||
source new_resource.url
|
||||
checksum new_resource.checksum if new_resource.checksum
|
||||
action :create
|
||||
notifies :run, "execute[cherry_pick #{new_resource.creates} from #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
execute "cherry_pick #{new_resource.creates} from #{new_resource.release_file}" do
|
||||
command cherry_pick_command
|
||||
creates "#{new_resource.path}/#{new_resource.creates}"
|
||||
notifies :run, "execute[set owner on #{new_resource.path}]"
|
||||
action :nothing
|
||||
end
|
||||
|
||||
# set_owner
|
||||
execute "set owner on #{new_resource.path}" do
|
||||
command owner_command
|
||||
action :nothing
|
||||
end
|
||||
end
|
||||
|
||||
###########################
|
||||
# action :install_with_make
|
||||
###########################
|
||||
action :install_with_make do
|
||||
show_deprecations
|
||||
set_paths
|
||||
|
||||
directory new_resource.path do
|
||||
recursive true
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
remote_file new_resource.release_file do
|
||||
Chef::Log.debug('DEBUG: new_resource.release_file')
|
||||
source new_resource.url
|
||||
checksum new_resource.checksum if new_resource.checksum
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
# unpack based on file extension
|
||||
execute "unpack #{new_resource.release_file}" do
|
||||
command unpack_command
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
notifies :run, "execute[set owner on #{new_resource.path}]"
|
||||
notifies :run, "execute[autogen #{new_resource.path}]"
|
||||
notifies :run, "execute[configure #{new_resource.path}]"
|
||||
notifies :run, "execute[make #{new_resource.path}]"
|
||||
notifies :run, "execute[make install #{new_resource.path}]"
|
||||
action :nothing
|
||||
end
|
||||
|
||||
# set_owner
|
||||
execute "set owner on #{new_resource.path}" do
|
||||
command owner_command
|
||||
action :nothing
|
||||
end
|
||||
|
||||
execute "autogen #{new_resource.path}" do
|
||||
command './autogen.sh'
|
||||
only_if { ::File.exist? "#{new_resource.path}/autogen.sh" }
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
action :nothing
|
||||
ignore_failure true
|
||||
end
|
||||
|
||||
execute "configure #{new_resource.path}" do
|
||||
command "./configure #{new_resource.autoconf_opts.join(' ')}"
|
||||
only_if { ::File.exist? "#{new_resource.path}/configure" }
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
action :nothing
|
||||
end
|
||||
|
||||
execute "make #{new_resource.path}" do
|
||||
command "make #{new_resource.make_opts.join(' ')}"
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
action :nothing
|
||||
end
|
||||
|
||||
execute "make install #{new_resource.path}" do
|
||||
command "make install #{new_resource.make_opts.join(' ')}"
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
action :nothing
|
||||
end
|
||||
end
|
||||
|
||||
action :setup_py_build do
|
||||
show_deprecations
|
||||
set_paths
|
||||
|
||||
directory new_resource.path do
|
||||
recursive true
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
remote_file new_resource.release_file do
|
||||
Chef::Log.debug('DEBUG: new_resource.release_file')
|
||||
source new_resource.url
|
||||
checksum new_resource.checksum if new_resource.checksum
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
# unpack based on file extension
|
||||
execute "unpack #{new_resource.release_file}" do
|
||||
command unpack_command
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
notifies :run, "execute[set owner on #{new_resource.path}]"
|
||||
notifies :run, "execute[python setup.py build #{new_resource.path}]"
|
||||
action :nothing
|
||||
end
|
||||
|
||||
# set_owner
|
||||
execute "set owner on #{new_resource.path}" do
|
||||
command owner_command
|
||||
action :nothing
|
||||
end
|
||||
|
||||
execute "python setup.py build #{new_resource.path}" do
|
||||
command "python setup.py build #{new_resource.make_opts.join(' ')}"
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
action :nothing
|
||||
end
|
||||
end
|
||||
|
||||
action :setup_py_install do
|
||||
show_deprecations
|
||||
set_paths
|
||||
|
||||
directory new_resource.path do
|
||||
recursive true
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
remote_file new_resource.release_file do
|
||||
Chef::Log.debug('DEBUG: new_resource.release_file')
|
||||
source new_resource.url
|
||||
checksum new_resource.checksum if new_resource.checksum
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
# unpack based on file extension
|
||||
execute "unpack #{new_resource.release_file}" do
|
||||
command unpack_command
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
notifies :run, "execute[set owner on #{new_resource.path}]"
|
||||
notifies :run, "execute[python setup.py install #{new_resource.path}]"
|
||||
action :nothing
|
||||
end
|
||||
|
||||
# set_owner
|
||||
execute "set owner on #{new_resource.path}" do
|
||||
command owner_command
|
||||
action :nothing
|
||||
end
|
||||
|
||||
execute "python setup.py install #{new_resource.path}" do
|
||||
command "python setup.py install #{new_resource.make_opts.join(' ')}"
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
action :nothing
|
||||
end
|
||||
end
|
||||
|
||||
action :setup_py do
|
||||
show_deprecations
|
||||
set_paths
|
||||
|
||||
directory new_resource.path do
|
||||
recursive true
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
remote_file new_resource.release_file do
|
||||
Chef::Log.debug('DEBUG: new_resource.release_file')
|
||||
source new_resource.url
|
||||
checksum new_resource.checksum if new_resource.checksum
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
# unpack based on file extension
|
||||
execute "unpack #{new_resource.release_file}" do
|
||||
command unpack_command
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
notifies :run, "execute[set owner on #{new_resource.path}]"
|
||||
notifies :run, "execute[python setup.py #{new_resource.path}]"
|
||||
action :nothing
|
||||
end
|
||||
|
||||
# set_owner
|
||||
execute "set owner on #{new_resource.path}" do
|
||||
command owner_command
|
||||
action :nothing
|
||||
end
|
||||
|
||||
execute "python setup.py #{new_resource.path}" do
|
||||
command "python setup.py #{new_resource.make_opts.join(' ')}"
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
action :nothing
|
||||
end
|
||||
end
|
||||
|
||||
action :configure do
|
||||
show_deprecations
|
||||
set_paths
|
||||
|
||||
directory new_resource.path do
|
||||
recursive true
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
remote_file new_resource.release_file do
|
||||
Chef::Log.debug('DEBUG: new_resource.release_file')
|
||||
source new_resource.url
|
||||
checksum new_resource.checksum if new_resource.checksum
|
||||
action :create
|
||||
notifies :run, "execute[unpack #{new_resource.release_file}]"
|
||||
end
|
||||
|
||||
# unpack based on file extension
|
||||
execute "unpack #{new_resource.release_file}" do
|
||||
command unpack_command
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
notifies :run, "execute[set owner on #{new_resource.path}]"
|
||||
notifies :run, "execute[autogen #{new_resource.path}]"
|
||||
notifies :run, "execute[configure #{new_resource.path}]"
|
||||
action :nothing
|
||||
end
|
||||
|
||||
# set_owner
|
||||
execute "set owner on #{new_resource.path}" do
|
||||
command owner_command
|
||||
action :nothing
|
||||
end
|
||||
|
||||
execute "autogen #{new_resource.path}" do
|
||||
command './autogen.sh'
|
||||
only_if { ::File.exist? "#{new_resource.path}/autogen.sh" }
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
action :nothing
|
||||
ignore_failure true
|
||||
end
|
||||
|
||||
execute "configure #{new_resource.path}" do
|
||||
command "./configure #{new_resource.autoconf_opts.join(' ')}"
|
||||
only_if { ::File.exist? "#{new_resource.path}/configure" }
|
||||
cwd new_resource.path
|
||||
environment new_resource.environment
|
||||
action :nothing
|
||||
end
|
||||
end
|
||||
|
||||
action_class do
|
||||
include ::Ark::ProviderHelpers
|
||||
end
|
@ -1 +0,0 @@
|
||||
export PATH=<%= @directory -%>:$PATH
|
285
ops/cookbooks/vendor/build-essential/CHANGELOG.md
vendored
285
ops/cookbooks/vendor/build-essential/CHANGELOG.md
vendored
@ -1,285 +0,0 @@
|
||||
# build-essential Cookbook CHANGELOG
|
||||
|
||||
This file is used to list changes made in each version of the build-essential cookbook.
|
||||
|
||||
## 8.2.1 (2018-09-04)
|
||||
|
||||
- Add a note that this cookbook is no longer maintained as the build_essential resource was moved directly into the chef-client making this cookbook no longer necessary.
|
||||
|
||||
## 8.2.0 (2018-08-28)
|
||||
|
||||
- Simplify the if installed logic for macos
|
||||
- Remove support for FreeBSD < 10 which is VERY much EOL
|
||||
- Avoid ChefSpec deprecation warnings
|
||||
- Avoid deprecation warnings in Chef 14.3+ by not loading resources already in Chef
|
||||
|
||||
## 8.1.1 (2018-03-17)
|
||||
|
||||
- Make sure we install the last available xcode command line tool package so we get the latest version
|
||||
|
||||
## 8.1.0 (2018-03-17)
|
||||
|
||||
- Support Amazon Linux 2.0
|
||||
- Remove the ChefSpec matchers which are autogenerated now in recent ChefDK releaeses. If your specs fail because of this you need to update to a more recent ChefDK release.
|
||||
- Swap Debian 7 testing for Amazon 2 & Ubuntu 18.04 testing since Debian 7 is EOL in May
|
||||
|
||||
## 8.0.4 (2017-11-29)
|
||||
|
||||
- Install gcc-c and gcc-c++ for solaris 11
|
||||
- Fix dokken's amazonlinux configuration
|
||||
- Update chef dependency in metadata.rb to Chef 12.7
|
||||
- Clean up testing
|
||||
|
||||
## 8.0.3 (2017-05-30)
|
||||
|
||||
- Fix solaris metadata in metadata.rb
|
||||
- Remove mac_os_x_server from metata as it's not a platform
|
||||
|
||||
## 8.0.2 (2017-05-06)
|
||||
|
||||
- Remove buggy action_class.class_eval usage
|
||||
|
||||
## 8.0.1 (2017-04-14)
|
||||
|
||||
- Test with local delivery and not Rake
|
||||
- Ensure compatibility with Chef 12.5
|
||||
- Update apache2 license string
|
||||
- Ensure compatibility with Amazon Linux on Chef 13
|
||||
|
||||
## 8.0.0 (2017-02-14)
|
||||
|
||||
- Require 12.5 or later and remove compat_resource cookbook dependency
|
||||
|
||||
## 7.0.3 (2016-12-22)
|
||||
|
||||
- Require the latest compat_resource
|
||||
- Cookstyle fixes
|
||||
|
||||
## 7.0.2 (2016-11-07)
|
||||
|
||||
- Fix softwareupdate issue from -v to --verbose
|
||||
|
||||
## 7.0.1 (2016-10-06)
|
||||
|
||||
- Install gcc 4.8 on SUSE < 12
|
||||
|
||||
## 7.0.0 (2016-09-30)
|
||||
|
||||
- Remove support for OS X < 10.9 and add support for OS X 10.12
|
||||
- Refactor the xcode installer resource as a custom resource that does not require updates for each new OS X update
|
||||
- Use a test recipe with apt_update to avoid needing apt
|
||||
|
||||
## 6.0.6 (2016-09-19)
|
||||
|
||||
- Remove chef 11 compatibility in the metadata
|
||||
- Solaris 11 needs both make and gnu make
|
||||
|
||||
## 6.0.5 (2016-09-07)
|
||||
|
||||
- Testing updates
|
||||
- Require the latest compat_resource
|
||||
|
||||
## 6.0.4 (2016-08-19)
|
||||
|
||||
- Install CLTools from dmg with -allowUntrusted on old OSX
|
||||
- Switch to cookstyle for ruby linting
|
||||
- Add OS X hosts to the kitchen config
|
||||
- Remove chefdk included gems from the Gemfile
|
||||
- Better handle kitchen failures in the Rakefile
|
||||
- Perform all unit/linting in a single travis job
|
||||
|
||||
## v6.0.3 (2016-07-26)
|
||||
|
||||
- Fix how gcc version specified for Solaris 11
|
||||
|
||||
## v6.0.2 (2016-07-22)
|
||||
|
||||
- Properly warn on Solaris 10
|
||||
- Specify the verson of gcc to install on Solaris 11
|
||||
|
||||
## v6.0.1 (2016-07-19)
|
||||
|
||||
- Clarify that this cookbook actually required Chef 12.1 or later not 12.0 or later
|
||||
- Add chef_version metadata
|
||||
|
||||
## v6.0.0 (2016-06-03)
|
||||
|
||||
This cookbook now uses the new msys2 based compiler toolchain on windows. Both 32-bit DW2 and 64-bit SEH based toolchains are available based on the gcc 5.3x series compiler. By default these are located in C:\msys2\mingw32 and C:\msys2\mingw64
|
||||
|
||||
## v5.0.0 (2016-06-03)
|
||||
|
||||
The cookbook now ships with a 12.5+ style custom resource 'build_essential' which performs the same work that the existing default.rb recipe. The default.rb recipe has been converted to consume that resource to provide backwards compatibility for users that use build-essential::default in their run lists or cookbooks. In converting to this custom resource support for EOL omnios has been removed and warning messages for Solaris 10 users have been removed. See the readme for usage information on the new resource.
|
||||
|
||||
## v4.0.0 (2016-05-12)
|
||||
|
||||
### Breaking change
|
||||
|
||||
This cookbook now requires Chef 12 or later as it includes the new mingw cookbook for installing Windows compilers. Mingw includes 12.5 style custom resources, which will fail to compile on Chef 11\. If you are not running Chef 12 you'll need to pin to 3.x in your environment.
|
||||
|
||||
## v3.2.0 (2016-03-25)
|
||||
|
||||
This version backs out a change in the 3.0 release which attempted to install the version of kernel-devel for the current running kernel on RHEL systems. This change had several unintended consequences and we believe the best solution is to back to change out until a better solution for the original problem is developed. Several of the issues could be resolved by code updates to build-essential, but not all, which complicates rolling forward vs. a roll back. The change caused issues which Chefspec runs on cookbooks where build-essential is a dependency as Fauxhai, used by Chefspec, does not mock out node['virtualization']. Fauxhai is being updated to mock out node['virtualization'], but we'd like to make sure a ChefDK release ships with this new Fauxhai before depending on that change.
|
||||
|
||||
## v3.1.0 (2016-03-23)
|
||||
|
||||
- Install GCC 4.8 if running on OmniOS >= 151008
|
||||
|
||||
## v3.0.0 (2016-03-23)
|
||||
|
||||
- Install GCC 4.9 on FreeBSD < 10
|
||||
- Install the version of kernel-devel that matches the running Kernel on RHEL
|
||||
- Remove suggests 'pkgutil' from the metadata as suggests does nothing
|
||||
- Properly warn the user that build-essential does not support Solaris 10 instead of just silently continuing on
|
||||
- Updated specs to run against more recent OS releases
|
||||
- Removed the warning for OmniOS users from the Readme as the upstream issue has been resolved
|
||||
- Switch from 7-zip to seven_zip cookbook as 7-zip has been deprecated
|
||||
- Add 7-zip to the system path on Windows hosts so the recipe will work out of the box
|
||||
- Switch from the deprecated 7-zip cookbook to seven_zip
|
||||
|
||||
## v2.4.0 (2016-03-21)
|
||||
|
||||
- Add gettext package to RHEL / FreeBSD to match other platforms
|
||||
- Fix OS X version detection logic to properly detect OS X 10.10 and 10.11
|
||||
|
||||
## v2.3.1 (2016-02-18)
|
||||
|
||||
- Restore Chef 11 compatibility and add Travis / Test Kitchen testing for Chef 11
|
||||
|
||||
## v2.3.0 (2016-02-17)
|
||||
|
||||
- Add mingw/msys based build tools for Windows
|
||||
|
||||
## v2.2.4 (2015-10-06)
|
||||
|
||||
- Add patch package on Fedora systems
|
||||
- Add additional platforms to Kitchen CI
|
||||
- Use Chef standard Rubocop file and resolve several issues
|
||||
- Update contributing and testing docs
|
||||
- Update Gemfile with the latest testing and development deps
|
||||
- Add maintainers.md and maintainers.toml files
|
||||
- Add chefignore file to limit the files uploaded to the Chef server
|
||||
- Add source_url and issues_url metadata for Supermarket
|
||||
|
||||
## v2.2.3 (2015-04-15)
|
||||
|
||||
- Don't install omnibus-build-essential on Solaris 10 - We decided it's easier to use the old GCC that ships with Solaris 10.
|
||||
- Use ChefDK for all Travis testing.
|
||||
|
||||
## v2.2.2 (2015-03-27)
|
||||
|
||||
- Update Solar 10's omnibus-build-essential to 0.0.5
|
||||
|
||||
## v2.2.1 (2015-03-23)
|
||||
|
||||
- Install GNU Patch on Solaris 11
|
||||
|
||||
## v2.2.0 (2015-03-18)
|
||||
|
||||
- [solaris] Differentiate between Solaris 10 and 11
|
||||
- [solaris] Add ucb compat package
|
||||
- [solaris] Solaris 10 build essential setup
|
||||
- Fix metadata to use a string instead of a bool (see #56, #57)
|
||||
|
||||
## v2.1.3 (2014-11-18)
|
||||
|
||||
- Update metadata for supported versions of OS X (10.7+) as noted from
|
||||
- v2.0.0 previously (#38)
|
||||
- Clarify requirement to have apt package cache updated in README. (#41)
|
||||
- Fix Xcode CLI installation on OS X (#50)
|
||||
|
||||
## v2.1.2 (2014-10-14)
|
||||
|
||||
- Mac OS X 10.10 Yosemite support
|
||||
|
||||
## v2.1.0 (2014-10-14)
|
||||
|
||||
- Use fully-qualified names when installing FreeBSD package
|
||||
|
||||
## v2.0.6 (2014-08-11)
|
||||
|
||||
- Use the resource form of `remote_file` to prevent context issues
|
||||
|
||||
## v2.0.4 (2014-06-06)
|
||||
|
||||
- [COOK-4661] added patch package to _rhel recipe
|
||||
|
||||
## v2.0.2 (2014-05-02)
|
||||
|
||||
- Updated documentation about older Chef versions
|
||||
- Added new SVG badges to the README
|
||||
- Fix a bug where `potentially_at_compile_time` fails on non-resources
|
||||
|
||||
## v2.0.0 (2014-03-13)
|
||||
|
||||
- Updated tested harnesses to use latest ecosystem tools
|
||||
- Added support for FreeBSD
|
||||
- Added support for installing XCode Command Line Tools on OSX (10.7, 10.8, 10.9)
|
||||
- Created a DSL method for wrapping compile_time vs runtime execution
|
||||
- Install additional developement tools on some platforms
|
||||
- Add nicer log and warning messages with helpful information
|
||||
|
||||
**Potentially Breaking Changes**
|
||||
|
||||
- Dropped support for OSX 10.6
|
||||
- OSX no longer downloads OSX GCC and uses XCode CLI tools instead
|
||||
- `build_essential` -> `build-essential` in node attributes
|
||||
- `compiletime` -> `compile_time` in node attributes
|
||||
- Cookbook version 2.x no longer supports Chef 10.x
|
||||
|
||||
## v1.4.4 (2014-02-27)
|
||||
|
||||
- [COOK-4245] Wrong package name used for developer tools on OS X 10.9
|
||||
|
||||
## v1.4.2
|
||||
|
||||
### Bug
|
||||
|
||||
- **[COOK-3318](https://tickets.chef.io/browse/COOK-3318)** - Use Mixlib::ShellOut instead of Chef::ShellOut
|
||||
|
||||
### New Feature
|
||||
|
||||
- **[COOK-3093](https://tickets.chef.io/browse/COOK-3093)** - Add OmniOS support
|
||||
|
||||
### Improvement
|
||||
|
||||
- **[COOK-3024](https://tickets.chef.io/browse/COOK-3024)** - Use newer package on SmartOS
|
||||
|
||||
## v1.4.0
|
||||
|
||||
This version splits up the default recipe into recipes included based on the node's platform_family.
|
||||
|
||||
- [COOK-2505] - backport omnibus builder improvements
|
||||
|
||||
## v1.3.4
|
||||
|
||||
- [COOK-2272] - Complete `platform_family` conversion in build-essential
|
||||
|
||||
## v1.3.2
|
||||
|
||||
- [COOK-2069] - build-essential will install osx-gcc-installer when XCode is present
|
||||
|
||||
## v1.3.0
|
||||
|
||||
- [COOK-1895] - support smartos
|
||||
|
||||
## v1.2.0
|
||||
|
||||
- Add test-kitchen support (source repo only)
|
||||
- [COOK-1677] - build-essential cookbook support for OpenSuse and SLES
|
||||
- [COOK-1718] - build-essential cookbook metadata should include scientific
|
||||
- [COOK-1768] - The apt-get update in build-essentials needs to be renamed
|
||||
|
||||
## v1.1.2
|
||||
|
||||
- [COOK-1620] - support OS X 10.8
|
||||
|
||||
## v1.1.0
|
||||
|
||||
- [COOK-1098] - support amazon linux
|
||||
- [COOK-1149] - support Mac OS X
|
||||
- [COOK-1296] - allow for compile-time installation of packages through an attribute (see README)
|
||||
|
||||
## v1.0.2
|
||||
|
||||
- [COOK-1098] - Add Amazon Linux platform support
|
||||
- [COOK-1149] - Add OS X platform support
|
@ -1,2 +0,0 @@
|
||||
Please refer to
|
||||
https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD
|
138
ops/cookbooks/vendor/build-essential/README.md
vendored
138
ops/cookbooks/vendor/build-essential/README.md
vendored
@ -1,138 +0,0 @@
|
||||
# build-essential Cookbook
|
||||
|
||||
[][cookbook] [](https://travis-ci.org/chef-cookbooks/build-essential)
|
||||
|
||||
Installs packages required for compiling C software from source. Use this cookbook if you wish to compile C programs, or install RubyGems with native extensions. Contains a resource, 'build_essential', as as well as a default recipe that simply calls that same resource.
|
||||
|
||||
Note: The functionality of this cookbook is now built into Chef 14+ in the [build_essential resource](https://docs.chef.io/resource_build_essential.html). This cookbook is no longer being maintained and all future changes will be done directly in the chef-client. We highly recommend you update your chef-client to the latest release and if possible migrate to using the build_essential resources instead of the recipe in this cookbook.
|
||||
|
||||
## Requirements
|
||||
|
||||
### Platforms
|
||||
|
||||
- Debian/Ubuntu
|
||||
- RHEL/CentOS/Scientific/Amazon/Oracle
|
||||
- openSUSE / SUSE Enterprise Linux
|
||||
- SmartOS
|
||||
- Fedora
|
||||
- Mac OS X 10.9+
|
||||
- FreeBSD
|
||||
|
||||
### Chef
|
||||
|
||||
- Chef 12.7+
|
||||
|
||||
### Cookbooks
|
||||
|
||||
- seven_zip
|
||||
- mingw
|
||||
|
||||
**Note for Debian platform family:** On Debian platform-family systems, it is recommended that `apt-get update` be run, to ensure that the package cache is updated. It's not in the scope of this cookbook to do that, as it can [create a duplicate resource](https://tickets.chef.io/browse/CHEF-3694). We recommend using the [apt](https://supermarket.chef.io/cookbooks/apt) cookbook to do this.
|
||||
|
||||
## Attributes
|
||||
|
||||
Attribute | Default | Description
|
||||
------------------------------------------ | :---------------------------: | -----------------------------------------------------
|
||||
`node['build-essential']['compile_time']` | `false` | Execute resources at compile time
|
||||
`node['build-essential']['msys2']['path']` | `#{ENV['SYSTEMDRIVE']\\msys2` | Destination for msys2 build tool chain (Windows only)
|
||||
|
||||
## Usage
|
||||
|
||||
### Recipe Usage
|
||||
|
||||
The recipe simply calls the build_essential resource, but it ideal for adding to roles or node run lists.
|
||||
|
||||
Include the build-essential recipe in your run list:
|
||||
|
||||
```sh
|
||||
knife node run_list add NODE "recipe[build-essential::default]"
|
||||
```
|
||||
|
||||
or add the build-essential recipe as a dependency and include it from inside another cookbook:
|
||||
|
||||
```ruby
|
||||
include_recipe 'build-essential::default'
|
||||
```
|
||||
|
||||
### Gems with C extensions
|
||||
|
||||
For RubyGems that include native C extensions you wish to use with Chef, you should do the following.
|
||||
|
||||
- Set the `compile_time` attribute to true in your wrapper cookbook or role:
|
||||
|
||||
```ruby
|
||||
# Wrapper attribute
|
||||
default['build-essential']['compile_time'] = true
|
||||
```
|
||||
|
||||
```ruby
|
||||
# Role
|
||||
default_attributes(
|
||||
'build-essential' => {
|
||||
'compile_time' => true
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
- Ensure that the C libraries, which include files and other assorted "dev"
|
||||
|
||||
type packages, are installed in the compile phase after the build-essential
|
||||
|
||||
recipe is executed. For example:
|
||||
|
||||
```ruby
|
||||
include_recipe 'build-essential::default'
|
||||
|
||||
package('mypackage-devel') { action :nothing }.run_action(:install)
|
||||
```
|
||||
|
||||
- Use the `chef_gem` resource in your recipe to install the gem with the native
|
||||
|
||||
extension:
|
||||
|
||||
```ruby
|
||||
chef_gem 'gem-with-native-extension'
|
||||
```
|
||||
|
||||
### Resource Usage
|
||||
|
||||
The cookbook includes a resource 'build_essential' that can be included in your cookbook to install the necessary build-essential packages
|
||||
|
||||
Simple package installation during the client run:
|
||||
|
||||
```ruby
|
||||
build_essential 'some name you choose'
|
||||
```
|
||||
|
||||
Package installation during the compile phase:
|
||||
|
||||
```ruby
|
||||
build_essential 'some name you choose' do
|
||||
compile_time false
|
||||
end
|
||||
```
|
||||
|
||||
## Maintainers
|
||||
|
||||
This cookbook is maintained by Chef's Community Cookbook Engineering team. Our goal is to improve cookbook quality and to aid the community in contributing to cookbooks. To learn more about our team, process, and design goals see our [team documentation](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/COOKBOOK_TEAM.MD). To learn more about contributing to cookbooks like this see our [contributing documentation](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD), or if you have general questions about this cookbook come chat with us in #cookbok-engineering on the [Chef Community Slack](http://community-slack.chef.io/)
|
||||
|
||||
## License
|
||||
|
||||
**Copyright:** 2009-2016, Chef Software, Inc.
|
||||
|
||||
```
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
```
|
||||
|
||||
[cookbook]: https://supermarket.chef.io/cookbooks/build-essential
|
||||
[travis]: http://travis-ci.org/chef-cookbooks/build-essential
|
@ -1,21 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build-essential
|
||||
# Attributes:: default
|
||||
#
|
||||
# Copyright:: 2008-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['build-essential']['compile_time'] = false
|
||||
default['build-essential']['msys2']['path'] = "#{ENV['SYSTEMDRIVE']}\\msys2"
|
File diff suppressed because one or more lines are too long
@ -1,53 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build-essential
|
||||
# Recipe:: _windows
|
||||
#
|
||||
# Copyright:: 2016-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
node.default['seven_zip']['syspath'] = true
|
||||
include_recipe 'seven_zip::default'
|
||||
|
||||
tool_path = node['build-essential']['msys2']['path']
|
||||
|
||||
directory tool_path do
|
||||
action :create
|
||||
recursive true
|
||||
end
|
||||
|
||||
[
|
||||
'base-devel', # Brings down msys based bash/make/awk/patch/stuff..
|
||||
'mingw-w64-x86_64-toolchain', # Puts 64-bit SEH mingw toolchain in msys2\mingw64
|
||||
'mingw-w64-i686-toolchain' # Puts 32-bit DW2 mingw toolchain in msys2\ming32
|
||||
].each do |package|
|
||||
msys2_package package do
|
||||
root tool_path
|
||||
end
|
||||
end
|
||||
|
||||
# Certain build steps assume that a tar command is available on the
|
||||
# system path. The default tar present in msys2\usr\bin is an msys GNU tar
|
||||
# that expects forward slashes and consider ':' to be a remote tape separator
|
||||
# or something weird like that. We therefore drop bat file in msys2\bin that
|
||||
# redirect to the underlying executables without mucking around with
|
||||
# msys2's /usr/bin itself.
|
||||
{
|
||||
'bsdtar.exe' => 'tar.bat',
|
||||
'patch.exe' => 'patch.bat',
|
||||
}.each do |reference, link|
|
||||
file "#{tool_path}\\bin\\#{link}" do
|
||||
content "@%~dp0..\\usr\\bin\\#{reference} %*"
|
||||
end
|
||||
end
|
@ -1,24 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build-essential
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright:: 2008-2018, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Call the build-essential custom resource
|
||||
# This can also be called directly in your cookbooks anywhere you want
|
||||
build_essential 'install_packages' do
|
||||
compile_time node['build-essential']['compile_time']
|
||||
end
|
@ -1,107 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build-essential
|
||||
# resource:: build_essential
|
||||
#
|
||||
# Copyright:: 2008-2018, Chef Software Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
chef_version_for_provides '< 14.0' if respond_to?(:chef_version_for_provides)
|
||||
provides :build_essential
|
||||
resource_name :build_essential
|
||||
|
||||
property :compile_time, [true, false], default: false
|
||||
|
||||
action :install do
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
package %w( autoconf binutils-doc bison build-essential flex gettext ncurses-dev )
|
||||
when 'amazon', 'fedora', 'rhel'
|
||||
package %w( autoconf bison flex gcc gcc-c++ gettext kernel-devel make m4 ncurses-devel patch )
|
||||
|
||||
# Ensure GCC 4 is available on older pre-6 EL
|
||||
package %w( gcc44 gcc44-c++ ) if !platform?('amazon') && node['platform_version'].to_i < 6
|
||||
when 'freebsd'
|
||||
package 'devel/gmake'
|
||||
package 'devel/autoconf'
|
||||
package 'devel/m4'
|
||||
package 'devel/gettext'
|
||||
when 'mac_os_x'
|
||||
xcode_command_line_tools 'install'
|
||||
when 'omnios'
|
||||
package 'developer/gcc48'
|
||||
package 'developer/object-file'
|
||||
package 'developer/linker'
|
||||
package 'developer/library/lint'
|
||||
package 'developer/build/gnu-make'
|
||||
package 'system/header'
|
||||
package 'system/library/math/header-math'
|
||||
|
||||
# Per OmniOS documentation, the gcc bin dir isn't in the default
|
||||
# $PATH, so add it to the running process environment
|
||||
# http://omnios.omniti.com/wiki.php/DevEnv
|
||||
ENV['PATH'] = "#{ENV['PATH']}:/opt/gcc-4.7.2/bin"
|
||||
when 'solaris2'
|
||||
if node['platform_version'].to_f == 5.10
|
||||
Chef::Log.warn('build-essential does not support Solaris 10. You will need to install SUNWbison, SUNWgcc, SUNWggrp, SUNWgmake, and SUNWgtar from the Solaris DVD')
|
||||
elsif node['platform_version'].to_f == 5.11
|
||||
package 'autoconf'
|
||||
package 'automake'
|
||||
package 'bison'
|
||||
package 'gnu-coreutils'
|
||||
package 'flex'
|
||||
# lock gcc versions because we don't use 5 yet
|
||||
%w(gcc gcc-c gcc-c++).each do |pkg|
|
||||
package pkg do # ~FC009
|
||||
accept_license true
|
||||
version '4.8.2'
|
||||
end
|
||||
end
|
||||
package 'gnu-grep'
|
||||
package 'gnu-make'
|
||||
package 'gnu-patch'
|
||||
package 'gnu-tar'
|
||||
package 'make'
|
||||
package 'pkg-config'
|
||||
package 'ucb'
|
||||
end
|
||||
when 'smartos'
|
||||
package 'autoconf'
|
||||
package 'binutils'
|
||||
package 'build-essential'
|
||||
package 'gcc47'
|
||||
package 'gmake'
|
||||
package 'pkg-config'
|
||||
when 'suse'
|
||||
package %w( autoconf bison flex gcc gcc-c++ kernel-default-devel make m4 )
|
||||
package %w( gcc48 gcc48-c++ ) if node['platform_version'].to_i < 12
|
||||
when 'windows'
|
||||
include_recipe 'build-essential::_windows'
|
||||
else
|
||||
Chef::Log.warn <<-EOH
|
||||
A build-essential recipe does not exist for '#{node['platform_family']}'. This
|
||||
means the build-essential cookbook does not have support for the
|
||||
#{node['platform_family']} family. If you are not compiling gems with native
|
||||
extensions or building packages from source, this will likely not affect you.
|
||||
EOH
|
||||
end
|
||||
end
|
||||
|
||||
# this resource forces itself to run at compile_time
|
||||
def after_created
|
||||
return unless compile_time
|
||||
Array(action).each do |action|
|
||||
run_action(action)
|
||||
end
|
||||
end
|
@ -1,57 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build-essential
|
||||
# Resource:: xcode_command_line_tools
|
||||
#
|
||||
# Copyright:: 2014-2018, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
resource_name :xcode_command_line_tools
|
||||
|
||||
action :install do
|
||||
if installed?
|
||||
Chef::Log.debug("#{new_resource} already installed - skipping")
|
||||
else
|
||||
converge_by("Install #{new_resource}") do
|
||||
# This script was graciously borrowed and modified from Tim Sutton's
|
||||
# osx-vm-templates at https://github.com/timsutton/osx-vm-templates/blob/b001475df54a9808d3d56d06e71b8fa3001fff42/scripts/xcode-cli-tools.sh
|
||||
execute 'install XCode Command Line tools' do
|
||||
command <<-EOH.gsub(/^ {14}/, '')
|
||||
# create the placeholder file that's checked by CLI updates' .dist code
|
||||
# in Apple's SUS catalog
|
||||
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
|
||||
# find the CLI Tools update
|
||||
PROD=$(softwareupdate -l | grep "\*.*Command Line" | tail -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '\n')
|
||||
# install it
|
||||
softwareupdate -i "$PROD" --verbose
|
||||
# Remove the placeholder to prevent perpetual appearance in the update utility
|
||||
rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
|
||||
EOH
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
action_class do
|
||||
#
|
||||
# Determine if the XCode Command Line Tools are installed
|
||||
#
|
||||
# @return [true, false]
|
||||
#
|
||||
def installed?
|
||||
cmd = Mixlib::ShellOut.new('pkgutil --pkgs=com.apple.pkg.CLTools_Executables')
|
||||
cmd.run_command
|
||||
cmd.error? ? false : true
|
||||
end
|
||||
end
|
6
ops/cookbooks/vendor/change-me/Berksfile
vendored
6
ops/cookbooks/vendor/change-me/Berksfile
vendored
@ -1,6 +0,0 @@
|
||||
source 'https://supermarket.chef.io'
|
||||
# cookbook 'mysql', '~> 8.5.1'
|
||||
metadata
|
||||
|
||||
cookbook 'app', path: 'app'
|
||||
cookbook 't42-common', git: 'https://github.com/theta42/t42-common.git'
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
driver:
|
||||
name: vagrant
|
||||
synced_folders:
|
||||
- [<%= File.join(ENV['PWD'], '..', '..')%>, '/tmp/repo-data']
|
||||
|
||||
provisioner:
|
||||
name: chef_zero
|
||||
encrypted_data_bag_secret_key_path: 'secrets/fakey-mcfakerton'
|
||||
data_bags_path: './data_bags'
|
||||
product_name: chefdk
|
||||
|
||||
platforms:
|
||||
- name: ubuntu-16.04
|
||||
- name: centos-7
|
||||
|
||||
suites:
|
||||
- name: default
|
||||
run_list:
|
||||
- recipe[test]
|
||||
attributes:
|
@ -1,7 +0,0 @@
|
||||
source 'https://supermarket.chef.io'
|
||||
|
||||
metadata
|
||||
|
||||
group :delivery do
|
||||
cookbook 'test', path: './test/fixtures/cookbooks/test'
|
||||
end
|
@ -1,3 +0,0 @@
|
||||
Copyright 2019 The Authors
|
||||
|
||||
All rights reserved, do not redistribute.
|
@ -1,146 +0,0 @@
|
||||
# build_cookbook
|
||||
|
||||
A build cookbook for running the parent project through Chef Delivery
|
||||
|
||||
This build cookbook should be customized to suit the needs of the parent project. Using this cookbook can be done outside of Chef Delivery, too. If the parent project is a Chef cookbook, we've detected that and "wrapped" [delivery-truck](https://github.com/chef-cookbooks/delivery-truck). That means it is a dependency, and each of its pipeline phase recipes is included in the appropriate phase recipes in this cookbook. If the parent project is not a cookbook, it's left as an exercise to the reader to customize the recipes as needed for each phase in the pipeline.
|
||||
|
||||
## .delivery/config.json
|
||||
|
||||
In the parent directory to this build_cookbook, the `config.json` can be modified as necessary. For example, phases can be skipped, publishing information can be added, and so on. Refer to customer support or the Chef Delivery documentation for assistance on what options are available for this configuration.
|
||||
|
||||
## Test Kitchen - Local Verify Testing
|
||||
|
||||
This cookbook also has a `.kitchen.yml` which can be used to create local build nodes with Test Kitchen to perform the verification phases, `unit`, `syntax`, and `lint`. When running `kitchen converge`, the instances will be set up like Chef Delivery "build nodes" with the [delivery_build cookbook](https://github.com/chef-cookbooks/delivery_build). The reason for this is to make sure that the same exact kind of nodes are used by this build cookbook are run on the local workstation as would run Delivery. It will run `delivery job verify PHASE` for the parent project.
|
||||
|
||||
Modify the `.kitchen.yml` if necessary to change the platforms or other configuration to run the verify phases. After making changes in the parent project, `cd` into this directory (`.delivery/build_cookbook`), and run:
|
||||
|
||||
```
|
||||
kitchen test
|
||||
```
|
||||
|
||||
## Recipes
|
||||
|
||||
Each of the recipes in this build_cookbook are run in the named phase during the Chef Delivery pipeline. The `unit`, `syntax`, and `lint` recipes are additionally run when using Test Kitchen for local testing as noted in the above section.
|
||||
|
||||
## Making Changes - Cookbook Example
|
||||
|
||||
When making changes in the parent project (that which lives in `../..` from this directory), or in the recipes in this build cookbook, there is a bespoke workflow for Chef Delivery. As an example, we'll discuss a Chef Cookbook as the parent.
|
||||
|
||||
First, create a new branch for the changes.
|
||||
|
||||
```
|
||||
git checkout -b testing-build-cookbook
|
||||
```
|
||||
|
||||
Next, increment the version in the metadata.rb. This should be in the _parent_, not in this, the build_cookbook. If this is not done, the verify phase will fail.
|
||||
|
||||
```
|
||||
% git diff
|
||||
<SNIP>
|
||||
-version '0.1.0'
|
||||
+version '0.1.1'
|
||||
```
|
||||
|
||||
The change we'll use for an example is to install the `zsh` package. Write a failing ChefSpec in the cookbook project's `spec/unit/recipes/default_spec.rb`.
|
||||
|
||||
```ruby
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'godzilla::default' do
|
||||
context 'When all attributes are default, on Ubuntu 16.04' do
|
||||
let(:chef_run) do
|
||||
runner = ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04')
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
it 'installs zsh' do
|
||||
expect(chef_run).to install_package('zsh')
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
Commit the local changes as work in progress. The `delivery job` expects to use a clean git repository.
|
||||
|
||||
```
|
||||
git add ../..
|
||||
git commit -m 'WIP: Testing changes'
|
||||
```
|
||||
|
||||
From _this_ directory (`.delivery/build_cookbook`, relative to the parent cookbook project), run
|
||||
|
||||
```
|
||||
cd .delivery/build_cookbook
|
||||
kitchen converge
|
||||
```
|
||||
|
||||
This will take some time at first, because the VMs need to be created, Chef installed, the Delivery CLI installed, etc. Later runs will be faster until they are destroyed. It will also fail on the first VM, as expected, because we wrote the test first. Now edit the parent cookbook project's default recipe to install `zsh`.
|
||||
|
||||
```
|
||||
cd ../../
|
||||
$EDITOR/recipes/default.rb
|
||||
```
|
||||
|
||||
It should look like this:
|
||||
|
||||
```
|
||||
package 'zsh'
|
||||
```
|
||||
|
||||
Create another commit.
|
||||
|
||||
```
|
||||
git add .
|
||||
git commit -m 'WIP: Install zsh in default recipe'
|
||||
```
|
||||
|
||||
Now rerun kitchen from the build_cookbook.
|
||||
|
||||
```
|
||||
cd .delivery/build_cookbook
|
||||
kitchen converge
|
||||
```
|
||||
|
||||
This will take awhile because it will now pass on the first VM, and then create the second VM. We should have warned you this was a good time for a coffee break.
|
||||
|
||||
```
|
||||
Recipe: test::default
|
||||
|
||||
- execute HOME=/home/vagrant delivery job verify unit --server localhost --ent test --org kitchen
|
||||
* execute[HOME=/home/vagrant delivery job verify lint --server localhost --ent test --org kitchen] action run
|
||||
- execute HOME=/home/vagrant delivery job verify lint --server localhost --ent test --org kitchen
|
||||
|
||||
- execute HOME=/home/vagrant delivery job verify syntax --server localhost --ent test --org kitchen
|
||||
|
||||
Running handlers:
|
||||
Running handlers complete
|
||||
Chef Client finished, 3/32 resources updated in 54.665445968 seconds
|
||||
Finished converging <default-centos-71> (1m26.83s).
|
||||
```
|
||||
|
||||
Victory is ours! Our verify phase passed on the build nodes.
|
||||
|
||||
We are ready to run this through our Delivery pipeline. Simply run `delivery review` on the local system from the parent project, and it will open a browser window up to the change we just added.
|
||||
|
||||
```
|
||||
cd ../..
|
||||
delivery review
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
### Why don't I just run rspec and foodcritic/rubocop on my local system?
|
||||
|
||||
An objection to the Test Kitchen approach is that it is much faster to run the unit, lint, and syntax commands for the project on the local system. That is totally true, and also totally valid. Do that for the really fast feedback loop. However, the dance we do with Test Kitchen brings a much higher degree of confidence in the changes we're making, that everything will run on the build nodes in Chef Delivery. We strongly encourage this approach before actually pushing the changes to Delivery.
|
||||
|
||||
### Why do I have to make a commit every time?
|
||||
|
||||
When running `delivery job`, it expects to merge the commit for the changeset against the clean master branch. If we don't save our progress by making a commit, our local changes aren't run through `delivery job` in the Test Kitchen build instances. We can always perform an interactive rebase, and modify the original changeset message in Delivery with `delivery review --edit`. The latter won't modify the git commits, only the changeset in Delivery.
|
||||
|
||||
### What do I do next?
|
||||
|
||||
Make changes in the cookbook project as required for organizational goals and needs. Modify the `build_cookbook` as necessary for the pipeline phases that the cookbook should go through.
|
||||
|
||||
### What if I get stuck?
|
||||
|
||||
Contact Chef Support, or your Chef Customer Success team and they will help you get unstuck.
|
@ -1,104 +0,0 @@
|
||||
# Put files/directories that should be ignored in this file when uploading
|
||||
# to a chef-server or supermarket.
|
||||
# Lines that start with '# ' are comments.
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store
|
||||
Icon?
|
||||
nohup.out
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# SASS #
|
||||
########
|
||||
.sass-cache
|
||||
|
||||
# EDITORS #
|
||||
###########
|
||||
\#*
|
||||
.#*
|
||||
*~
|
||||
*.sw[a-z]
|
||||
*.bak
|
||||
REVISION
|
||||
TAGS*
|
||||
tmtags
|
||||
*_flymake.*
|
||||
*_flymake
|
||||
*.tmproj
|
||||
.project
|
||||
.settings
|
||||
mkmf.log
|
||||
|
||||
## COMPILED ##
|
||||
##############
|
||||
a.out
|
||||
*.o
|
||||
*.pyc
|
||||
*.so
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.exe
|
||||
*/rdoc/
|
||||
|
||||
# Testing #
|
||||
###########
|
||||
.watchr
|
||||
.rspec
|
||||
spec/*
|
||||
spec/fixtures/*
|
||||
test/*
|
||||
features/*
|
||||
examples/*
|
||||
Guardfile
|
||||
Procfile
|
||||
.kitchen*
|
||||
kitchen.yml*
|
||||
.rubocop.yml
|
||||
spec/*
|
||||
Rakefile
|
||||
.travis.yml
|
||||
.foodcritic
|
||||
.codeclimate.yml
|
||||
|
||||
# SCM #
|
||||
#######
|
||||
.git
|
||||
*/.git
|
||||
.gitignore
|
||||
.gitmodules
|
||||
.gitconfig
|
||||
.gitattributes
|
||||
.svn
|
||||
*/.bzr/*
|
||||
*/.hg/*
|
||||
*/.svn/*
|
||||
|
||||
# Berkshelf #
|
||||
#############
|
||||
Berksfile
|
||||
Berksfile.lock
|
||||
cookbooks/*
|
||||
tmp
|
||||
|
||||
# Bundler #
|
||||
###########
|
||||
vendor/*
|
||||
|
||||
# Policyfile #
|
||||
##############
|
||||
Policyfile.rb
|
||||
Policyfile.lock.json
|
||||
|
||||
# Cookbooks #
|
||||
#############
|
||||
CONTRIBUTING*
|
||||
CHANGELOG*
|
||||
TESTING*
|
||||
|
||||
# Vagrant #
|
||||
###########
|
||||
.vagrant
|
||||
Vagrantfile
|
@ -1 +0,0 @@
|
||||
{"id": "delivery_builder_keys"}
|
@ -1,8 +0,0 @@
|
||||
name 'build_cookbook'
|
||||
maintainer 'The Authors'
|
||||
maintainer_email 'you@example.com'
|
||||
license 'all_rights'
|
||||
version '0.1.0'
|
||||
chef_version '>= 13.0'
|
||||
|
||||
depends 'delivery-truck'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::default'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: deploy
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::deploy'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: functional
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::functional'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: lint
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::lint'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: provision
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::provision'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: publish
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::publish'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: quality
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::quality'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: security
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::security'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: smoke
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::smoke'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: syntax
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::syntax'
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# Cookbook:: build_cookbook
|
||||
# Recipe:: unit
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
include_recipe 'delivery-truck::unit'
|
@ -1,2 +0,0 @@
|
||||
name 'test'
|
||||
version '0.1.0'
|
@ -1,9 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
%w(unit lint syntax).each do |phase|
|
||||
# TODO: This works on Linux/Unix. Not Windows.
|
||||
execute "HOME=/home/vagrant delivery job verify #{phase} --server localhost --ent test --org kitchen" do
|
||||
cwd '/tmp/repo-data'
|
||||
user 'vagrant'
|
||||
environment('GIT_DISCOVERY_ACROSS_FILESYSTEM' => '1')
|
||||
end
|
||||
end
|
@ -1,17 +0,0 @@
|
||||
{
|
||||
"version": "2",
|
||||
"build_cookbook": {
|
||||
"name": "build_cookbook",
|
||||
"path": ".delivery/build_cookbook"
|
||||
},
|
||||
"delivery-truck": {
|
||||
"lint": {
|
||||
"enable_cookstyle": true
|
||||
}
|
||||
},
|
||||
"skip_phases": [],
|
||||
"job_dispatch": {
|
||||
"version": "v2"
|
||||
},
|
||||
"dependencies": []
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
# Delivery Prototype for Local Phases Execution
|
||||
#
|
||||
# The purpose of this file is to prototype a new way to execute
|
||||
# phases locally on your workstation. The delivery-cli will read
|
||||
# this file and execute the command(s) that are configured for
|
||||
# each phase. You can customize them by just modifying the phase
|
||||
# key on this file.
|
||||
#
|
||||
# By default these phases are configured for Cookbook Workflow only
|
||||
#
|
||||
# As this is still a prototype we are not modifying the current
|
||||
# config.json file and it will continue working as usual.
|
||||
|
||||
[local_phases]
|
||||
unit = "chef exec rspec spec/"
|
||||
lint = "chef exec cookstyle"
|
||||
# Foodcritic includes rules only appropriate for community cookbooks
|
||||
# uploaded to Supermarket. We turn off any rules tagged "supermarket"
|
||||
# by default. If you plan to share this cookbook you should remove
|
||||
# '-t ~supermarket' below to enable supermarket rules.
|
||||
syntax = "chef exec foodcritic . -t ~supermarket"
|
||||
provision = "chef exec kitchen create"
|
||||
deploy = "chef exec kitchen converge"
|
||||
smoke = "chef exec kitchen verify"
|
||||
# The functional phase is optional, you can define it by uncommenting
|
||||
# the line below and running the command: `delivery local functional`
|
||||
# functional = ""
|
||||
cleanup = "chef exec kitchen destroy"
|
||||
|
||||
# Remote project.toml file
|
||||
#
|
||||
# Specify a remote URI location for the `project.toml` file.
|
||||
# This is useful for teams that wish to centrally manage the behavior
|
||||
# of the `delivery local` command across many different projects.
|
||||
#
|
||||
# remote_file = "https://url/project.toml"
|
22
ops/cookbooks/vendor/change-me/app/.gitignore
vendored
22
ops/cookbooks/vendor/change-me/app/.gitignore
vendored
@ -1,22 +0,0 @@
|
||||
.vagrant
|
||||
*~
|
||||
*#
|
||||
.#*
|
||||
\#*#
|
||||
.*.sw[a-z]
|
||||
*.un~
|
||||
|
||||
# Bundler
|
||||
Gemfile.lock
|
||||
gems.locked
|
||||
bin/*
|
||||
.bundle/*
|
||||
|
||||
# test kitchen
|
||||
.kitchen/
|
||||
.kitchen.local.yml
|
||||
|
||||
# Chef
|
||||
Berksfile.lock
|
||||
.zero-knife.rb
|
||||
Policyfile.lock.json
|
26
ops/cookbooks/vendor/change-me/app/.kitchen.yml
vendored
26
ops/cookbooks/vendor/change-me/app/.kitchen.yml
vendored
@ -1,26 +0,0 @@
|
||||
---
|
||||
driver:
|
||||
name: vagrant
|
||||
|
||||
provisioner:
|
||||
name: chef_zero
|
||||
# You may wish to disable always updating cookbooks in CI or other testing environments.
|
||||
# For example:
|
||||
# always_update_cookbooks: <%= !ENV['CI'] %>
|
||||
always_update_cookbooks: true
|
||||
|
||||
verifier:
|
||||
name: inspec
|
||||
|
||||
platforms:
|
||||
- name: ubuntu-16.04
|
||||
- name: centos-7
|
||||
|
||||
suites:
|
||||
- name: default
|
||||
run_list:
|
||||
- recipe[django-bakend::default]
|
||||
verifier:
|
||||
inspec_tests:
|
||||
- test/integration/default
|
||||
attributes:
|
5
ops/cookbooks/vendor/change-me/app/Berksfile
vendored
5
ops/cookbooks/vendor/change-me/app/Berksfile
vendored
@ -1,5 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
source 'https://supermarket.chef.io'
|
||||
# cookbook 'mysql', '~> 8.5.1'
|
||||
cookbook "library-cookbook", "~> 0.1.1", git: "https://github.com/example/library-cookbook.git"
|
||||
metadata
|
11
ops/cookbooks/vendor/change-me/app/CHANGELOG.md
vendored
11
ops/cookbooks/vendor/change-me/app/CHANGELOG.md
vendored
@ -1,11 +0,0 @@
|
||||
# django-bakend CHANGELOG
|
||||
|
||||
This file is used to list changes made in each version of the django-bakend cookbook.
|
||||
|
||||
# 0.1.0
|
||||
|
||||
Initial release.
|
||||
|
||||
- change 0
|
||||
- change 1
|
||||
|
3
ops/cookbooks/vendor/change-me/app/LICENSE
vendored
3
ops/cookbooks/vendor/change-me/app/LICENSE
vendored
@ -1,3 +0,0 @@
|
||||
Copyright 2019 The Authors
|
||||
|
||||
All rights reserved, do not redistribute.
|
4
ops/cookbooks/vendor/change-me/app/README.md
vendored
4
ops/cookbooks/vendor/change-me/app/README.md
vendored
@ -1,4 +0,0 @@
|
||||
# django-backend
|
||||
|
||||
TODO: Enter the cookbook description here.
|
||||
|
104
ops/cookbooks/vendor/change-me/app/chefignore
vendored
104
ops/cookbooks/vendor/change-me/app/chefignore
vendored
@ -1,104 +0,0 @@
|
||||
# Put files/directories that should be ignored in this file when uploading
|
||||
# to a chef-server or supermarket.
|
||||
# Lines that start with '# ' are comments.
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store
|
||||
Icon?
|
||||
nohup.out
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# SASS #
|
||||
########
|
||||
.sass-cache
|
||||
|
||||
# EDITORS #
|
||||
###########
|
||||
\#*
|
||||
.#*
|
||||
*~
|
||||
*.sw[a-z]
|
||||
*.bak
|
||||
REVISION
|
||||
TAGS*
|
||||
tmtags
|
||||
*_flymake.*
|
||||
*_flymake
|
||||
*.tmproj
|
||||
.project
|
||||
.settings
|
||||
mkmf.log
|
||||
|
||||
## COMPILED ##
|
||||
##############
|
||||
a.out
|
||||
*.o
|
||||
*.pyc
|
||||
*.so
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.exe
|
||||
*/rdoc/
|
||||
|
||||
# Testing #
|
||||
###########
|
||||
.watchr
|
||||
.rspec
|
||||
spec/*
|
||||
spec/fixtures/*
|
||||
test/*
|
||||
features/*
|
||||
examples/*
|
||||
Guardfile
|
||||
Procfile
|
||||
.kitchen*
|
||||
kitchen.yml*
|
||||
.rubocop.yml
|
||||
spec/*
|
||||
Rakefile
|
||||
.travis.yml
|
||||
.foodcritic
|
||||
.codeclimate.yml
|
||||
|
||||
# SCM #
|
||||
#######
|
||||
.git
|
||||
*/.git
|
||||
.gitignore
|
||||
.gitmodules
|
||||
.gitconfig
|
||||
.gitattributes
|
||||
.svn
|
||||
*/.bzr/*
|
||||
*/.hg/*
|
||||
*/.svn/*
|
||||
|
||||
# Berkshelf #
|
||||
#############
|
||||
Berksfile
|
||||
Berksfile.lock
|
||||
cookbooks/*
|
||||
tmp
|
||||
|
||||
# Bundler #
|
||||
###########
|
||||
vendor/*
|
||||
|
||||
# Policyfile #
|
||||
##############
|
||||
Policyfile.rb
|
||||
Policyfile.lock.json
|
||||
|
||||
# Cookbooks #
|
||||
#############
|
||||
CONTRIBUTING*
|
||||
CHANGELOG*
|
||||
TESTING*
|
||||
|
||||
# Vagrant #
|
||||
###########
|
||||
.vagrant
|
||||
Vagrantfile
|
22
ops/cookbooks/vendor/change-me/app/metadata.rb
vendored
22
ops/cookbooks/vendor/change-me/app/metadata.rb
vendored
@ -1,22 +0,0 @@
|
||||
name 'app'
|
||||
maintainer 'The Authors'
|
||||
maintainer_email 'you@example.com'
|
||||
license 'All Rights Reserved'
|
||||
description 'Installs/Configures django-backend'
|
||||
long_description 'Installs/Configures django-backend'
|
||||
version '0.1.0'
|
||||
chef_version '>= 13.0'
|
||||
|
||||
depends 't42-common'
|
||||
|
||||
# The `issues_url` points to the location where issues for this cookbook are
|
||||
# tracked. A `View Issues` link will be displayed on this cookbook's page when
|
||||
# uploaded to a Supermarket.
|
||||
#
|
||||
# issues_url 'https://github.com/<insert_org_here>/django-backend/issues'
|
||||
|
||||
# The `source_url` points to the development repository for this cookbook. A
|
||||
# `View Source` link will be displayed on this cookbook's page when uploaded to
|
||||
# a Supermarket.
|
||||
#
|
||||
# source_url 'https://github.com/<insert_org_here>/django-backend'
|
@ -1 +0,0 @@
|
||||
package 'libpam0g-dev'
|
@ -1,3 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
require 'chefspec'
|
||||
require 'chefspec/berkshelf'
|
@ -1,35 +0,0 @@
|
||||
#
|
||||
# Cookbook:: app
|
||||
# Spec:: default
|
||||
#
|
||||
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'app::default' do
|
||||
context 'When all attributes are default, on Ubuntu 16.04' do
|
||||
let(:chef_run) do
|
||||
# for a complete list of available platforms and versions see:
|
||||
# https://github.com/customink/fauxhai/blob/master/PLATFORMS.md
|
||||
runner = ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04')
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
it 'converges successfully' do
|
||||
expect { chef_run }.to_not raise_error
|
||||
end
|
||||
end
|
||||
|
||||
context 'When all attributes are default, on CentOS 7.4.1708' do
|
||||
let(:chef_run) do
|
||||
# for a complete list of available platforms and versions see:
|
||||
# https://github.com/customink/fauxhai/blob/master/PLATFORMS.md
|
||||
runner = ChefSpec::ServerRunner.new(platform: 'centos', version: '7.4.1708')
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
it 'converges successfully' do
|
||||
expect { chef_run }.to_not raise_error
|
||||
end
|
||||
end
|
||||
end
|
@ -1,16 +0,0 @@
|
||||
# InSpec test for recipe django-bakend::default
|
||||
|
||||
# The InSpec reference, with examples and extensive documentation, can be
|
||||
# found at http://inspec.io/docs/reference/resources/
|
||||
|
||||
unless os.windows?
|
||||
# This is an example test, replace with your own test.
|
||||
describe user('root'), :skip do
|
||||
it { should exist }
|
||||
end
|
||||
end
|
||||
|
||||
# This is an example test, replace it with your own test.
|
||||
describe port(80), :skip do
|
||||
it { should_not be_listening }
|
||||
end
|
33
ops/cookbooks/vendor/change-me/metadata.json
vendored
33
ops/cookbooks/vendor/change-me/metadata.json
vendored
@ -1,33 +0,0 @@
|
||||
{
|
||||
"name": "change-me",
|
||||
"description": "",
|
||||
"long_description": "",
|
||||
"maintainer": "",
|
||||
"maintainer_email": "",
|
||||
"license": "All rights reserved",
|
||||
"platforms": {
|
||||
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
},
|
||||
"providing": {
|
||||
|
||||
},
|
||||
"recipes": {
|
||||
|
||||
},
|
||||
"version": "0.0.0",
|
||||
"source_url": "",
|
||||
"issues_url": "",
|
||||
"privacy": false,
|
||||
"chef_versions": [
|
||||
|
||||
],
|
||||
"ohai_versions": [
|
||||
|
||||
],
|
||||
"gems": [
|
||||
|
||||
]
|
||||
}
|
3
ops/cookbooks/vendor/change-me/metadata.rb
vendored
3
ops/cookbooks/vendor/change-me/metadata.rb
vendored
@ -1,3 +0,0 @@
|
||||
name 'change-me'
|
||||
|
||||
depnds 'app'
|
58
ops/cookbooks/vendor/mingw/CHANGELOG.md
vendored
58
ops/cookbooks/vendor/mingw/CHANGELOG.md
vendored
@ -1,58 +0,0 @@
|
||||
# mingw Cookbook CHANGELOG
|
||||
|
||||
This file is used to list changes made in each version of the mingw cookbook.
|
||||
|
||||
## 2.1.0 (2018-07-24)
|
||||
|
||||
- refactor msys2 package source and checksum to attributes
|
||||
|
||||
## 2.0.2 (2018-02-15)
|
||||
|
||||
- Remove kind_of usage in the custom resources (FC117)
|
||||
|
||||
## 2.0.1 (2017-04-26)
|
||||
|
||||
- Test with Local Delivery instead of Rake
|
||||
- Add chef_version to the metadata
|
||||
- Use standardize Apache 2 license string
|
||||
|
||||
## 2.0.0 (2017-02-27)
|
||||
|
||||
- Require Chef 12.5 and remove compat_resource dependency
|
||||
|
||||
## 1.2.5 (2017-01-18)
|
||||
|
||||
- Require a working compat_resource
|
||||
|
||||
## v1.2.4 (2016-07-26)
|
||||
|
||||
- New msys2 shells do not inherit PATH from windows. Provide a way for
|
||||
clients to do this.
|
||||
|
||||
## v1.2.3 (2016-07-25)
|
||||
|
||||
- If PKG_CONFIG_PATH is already defined, honor it in the msys2 shell.
|
||||
|
||||
## v1.2.2 (2016-06-24)
|
||||
|
||||
- Download msys2 from the primary download url (instead of a specific mirror).
|
||||
|
||||
## v1.2.1 (2016-06-23)
|
||||
|
||||
- Fix msys2 initial install/upgrade steps that dependended on file modification time.
|
||||
- Make msys2_package :install idempotent - it should not reinstall packages.
|
||||
- Do not allow bash.exe to be called if MSYSTEM is undefined.
|
||||
|
||||
## v1.2.0 (2016-06-03)
|
||||
- Updating to fix the issue where msys2 bash does not inherit the cwd correctly
|
||||
|
||||
## v1.1.0 (2016-06-03)
|
||||
- Add msys2 based compiler support using the new msys2_package resource
|
||||
|
||||
## v1.0.0 (2016-05-11)
|
||||
|
||||
- Remove unnecessary default_action from the resources
|
||||
- Depend on compat_resource cookbook to add Chef 12.1 - 12.4 compatbility
|
||||
- Add this changelog file
|
||||
- Fix license metadata in metadata.rb
|
||||
- Disable FC016 check
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user