Repository: bigtop Updated Branches: refs/heads/master 14fa7b0b5 -> 82f2ebf31
BIGTOP-1693. Puppet stdlib should be automatically installed by toolchain Signed-off-by: Evans Ye <evan...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/82f2ebf3 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/82f2ebf3 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/82f2ebf3 Branch: refs/heads/master Commit: 82f2ebf3178973863c5eeeef2fdd51266bbbf8cc Parents: 14fa7b0 Author: Konstantin Boudnik <c...@apache.org> Authored: Mon Feb 23 23:58:46 2015 -0800 Committer: Evans Ye <evan...@apache.org> Committed: Sun Mar 1 18:46:22 2015 +0000 ---------------------------------------------------------------------- bigtop-deploy/puppet/README.md | 9 +++++++-- bigtop_toolchain/manifests/puppet-modules.pp | 24 +++++++++++++++++++++++ build.gradle | 12 ++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/82f2ebf3/bigtop-deploy/puppet/README.md ---------------------------------------------------------------------- diff --git a/bigtop-deploy/puppet/README.md b/bigtop-deploy/puppet/README.md index 0f55ca8..050e6ea 100644 --- a/bigtop-deploy/puppet/README.md +++ b/bigtop-deploy/puppet/README.md @@ -106,8 +106,13 @@ directories to use. ## Usage - Make sure that the bigtop-deploy directory is available on every node of your cluster, and then -- Make sure you've installed puppet's stdlib "puppet module install puppetlabs/stdlib" version - 4.0.0 or newer. +- Make sure all required puppet's modules are installed: + + gradle toolchain-puppetmodules + + or + + puppet apply --modulepath=<path_to_bigtop> -e "include bigtop_toolchain::puppet-modules" And run the following on those nodes: http://git-wip-us.apache.org/repos/asf/bigtop/blob/82f2ebf3/bigtop_toolchain/manifests/puppet-modules.pp ---------------------------------------------------------------------- diff --git a/bigtop_toolchain/manifests/puppet-modules.pp b/bigtop_toolchain/manifests/puppet-modules.pp new file mode 100644 index 0000000..4828c4a --- /dev/null +++ b/bigtop_toolchain/manifests/puppet-modules.pp @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +class bigtop_toolchain::puppet-modules { + + exec { 'install-puppet-stdlib': + path => '/usr/bin:/bin', + command => 'puppet module install puppetlabs-stdlib', + onlyif => "test `facter puppetversion |cut -d'.' -f 1` -ge 3", + creates => '/etc/puppet/modules/stdlib', + } +} http://git-wip-us.apache.org/repos/asf/bigtop/blob/82f2ebf3/build.gradle ---------------------------------------------------------------------- diff --git a/build.gradle b/build.gradle index da12231..2bb1a0f 100644 --- a/build.gradle +++ b/build.gradle @@ -81,6 +81,18 @@ task toolchain(type:Exec, commandLine command } +task "toolchain-puppetmodules"(type:Exec, + description: 'Setup puppet modules via toolchain; Requires: Puppet, sudo', + group: DEVENV_GROUP) { + def command = [ + 'sudo', 'puppet', 'apply', '-d', + "--modulepath=${projectDir.absolutePath}", '-e', + 'include bigtop_toolchain::puppet-modules' + ] + workingDir '.' + commandLine command +} + task installTopLevel(type:Exec) { workingDir "." commandLine 'mvn clean install -f pom.xml'.split(" ")