Repository: bigtop Updated Branches: refs/heads/master 8cf130ccf -> c716b1272
BIGTOP-2811: Add R to toolchain for Spark and Zeppelin Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/c716b127 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/c716b127 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/c716b127 Branch: refs/heads/master Commit: c716b12729c602ea9814670051f237161b9579b6 Parents: 8cf130c Author: Youngwoo Kim <yw...@apache.org> Authored: Wed Dec 13 17:24:24 2017 +0900 Committer: Youngwoo Kim <yw...@apache.org> Committed: Tue Dec 26 11:02:01 2017 +0900 ---------------------------------------------------------------------- bigtop_toolchain/manifests/installer.pp | 1 + bigtop_toolchain/manifests/packages.pp | 3 +- bigtop_toolchain/manifests/renv.pp | 50 ++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/c716b127/bigtop_toolchain/manifests/installer.pp ---------------------------------------------------------------------- diff --git a/bigtop_toolchain/manifests/installer.pp b/bigtop_toolchain/manifests/installer.pp index 5bc99b6..813d203 100644 --- a/bigtop_toolchain/manifests/installer.pp +++ b/bigtop_toolchain/manifests/installer.pp @@ -23,6 +23,7 @@ class bigtop_toolchain::installer { include bigtop_toolchain::packages include bigtop_toolchain::env include bigtop_toolchain::user + include bigtop_toolchain::renv stage { 'last': require => Stage['main'], http://git-wip-us.apache.org/repos/asf/bigtop/blob/c716b127/bigtop_toolchain/manifests/packages.pp ---------------------------------------------------------------------- diff --git a/bigtop_toolchain/manifests/packages.pp b/bigtop_toolchain/manifests/packages.pp index 1514827..715a606 100644 --- a/bigtop_toolchain/manifests/packages.pp +++ b/bigtop_toolchain/manifests/packages.pp @@ -62,7 +62,8 @@ class bigtop_toolchain::packages { "libevent-devel", "apr-devel", "bison", - "libffi-devel" + "libffi-devel", + "epel-release" ] } /(?i:(SLES|opensuse))/: { $pkgs = [ http://git-wip-us.apache.org/repos/asf/bigtop/blob/c716b127/bigtop_toolchain/manifests/renv.pp ---------------------------------------------------------------------- diff --git a/bigtop_toolchain/manifests/renv.pp b/bigtop_toolchain/manifests/renv.pp new file mode 100644 index 0000000..776340a --- /dev/null +++ b/bigtop_toolchain/manifests/renv.pp @@ -0,0 +1,50 @@ +# 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::renv { + case $operatingsystem{ + /(?i:(centos|fedora|Amazon))/: { + $pkgs = [ + "R", + "R-devel", + "pandoc" + ] + } + /(?i:(SLES|opensuse))/: { + $pkgs = [ + "R-base", + "R-base-devel", + "pandoc" + ] + } + /(Ubuntu|Debian)/: { + $pkgs = [ + "r-base", + "r-base-dev", + "pandoc" + ] + } + } + package { $pkgs: + ensure => installed, + before => [Exec['install_r_packages']] + } + + # Install required R packages + exec { 'install_r_packages': + cwd => "/usr/bin", + command => "/usr/bin/R -e \"install.packages(c('devtools', 'evaluate', 'rmarkdown', 'knitr', 'roxygen2', 'testthat', 'e1071'), repos = 'http://cran.us.r-project.org')\"", + } +}