Puppet Class: hyperglass::server

Defined in:
manifests/server.pp

Summary

installs the hyperglass looking glass

Overview

Parameters:

  • manage_depended_services (Boolean) (defaults to: true)

    if true, installs all other services that hyperglass requires, like redis, yarn, nginx, python

  • manage_python (Boolean) (defaults to: true)

    installs python3

  • manage_gcc (Boolean) (defaults to: true)

    installs gcc

  • devices (Hash) (defaults to: { 'routers' => [ { 'name' => 'atl_router01', 'address' => '10.0.0.2', 'network' => { 'name' => 'secondary', 'display_name' => 'That Other Network', }, 'credential' => { 'username' => 'user2', 'password' => ' secret2', }, 'display_name' => 'Atlanta, GA', 'port' => 22, 'nos' => 'juniper', 'vrfs' => [ { 'name' => 'default', 'display_name' => 'Global', 'ipv4' => { 'source_address' => '192.0.2.2', }, }, ], }, ], })

    hash containing all the devices hyperglass can connect to. Defaults to demo data so the service starts properly.

  • commands (Hash) (defaults to: {})

    specific commands that can be used by the devices

  • data (Hash) (defaults to: {})

    generic hyperglass configuration hash.

See Also:

Author:

  • Tim Meusel <tim@bastelfreak.de>



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'manifests/server.pp', line 13

class hyperglass::server (
  Boolean $manage_depended_services = true,
  Boolean $manage_python            = true,
  Boolean $manage_gcc               = true,
  Hash $data                        = {},
  Hash $commands                    = {},
  Hash $devices                     = {
    'routers' => [
      {
        'name' => 'atl_router01',
        'address' => '10.0.0.2',
        'network' => {
          'name' => 'secondary',
          'display_name' => 'That Other Network',
        },
        'credential' => {
          'username' => 'user2',
          'password' => ' secret2',
        },
        'display_name' => 'Atlanta, GA',
        'port' => 22,
        'nos' => 'juniper',
        'vrfs' => [
          {
            'name' => 'default',
            'display_name' => 'Global',
            'ipv4' => {
              'source_address' => '192.0.2.2',
            },
          },
        ],
      },
    ],
  },
) {
  unless $facts['os']['name'] in ['CentOS', 'RedHat', 'VirtuozzoLinux'] {
    fail('the hyperglass::server class currently only works on CentOS/RedHat')
  }

  if $manage_depended_services {
    require hyperglass::server::dependencies
  }

  require hyperglass::hyperglassdir
  contain hyperglass::server::install
  contain hyperglass::server::config
  contain hyperglass::server::service

  Class['hyperglass::server::install']
  -> Class['hyperglass::server::config']
  ~> Class['hyperglass::server::service']
}