Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

The application_buildpack cookbook has been deprecated

Author provided reason for deprecation:

The application_buildpack cookbook has been deprecated and is no longer being maintained by its authors. Use of the application_buildpack cookbook is no longer recommended.

You may find that the application cookbook is a suitable alternative.

RSS

application_buildpack (7) Versions 0.0.7

deploys and configures apps using heroku buildpacks

Policyfile
Berkshelf
Knife
cookbook 'application_buildpack', '~> 0.0.7', :supermarket
cookbook 'application_buildpack', '~> 0.0.7'
knife supermarket install application_buildpack
knife supermarket download application_buildpack
README
Dependencies
Quality 17%

application_buildpack

Description

This cookbook is designed to be able to deploy applications using heroku buildpacks.

The following buildpacks are tested and supported:

  • ruby
  • nodejs

Note that this cookbook is based on the application cookbook; you will find general documentation in that cookbook.

Requirements

Chef 11.0.0 or higher required (for Chef environment use).

The following Opscode cookbooks are dependencies:

Resources/Providers

The LWRP provided by this cookbook is not meant to be used by itself; make sure you are familiar with the application cookbook before proceeding.

compile

The compile sub-resource LWRP deals with compiling an app using a buildpack.

Attribute Parameters

  • buildpack: The buildpack to be used. Will be used to install dependencies and set the buildpack repository. Default: nil. Options: :ruby, :nodejs
  • buildpack_repository: A custom buildpack repository that should be used instead. Default: nil.
  • buildpack_revision: The revision of the buildpack to be used. Default: master.
  • buildpack_environmet: Additional ENV variables to be passed to the buidlpack compile script. Default: {}.

scale

The scale sub-resource LWRP deals with configuring monit to start processes described in your Procfile.

Attribute Parameters

You can pass any attribute combination to scale the name of the attribute will be matched to a process described in your Procfile.

scale do
  # scale with one process
  web 1

  # scale with multiple processes
  # PROCESS_NUM env variable will indicate the processes id
  worker 4

  # send a custom signal on reload to gracefully stop the process
  guard 1, reload: 'USR1'

  # override or define missing entry
  whatever 1, run: '/bin/app-that-is-missing'
end

Usage

A sample recipe that deploy a Ruby app:

application 'example' do
  path '/srv/example'

  owner 'ubuntu'
  group 'ubuntu'

  packages ['git']
  repository 'https://github.com/heroku/ruby-rails-sample.git'

  environment 'PORT' => 8000

  compile do
    buildpack :ruby
  end

  scale do
    web 1
  end
end

A sample recipe that deploys an scala app using a custom buildpack

application 'example' do
  path '/srv/example'

  owner 'ubuntu'
  group 'ubuntu'

  packages ['git']
  repository 'https://github.com/heroku/scala-sample.git'

  compile do
    buildpack_repository 'https://github.com/heroku/heroku-buildpack-scala.git'
  end

  scale do
    web 1
  end
end

Buildpack Tool

While on the server you can use the buildpack tool to run commands in the environment of your app:

$ cd /srv/app/current
$ ./buildpack rake -T

Troubleshoot

  • If the buildpack fails to compile because some packages are missing, just define the packages in your application LWRP: packages ['lib-imagemagick'].
  • If the buildpack fails to compile due to a missing /app directory then the buidlpack uses hardcoded heroku paths. Create an issue on the repository or fork it.

Credits

Thanks to:

License

The MIT License (MIT)

Copyright (c) 2014 Joël Gähwiler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Dependent cookbooks

monit >= 0.0.0
application ~> 4.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.0.7 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.0.7 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.0.7 failed this metric

FC016: LWRP does not declare a default action: application_buildpack/resources/compile.rb:1
FC016: LWRP does not declare a default action: application_buildpack/resources/scale.rb:1
FC056: Ensure maintainer_email is set in metadata: application_buildpack/metadata.rb:1
FC064: Ensure issues_url is set in metadata: application_buildpack/metadata.rb:1
FC065: Ensure source_url is set in metadata: application_buildpack/metadata.rb:1
FC066: Ensure chef_version is set in metadata: application_buildpack/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.0.7 passed this metric

Testing File Metric
            

0.0.7 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.0.7 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number