aboutsummaryrefslogtreecommitdiff
path: root/bigtop_toolchain
diff options
context:
space:
mode:
authorOlaf Flebbe <of@oflebbe.de>2015-10-14 22:26:00 +0200
committerOlaf Flebbe <of@oflebbe.de>2015-10-21 16:07:45 +0200
commit2bf76ff0fc8d3b9f78d3805f10cf9160be6263ec (patch)
tree17019898760cf887241605883dc35f49c66400e6 /bigtop_toolchain
parentd32c23a548d48ebd7f1aa29b07c8055714ae73a5 (diff)
downloadbigtop-odpi-2bf76ff0fc8d3b9f78d3805f10cf9160be6263ec.tar.gz
BIGTOP-2089: Fix bigtop.sh generation
Diffstat (limited to 'bigtop_toolchain')
-rw-r--r--bigtop_toolchain/files/jenkins.sh.centos22
-rw-r--r--bigtop_toolchain/files/jenkins.sh.debian22
-rw-r--r--bigtop_toolchain/files/jenkins.sh.opensuse22
-rw-r--r--bigtop_toolchain/manifests/env.pp71
-rw-r--r--bigtop_toolchain/manifests/jdk.pp2
-rw-r--r--bigtop_toolchain/templates/jenkins.sh (renamed from bigtop_toolchain/files/jenkins.sh.fedora)4
6 files changed, 21 insertions, 122 deletions
diff --git a/bigtop_toolchain/files/jenkins.sh.centos b/bigtop_toolchain/files/jenkins.sh.centos
deleted file mode 100644
index badb18c6..00000000
--- a/bigtop_toolchain/files/jenkins.sh.centos
+++ /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 JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64
-export ANT_HOME=/usr/local/ant
-export GRADLE_HOME=/usr/local/gradle
-export PATH=$MAVEN_HOME/bin:$ANT_HOME/bin:$FORREST_HOME/bin:$GRADLE_HOME/bin:$PATH
-
-export GRADLE_OPTS="-Dorg.gradle.daemon=true"
diff --git a/bigtop_toolchain/files/jenkins.sh.debian b/bigtop_toolchain/files/jenkins.sh.debian
deleted file mode 100644
index 65217fe7..00000000
--- a/bigtop_toolchain/files/jenkins.sh.debian
+++ /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 JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
-export ANT_HOME=/usr/local/ant
-export GRADLE_HOME=/usr/local/gradle
-export PATH=$MAVEN_HOME/bin:$ANT_HOME/bin:$FORREST_HOME/bin:$GRADLE_HOME/bin:$PATH
-
-export GRADLE_OPTS="-Dorg.gradle.daemon=true"
diff --git a/bigtop_toolchain/files/jenkins.sh.opensuse b/bigtop_toolchain/files/jenkins.sh.opensuse
deleted file mode 100644
index 508cf5db..00000000
--- a/bigtop_toolchain/files/jenkins.sh.opensuse
+++ /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 JAVA_HOME=/usr/lib64/jvm/java-1.7.0-openjdk
-export ANT_HOME=/usr/local/ant
-export GRADLE_HOME=/usr/local/gradle
-export PATH=$MAVEN_HOME/bin:$ANT_HOME/bin:$FORREST_HOME/bin:$GRADLE_HOME/bin:$PATH
-
-export GRADLE_OPTS="-Dorg.gradle.daemon=true"
diff --git a/bigtop_toolchain/manifests/env.pp b/bigtop_toolchain/manifests/env.pp
index 738cd965..b309eca8 100644
--- a/bigtop_toolchain/manifests/env.pp
+++ b/bigtop_toolchain/manifests/env.pp
@@ -14,62 +14,27 @@
# limitations under the License.
class bigtop_toolchain::env {
- case $operatingsystem{
- Ubuntu,Debian: {
- file { '/etc/profile.d/bigtop.sh':
- source => 'puppet:///modules/bigtop_toolchain/jenkins.sh.debian',
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- }
- }
- Fedora: {
- file {'/etc/profile.d/bigtop.sh':
- source => 'puppet:///modules/bigtop_toolchain/jenkins.sh.fedora',
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- }
- }
- CentOS: {
- if $operatingsystemmajrelease >=7 {
- file {'/etc/profile.d/bigtop.sh':
- source => 'puppet:///modules/bigtop_toolchain/jenkins.sh.fedora',
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- }
- } else {
- file {'/etc/profile.d/bigtop.sh':
- source => 'puppet:///modules/bigtop_toolchain/jenkins.sh.centos',
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- }
- }
+ case $architecture {
+ 'amd64' : { $arch= "amd64" }
+ 'ppc64le' : { $arch= "ppc64el" }
+ }
+ case $operatingsystem {
+ 'Ubuntu','Debian': {
+ $javahome = "/usr/lib/jvm/java-1.7.0-openjdk-$arch"
}
- OpenSuSE: {
- file {'/etc/profile.d/bigtop.sh':
- source => 'puppet:///modules/bigtop_toolchain/jenkins.sh.opensuse',
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- }
+ 'Fedora','Centos', 'Amazon': {
+ $javahome = "/usr/lib/jvm/java-1.7.0"
}
- default: {
- file {'/etc/profile.d/bigtop.sh':
- source => 'puppet:///modules/bigtop_toolchain/jenkins.sh.centos',
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- }
+ 'OpenSuSE' : {
+ $javahome = "/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0"
}
}
+ file { '/etc/profile.d/bigtop.sh':
+ content => template('bigtop_toolchain/jenkins.sh'),
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 644,
+ }
}
diff --git a/bigtop_toolchain/manifests/jdk.pp b/bigtop_toolchain/manifests/jdk.pp
index 6c71ec42..730728f9 100644
--- a/bigtop_toolchain/manifests/jdk.pp
+++ b/bigtop_toolchain/manifests/jdk.pp
@@ -47,7 +47,7 @@ class bigtop_toolchain::jdk {
Apt::Ppa['http://ppa.launchpad.net/openjdk-r/ppa/ubuntu'] -> Exec['apt-update']
}
- /(CentOS|Fedora|Amazon|OpenSuSE)/: {
+ /(CentOS|Fedora|Amazon)/: {
package { 'java-1.7.0-openjdk-devel' :
ensure => present
}
diff --git a/bigtop_toolchain/files/jenkins.sh.fedora b/bigtop_toolchain/templates/jenkins.sh
index 6de79815..31e3ecde 100644
--- a/bigtop_toolchain/files/jenkins.sh.fedora
+++ b/bigtop_toolchain/templates/jenkins.sh
@@ -14,9 +14,9 @@
# limitations under the License.
export MAVEN_HOME=/usr/local/maven
-export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk
+export JAVA_HOME=<%= @javahome %>
export ANT_HOME=/usr/local/ant
export GRADLE_HOME=/usr/local/gradle
-export PATH=$MAVEN_HOME/bin:$ANT_HOME/bin:$FORREST_HOME/bin:$GRADLE_HOME/bin:$PATH
+export PATH=$MAVEN_HOME/bin:$ANT_HOME/bin:$GRADLE_HOME/bin:$PATH
export GRADLE_OPTS="-Dorg.gradle.daemon=true"