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 2015/03/03 06:51:06 UTC

bigtop git commit: BIGTOP-1423. Add Groovy installation to the bigtop_toolchain

Repository: bigtop
Updated Branches:
  refs/heads/master a66540ef5 -> 25fee1284


BIGTOP-1423. Add Groovy installation to the bigtop_toolchain


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/25fee128
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/25fee128
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/25fee128

Branch: refs/heads/master
Commit: 25fee12844241fd20ca6bd281b7673691b0259a0
Parents: a66540e
Author: Konstantin Boudnik <co...@apache.org>
Authored: Tue Feb 3 21:22:05 2015 -0800
Committer: Konstantin Boudnik <co...@apache.org>
Committed: Mon Mar 2 21:50:52 2015 -0800

----------------------------------------------------------------------
 bigtop_toolchain/README.md                      | 12 +++++++
 bigtop_toolchain/manifests/development-tools.pp | 18 ++++++++++
 bigtop_toolchain/manifests/groovy.pp            | 38 ++++++++++++++++++++
 build.gradle                                    | 12 ++++++-
 4 files changed, 79 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/25fee128/bigtop_toolchain/README.md
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/README.md b/bigtop_toolchain/README.md
index 206d4b1..567705d 100644
--- a/bigtop_toolchain/README.md
+++ b/bigtop_toolchain/README.md
@@ -83,6 +83,18 @@ The usage is as below:
 
 By applying the snippet, Vagrant will be installed(the Docker installation will be added soon).
 
+## Optional development tools
+
+This isn't a part of fundamental toolchain recipes as we are trying to contain the size of CI and dev-
+images of docker containers.
+As Groovy isn't required (yet!) for creation of a Bigtop stack, this environment is separated for now
+In case you system doesn't have already installed version of Bigtop recommended Groovy environment,
+you should be able to so easily by running
+
+	puppet apply --modulepath=<path_to_bigtop> -e "include bigtop_toolchain::development-tools"
+
+Potentially, we'll be adding more development tools in this manifest.
+
 ## Requirements
 
 For RedHat/Centos, due to redistribution restrictions the Oracle JDK must be downloaded seperately. 

http://git-wip-us.apache.org/repos/asf/bigtop/blob/25fee128/bigtop_toolchain/manifests/development-tools.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/development-tools.pp b/bigtop_toolchain/manifests/development-tools.pp
new file mode 100644
index 0000000..0e26394
--- /dev/null
+++ b/bigtop_toolchain/manifests/development-tools.pp
@@ -0,0 +1,18 @@
+# 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::development-tools {
+  include bigtop_toolchain::groovy
+}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/25fee128/bigtop_toolchain/manifests/groovy.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/groovy.pp b/bigtop_toolchain/manifests/groovy.pp
new file mode 100644
index 0000000..eb32d75
--- /dev/null
+++ b/bigtop_toolchain/manifests/groovy.pp
@@ -0,0 +1,38 @@
+# 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::groovy {
+
+  include bigtop_toolchain::packages
+
+  exec {"/usr/bin/wget http://dl.bintray.com/groovy/maven/groovy-binary-2.4.0.zip":
+    cwd     => "/usr/src",
+    require => Package[$packages::pkgs],
+    unless  => "/usr/bin/test -f /usr/src/groovy-binary-2.4.0.zip",
+  }
+
+  exec {'/usr/bin/unzip -x -o /usr/src/groovy-binary-2.4.0.zip':
+    cwd         => '/usr/local',
+    refreshonly => true,
+    subscribe   => Exec["/usr/bin/wget http://dl.bintray.com/groovy/maven/groovy-binary-2.4.0.zip"],
+    require     => Exec["/usr/bin/wget http://dl.bintray.com/groovy/maven/groovy-binary-2.4.0.zip"],
+  }
+
+  file {'/usr/local/groovy':
+    ensure  => link,
+    target  => '/usr/local/groovy-2.4.0',
+    require => Exec['/usr/bin/unzip -x -o /usr/src/groovy-binary-2.4.0.zip'],
+  }
+}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/25fee128/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 2bb1a0f..2fb4c2f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -80,7 +80,6 @@ task toolchain(type:Exec,
   workingDir '.'
   commandLine command
 }
-
 task "toolchain-puppetmodules"(type:Exec,
     description: 'Setup puppet modules via toolchain; Requires: Puppet, sudo',
     group: DEVENV_GROUP) {
@@ -92,6 +91,17 @@ task "toolchain-puppetmodules"(type:Exec,
   workingDir '.'
   commandLine command
 }
+task "toolchain-devtools"(type:Exec,
+    description: 'Setup additional dev. tools like Groovy SDK via toolchain; Requires: Puppet, sudo',
+    group: DEVENV_GROUP) {
+  def command = [
+      'sudo', 'puppet', 'apply', '-d',
+      "--modulepath=${projectDir.absolutePath}", '-e',
+      'include bigtop_toolchain::development-tools'
+  ]
+  workingDir '.'
+  commandLine command
+}
 
 task installTopLevel(type:Exec) {
   workingDir "."