You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by rv...@apache.org on 2014/09/08 05:01:12 UTC
git commit: BIGTOP-1442. need to add proper clean up for the
toolchain puppet code
Repository: bigtop
Updated Branches:
refs/heads/master 8171a361a -> 3638b1964
BIGTOP-1442. need to add proper clean up for the toolchain puppet code
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/3638b196
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/3638b196
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/3638b196
Branch: refs/heads/master
Commit: 3638b1964b65835ecf19bc5cc84d0509a8e82d9c
Parents: 8171a36
Author: Roman Shaposhnik <rv...@apache.org>
Authored: Mon Sep 8 02:54:07 2014 +0000
Committer: Roman Shaposhnik <rv...@apache.org>
Committed: Sun Sep 7 20:00:05 2014 -0700
----------------------------------------------------------------------
bigtop_toolchain/files/jenkins.sh.ubu | 2 +-
bigtop_toolchain/manifests/cleanup.pp | 33 ++++++++++++++++++++++++++++
bigtop_toolchain/manifests/deps.pp | 12 ----------
bigtop_toolchain/manifests/installer.pp | 5 +++++
bigtop_toolchain/manifests/packages.pp | 6 ++---
bigtop_toolchain/manifests/scala.pp | 22 ++++++-------------
6 files changed, 49 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/3638b196/bigtop_toolchain/files/jenkins.sh.ubu
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/files/jenkins.sh.ubu b/bigtop_toolchain/files/jenkins.sh.ubu
index 0b79a5f..99b5d8e 100644
--- a/bigtop_toolchain/files/jenkins.sh.ubu
+++ b/bigtop_toolchain/files/jenkins.sh.ubu
@@ -15,7 +15,7 @@
export MAVEN_HOME=/usr/local/maven
export JAVA6_HOME=/usr/lib/jvm/java-6-oracle
-export JAVA7_HOME=/usr/lib/jvm/java-7-oracle
+export JAVA7_HOME=/usr/lib/jdk7-latest
export JAVA_HOME=$JAVA7_HOME
export ANT_HOME=/usr/local/ant
export FORREST_HOME=/usr/local/apache-forrest
http://git-wip-us.apache.org/repos/asf/bigtop/blob/3638b196/bigtop_toolchain/manifests/cleanup.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/cleanup.pp b/bigtop_toolchain/manifests/cleanup.pp
new file mode 100644
index 0000000..a0b5421
--- /dev/null
+++ b/bigtop_toolchain/manifests/cleanup.pp
@@ -0,0 +1,33 @@
+# 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::cleanup {
+ $packager_cleanup = $operatingsystem ? {
+ /(?i:(centos|fedora))/ => 'yum clean all',
+ /(?i:(SLES|opensuse))/ => 'zypper clean -a',
+ Ubuntu => 'apt-get clean',
+ }
+
+ exec { 'remove archives':
+ cwd => '/tmp',
+ command => '/bin/bash -c "rm -rf /tmp/* ; rm -f /usr/src/* ; exit 0"'
+ }
+
+ exec { 'clean packages':
+ cwd => '/tmp',
+ command => $packager_cleanup,
+ path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin'],
+ }
+}
http://git-wip-us.apache.org/repos/asf/bigtop/blob/3638b196/bigtop_toolchain/manifests/deps.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/deps.pp b/bigtop_toolchain/manifests/deps.pp
index a7d3777..e3534a4 100644
--- a/bigtop_toolchain/manifests/deps.pp
+++ b/bigtop_toolchain/manifests/deps.pp
@@ -15,18 +15,6 @@
class bigtop_toolchain::deps {
include bigtop_toolchain::packages
- include bigtop_toolchain::jdk
-
- case $operatingsystem{
- Ubuntu: { $scala_file = 'scala-2.10.3.deb' }
- default: { $scala_file = 'scala-2.10.3.rpm'}
- }
-
- exec {"/usr/bin/wget http://www.scala-lang.org/files/archive/$scala_file":
- cwd => "/usr/src",
- require => Package[$packages::pkgs],
- unless => "/usr/bin/test -f /usr/src/$scala_file",
- }
exec {"/usr/bin/wget http://mirrors.ibiblio.org/apache//ant/binaries/apache-ant-1.9.4-bin.tar.gz":
cwd => "/usr/src",
http://git-wip-us.apache.org/repos/asf/bigtop/blob/3638b196/bigtop_toolchain/manifests/installer.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/installer.pp b/bigtop_toolchain/manifests/installer.pp
index a723d60..8b1e992 100644
--- a/bigtop_toolchain/manifests/installer.pp
+++ b/bigtop_toolchain/manifests/installer.pp
@@ -25,4 +25,9 @@ class bigtop_toolchain::installer {
include bigtop_toolchain::env
include bigtop_toolchain::user
include bigtop_toolchain::scala
+
+ stage { 'last':
+ require => Stage['main'],
+ }
+ class { 'bigtop_toolchain::cleanup': stage => 'last' }
}
http://git-wip-us.apache.org/repos/asf/bigtop/blob/3638b196/bigtop_toolchain/manifests/packages.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/packages.pp b/bigtop_toolchain/manifests/packages.pp
index 426af6c..556f1f8 100644
--- a/bigtop_toolchain/manifests/packages.pp
+++ b/bigtop_toolchain/manifests/packages.pp
@@ -15,9 +15,9 @@
class bigtop_toolchain::packages {
case $operatingsystem{
- /(?i:(centos|fedora))/: { $pkgs = [ "wget", "git", "make" , "cmake" , "rpm-build" , "lzo-devel", "redhat-rpm-config", "openssl-devel", "fuse-libs", "fuse-devel", "fuse", "gcc", "gcc-c++", "autoconf", "automake", "libtool", "createrepo", "cppunit-devel"] }
- /(?i:(SLES|opensuse))/: { $pkgs = [ "unzip", "wget", "git", "make" , "cmake" , "rpm-devel" , "lzo-devel", "libopenssl-devel", "fuse-devel", "fuse", "gcc", "gcc-c++", "autoconf", "automake", "libtool", "pkg-config", "createrepo", "libcppunit-devel"] }
- Ubuntu: { $pkgs = [ "liblzo2-dev", "libzip-dev", "sharutils", "libfuse-dev", "cmake", "pkg-config", "debhelper", "devscripts", "protobuf-compiler", "build-essential", "dh-make", "reprepro", "automake", "autoconf", "libfuse2", "libssh-dev", "libjansi-java", "libcppunit-dev" ]
+ /(?i:(centos|fedora))/: { $pkgs = [ "unzip", "curl", "wget", "git", "make", "cmake", "autoconf", "automake", "libtool", "gcc", "gcc-c++", "fuse", "createrepo", "lzo-devel", "fuse-devel", "cppunit-devel", "openssl-devel", "rpm-build" , "redhat-rpm-config", "fuse-libs" ] }
+ /(?i:(SLES|opensuse))/: { $pkgs = [ "unzip", "curl", "wget", "git", "make", "cmake", "autoconf", "automake", "libtool", "gcc", "gcc-c++", "fuse", "createrepo", "lzo-devel", "fuse-devel", "libcppunit-devel", "libopenssl-devel", "rpm-devel", "pkg-config" ] }
+ Ubuntu: { $pkgs = [ "unzip", "curl", "wget", "git-core", "make", "cmake", "autoconf", "automake", "libtool", "gcc", "g++", "fuse", "reprepro", "liblzo2-dev", "libfuse-dev", "libcppunit-dev", "libssl-dev", "libzip-dev", "sharutils", "pkg-config", "debhelper", "devscripts", "protobuf-compiler", "build-essential", "dh-make", "libfuse2", "libssh-dev", "libjansi-java" ]
exec { "apt-update":
command => "/usr/bin/apt-get update"
http://git-wip-us.apache.org/repos/asf/bigtop/blob/3638b196/bigtop_toolchain/manifests/scala.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/scala.pp b/bigtop_toolchain/manifests/scala.pp
index 5e2dce0..2d54a44 100644
--- a/bigtop_toolchain/manifests/scala.pp
+++ b/bigtop_toolchain/manifests/scala.pp
@@ -13,24 +13,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
class bigtop_toolchain::scala {
-
- include bigtop_toolchain::deps
-
- case $operatingsystem{
- Ubuntu: {
- $pm = '/usr/bin/dpkg -i'
- $requires = [ Exec["/usr/bin/wget http://www.scala-lang.org/files/archive/$bigtop_toolchain::deps::scala_file"] ]
- }
- default: {
- $pm = '/bin/rpm -Uvh'
- $requires = Exec["/usr/bin/wget http://www.scala-lang.org/files/archive/$bigtop_toolchain::deps::scala_file"]
- }
+
+ $install_scala_cmd = $operatingsystem ? {
+ 'Ubuntu' => '/bin/bash -c "wget http://www.scala-lang.org/files/archive/scala-2.10.3.deb ; dpkg -x ./scala-2.10.3.deb /"',
+ default => '/bin/rpm -Uvh http://www.scala-lang.org/files/archive/scala-2.10.3.rpm'
}
- exec {"$pm /usr/src/$bigtop_toolchain::deps::scala_file":
+ exec { "install scala":
+ cwd => '/tmp',
+ command => $install_scala_cmd,
unless => "/usr/bin/test -f /usr/bin/scala",
- #require => Exec["/usr/bin/wget http://www.scala-lang.org/files/archive/$bigtop_toolchain::deps::scala_file"],
require => $requires
}
-
}