GithubHelp home page GithubHelp logo

voxpupuli / puppet-puppetwebhook Goto Github PK

View Code? Open in Web Editor NEW
0.0 37.0 7.0 164 KB

Manage the installation and configuration of the puppet_webhook gem

License: Apache License 2.0

Ruby 53.48% Puppet 43.37% Dockerfile 3.15%
linux-puppet-module puppet hacktoberfest centos-puppet-module debian-puppet-module oraclelinux-puppet-module redhat-puppet-module scientific-puppet-module ubuntu-puppet-module

puppet-puppetwebhook's Introduction

puppetwebhook

Puppet Forge Puppet Forge Puppet Forge Puppet Forge

Puppet module for installing and managing Vox Pupuli's puppet_webhook API Server.

Version 2 and newer of this module manage the new puppet_webhook project, which is a Ruby application, packaged as rpms/debs. Version 1 only supports the deprecated puppet_webhook gem

Table of Contents

  1. Description
  2. Setup - The basics of getting started with puppetwebhook
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

puppet-puppetwebhook will install the puppet_webhook Ruby project, configure it and start said service.

Setup

The Module manages the following:

Usage

This module provides one public class puppetwebhook.

include puppetwebhook

With all default parameter values, this installs, enables, and starts the puppet_webhook service. The package provider, user/group that owns the process and files, and the configuration options themselves.

Limitations

The rpm/deb packages expect that you provide a running redis instance.

You can install redis from different sources. One solution is our own puppet module voxpupuli/redis. After deploying this to your environment, simply do a include redis to deploy redis listening only on localhost. One exception is CentOS, where the shipped Redis version is too old. But you can enable the SCL repository:

class{ 'redis::globals':
  scl => 'rh-redis5',
}
include puppetwebhook
class{ 'redis':
  manage_repo => true,
  notify => Service['puppet-webhook'],
}

On Debian-like systems you need to install the puppetlabs/apt module.

On RedHat-like systems you need to enable epel. To do so you can use our voxpupuli/epel module, or something like

puppet resource package epel-release ensure=present

in the CLI or this in your profile:

package { 'epel-release':
  ensure => 'installed',
}

Development

Please see the CONTRIBUTING.md file for instructions regarding development environments and testing.

Authors

puppet-puppetwebhook's People

Contributors

alexjfisher avatar bastelfreak avatar binford2k avatar dan33l avatar dhollinger avatar dhoppe avatar kenyon avatar sgnl05 avatar smortex avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-puppetwebhook's Issues

Drop Fedora support

we currently don't build Fedora packages so we don't officially support it anymore.

Drop Debian 8 support

Debian 8 is end of life and tests don't pass anymore. Support for it is dropped with this major release.

Drop SLES support

We don't build SLES packages anymore so this release drops support for it.

puppet_webhook does not start

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.8 AIO
  • Ruby:
  • Distribution: ubuntu 16.06
  • Module version: 1.0.0

How to reproduce (e.g Puppet code you use)

  class { 'puppetwebhook' :
    pkg_provider  => 'gem',
    server_cfg    => {
      server_type => 'daemon',
      host        => $facts['networking']['ip'],
      logfile     => '/var/log/puppet_webhook/webhook.log',
      loglevel    => 'WARN',
      pidfile     => '/var/run/webhook.pid',
      port        => 8088,
      enable_ssl  => false,

    },
    webhook_user  => 'puppet',
    webhook_group => 'puppet',
  }

What are you seeing

puppet apply hang on command /bin/systemctl start puppet_webhook and the process does not start.

What behaviour did you expect instead

Output log

Debug output:

Debug: Prefetching gem resources for package
Debug: Executing: '/usr/bin/gem list --local'
Debug: Prefetching puppet_gem resources for package
Debug: Executing: '/opt/puppetlabs/puppet/bin/gem list --local'
Debug: Prefetching apt resources for package
Debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n''
Debug: Executing: '/bin/systemctl is-active puppet_webhook'
Debug: Executing: '/bin/systemctl is-enabled puppet_webhook'
Debug: Executing: '/bin/systemctl unmask puppet_webhook'
Debug: Executing: '/bin/systemctl start puppet_webhook'

And hang here.

Any additional information you'd like to impart

The systemd unit is:

[Unit]
Description=R10K Webhook Service
After=syslog.target network.target

[Service]
Type=simple
EnvironmentFile=-/etc/sysconfig/webhook
RuntimeDirectory=puppet_webhook
User=puppet
TimeoutStartSec=90
TimeoutStopSec=30
RestartSec=10000

ExecStart=/opt/puppetlabs/puppet/bin/puppet_webhook -c /etc/puppet_webhook/server.yml
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
StandardOutput=syslog

[Install]
WantedBy=multi-user.target

But the file is in /usr/local/bin/puppet_webhook.
On Debian like systems it should be EnvironmentFile=-/etc/default/webhook

https://dl.bintray.com/voxpupuli/rpm/el/8/x86_64/repodata/repomd.xml throws 403

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: N/A
  • Ruby: N/A
  • Distribution: CentOS
  • Module version: 2.1.0

How to reproduce (e.g Puppet code you use)

Use module with default parameters

What are you seeing

Http error 403 on https://dl.bintray.com/voxpupuli/rpm/el/8/x86_64/repodata/repomd.xml prevents puppetwebhook from being installed

What behaviour did you expect instead

Normal installation

Output log

Error: Execution of '/usr/bin/dnf -d 0 -e 1 -y install puppet-webhook' returned 1: Error: Failed to download metadata for repo 'voxpupuli': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Error: /Stage[main]/Puppetwebhook::Install/Package[puppet-webhook]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/dnf -d 0 -e 1 -y install puppet-webhook' returned 1: Error: Failed to download metadata for repo 'voxpupuli': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

Any additional information you'd like to impart

`app_cfg` parameter should have defaults merged.

It should be possible to declare the class with a minimal config such as...

class { 'puppetwebhook':
  app_cfg => {
    'pass'  => 'SOME_SECRET',
  },
}

and have defaults for the other app_cfg parameters merged in somehow.

Add support for .deb / .rpm packages

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5
  • Ruby: 2.4.x
  • Distribution: All
  • Module version: 1.2.0

How to reproduce (e.g Puppet code you use)

What are you seeing

Sidekiq requires Ruby version >= 2.5.0.

What behaviour did you expect instead

Running without any error messages.

Any additional information you'd like to impart

The current version of this module uses gem to install puppet_webhook, but the latest version is provided as package.

Archiving this module

The discussion came up of this module should get archived. Should someone want to keep this module around, just comment here.
If no comments to keep this around arise in the new weeks, we will move forward with archiving.

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.