Repository: bigtop
Updated Branches:
  refs/heads/master 0b7e287ea -> f981e3c9f


BIGTOP-2760. [Sandbox] Upgrade to Bigtop 1.2


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

Branch: refs/heads/master
Commit: f981e3c9fb1b03c44b9ce9400650ea0e1e380ef8
Parents: 0b7e287
Author: Evans Ye <[email protected]>
Authored: Sun May 7 20:19:37 2017 +0800
Committer: Evans Ye <[email protected]>
Committed: Sat May 13 11:43:45 2017 +0800

----------------------------------------------------------------------
 docker/sandbox/build.sh       |  8 ++++++--
 docker/sandbox/sandbox-env.sh | 24 +++++++++++++++++++++---
 2 files changed, 27 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/f981e3c9/docker/sandbox/build.sh
----------------------------------------------------------------------
diff --git a/docker/sandbox/build.sh b/docker/sandbox/build.sh
index 8676250..7819e81 100755
--- a/docker/sandbox/build.sh
+++ b/docker/sandbox/build.sh
@@ -74,8 +74,12 @@ detect_jdk() {
 }
 
 detect_repo() {
-    OS_WITH_CODE_NAME=${OS/ubuntu-14.04/ubuntu-trusty}
-    
REPO=${REPO:-"http://bigtop-repos.s3.amazonaws.com/releases/${BIGTOP_VERSION}/${OS_WITH_CODE_NAME/-//}/x86_64"}
+    OS_WITH_CODE_NAME=$(OS_TO_CODE_NAME $OS)
+    if [ -z "$OS_WITH_CODE_NAME" ]; then
+        OS_WITH_CODE_NAME=$OS
+    fi
+    OS_WITH_CODE_NAME_SEP_BY_SLASH=${OS_WITH_CODE_NAME/-//}
+    
REPO=${REPO:-"http://bigtop-repos.s3.amazonaws.com/releases/${BIGTOP_VERSION}/${OS_WITH_CODE_NAME_SEP_BY_SLASH}/x86_64"}
 }
 
 image_config_validator() {

http://git-wip-us.apache.org/repos/asf/bigtop/blob/f981e3c9/docker/sandbox/sandbox-env.sh
----------------------------------------------------------------------
diff --git a/docker/sandbox/sandbox-env.sh b/docker/sandbox/sandbox-env.sh
index f6caeef..d765fe3 100644
--- a/docker/sandbox/sandbox-env.sh
+++ b/docker/sandbox/sandbox-env.sh
@@ -15,10 +15,28 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-RPMS=(centos-6 centos-7 fedora-20)
-DEBS=(debian-8 ubuntu-14.04)
+BIGTOP_VERSION=1.2.0
+# REPO="YOUR CUSTOM REPO"
 
+RPMS=( \
+    centos-6 \
+    centos-7 \
+    fedora-25 \
+    opensuse-42.1 \
+)
 RPM_JDK=java-1.8.0-openjdk-devel.x86_64
+
+DEBS=( \
+    debian-8 \
+    ubuntu-14.04 \
+    ubuntu-16.04 \
+)
 DEB_JDK=openjdk-8-jdk
 
-BIGTOP_VERSION=1.2.0
+OS_TO_CODE_NAME() {
+    case $1 in
+        "ubuntu-14.04") OS_WITH_CODE_NAME="ubuntu-trusty" ;;
+        "ubuntu-16.04") OS_WITH_CODE_NAME="ubuntu-xenial" ;;
+    esac
+    echo $OS_WITH_CODE_NAME
+}

Reply via email to