You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by co...@apache.org on 2014/02/06 06:38:25 UTC
[2/2] git commit: BIGTOP-1203. Update toolchaing to automatically
install Gradle into dev env.
BIGTOP-1203. Update toolchaing to automatically install Gradle into dev env.
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/304a5d2f
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/304a5d2f
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/304a5d2f
Branch: refs/heads/master
Commit: 304a5d2f34decaa386213540bce6aa3338178fad
Parents: fae96c5
Author: Konstantin Boudnik <co...@apache.org>
Authored: Tue Feb 4 14:52:46 2014 -0800
Committer: Konstantin Boudnik <co...@apache.org>
Committed: Tue Feb 4 14:52:46 2014 -0800
----------------------------------------------------------------------
bigtop_toolchain/README.md | 8 +++++--
bigtop_toolchain/files/jenkins.sh.centos | 5 ++++-
bigtop_toolchain/files/jenkins.sh.ubu | 5 ++++-
bigtop_toolchain/manifests/deps.pp | 6 +++++
bigtop_toolchain/manifests/gradle.pp | 32 +++++++++++++++++++++++++++
bigtop_toolchain/manifests/installer.pp | 1 +
6 files changed, 53 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/304a5d2f/bigtop_toolchain/README.md
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/README.md b/bigtop_toolchain/README.md
index 73bab2d..02e08a8 100644
--- a/bigtop_toolchain/README.md
+++ b/bigtop_toolchain/README.md
@@ -28,6 +28,8 @@ Puppet module for configuring a CentOS host for building BigTop. It installs:
**Apache Maven 3.0.5**
+**Gradle 1.10**
+
**Protobuf 2.4.1**
##Usage
@@ -40,6 +42,7 @@ These can be indivdually applied using:
include bigtop_toolchain::maven
include bigtop_toolchain::forrest
include bigtop_toolchain::ant
+ include bigtop_toolchain::gradle
include bigtop_toolchain::protobuf
include bigtop_toolchain::packages
include bigtop_toolchain::env
@@ -61,8 +64,9 @@ building BigTop:
ANT_HOME=/usr/local/ant
PATH=$PATH:$ANT_HOME/bin
FORREST_HOME=/usr/local/apache-forrest
- PATH=$PATH:$FORREST_HOME/bin
-
+ GRADLE_HOME=/usr/local/gradle
+ PATH=$PATH:$FORREST_HOME/bin:$GRADLE_HOME/bin
+
If you do not want to use a puppet master this module can be applied
standalone with a command such as:
http://git-wip-us.apache.org/repos/asf/bigtop/blob/304a5d2f/bigtop_toolchain/files/jenkins.sh.centos
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/files/jenkins.sh.centos b/bigtop_toolchain/files/jenkins.sh.centos
index ebe2228..7929745 100644
--- a/bigtop_toolchain/files/jenkins.sh.centos
+++ b/bigtop_toolchain/files/jenkins.sh.centos
@@ -20,4 +20,7 @@ export ANT_HOME=/usr/local/ant
export PATH=$PATH:$ANT_HOME/bin
export FORREST_HOME=/usr/local/apache-forrest
export SCALA_HOME=/usr/share/java
-export PATH=$PATH:$FORREST_HOME/bin
+export GRADLE_HOME=/usr/local/gradle
+export PATH=$PATH:$FORREST_HOME/bin:$GRADLE_HOME/bin
+
+export GRADLE_OPTS="-Dorg.gradle.daemon=true
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/bigtop/blob/304a5d2f/bigtop_toolchain/files/jenkins.sh.ubu
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/files/jenkins.sh.ubu b/bigtop_toolchain/files/jenkins.sh.ubu
index e2246b4..a8d8f1d 100644
--- a/bigtop_toolchain/files/jenkins.sh.ubu
+++ b/bigtop_toolchain/files/jenkins.sh.ubu
@@ -20,4 +20,7 @@ export ANT_HOME=/usr/local/ant
export PATH=$PATH:$ANT_HOME/bin
export FORREST_HOME=/usr/local/apache-forrest
export SCALA_HOME=/usr/share/java
-export PATH=$PATH:$FORREST_HOME/bin
+export GRADLE_HOME=/usr/local/gradle
+export PATH=$PATH:$FORREST_HOME/bin:$GRADLE_HOME/bin
+
+export GRADLE_OPTS="-Dorg.gradle.daemon=true
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/bigtop/blob/304a5d2f/bigtop_toolchain/manifests/deps.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/deps.pp b/bigtop_toolchain/manifests/deps.pp
index 2003394..dc9315f 100644
--- a/bigtop_toolchain/manifests/deps.pp
+++ b/bigtop_toolchain/manifests/deps.pp
@@ -45,4 +45,10 @@ class bigtop_toolchain::deps {
require => Package[$packages::pkgs],
unless => "/usr/bin/test -f /usr/src/apache-maven-3.0.5-bin.tar.gz",
}
+
+ exec {"/usr/bin/wget http://services.gradle.org/distributions/gradle-1.10-bin.zip":
+ cwd => "/usr/src",
+ require => Package[$packages::pkgs],
+ unless => "/usr/bin/test -f /usr/src/gradle-1.10-bin.zip",
+ }
}
http://git-wip-us.apache.org/repos/asf/bigtop/blob/304a5d2f/bigtop_toolchain/manifests/gradle.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/gradle.pp b/bigtop_toolchain/manifests/gradle.pp
new file mode 100644
index 0000000..df77bd7
--- /dev/null
+++ b/bigtop_toolchain/manifests/gradle.pp
@@ -0,0 +1,32 @@
+# 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::gradle {
+
+ include bigtop_toolchain::deps
+
+ exec {'/usr/bin/unzip -x /usr/src/gradle-1.10-bin.zip':
+ cwd => '/usr/local',
+ refreshonly => true,
+ subscribe => Exec["/usr/bin/wget http://services.gradle.org/distributions/gradle-1.10-bin.zip"],
+ require => Exec["/usr/bin/wget http://services.gradle.org/distributions/gradle-1.10-bin.zip"],
+ }
+
+ file {'/usr/local/gradle':
+ ensure => link,
+ target => '/usr/local/gradle-1.10',
+ require => Exec['/usr/bin/unzip -x /usr/src/gradle-1.10-bin.zip'],
+ }
+}
http://git-wip-us.apache.org/repos/asf/bigtop/blob/304a5d2f/bigtop_toolchain/manifests/installer.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/installer.pp b/bigtop_toolchain/manifests/installer.pp
index ee7a620..871732c 100644
--- a/bigtop_toolchain/manifests/installer.pp
+++ b/bigtop_toolchain/manifests/installer.pp
@@ -18,6 +18,7 @@ class bigtop_toolchain::installer {
include bigtop_toolchain::maven
include bigtop_toolchain::forrest
include bigtop_toolchain::ant
+ include bigtop_toolchain::gradle
include bigtop_toolchain::protobuf
include bigtop_toolchain::packages
include bigtop_toolchain::env