Skip to content

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

Notifications You must be signed in to change notification settings

rackerlabs/puppet-repose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5adc865 · Feb 26, 2024
Oct 28, 2022
Oct 14, 2019
Oct 28, 2022
Oct 28, 2022
Feb 25, 2020
Feb 26, 2024
Nov 3, 2022
Mar 16, 2021
Oct 31, 2022
Feb 25, 2020
Oct 28, 2022
Oct 28, 2022
Feb 25, 2020
Oct 28, 2022
Nov 1, 2022
Feb 25, 2020
Oct 28, 2022
Sep 16, 2013
Feb 24, 2020
Mar 15, 2021
Oct 28, 2022
Feb 25, 2020
Feb 26, 2024
Oct 28, 2022

Repository files navigation

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

alex.schultz@rackspace.com

Greg Swift

greg.swift@rackspace.com

Josh Bell

josh.bell@rackspace.com

Cory Ringdahl

cory.ringdahl@rackspace.com