Git Product home page Git Product logo

puppet-repose's Introduction

Repose

<img src=“https://travis-ci.org/rackerlabs/puppet-repose.png?branch=master” alt=“Build Status” />

This module provides a re-usable and environment agnostic control of Repose Power Proxy

Note: This version supports Repose 9+ only.


Usage of Module

Installing Repose with basic keystone auth and http logging

# Setup the basic information about the API you are putting Repose in front of
$app_name     = 'myapp'
$api_protocol = 'https'
$api_host     = "api-internal.${::domain}"
$api_port     = '443'
$api_uri      = "${api_protocol}://${api_host}/${app_name}"
$repose_nodes = [ "repose-n01.${::domain}",
                  "repose-n02.${::domain}" ]

# Your service account for verifying identities against keystone
$auth = {
  'user' => 'service_admin',
  'pass' => 'somepassword',
  'uri'  => 'https://keystone.${::domain}/v2.0',
}
$client_maps = [ ".*/${app_name}/(\d+)" ]
$white_lists = [ '/application\.wadl$' ]

# Your http logging definitions
$log_files = [
  { 'id'     => 'http',
    'format' => 'Response Code Modifiers=%200,201U\tModifier Negation=%!401a\tRemote IP=%a\tLocal IP=%A\tResponse Size(bytes)=%b',
  },
]

# Your definitions for the system model
$filters = {
    10 => { 'name'      => 'slf4j-http-logging' },
    20 => { 'name'      => 'client-auth',
            'uri-regex' => "/${app_name}/.*" },
    30 => { 'name'      => 'default-router' },
}
$endpoints = [
  { 'id'        => $app_name,
    'protocol'  => $api_protocol,
    'hostname'  => $api_host,
    'root-path' => '',
    'port'      => $api_port,
    'default'   => true,
  },
]

# Bringing it all together
class { 'repose': 
  ensure => 'present',
}
repose::filter::slf4j_http_logging { 'default':
  log_files => $log_files,
}
repose::filter::client_auth_n { 'default':
  auth        => $auth,
  client_maps => $client_maps,
  white_lists => $white_lists,
}
repose::filter::system_model { 'default':
  app_name  => $app_name,
  nodes     => $repose_nodes,
  filters   => $filters,
  endpoints => $endpoints,
}

Removing Repose

class { 'repose': ensure => absent }

Installing this module

via GIT

git clone https://github.com/rackerlabs/puppet-repose.git /etc/puppet/modules/repose

Running tests

Requirements

Must have:

  • pdk 1.17.0+

With pdk

git clone https://github.com/rackerlabs/puppet-repose.git 
cd puppet-repose
pdk test unit --verbose

Authors

Alex Schultz

[email protected]

Greg Swift

[email protected]

Josh Bell

[email protected]

Cory Ringdahl

[email protected]

puppet-repose's People

Contributors

ajstieren avatar cheord avatar classyviking avatar cringdahl avatar ericlake avatar fsargent avatar gregswift avatar joelrizner avatar jstraw avatar lokeshbelwaltx avatar mwhahaha avatar nickbales avatar rackergs avatar scarlettmoonbell avatar sent0531 avatar shintasmith avatar

Stargazers

 avatar  avatar  avatar  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

puppet-repose's Issues

Make log4j2 compress logs

right now we have a mix of logrotate and log4j, lets ensure we only use log4j2's compression rotation.

systemd module requires puppet 4

Use of systemd module requires puppet 4 in #62
We would have to leave puppet 3 compatibility behind to use this module. Leaving the PR and Issue to track when we can end puppet 3 compatibility.

Update tests to be more DRY

spec/classes/package_spec.rb is a good example where we want to run a set of tests with experimental_filters on and off/identity_filters on and off, review looping the tests to see if we can make it work

Filter refactoring

add_header_spec.rb:

  • make it more clear in the test that these are request or response header tests

cors_spec.rb:

  • test non-regex origins

open_tracing_spec.rb:

  • try and merge the test with_content like other tests

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.