2 # Copyright 2013, 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}/_lib/grid.rb
22 description 'Grid distribution node'
27 'role[apt-cacher-ng]',
34 'role[apache-mirror]',
35 #'role[ganglia-gmond]',
40 this_subcluster = Grid::CLUSTERS[:base][:admins]
41 mcast_addr = this_subcluster[:mcast_addr]
45 udp_send_channels4ucast = []
46 this_subcluster[:nodes].first(2).each {|host|
47 udp_send_channels4ucast.push(
50 'host' => "#{host}.#{Grid::DOMAIN}",
63 #'only_for_mirroring' => true,
65 # 'platform' => 'centos',
66 # 'platform_version' => '6'
72 'cloudera-gplextras4',
75 'url_alias_with_authority_part' => true
80 #'version' => '1.2.3.1',
83 'only_for_mirroring' => true,
85 'platform' => 'centos',
86 'platform_version' => '6'
95 'Updates-ambari-1.2.5.17'
97 'url_alias_with_authority_part' => true
105 'cron_period' => '#15 23 * * *'
111 #'deb http://cdn.debian.net/debian wheezy main contrib non-free',
112 #'deb http://cdn.debian.net/debian wheezy-updates main contrib',
113 #'deb http://cdn.debian.net/debian wheezy-backports main contrib non-free',
114 #'deb http://security.debian.org/ wheezy/updates main contrib non-free',
116 'deb http://ftp.grid.example.com/debian wheezy main contrib non-free',
117 'deb http://ftp.grid.example.com/debian wheezy-updates main contrib',
118 'deb http://ftp.grid.example.com/debian wheezy-backports main contrib non-free',
119 'deb http://ftp.grid.example.com:3142/security.debian.org/ wheezy/updates main contrib non-free'
123 'cron_period' => '#0 22 * * *',
124 #'cron_period' => '0 4 * * *',
153 'mirrorlist_ctx' => '', # default: inactive
154 #'mirrorlist_ctx' => 'http://mirrorlist.centos.org',
155 'baseurl_ctx' => '', # default: inactive
156 #'baseurl_ctx' => 'http://mirror.centos.org/centos',
157 #'baseurl_ctx' => 'http://ftp.grid.example.com/centos',
158 #'baseurl_ctx' => 'http://localhost/centos',
159 'gpgkey' => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6'
162 'mirrorlist_ctx' => '', # default: inactive
163 #'mirrorlist_ctx' => 'http://mirrors.fedoraproject.org',
164 'baseurl_ctx' => '', # default: inactive
165 #'baseurl_ctx' => 'http://ftp.grid.example.com/fedora/epel',
166 #'baseurl_ctx' => 'http://localhost/fedora/epel',
167 'gpgkey' => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6'
171 'cron_period' => '#0 21 * * *',
172 #'cron_period' => '0 4 * * *',
176 'url' => 'rsync://ftp.riken.jp/centos/',
178 'rsync_opts' => '-avSH --stats --partial --delete --safe-links --exclude /[1-4]*/ --exclude /5.[0-8]/ --exclude /6.[0-3]/ --exclude local* --exclude isos --exclude ppc*',
180 #'rsync_opts' => '-avSH --stats --partial --delete --safe-links --exclude /[1-5]*/ --exclude /6.[0-3]/ --exclude local* --exclude isos --exclude ppc*',
181 'http_alias' => '/centos'
185 'url' => 'rsync://ftp.riken.jp/fedora/epel/',
187 'rsync_opts' => '-avSH --stats --partial --delete --safe-links --exclude /[1-4]*/ --exclude local* --exclude isos --exclude ppc*',
189 #'rsync_opts' => '-avSH --stats --partial --delete --safe-links --exclude /[1-5]*/ --exclude local* --exclude isos --exclude ppc*',
190 'http_alias' => '/fedora/epel'
198 'name' => this_subcluster[:alias],
199 'owner' => Grid::DOMAIN
203 'udp_send_channels' => [
205 'mcast_join' => mcast_addr,
211 'udp_recv_channels' => [
213 'mcast_join' => mcast_addr,
220 'udp_send_channels' => udp_send_channels4ucast,
221 'udp_recv_channels' => [