Puppet Class: weave

Inherits:
weave::params
Defined in:
manifests/init.pp

Overview

Parameters:

  • docker_host_weave_ip (Any) (defaults to: $weave::params::docker_host_weave_ip)
  • docker_cluster_peers (Any) (defaults to: $weave::params::docker_cluster_peers)
  • docker (Any) (defaults to: $weave::params::docker)
  • weave (Any) (defaults to: $weave::params::weave)
  • weave_container (Any) (defaults to: $weave::params::weave_container)
  • weave_image (Any) (defaults to: $weave::params::weave_image)
  • weave_image_tag (Any) (defaults to: $weave::params::weave_image_tag)


95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'manifests/init.pp', line 95

class weave (

  $docker_host_weave_ip = $weave::params::docker_host_weave_ip,
  $docker_cluster_peers = $weave::params::docker_cluster_peers,
  $docker               = $weave::params::docker,
  $weave                = $weave::params::weave,
  $weave_container      = $weave::params::weave_container,
  $weave_image          = $weave::params::weave_image,
  $weave_image_tag      = $weave::params::weave_image_tag,

) inherits weave::params {

  include stdlib
  include firewall
  include docker

  validate_absolute_path( $weave )
  validate_absolute_path( $docker )
  validate_string( $weave_image )
  validate_string( $weave_image_tag )
  validate_string( $weave_conatiner )
  validate_bool( is_ip_address( $docker_host_weave_ip ) )
  # for $docker_cluster_peer in $docker_cluster_peers
  # validate_bool( is_ip_address( $docker_cluster_peer) )

  anchor { 'weave::begin': } ->
  class { 'weave::install': } ->
  weave::launch { "$docker_host_weave_ip":
    docker_host_weave_ip => $docker_host_weave_ip,
    docker_cluster_peers => $docker_cluster_peers,
  } ~>
  anchor { 'weave::end': }

}