Permalink
Browse files

BIGTOP-2922: Drop arch specific bigtop-* images

Use unified Dockerfile for puppet/slaves images on different architectures.
Simplified the build process, and add gradle tasks for them.
Example: ./gradlew -POS=debian-9 -Pprefix=1.2.1 bigtop-puppet
         ./gradlew -POS=debian-9 -Pprefix=1.2.1 bigtop-slaves
This will create proper images with same image name as existings on different
HW architectures. This eases efforts for deploy and test.

Change-Id: I183452324faf54808a4e88981d604d8fe119b51a
Signed-off-by: Jun He <jun.he@linaro.org>
Signed-off-by: Evans Ye <evansye@apache.org>
  • Loading branch information...
Jun He authored and evans-ye committed Nov 14, 2017
1 parent 71aa643 commit f3fc0770422027180665ad90512c9269e4841bba
Showing with 125 additions and 552 deletions.
  1. +18 −6 build.gradle
  2. +32 −3 docker/bigtop-puppet/{fedora-26/Dockerfile → build.sh}
  3. +0 −20 docker/bigtop-puppet/centos-7/Dockerfile
  4. +0 −16 docker/bigtop-puppet/centos-7/build.sh
  5. +0 −20 docker/bigtop-puppet/debian-9-aarch64/Dockerfile
  6. +0 −16 docker/bigtop-puppet/debian-9-aarch64/build.sh
  7. +0 −20 docker/bigtop-puppet/debian-9/Dockerfile
  8. +0 −16 docker/bigtop-puppet/debian-9/build.sh
  9. +0 −19 docker/bigtop-puppet/fedora-26-aarch64/Dockerfile
  10. +0 −16 docker/bigtop-puppet/fedora-26-aarch64/build.sh
  11. +0 −20 docker/bigtop-puppet/fedora-26-ppc64le/Dockerfile
  12. +0 −16 docker/bigtop-puppet/fedora-26-ppc64le/build.sh
  13. +0 −16 docker/bigtop-puppet/fedora-26/build.sh
  14. +0 −20 docker/bigtop-puppet/opensuse-42.3/Dockerfile
  15. +0 −16 docker/bigtop-puppet/opensuse-42.3/build.sh
  16. +0 −20 docker/bigtop-puppet/ubuntu-16.04-aarch64/Dockerfile
  17. +0 −16 docker/bigtop-puppet/ubuntu-16.04-aarch64/build.sh
  18. +0 −20 docker/bigtop-puppet/ubuntu-16.04-ppc64le/Dockerfile
  19. +0 −16 docker/bigtop-puppet/ubuntu-16.04-ppc64le/build.sh
  20. +0 −20 docker/bigtop-puppet/ubuntu-16.04/Dockerfile
  21. +0 −16 docker/bigtop-puppet/ubuntu-16.04/build.sh
  22. +6 −4 docker/bigtop-slaves/{fedora-26/Dockerfile → Dockerfile.template}
  23. +69 −0 docker/bigtop-slaves/build.sh
  24. +0 −22 docker/bigtop-slaves/centos-7/Dockerfile
  25. +0 −23 docker/bigtop-slaves/debian-9-aarch64/Dockerfile
  26. +0 −23 docker/bigtop-slaves/debian-9/Dockerfile
  27. +0 −22 docker/bigtop-slaves/fedora-26-aarch64/Dockerfile
  28. +0 −22 docker/bigtop-slaves/fedora-26-ppc64le/Dockerfile
  29. +0 −22 docker/bigtop-slaves/opensuse-42.3/Dockerfile
  30. +0 −22 docker/bigtop-slaves/ubuntu-16.04-aarch64/Dockerfile
  31. +0 −22 docker/bigtop-slaves/ubuntu-16.04-ppc64le/Dockerfile
  32. +0 −22 docker/bigtop-slaves/ubuntu-16.04/Dockerfile
View
@@ -408,21 +408,33 @@ task "configure-nexus"(dependsOn: tasks.findAll { alltask -> alltask.name.starts
writer.append("</mirrors></settings>")
}
+task "bigtop-puppet"(type:Exec,
+ description: 'Build bigtop/puppet images.\n' +
+ 'Usage:\n $ ./gradlew -POS=[centos-7|fedora-26|debian-9|ubuntu-16.04|opensuse-42.3] -Pprefix=STRING_TO_PREFIX bigtop-puppet\n' +
+ 'Example:\n $ ./gradlew -POS=debian-9 -Pprefix=1.0.0 bigtop-puppet\n' +
+ 'The built image name: bigtop/puppet:1.0.0-debian-9',
+ group: DOCKERBUILD_GROUP) {
+ def _prefix = project.hasProperty("prefix") ? prefix : "trunk"
+ def _OS = project.hasProperty("OS") ? OS : "centos-7"
+ def command = [
+ './build.sh', _prefix + '-' + _OS,
+ ]
+ workingDir './docker/bigtop-puppet'
+ commandLine command
+}
+
task "bigtop-slaves"(type:Exec,
description: 'Build bigtop/slaves images.\n' +
'Usage:\n $ ./gradlew -POS=[centos-7|fedora-26|debian-9|ubuntu-16.04|opensuse-42.3] -Pprefix=STRING_TO_PREFIX bigtop-slaves\n' +
'Example:\n $ ./gradlew -POS=debian-9 -Pprefix=1.0.0 bigtop-slaves\n' +
- 'The built image name: bigtop/slaves:1.0.0-debian-8',
+ 'The built image name: bigtop/slaves:1.0.0-debian-9',
group: DOCKERBUILD_GROUP) {
def _prefix = project.hasProperty("prefix") ? prefix : "trunk"
def _OS = project.hasProperty("OS") ? OS : "centos-7"
def command = [
- 'docker', 'build',
- '-t', 'bigtop/slaves:' + _prefix + '-' + _OS,
- '-f', "docker/bigtop-slaves/" + _OS + "/Dockerfile",
- '.'
+ './build.sh', _prefix + '-' + _OS,
]
- workingDir '.'
+ workingDir './docker/bigtop-slaves'
commandLine command
}
@@ -12,9 +12,38 @@
# 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 fedora:26
-MAINTAINER dev@bigtop.apache.org
-COPY puppetize.sh /tmp/puppetize.sh
+#!/bin/sh
+
+set -ex
+
+if [ $# != 1 ]; then
+ echo "Creates bigtop/puppet image"
+ echo
+ echo "Usage: build.sh <PREIX-OS-VERSION>"
+ echo
+ echo "Example: build.sh trunk-centos-7"
+ echo " : build.sh 1.0.0-centos-7"
+ exit 1
+fi
+PREFIX=$(echo "$1" | cut -d '-' -f 1)
+OS=$(echo "$1" | cut -d '-' -f 2)
+VERSION=$(echo "$1" | cut -d '-' -f 3)
+ARCH=$(uname -m)
+if [ "${ARCH}" != "x86_64" ];then
+ARCH="-${ARCH}"
+else
+ARCH=""
+fi
+
+cp ../../bigtop_toolchain/bin/puppetize.sh .
+cat >Dockerfile <<EOF
+FROM ${OS}:${VERSION}
+MAINTAINER dev@bigtop.apache.org
+COPY puppetize.sh /tmp/puppetize.sh
RUN bash /tmp/puppetize.sh
+EOF
+
+docker build -t bigtop/puppet:${PREFIX}-${OS}-${VERSION}${ARCH} .
+rm -f Dockerfile puppetize.sh
@@ -1,20 +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.
-FROM centos:7
-MAINTAINER evansye@apache.org
-
-COPY puppetize.sh /tmp/puppetize.sh
-
-RUN bash /tmp/puppetize.sh
@@ -1,16 +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.
-cp ../../../bigtop_toolchain/bin/puppetize.sh .
-docker build --pull=true -t bigtop/puppet:trunk-centos-7 .
@@ -1,20 +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.
-FROM arm64v8/debian:9
-MAINTAINER Yuqi Gu <yuqi.gu@arm.com>
-
-COPY puppetize.sh /tmp/puppetize.sh
-
-RUN bash /tmp/puppetize.sh
@@ -1,16 +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.
-cp ../../../bigtop_toolchain/bin/puppetize.sh .
-docker build --pull=true -t bigtop/puppet:trunk-debian-9-aarch64 .
@@ -1,20 +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.
-FROM debian:9
-MAINTAINER dev@bigtop.apache.org
-
-COPY puppetize.sh /tmp/puppetize.sh
-
-RUN bash /tmp/puppetize.sh
@@ -1,16 +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.
-cp ../../../bigtop_toolchain/bin/puppetize.sh .
-docker build --pull=true -t bigtop/puppet:trunk-debian-9 .
@@ -1,19 +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.
-FROM arm64v8/fedora:26
-MAINTAINER Jun He <jun.he@arm.com>
-
-COPY puppetize.sh /tmp/puppetize.sh
-RUN bash /tmp/puppetize.sh
@@ -1,16 +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.
-cp ../../../bigtop_toolchain/bin/puppetize.sh .
-docker build --pull=true -t bigtop/puppet:trunk-fedora-26-aarch64 .
@@ -1,20 +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.
-FROM ppc64le/fedora:26
-MAINTAINER Amir Sanjar
-
-COPY puppetize.sh /tmp/puppetize.sh
-
-RUN bash /tmp/puppetize.sh
@@ -1,16 +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.
-cp ../../../bigtop_toolchain/bin/puppetize.sh .
-docker build --pull=true -t bigtop/puppet:trunk-fedora-26-ppc64le .
@@ -1,16 +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.
-cp ../../../bigtop_toolchain/bin/puppetize.sh .
-docker build --pull=true -t bigtop/puppet:trunk-fedora-26 .
@@ -1,20 +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.
-FROM opensuse:42.3
-MAINTAINER dev@bigtop.apache.org
-
-COPY puppetize.sh /tmp/puppetize.sh
-
-RUN bash /tmp/puppetize.sh
@@ -1,16 +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.
-cp ../../../bigtop_toolchain/bin/puppetize.sh .
-docker build --pull=true -t bigtop/puppet:trunk-opensuse-42.3 .
@@ -1,20 +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.
-FROM arm64v8/ubuntu:16.04
-MAINTAINER Amir Sanjar
-
-COPY puppetize.sh /tmp/puppetize.sh
-
-RUN bash /tmp/puppetize.sh
@@ -1,16 +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.
-cp ../../../bigtop_toolchain/bin/puppetize.sh .
-docker build --pull=true -t bigtop/puppet:trunk-ubuntu-16.04-aarch64 .
@@ -1,20 +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.
-FROM ppc64le/ubuntu:16.04
-MAINTAINER Amir Sanjar
-
-COPY puppetize.sh /tmp/puppetize.sh
-
-RUN bash /tmp/puppetize.sh
Oops, something went wrong.

0 comments on commit f3fc077

Please sign in to comment.