Repository: bigtop
Updated Branches:
  refs/heads/master db3e38a78 -> 9a8b0d78b


BIGTOP-2018: Create a puppetizing script

Signed-off-by: Evans Ye <[email protected]>


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

Branch: refs/heads/master
Commit: 9a8b0d78b2b6e16d7a045c252243d19f8e1bd3d4
Parents: db3e38a
Author: Olaf Flebbe <[email protected]>
Authored: Tue Sep 8 21:25:10 2015 +0200
Committer: Evans Ye <[email protected]>
Committed: Thu Sep 10 09:13:12 2015 +0000

----------------------------------------------------------------------
 bigtop_toolchain/bin/puppetize.sh             | 71 ++++++++++++++++++++++
 docker/bigtop-puppet/centos-6/Dockerfile      |  5 +-
 docker/bigtop-puppet/centos-6/build.sh        |  1 +
 docker/bigtop-puppet/centos-7/Dockerfile      |  5 +-
 docker/bigtop-puppet/centos-7/build.sh        |  1 +
 docker/bigtop-puppet/debian-8/Dockerfile      |  5 +-
 docker/bigtop-puppet/debian-8/build.sh        |  1 +
 docker/bigtop-puppet/fedora-20/Dockerfile     |  5 +-
 docker/bigtop-puppet/fedora-20/build.sh       |  1 +
 docker/bigtop-puppet/opensuse-13.2/Dockerfile |  4 +-
 docker/bigtop-puppet/opensuse-13.2/build.sh   |  1 +
 docker/bigtop-puppet/ubuntu-14.04/Dockerfile  |  5 +-
 docker/bigtop-puppet/ubuntu-14.04/build.sh    |  1 +
 13 files changed, 95 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a8b0d78/bigtop_toolchain/bin/puppetize.sh
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/bin/puppetize.sh 
b/bigtop_toolchain/bin/puppetize.sh
new file mode 100755
index 0000000..84681f9
--- /dev/null
+++ b/bigtop_toolchain/bin/puppetize.sh
@@ -0,0 +1,71 @@
+#!/bin/bash
+# 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.
+
+# Use /etc/os-release to determine Linux Distro
+
+if [ -f /etc/os-release ]; then
+    . /etc/os-release
+else
+    if [ -f /etc/redhat-release ]; then
+       if grep "CentOS release 6" /etc/redhat-release >/dev/null ; then
+           ID=centos
+           VERSION_ID=6
+       fi
+    else
+       echo "Unknown Linux Distribution."
+       exit 1
+    fi
+fi
+
+case ${ID}-${VERSION_ID} in
+    fedora-20*)
+       # Work around issue in fedora:20 docker image
+       yum -y install yum-utils;  yum-config-manager --enable updates-testing
+        rpm -ivh 
https://yum.puppetlabs.com/puppetlabs-release-fedora-20.noarch.rpm
+        yum update
+       yum -y install hostname curl sudo unzip wget puppet
+       ;;
+    ubuntu-14.04)
+       # BIGTOP-2003. A workaround to install newer hiera to get rid of hiera 
1.3.0 bug.
+       apt-get -y install wget
+       wget -O /tmp/puppetlabs-release-trusty.deb 
https://apt.puppetlabs.com/puppetlabs-release-trusty.deb && dpkg -i 
/tmp/puppetlabs-release-trusty.deb
+       rm -f /tmp/puppetlabs-release-trusty.deb
+       apt-get update
+       apt-get -y install curl sudo unzip puppet software-properties-common
+       ;;
+    ubuntu-15*)
+       apt-get update
+       apt-get -y install curl sudo unzip wget puppet 
software-properties-common
+       ;;
+    debian-8*)
+       apt-get update
+       apt-get -y install curl sudo unzip wget puppet
+       ;;
+    opensuse-13.2)
+       zypper --gpg-auto-import-keys install -y curl sudo unzip wget puppet 
suse-release ca-certificates-mozilla net-tools tar
+       ;;
+    centos-6*)
+        rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm
+       yum -y install curl sudo unzip wget puppet tar
+       ;;
+    centos-7*)
+        rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
+       yum -y install hostname curl sudo unzip wget puppet
+       ;;
+    *)
+       echo "Unsupported OS ${ID}-${VERSION_ID}."
+       exit 1
+esac

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a8b0d78/docker/bigtop-puppet/centos-6/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/bigtop-puppet/centos-6/Dockerfile 
b/docker/bigtop-puppet/centos-6/Dockerfile
index 6e845d4..9398303 100644
--- a/docker/bigtop-puppet/centos-6/Dockerfile
+++ b/docker/bigtop-puppet/centos-6/Dockerfile
@@ -15,5 +15,6 @@
 FROM centos:6
 MAINTAINER [email protected]
 
-RUN rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm; \
-    yum -y install curl sudo unzip wget puppet
+COPY puppetize.sh /tmp/puppetize.sh
+
+RUN bash /tmp/puppetize.sh

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a8b0d78/docker/bigtop-puppet/centos-6/build.sh
----------------------------------------------------------------------
diff --git a/docker/bigtop-puppet/centos-6/build.sh 
b/docker/bigtop-puppet/centos-6/build.sh
index 58a169e..daf209f 100755
--- a/docker/bigtop-puppet/centos-6/build.sh
+++ b/docker/bigtop-puppet/centos-6/build.sh
@@ -12,4 +12,5 @@
 # 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.
+cp ../../../bigtop_toolchain/bin/puppetize.sh .
 docker build -t bigtop/puppet:centos-6 .

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a8b0d78/docker/bigtop-puppet/centos-7/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/bigtop-puppet/centos-7/Dockerfile 
b/docker/bigtop-puppet/centos-7/Dockerfile
index a145f4a..bd25fa4 100644
--- a/docker/bigtop-puppet/centos-7/Dockerfile
+++ b/docker/bigtop-puppet/centos-7/Dockerfile
@@ -15,5 +15,6 @@
 FROM centos:7
 MAINTAINER [email protected]
 
-RUN rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm; \
-    yum -y install hostname curl sudo unzip wget puppet
+COPY puppetize.sh /tmp/puppetize.sh
+
+RUN bash /tmp/puppetize.sh

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a8b0d78/docker/bigtop-puppet/centos-7/build.sh
----------------------------------------------------------------------
diff --git a/docker/bigtop-puppet/centos-7/build.sh 
b/docker/bigtop-puppet/centos-7/build.sh
index f373b02..742ad5d 100755
--- a/docker/bigtop-puppet/centos-7/build.sh
+++ b/docker/bigtop-puppet/centos-7/build.sh
@@ -12,4 +12,5 @@
 # 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.
+cp ../../../bigtop_toolchain/bin/puppetize.sh .
 docker build -t bigtop/puppet:centos-7 .

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a8b0d78/docker/bigtop-puppet/debian-8/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/bigtop-puppet/debian-8/Dockerfile 
b/docker/bigtop-puppet/debian-8/Dockerfile
index 5c3d38d..d015ca6 100644
--- a/docker/bigtop-puppet/debian-8/Dockerfile
+++ b/docker/bigtop-puppet/debian-8/Dockerfile
@@ -15,5 +15,6 @@
 FROM debian:8
 MAINTAINER [email protected]
 
-RUN apt-get update; \
-    apt-get -y install curl sudo unzip wget puppet
+COPY puppetize.sh /tmp/puppetize.sh
+
+RUN bash /tmp/puppetize.sh

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a8b0d78/docker/bigtop-puppet/debian-8/build.sh
----------------------------------------------------------------------
diff --git a/docker/bigtop-puppet/debian-8/build.sh 
b/docker/bigtop-puppet/debian-8/build.sh
index 30ce3a4..00666a7 100755
--- a/docker/bigtop-puppet/debian-8/build.sh
+++ b/docker/bigtop-puppet/debian-8/build.sh
@@ -12,4 +12,5 @@
 # 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.
+cp ../../../bigtop_toolchain/bin/puppetize.sh .
 docker build -t bigtop/puppet:debian-8 .

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a8b0d78/docker/bigtop-puppet/fedora-20/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/bigtop-puppet/fedora-20/Dockerfile 
b/docker/bigtop-puppet/fedora-20/Dockerfile
index 90f79a9..271c7ac 100644
--- a/docker/bigtop-puppet/fedora-20/Dockerfile
+++ b/docker/bigtop-puppet/fedora-20/Dockerfile
@@ -15,5 +15,6 @@
 FROM fedora:20
 MAINTAINER [email protected]
 
-RUN rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm; \
-    yum -y install hostname curl sudo unzip wget puppet
+COPY puppetize.sh /tmp/puppetize.sh
+
+RUN bash /tmp/puppetize.sh

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a8b0d78/docker/bigtop-puppet/fedora-20/build.sh
----------------------------------------------------------------------
diff --git a/docker/bigtop-puppet/fedora-20/build.sh 
b/docker/bigtop-puppet/fedora-20/build.sh
index 06b065f..37801fa 100755
--- a/docker/bigtop-puppet/fedora-20/build.sh
+++ b/docker/bigtop-puppet/fedora-20/build.sh
@@ -12,4 +12,5 @@
 # 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.
+cp ../../../bigtop_toolchain/bin/puppetize.sh .
 docker build -t bigtop/puppet:fedora-20 .

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a8b0d78/docker/bigtop-puppet/opensuse-13.2/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/bigtop-puppet/opensuse-13.2/Dockerfile 
b/docker/bigtop-puppet/opensuse-13.2/Dockerfile
index c5dbe25..9c41f63 100644
--- a/docker/bigtop-puppet/opensuse-13.2/Dockerfile
+++ b/docker/bigtop-puppet/opensuse-13.2/Dockerfile
@@ -15,4 +15,6 @@
 FROM opensuse:13.2
 MAINTAINER [email protected]
 
-RUN zypper --gpg-auto-import-keys install -y curl sudo unzip wget puppet 
suse-release ca-certificates-mozilla
+COPY puppetize.sh /tmp/puppetize.sh
+
+RUN bash /tmp/puppetize.sh

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a8b0d78/docker/bigtop-puppet/opensuse-13.2/build.sh
----------------------------------------------------------------------
diff --git a/docker/bigtop-puppet/opensuse-13.2/build.sh 
b/docker/bigtop-puppet/opensuse-13.2/build.sh
index 9be04ce..049c62a 100755
--- a/docker/bigtop-puppet/opensuse-13.2/build.sh
+++ b/docker/bigtop-puppet/opensuse-13.2/build.sh
@@ -12,4 +12,5 @@
 # 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.
+cp ../../../bigtop_toolchain/bin/puppetize.sh .
 docker build -t bigtop/puppet:opensuse-13.2 .

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a8b0d78/docker/bigtop-puppet/ubuntu-14.04/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/bigtop-puppet/ubuntu-14.04/Dockerfile 
b/docker/bigtop-puppet/ubuntu-14.04/Dockerfile
index 2cb725e..dc6db63 100644
--- a/docker/bigtop-puppet/ubuntu-14.04/Dockerfile
+++ b/docker/bigtop-puppet/ubuntu-14.04/Dockerfile
@@ -15,5 +15,6 @@
 FROM ubuntu:14.04
 MAINTAINER [email protected]
 
-RUN apt-get update; \
-    apt-get -y install curl sudo unzip wget puppet
+COPY puppetize.sh /tmp/puppetize.sh
+
+RUN bash /tmp/puppetize.sh

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a8b0d78/docker/bigtop-puppet/ubuntu-14.04/build.sh
----------------------------------------------------------------------
diff --git a/docker/bigtop-puppet/ubuntu-14.04/build.sh 
b/docker/bigtop-puppet/ubuntu-14.04/build.sh
index c8c9ef7..f4df1f7 100755
--- a/docker/bigtop-puppet/ubuntu-14.04/build.sh
+++ b/docker/bigtop-puppet/ubuntu-14.04/build.sh
@@ -12,4 +12,5 @@
 # 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.
+cp ../../../bigtop_toolchain/bin/puppetize.sh .
 docker build -t bigtop/puppet:ubuntu-14.04 .

Reply via email to