Coder Social home page Coder Social logo

cregev / chef-consul-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adamkrone/chef-consul-template

0.0 2.0 0.0 417 KB

A Chef cookbook that installs and configures consul-template

License: Other

Ruby 85.04% Shell 12.28% HTML 2.68%

chef-consul-template's Introduction

consul-template

Latest Version Build Status Coverage Status

Installs and configures consul-template.

Supported Platforms

  • Ubuntu 14.04, 12.04
  • Debian 7.7, 6.0.10
  • Centos 6.5

Attributes

  • node['consul_template']['base_url'] - Base URL for consul-template binary files
  • node['consul_template']['version'] - Version of consul-template to install. Used to determine which binary to grab from the base_url.
  • node['consul_template']['install_method'] - How consul-template should be installed. Supports 'binary' or 'source'.
  • 'node['consul_template']['install_dir'] - Directory where consul-template should be installed.
  • node['consul_template']['checksums'] - Contains a hash of checksums where the key is the file for a given OS/architecture, and the value is the associated checksum. For example, consul-template_0.3.1_linux_amd64.
  • node['consul_template']['source_revision'] - When installing from source, this determines the revision it should use.
  • node['consul_template']['config_dir'] - The directory that contains the configuration files for consul-template.
  • node['consul_template']['init_style'] - Defines the init system that the consul-template service should use. Supports 'init', 'runit', or 'systemd'.
  • node['consul_template']['service_user'] - Defines the user that should be used for the consul-template service.
  • node['consul_template']['service_group'] - Defines the group that should be used for the consul-template service.
  • node['consul_template']['template_mode'] - File permissions mode for all consul-template configuration files.

Recipes

default

Installs and configures consul-template using the install method specified in node['consul_template']['install_method'].

install_binary

Installs consul-template using one of the binaries provided by Hashicorp. It will also verify the checksum. The default attributes includes the latest version's binaries for all supported OS/architectures, including their checksum.

install_source

Installs consul-template from source.

service

Installs and configures the consul-template service.

LWRP

consul_template_config

Creates configuration files in node['consul_template']['config_dir'], and reloads the configuration.

For example, if you want to generate HAProxy's config using consul-template, you may include something like this in your recipe:

consul_template_config 'haproxy' do
  templates [{
    source: '/etc/haproxy/haproxy.cfg.ctmpl',
    destination: '/etc/haproxy/haproxy.cfg',
    command: 'service haproxy restart'
  }]
  notifies :reload, 'service[consul-template]', :delayed
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

chef-consul-template's People

Contributors

adamkrone avatar anoldguy avatar franklinwise avatar gamepoet avatar inean avatar logankoester avatar mrcroy avatar tgwizard avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.