#
-# Copyright 2013, whitestar
+# Copyright 2013,2014 whitestar
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# limitations under the License.
#
-$LOAD_PATH.push("#{File.dirname(__FILE__)}/../_lib")
-#${chef-repo}/_lib/grid.rb
+$LOAD_PATH.push("#{File.dirname(__FILE__)}/_lib")
+#${chef-repo}/roles/_lib/grid.rb
require 'grid'
name 'grid-ftp'
run_list(
'role[node_commons]',
'role[apt-mirror]',
- #'role[apt-source]',
+ 'role[apt-cacher-ng]',
+ 'role[apt-source]',
'role[yum-mirror]',
#'role[yum-repos]',
+ 'role[yum-cdh]',
+ 'role[cdh-mirror]',
+ 'role[yum-hdp]',
+ 'role[hdp-mirror]',
'role[apache-mirror]',
#'role[ganglia-gmond]',
)
override_attributes(
'apache_utils' => {
'mirror' => {
- 'cron_period' => '#15 23 * * *'
+ 'cron_period' => '5 23 * * *'
}
},
'apt_utils' => {
'source' => {
'apt_lines' => [
- 'deb http://cdn.debian.net/debian wheezy main contrib non-free',
- 'deb http://cdn.debian.net/debian wheezy-updates main contrib',
- 'deb http://cdn.debian.net/debian wheezy-backports main contrib non-free',
+ '#deb http://cdn.debian.net/debian wheezy main contrib non-free',
+ '#deb http://cdn.debian.net/debian wheezy-updates main contrib',
+ '#deb http://cdn.debian.net/debian wheezy-backports main contrib non-free',
+ '#deb http://security.debian.org/ wheezy/updates main contrib non-free',
# self test
- #'deb http://localhost/debian wheezy main contrib non-free',
- #'deb http://localhost/debian wheezy-updates main contrib',
- #'deb http://localhost/debian wheezy-backports main contrib non-free',
+ 'deb http://ftp.grid.example.com/debian wheezy main contrib non-free',
+ 'deb http://ftp.grid.example.com/debian wheezy-updates main contrib',
+ 'deb http://ftp.grid.example.com/debian wheezy-backports main contrib non-free',
+ 'deb http://ftp.grid.example.com:3142/security.debian.org/ wheezy/updates main contrib non-free'
]
},
'mirror' => {
- 'cron_period' => '#0 22 * * *',
- #'cron_period' => '0 4 * * *',
+ 'cron_period' => '5 22 * * *',
'country' => 'jp',
'distributions' => {
'debian' => {
}
}
},
+ 'cdh' => {
+ 'version' => '4.4.0',
+ 'yum_repo' => {
+ 'with_gplextras' => true,
+ 'update' => true,
+ 'only_for_mirroring' => true,
+ 'mirroring' => {
+ 'platform' => 'centos',
+ 'platform_version' => '6',
+ 'arch' => 'x86_64'
+ }
+ },
+ 'yum_mirror' => {
+ 'cron_period' => '5 20 * * *',
+ 'repo_ids' => [
+ 'cloudera-cdh4',
+ 'cloudera-gplextras4',
+ ],
+ 'arch' => 'x86_64',
+ 'url_alias_with_authority_part' => true
+ }
+ },
+ 'hdp' => {
+ 'version' => '1.3.2',
+ #'version' => '1.2.3.1',
+ 'yum_repo' => {
+ 'update' => true,
+ 'only_for_mirroring' => true,
+ 'mirroring' => {
+ 'platform' => 'centos',
+ 'platform_version' => '6'
+ }
+ },
+ 'yum_mirror' => {
+ 'cron_period' => '35 20 * * *',
+ 'repo_ids' => [
+ 'HDP-1.x',
+ 'Updates-HDP-1.x',
+ 'HDP-UTILS-1.1.0.16',
+ 'ambari-1.x',
+ 'Updates-ambari-1.2.5.17'
+ ],
+ 'url_alias_with_authority_part' => true
+ }
+ },
'yum_utils' => {
'repos' => {
'CentOS-Base' => {
'baseurl_ctx' => '', # default: inactive
#'baseurl_ctx' => 'http://mirror.centos.org/centos',
#'baseurl_ctx' => 'http://ftp.grid.example.com/centos',
- #'baseurl_ctx' => 'http://localhost/centos',
'gpgkey' => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6'
},
'epel' => {
#'mirrorlist_ctx' => 'http://mirrors.fedoraproject.org',
'baseurl_ctx' => '', # default: inactive
#'baseurl_ctx' => 'http://ftp.grid.example.com/fedora/epel',
- #'baseurl_ctx' => 'http://localhost/fedora/epel',
'gpgkey' => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6'
}
},
'mirror' => {
- 'cron_period' => '#0 21 * * *',
- #'cron_period' => '0 4 * * *',
+ 'cron_period' => '5 21 * * *',
'rsync_sources' => [
{
+ # CentOS
'url' => 'rsync://ftp.riken.jp/centos/',
- 'rsync_opts' => '-avSH --stats --partial --delete --safe-links --exclude /[1-5]*/ --exclude /6.[0-3]/ --exclude local* --exclude isos --exclude ppc*',
+ # 5.9 or later
+ '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*',
+ # 6.4 or later
+ #'rsync_opts' => '-avSH --stats --partial --delete --safe-links --exclude /[1-5]*/ --exclude /6.[0-3]/ --exclude local* --exclude isos --exclude ppc*',
'http_alias' => '/centos'
},
{
+ # EPEL
'url' => 'rsync://ftp.riken.jp/fedora/epel/',
- 'rsync_opts' => '-avSH --stats --partial --delete --safe-links --exclude /[1-5]*/ --exclude local* --exclude isos --exclude ppc*',
+ # 5 or later
+ 'rsync_opts' => '-avSH --stats --partial --delete --safe-links --exclude /[1-4]*/ --exclude local* --exclude isos --exclude ppc*',
+ # 6 or later
+ #'rsync_opts' => '-avSH --stats --partial --delete --safe-links --exclude /[1-5]*/ --exclude local* --exclude isos --exclude ppc*',
'http_alias' => '/fedora/epel'
}
]