venmo / puppet-hound

Puppet hound module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

puppet-hound

Puppet module for Hound

Table of Contents

  1. Getting started
  2. Proxy with Nginx
  3. Adding repos
  4. Managed vs Unmanaged
  5. Limitations
  6. TODO
  7. Development

Getting started

  class { '::hound':
    version     => '0.2.0',
    package_url => 'http://some.fqdn.tld/package.tar.gz',
    repos       =>  {
      'repos' => {
        'sentry' => {
          'url' => 'https://github.com/venmo/puppet-sentry.git',
        }, 
        'consulr' => {
          'url' => 'https://github.com/venmo/puppet-consulr.git',
        }, 
      },
    },
  }

Proxy with Nginx

Using jfryman/nginx puppet module you can easily proxy:

include nginx

nginx::resource::vhost { 'hound.something.tld':
  proxy => 'http://172.0.0.1:6080',
}

You can also extend this to terminate SSL connections.

Adding repos

Every option under repos can be used, see the example for possible options.

PUPPET

class { '::hound':
...
  repos =>
    "repos" => {
      "AnotherGitRepo" => {
          "url" => "https://www.github.com/YourOrganization/RepoOne.git",
          "ms-between-poll"   => 10000,
          "exclude-dot-files" => true,
      },
      "SomeMercurialRepo" ==> {
          "url" => "https://www.example.com/foo/hg",
          "vcs" => "hg",
      },
      "Subversion" => {
          "url" => "http://my-svn.com/repo",
          "url-pattern" => { 
              "base-url" => "{url}/{path}{anchor}",
          },
          "vcs" => "svn",
      },
    },
  },
...
}

JSON equivalent

"repos" : {
  "AnotherGitRepo" : {
      "url" : "https://www.github.com/YourOrganization/RepoOne.git",
      "ms-between-poll": 10000,
      "exclude-dot-files": true
  },
  "SomeMercurialRepo" : {
      "url" : "https://www.example.com/foo/hg",
      "vcs" : "hg"
  },
  "Subversion" : {
      "url" : "http://my-svn.com/repo",
      "url-pattern" : { 
          "base-url" : "{url}/{path}{anchor}"
      },
      "vcs" : "svn"
  }
}

Managed vs Unmanaged

  • Managed config.json
    • Is generated by puppet
    • $hound::max_concurrent_indexers and $hound::repos are only used when $hound::managed_config is true.
  • Unmanaged config.json
    • Is generated by an external script, not by puppet.
    • config.json must be dropped in ${hound::conf_dir}.
    • Although not generated by puppet, config.json must still be dropped in the same location as defined in puppet. Puppet run will fail if it can't find config.json.
    • Don't forget dbpath and max-concurrent-indexers when generating the config.json (example).
    • dbpath must match $hound::data_dir.
    • houndd needs to be restarted when a new config.json is generated. Your external script can write 1 to ${hound::tmp_dir}/houndd_restart and on the next puppet run houndd will be restarted.
    • You can also restart the service from the script service houndd restart if you choose not to use houndd_restart method.

Limitations

  • Works with Ubuntu, Debian, RedHat, CentOS, Fedora, Scientific, Oracle and Amazon
  • Only AMD64 arch is supported
  • Only tar.gz packages are supported

TODO

  • unit tests
  • support more package types

Development

You know the deal: fork and pull

About

Puppet hound module

License:Apache License 2.0


Languages

Language:Puppet 72.6%Language:Shell 23.3%Language:HTML 4.1%