Code Monkey home page Code Monkey logo

puppet-redis's Introduction

Puppet Redis

License Build Status Code Coverage Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores

Example usage

Standalone

include ::redis

Master node

class { '::redis':
  bind => '10.0.1.1',
}

With authentication

class { '::redis':
  bind       => '10.0.1.1',
  masterauth => 'secret',
}

Slave node

class { '::redis':
  bind    => '10.0.1.2',
  slaveof => '10.0.1.1 6379',
}

With authentication

class { '::redis':
  bind       => '10.0.1.2',
  slaveof    => '10.0.1.1 6379',
  masterauth => 'secret',
}

Redis 3.0 Clustering

class { '::redis':
  bind                 => '10.0.1.2',
  appendonly           => true,
  cluster_enabled      => true,
  cluster_config_file  => 'nodes.conf',
  cluster_node_timeout => 5000,
}

Multiple instances

$listening_ports = [6379,6380,6381,6382]

class { '::redis':
  default_install => false,
  service_enable  => false,
  service_ensure  => 'stopped',
}

$listening_ports.each |$port| {
  $port_string = sprintf('%d',$port)
  redis::instance { $port_string:
    service_enable => true,
    service_ensure => 'running',
    port           => $port,
    bind           => $facts['networking']['ip'],
    dbfilename     => "${port}-dump.rdb",
    appendfilename => "${port}-appendonly.aof",
    appendfsync    => 'always',
    require        => Class['Redis'],
  }
}

Manage repositories

Disabled by default but if you really want the module to manage the required repositories you can use this snippet:

class { '::redis':
  manage_repo => true,
}

On Ubuntu, you can use a PPA by using the ppa_repo parameter:

class { '::redis':
  manage_repo => true,
  ppa_repo    => 'ppa:rwky/redis',
}

Warning note that PPA usage requires puppetlabs/apt on Ubuntu distros. On EL7 puppet/epel is needed unless the installation is using Software Collections. In that case will install centos-release-scl-rh from CentOS extras. For RHEL or other RHEL-derivatives this isn't managed.

Redis Sentinel

Optionally install and configuration a redis-sentinel server.

With default settings:

include ::redis::sentinel

With adjustments:

class { '::redis::sentinel':
  master_name      => 'cow',
  redis_host       => '192.168.1.5',
  failover_timeout => 30000,
}

Soft dependency

When managing the repo, it either needs puppetlabs/apt or puppet/epel.

For administration of sysctl it depends on herculesteam/augeasproviders_sysctl.

redis::get() function

This function is used to get data from redis. You must have the 'redis' gem installed on your puppet master.

Functions are documented in REFERENCE.md

puppet-redis's People

Contributors

arioch avatar ekohl avatar petems avatar bastelfreak avatar alexjfisher avatar root-expert avatar ghoneycutt avatar dhoppe avatar dom-nie avatar zebzeb avatar smortex avatar evgeni avatar codylane avatar markasammut avatar cdent avatar kwevers avatar kajinamit avatar jhoblitt avatar rschemm-godaddy avatar vincent-- avatar trlinkin avatar eliskovets avatar ragingdave avatar aamerik-salesforce avatar alexskr avatar christofhaerens avatar fraenki avatar kenyon avatar leepa avatar laugmanuel 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.