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

RSS

kong (5) Versions 0.5.0

Installs and Configures Kong: An open-source management layer for APIs, delivering high performance and reliability.

Policyfile
Berkshelf
Knife
cookbook 'kong', '~> 0.5.0', :supermarket
cookbook 'kong', '~> 0.5.0'
knife supermarket install kong
knife supermarket download kong
README
Dependencies
Changelog
Quality 17%

Kong Cookbook

GitHub
License

Cookbook Version
Dependency Status
Code Climate
Build Status
Circle CI
Coverage Status
Inline docs

Chef cookbook to install Kong: An open-source management layer for APIs, delivering high performance and reliability.

Requirements

Supported Platforms

This cookbook has been tested on the following platforms:

  • Amazon Linux
  • CentOS
  • Debian
  • Ubuntu

Please, let me know if you use it successfully on any other platform.

Required Cookbooks

Required Applications

  • Chef 12 or higher.
  • Ruby 2.2 or higher.

Attributes

Attribute Default Description
node['kong']['version'] '0.8.2' Kong version to install.
node['kong']['mirror'] calculated Kong URL path without including the file name.
node['kong']['kong.yml'] calculated Kong YAML configuration options. See the default configuration values.
node['kong']['manage_ssl_certificate'] calculated Whether to manage HTTPS certificate creation using the ssl_certificate cookbook.
node['kong']['manage_cassandra'] calculated Whether to manage Cassandra server installation using the cassandra-dse cookbook.
node['kong']['wait_for_cassandra'] 300 Time in seconds to wait for Cassandra to start. Only used with manage_cassandra enabled.
node['kong']['pid_file'] calculated Kong nginx PID file path.
node['kong']['kong.yml']['template']['cookbook'] 'kong' Kong template cookbook.

Some cookbook attributes are used internally to support the different platforms. Surely you want to change them if you want to support new platforms or want to improve the support of some platforms already supported.

Attribute Default Description
node['kong']['required_packages'] calculated Some packages required by Kong.
node['kong']['package_file'] calculated Kong package file name.
node['kong']['package_checksum'] calculated Kong package file checksum.

Recipes

kong::default

Installs and configures Kong.

kong::cassandra

Installs and configures Cassandra.

Usage Examples

Including in a Cookbook Recipe

You can simply include it in a recipe:

include_recipe 'kong'

Don't forget to include the kong cookbook as a dependency in the metadata.

# metadata.rb
# [...]

depends 'kong', '~> 0.1.0'

Including in the Run List

Another alternative is to include the default recipe in your Run List:

{
  "name": "api.example.com",
  "[...]": "[...]",
  "run_list": [
    "recipe[kong]"
  ]
}

Configuring the Cassandra Server Address

It is highly recommended to use an external Cassandra server with this cookbook.

For example:

node.default['kong']['kong.yml']['cassandra']['contact_points'] =
  'cassandra.example.com'

include_recipe 'kong'

If you want to use the local Cassandra server installed by this cookbook, it is recommended to set the following attributes:

node.default['cassandra']['config']['cluster_name'] = # ...
node.default['cassandra']['install_method'] = # ...
# node.default['cassandra'][...]
# ...

include_recipe 'kong'

See the cassandra-dse cookbook documentation.

By default, this cookbook installs a local Cassandra server if the 'hosts' attribute is not set or includes 'localhost'. You can use the node['kong']['manage_cassandra'] attribute to force this behavior.

The HTTPS Certificate

This cookbook uses the ssl_certificate cookbook to create the HTTPS certificate. The namespace used is node['kong']. For example:

node.default['kong']['common_name'] = 'api.example.com'
include_recipe 'kong'

See the ssl_certificate namespace documentation for more information.

You can disable the SSL certificate creation by setting the node['kong']['kong.yml']['ssl_cert_path'] and node['kong']['kong.yml']['ssl_key_path'] attributes. You can use the node['kong']['manage_ssl_certificate'] attribute to force this behavior.

Testing

See TESTING.md.

Contributing

Please do not hesitate to open an issue with any questions or problems.

See CONTRIBUTING.md.

TODO

See TODO.md.

License and Author

Author: Xabier de Zuazo (xabier@zuazo.org)
Contributor: Mark Keisler
Contributor: Alexander Vynnyk
Contributor: Igor Moroz
Contributor: Yves Jans
Copyright: Copyright (c) 2015-2016, Xabier de Zuazo
License: Apache License, Version 2.0
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.

Dependent cookbooks

cassandra-dse ~> 4.0
netstat ~> 0.1.0
ssl_certificate ~> 1.1

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

kong CHANGELOG

This file is used to list changes made in each version of the kong cookbook.

v0.5.0 (2017-03-24)

  • Require Chef 12 and Ruby >= 2.2 (breaking change).
  • Quote yaml strings containing . or : (issue #6, thanks Mark Keisler).
  • Fix for 0.9.x versions (issue #7, thanks Alexander Vynnyk).
  • Move yml template cookbook to attributes (issue #10, thanks Igor Moroz).
  • Add support for Ubuntu 16.04 (Xenial) (issue #11, thanks Yves Jans).
  • Update kong version to 0.8.2.
  • Update foodcritic to 6.3 and RuboCop to 0.40.
  • README: Update Configuring the Cassandra Server Address documentation.

v0.4.0 (2016-04-03)

  • Add Amazon Linux support.
  • Support package version upgrade (thanks Jannes PockelĂ©).

Testing:
* Fix Travis with Chef 11.
* Remove Travis exclude matrix (no longer needed).

v0.3.0 (2016-03-30)

  • Remove Ruby 1.9 support (breaking change).
  • Update kong to version 0.7.0 (breaking change).
  • Update cassandra-dse cookbook to version 4.
  • Update RuboCop to version 4 and foodcritic to 0.39.

Documentation:
* Improve testing documentation.
* Fix documentation bug: Missing param name.
* README: Add license badge.

Testing:
* Fix nokogiri error.
* Fix bundle args.
* Update Berkshelf to 4.
* Update .kitchen.yml files.
* Update kitchen-ec2 to version 1.

v0.2.0 (2015-09-10)

  • Remove nginx cookbook from dependencies.

  • Documention:

    • README:
    • Add Required Cookbooks section.
    • Add GitHub badge.
  • Testing:

    • Integrate Kitchen tests with CircleCI.
    • Include amazon instances in the .kitchen.cloud.yml file.
    • Add Vagrantfile.
    • Gemfile: foodcritic ~>4.0.0, rubocop~> 0.34.0.
    • Travis CI: Use bundler cache.
    • .rubocop.yml: Exclude vendor directory.
    • Berksfile: Fix cookbooks constraint error.
    • Rakefile:
    • Use Kitchen class instead of sh.
    • Run docker by default in the CI.

v0.1.0 (2015-08-18)

  • Initial release of kong.

Collaborator Number Metric
            

0.5.0 failed this metric

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

Contributing File Metric
            

0.5.0 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.5.0 failed this metric

FC066: Ensure chef_version is set in metadata: kong/metadata.rb:1
FC069: Ensure standardized license defined in metadata: kong/metadata.rb:1
FC072: Metadata should not contain "attribute" keyword: kong/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.5.0 passed this metric

Testing File Metric
            

0.5.0 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.5.0 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