2 # Copyright 2013-2014, whitestar
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 $LOAD_PATH.push("#{File.dirname(__FILE__)}/_lib")
18 #${chef-repo}/roles/_lib/grid.rb
22 description 'Grid provisioning master node'
26 'role[ganglia-gmond]',
27 'role[berkshelf-api-server]',
30 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
32 this_subcluster = Grid::CLUSTERS[:base][:provisioningmasters]
33 mcast_addr = this_subcluster[:mcast_addr]
37 udp_send_channels4ucast = []
38 this_subcluster[:nodes].first(2).each {|host|
39 udp_send_channels4ucast.push(
42 'host' => "#{host}.#{Grid::DOMAIN}",
58 'type' => 'chef_server',
60 #'url' => 'https://gpm00.grid.example.com/organizations/grid', # chef12
61 'url' => 'https://gpm00.grid.example.com', # chef11
62 'client_key' => '/etc/berkshelf/api-server/grid-berkshelf.pem',
63 'client_name' => 'berkshelf',
68 'build_interval' => 180.0
70 'app_host' => '127.0.0.1',
71 'host' => "gpm00.#{Grid::DOMAIN}",
76 'ssl_certificate' => '/etc/pki/tls/certs/01gpm00_server.crt',
77 'ssl_certificate_key' => '/etc/pki/tls/private/01gpm00_server.key',
83 'name' => this_subcluster[:alias],
84 'owner' => Grid::DOMAIN
88 'udp_send_channels' => [
90 'mcast_join' => mcast_addr,
96 'udp_recv_channels' => [
98 'mcast_join' => mcast_addr,
105 'udp_send_channels' => udp_send_channels4ucast,
106 'udp_recv_channels' => [