diff options
-rw-r--r-- | bigtop_toolchain/manifests/env.pp | 13 | ||||
-rw-r--r-- | bigtop_toolchain/manifests/jdk.pp | 8 | ||||
-rw-r--r-- | bigtop_toolchain/manifests/protobuf.pp | 12 | ||||
-rw-r--r-- | bigtop_toolchain/manifests/user.pp | 4 | ||||
-rw-r--r-- | docker/bigtop-slaves/fedora-25-ppc64le/Dockerfile | 22 | ||||
-rw-r--r-- | docker/bigtop-slaves/fedora-25/Dockerfile | 22 |
6 files changed, 72 insertions, 9 deletions
diff --git a/bigtop_toolchain/manifests/env.pp b/bigtop_toolchain/manifests/env.pp index 03d1b03d..68cfe424 100644 --- a/bigtop_toolchain/manifests/env.pp +++ b/bigtop_toolchain/manifests/env.pp @@ -14,9 +14,11 @@ # limitations under the License. class bigtop_toolchain::env { - $java_version = '1.7.0' + case "$::operatingsystem $::operatingsystemrelease" { + /(Fedora) 25/: { $java_version = '1.8.0' } + default: { $java_version = '1.7.0' } + } $java = "java-${java_version}" - case $architecture { 'amd64' : { $arch= "amd64" } 'ppc64le' : { $arch= "ppc64el" } @@ -27,7 +29,10 @@ class bigtop_toolchain::env { $javahome = "/usr/lib/jvm/${java}-openjdk-$arch" } 'Fedora','Centos', 'Amazon': { - $javahome = "/usr/lib/jvm/${java}" + case $architecture { + 'amd64' : { $javahome = "/usr/lib/jvm/${java}" } + 'ppc64le' : { $javahome = "/usr/lib/jvm/${java}-openjdk" } + } } 'OpenSuSE' : { $javahome = "/usr/lib64/jvm/${java}-openjdk-${java_version}" @@ -38,7 +43,7 @@ class bigtop_toolchain::env { ensure => present, owner => root, group => root, - mode => 644, + mode => "644", } } diff --git a/bigtop_toolchain/manifests/jdk.pp b/bigtop_toolchain/manifests/jdk.pp index 730728f9..06090ad0 100644 --- a/bigtop_toolchain/manifests/jdk.pp +++ b/bigtop_toolchain/manifests/jdk.pp @@ -14,8 +14,12 @@ # limitations under the License. class bigtop_toolchain::jdk { - - case $operatingsystem{ + case "$::operatingsystem $::operatingsystemrelease" { + /(Fedora) 25/: { + package { 'java-1.8.0-openjdk-devel' : + ensure => present + } + } Debian: { include apt include apt::backports diff --git a/bigtop_toolchain/manifests/protobuf.pp b/bigtop_toolchain/manifests/protobuf.pp index eed426e9..58f010cb 100644 --- a/bigtop_toolchain/manifests/protobuf.pp +++ b/bigtop_toolchain/manifests/protobuf.pp @@ -48,7 +48,15 @@ class bigtop_toolchain::protobuf { default: { case $operatingsystem { /(?i:(centos|fedora|amazon))/: { - yumrepo { "protobuf": + case $architecture { + 'ppc64le' : { + exec { 'install_mrdocs_repo': + command => "/usr/bin/rpm -ivh https://dl.fedoraproject.org/pub/fedora-secondary/releases/22/Everything/ppc64le/os/Packages/p/protobuf-2.5.0-11.fc22.ppc64le.rpm;/usr/bin/rpm -ivh https://dl.fedoraproject.org/pub/fedora-secondary/releases/22/Everything/ppc64le/os/Packages/p/protobuf-compiler-2.5.0-11.fc22.ppc64le.rpm;/usr/bin/rpm -ivh https://dl.fedoraproject.org/pub/fedora-secondary/releases/22/Everything/ppc64le/os/Packages/p/protobuf-devel-2.5.0-11.fc22.ppc64le.rpm", + } + $package_name = 'protobuf-devel' + } + + default: { yumrepo { "protobuf": baseurl => "http://download.opensuse.org/repositories/home:/mrdocs:/protobuf-rpm/CentOS_CentOS-6/", descr => "Bigtop protobuf repo", enabled => 1, @@ -60,6 +68,8 @@ class bigtop_toolchain::protobuf { require => Yumrepo['protobuf'], } $package_name = 'protobuf-devel' + } + } } /(?i:(SLES|opensuse))/:{ exec { 'install_mrdocs_repo': diff --git a/bigtop_toolchain/manifests/user.pp b/bigtop_toolchain/manifests/user.pp index d231b272..901483ef 100644 --- a/bigtop_toolchain/manifests/user.pp +++ b/bigtop_toolchain/manifests/user.pp @@ -33,7 +33,7 @@ class bigtop_toolchain::user { ensure => directory, owner => 'jenkins', group => 'jenkins', - mode => 755, + mode => "755", require => User['jenkins'], } @@ -41,7 +41,7 @@ class bigtop_toolchain::user { ensure => directory, owner => 'jenkins', group => 'jenkins', - mode => 600, + mode => "600", require => User['jenkins'], } } diff --git a/docker/bigtop-slaves/fedora-25-ppc64le/Dockerfile b/docker/bigtop-slaves/fedora-25-ppc64le/Dockerfile new file mode 100644 index 00000000..d799714a --- /dev/null +++ b/docker/bigtop-slaves/fedora-25-ppc64le/Dockerfile @@ -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. +FROM bigtop/puppet:fedora-25-ppc64le +MAINTAINER Amir Sanjar + +COPY bigtop_toolchain /etc/puppet/modules/bigtop_toolchain + +RUN puppet apply -e "include bigtop_toolchain::installer" +COPY . /tmp/bigtop +RUN cd /tmp/bigtop && ./gradlew && cd && rm -rf /tmp/bigtop diff --git a/docker/bigtop-slaves/fedora-25/Dockerfile b/docker/bigtop-slaves/fedora-25/Dockerfile new file mode 100644 index 00000000..e820efb6 --- /dev/null +++ b/docker/bigtop-slaves/fedora-25/Dockerfile @@ -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. +FROM bigtop/puppet:fedora-25 +MAINTAINER Amir Sanjar + +COPY bigtop_toolchain /etc/puppet/modules/bigtop_toolchain + +RUN puppet apply -e "include bigtop_toolchain::installer" +COPY . /tmp/bigtop +RUN cd /tmp/bigtop && ./gradlew && cd && rm -rf /tmp/bigtop |