bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject git commit: BIGTOP-927. Update puppet recipes to support Ubuntu
Date Tue, 10 Sep 2013 03:59:01 GMT
Updated Branches:
  refs/heads/master 03e4ea131 -> 46b28b00d


BIGTOP-927. Update puppet recipes to support Ubuntu


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

Branch: refs/heads/master
Commit: 46b28b00d2dccdfe491c98a5d3cb102e72733adc
Parents: 03e4ea1
Author: Konstantin Boudnik <cos@apache.org>
Authored: Mon Sep 9 20:53:11 2013 -0700
Committer: Konstantin Boudnik <cos@apache.org>
Committed: Mon Sep 9 20:53:11 2013 -0700

----------------------------------------------------------------------
 bigtop-toolchain/files/jenkins.sh        | 22 ----------
 bigtop-toolchain/files/jenkins.sh.centos | 22 ++++++++++
 bigtop-toolchain/files/jenkins.sh.ubu    | 22 ++++++++++
 bigtop-toolchain/manifests/deps.pp       | 38 ++++++++++++++++
 bigtop-toolchain/manifests/env.pp        | 26 ++++++++---
 bigtop-toolchain/manifests/jdk.pp        | 63 ++++++++++++++++++++++-----
 bigtop-toolchain/manifests/packages.pp   |  1 +
 bigtop-toolchain/manifests/protobuf.pp   | 28 +++++++-----
 8 files changed, 172 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/46b28b00/bigtop-toolchain/files/jenkins.sh
----------------------------------------------------------------------
diff --git a/bigtop-toolchain/files/jenkins.sh b/bigtop-toolchain/files/jenkins.sh
deleted file mode 100644
index a83c158..0000000
--- a/bigtop-toolchain/files/jenkins.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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.
-
-export MAVEN_HOME=/usr/local/maven
-export PATH=$PATH:$MAVEN_HOME/bin
-export JAVA_HOME=/usr/java/latest
-export ANT_HOME=/usr/local/ant
-export PATH=$PATH:$ANT_HOME/bin
-export FORREST_HOME=/usr/local/apache-forrest
-export PATH=$PATH:$FORREST_HOME/bin

http://git-wip-us.apache.org/repos/asf/bigtop/blob/46b28b00/bigtop-toolchain/files/jenkins.sh.centos
----------------------------------------------------------------------
diff --git a/bigtop-toolchain/files/jenkins.sh.centos b/bigtop-toolchain/files/jenkins.sh.centos
new file mode 100644
index 0000000..a83c158
--- /dev/null
+++ b/bigtop-toolchain/files/jenkins.sh.centos
@@ -0,0 +1,22 @@
+# 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.
+
+export MAVEN_HOME=/usr/local/maven
+export PATH=$PATH:$MAVEN_HOME/bin
+export JAVA_HOME=/usr/java/latest
+export ANT_HOME=/usr/local/ant
+export PATH=$PATH:$ANT_HOME/bin
+export FORREST_HOME=/usr/local/apache-forrest
+export PATH=$PATH:$FORREST_HOME/bin

http://git-wip-us.apache.org/repos/asf/bigtop/blob/46b28b00/bigtop-toolchain/files/jenkins.sh.ubu
----------------------------------------------------------------------
diff --git a/bigtop-toolchain/files/jenkins.sh.ubu b/bigtop-toolchain/files/jenkins.sh.ubu
new file mode 100644
index 0000000..098e6e5
--- /dev/null
+++ b/bigtop-toolchain/files/jenkins.sh.ubu
@@ -0,0 +1,22 @@
+# 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.
+
+export MAVEN_HOME=/usr/local/maven
+export PATH=$PATH:$MAVEN_HOME/bin
+export JAVA_HOME=/usr/lib/jvm/java-6-oracle
+export ANT_HOME=/usr/local/ant
+export PATH=$PATH:$ANT_HOME/bin
+export FORREST_HOME=/usr/local/apache-forrest
+export PATH=$PATH:$FORREST_HOME/bin

http://git-wip-us.apache.org/repos/asf/bigtop/blob/46b28b00/bigtop-toolchain/manifests/deps.pp
----------------------------------------------------------------------
diff --git a/bigtop-toolchain/manifests/deps.pp b/bigtop-toolchain/manifests/deps.pp
new file mode 100644
index 0000000..bf1e502
--- /dev/null
+++ b/bigtop-toolchain/manifests/deps.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::deps {
+
+  package { "wget":
+    ensure => latest,
+  }
+
+  exec {"/usr/bin/wget http://mirrors.ibiblio.org/apache//ant/binaries/apache-ant-1.9.2-bin.tar.gz":
+    cwd     => "/usr/src",
+    require => Package["wget"],
+    unless  => "/usr/bin/test -f /usr/src/apache-ant-1.9.2-bin.tar.gz",
+  }
+
+  exec {"/usr/bin/wget http://archive.apache.org/dist/forrest/0.9/apache-forrest-0.9.tar.gz":
+    cwd     => "/usr/src",
+    require => Package["wget"],
+    unless  => "/usr/bin/test -f /usr/src/apache-forrest-0.9.tar.gz",
+  }
+
+  exec {"/usr/bin/wget ftp://mirror.reverse.net/pub/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz":
+    cwd     => "/usr/src",
+    require => Package["wget"],
+    unless  => "/usr/bin/test -f /usr/src/apache-maven-3.0.5-bin.tar.gz",
+  }
+}

http://git-wip-us.apache.org/repos/asf/bigtop/blob/46b28b00/bigtop-toolchain/manifests/env.pp
----------------------------------------------------------------------
diff --git a/bigtop-toolchain/manifests/env.pp b/bigtop-toolchain/manifests/env.pp
index 03eb523..f7c3998 100644
--- a/bigtop-toolchain/manifests/env.pp
+++ b/bigtop-toolchain/manifests/env.pp
@@ -14,11 +14,25 @@
 # limitations under the License.
 
 class bigtop-toolchain::env {
-  file { '/etc/profile.d/jenkins.sh':
-    source => 'puppet:///modules/bigtop-toolchain/jenkins.sh',
-    ensure => present,
-    owner  => root,
-    group  => root,
-    mode   => 644,
+  case $operatingsystem{
+    Ubuntu: {
+      file { '/etc/profile.d/bigtop.sh':
+        source => 'puppet:///modules/bigtop-toolchain/jenkins.sh.ubu',
+        ensure => present,
+        owner  => root,
+        group  => root,
+        mode   => 644,
+      }
+    }
+    default: {
+      file {'/etc/profile.d/bigtop.sh':
+        source => 'puppet:///modules/bigtop-toolchain/jenkins.sh.ubu',
+        ensure => present,
+        owner  => root,
+        group  => root,
+        mode   => 644,
+      }
+    }
   }
 }
+

http://git-wip-us.apache.org/repos/asf/bigtop/blob/46b28b00/bigtop-toolchain/manifests/jdk.pp
----------------------------------------------------------------------
diff --git a/bigtop-toolchain/manifests/jdk.pp b/bigtop-toolchain/manifests/jdk.pp
index 19e1b9f..2c4d68c 100644
--- a/bigtop-toolchain/manifests/jdk.pp
+++ b/bigtop-toolchain/manifests/jdk.pp
@@ -14,17 +14,58 @@
 # limitations under the License.
 
 class bigtop-toolchain::jdk {
-  file { '/tmp/jdk-6u45-linux-amd64.rpm':
-    source => 'puppet:///modules/bigtop-toolchain/jdk-6u45-linux-amd64.rpm',
-    ensure => present,
-    owner  => root,
-    group  => root,
-    mode   => 755
-  }
+  case $::lsbdistcodename{
+    precise: {
+      package {'python-software-properties':
+        ensure => present,
+      }
+
+      exec {'/usr/bin/apt-add-repository -y ppa:webupd8team/java':
+        unless  => '/usr/bin/test -f /etc/apt/sources.list.d/webupd8team-java-precise.list',
+        require => Package['python-software-properties'],
+      }
+
+      exec {'/usr/bin/apt-get update':
+        refreshonly => true,
+        subscribe   => Exec['/usr/bin/apt-add-repository -y ppa:webupd8team/java'],
+        require     => Exec['/usr/bin/apt-add-repository -y ppa:webupd8team/java'],
+      }
+
+      exec {"accept-license1":
+        command     => "echo debconf shared/accepted-oracle-license-v1-1 select true |
sudo debconf-set-selections",
+        path        => ["/bin", "/usr/bin"],
+        require     => Exec['/usr/bin/apt-get update'],
+        refreshonly => true,
+        subscribe   => Exec['/usr/bin/apt-get update'],
+      }
+
+      exec {"accept-license2":
+        command     => "echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo
debconf-set-selections",
+        path        => ["/bin", "/usr/bin"],
+        require     => Exec["accept-license1"],
+        refreshonly => true,
+        subscribe   => Exec["accept-license1"],
+      }
+
+      package {'oracle-java6-installer':
+        ensure  => present,
+        require => Exec["accept-license2"],
+      }
+    }
+    default: {
+      file { '/tmp/jdk-6u45-linux-amd64.rpm':
+        source => 'puppet:///modules/bigtop-toolchain/jdk-6u45-linux-amd64.rpm',
+        ensure => present,
+        owner  => root,
+        group  => root,
+        mode   => 755
+      }
   
-  exec {'/bin/rpm -Uvh /tmp/jdk-6u45-linux-amd64.rpm':
-    cwd         => '/tmp',
-    refreshonly => true,
-    subscribe   => File["/tmp/jdk-6u45-linux-amd64.rpm"],
+      exec {'/bin/rpm -Uvh /tmp/jdk-6u45-linux-amd64.rpm':
+        cwd         => '/tmp',
+        refreshonly => true,
+        subscribe   => File["/tmp/jdk-6u45-linux-amd64.rpm"],
+      }
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/bigtop/blob/46b28b00/bigtop-toolchain/manifests/packages.pp
----------------------------------------------------------------------
diff --git a/bigtop-toolchain/manifests/packages.pp b/bigtop-toolchain/manifests/packages.pp
index aece51d..012e9e9 100644
--- a/bigtop-toolchain/manifests/packages.pp
+++ b/bigtop-toolchain/manifests/packages.pp
@@ -17,6 +17,7 @@ class bigtop-toolchain::packages {
   case $operatingsystem{
   centos: { $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"] }
   SLES: { $pkgs = [ "wget", "git", "make" , "cmake" , "rpm-devel" , "lzo-devel", "libopenssl-devel",
"fuse-devel", "fuse", "gcc", "gcc-c++", "autoconf", "automake", "libtool", "pkg-config"] }
+  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", "asciidoc" ] }
 }
   package { $pkgs:
     ensure => installed,

http://git-wip-us.apache.org/repos/asf/bigtop/blob/46b28b00/bigtop-toolchain/manifests/protobuf.pp
----------------------------------------------------------------------
diff --git a/bigtop-toolchain/manifests/protobuf.pp b/bigtop-toolchain/manifests/protobuf.pp
index 3fd0b07..d2517b1 100644
--- a/bigtop-toolchain/manifests/protobuf.pp
+++ b/bigtop-toolchain/manifests/protobuf.pp
@@ -14,17 +14,23 @@
 # limitations under the License.
 
 class bigtop-toolchain::protobuf {
-  file { '/etc/yum.repos.d/mrdocs-protobuf-rpm.repo':
-    source => 'puppet:///modules/bigtop-toolchain/mrdocs-protobuf-rpm.repo',
-    ensure => present,
-    owner  => root,
-    group  => root,
-    mode   => 755,
-  }
+  case $operatingsystem{
+    Ubuntu: {
+      notify {"Ubuntu provides protobuf in repo":}
+    }
+    default:{
+      file { '/etc/yum.repos.d/mrdocs-protobuf-rpm.repo':
+        source => 'puppet:///modules/bigtop-toolchain/mrdocs-protobuf-rpm.repo',
+        ensure => present,
+        owner  => root,
+        group  => root,
+        mode   => 755,
+      }
   
-  package { 'protobuf-devel':
-    ensure => present,
-    require => File['/etc/yum.repos.d/mrdocs-protobuf-rpm.repo'],
+      package { 'protobuf-devel':
+        ensure => present,
+        require => File['/etc/yum.repos.d/mrdocs-protobuf-rpm.repo'],
+      }
+    }
   }
 }
-


Mime
View raw message