kongfig

contributions requested
Install kongfig which is a tool for declaratively configuring Kong

10,842 downloads

7,383 latest version

2.2 quality score

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.1 (latest)
  • 0.1.0
  • 0.0.3
  • 0.0.2
  • 0.0.1 (deleted)
released Sep 15th 2016
This version is compatible with:
  • Puppet Enterprise 3.2.x
  • Puppet >=2.7.20 <4.0.0
  • Debian
    ,
    Ubuntu

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'mybuilder-kongfig', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add mybuilder-kongfig
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install mybuilder-kongfig --version 0.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

mybuilder/kongfig — version 0.1.1 Sep 15th 2016

Puppet module for installing and managing Kongfig - a tool for Kong to allow declarative configuration.

Kongfig

This module is currently tested on:

  • Debian (8.0, 7.8)
  • Ubuntu (14.04)

It may work on other distros.

Configuring Kong

Configuring a new api is easy, simply call kongfig::setup with an array of apis and consumers you want configured.

$apis = [
  {
    'name'       => "test-api",
    'ensure'     => "present",
    'attributes' => {
      'upstream_url' => "http://test-api.internal.example.com",
      'request_host' => "test-api.example.com",
    },
    'plugins'    => [
      { 'name' => 'cors' },
      { 'name' => 'file-log', 'attributes' => { 'config.path' => '/var/log/kong.log' } },
    ]
  },
  {
    'name'       => "old-api",
    'ensure'     => "removed",
    'attributes' => {
      'upstream_url' => "http://old-api.internal.example.com",
      'request_host' => "old-api.example.com",
    },
    'plugins'    => [
      { 'name' => 'cors' },
    ]
  }
]

$consumers = [
  {
    'username' => 'iphone-app',
    'credentials' => [
      {
        'name' => 'key-auth',
        'attributes' => {
          'key' => 'very-secret-key'
        }
      }
    ]
  }
]

kongfig::setup { 'test-api':
  kong_server => '127.0.0.1',
  kong_port   => 8001,
  apis        => $apis,
  consumers   => $consumers
}

Installing Kongfig

Whenever you use kongfig:setup it will ensure that the latest version of Kongfig is installed.

If you want to install a specific version you can do this

class { 'kongfig':
    version   => '1.0.3',
    directory => '/tmp'
  }

Created by MyBuilder - Check out our blog for more information and our other open-source projects.