mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject [mesos] 02/10: Updated Mesos-mini scripts.
Date Sun, 28 Oct 2018 05:33:28 GMT
This is an automated email from the ASF dual-hosted git repository.

jieyu pushed a commit to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit f267be6abf3747d609969f1bd955be3e5e1af2f1
Author: Jie Yu <yujie.jay@gmail.com>
AuthorDate: Sat Oct 27 11:47:06 2018 -0700

    Updated Mesos-mini scripts.
    
    This patch fixed some issues in the Mesos-mini build scripts and adapted
    to the new centos Docker build workflow.
    
    (cherry picked from commit 20ed47b839b2713912b02770a381a9e000b52ea8)
---
 support/mesos-mini/Dockerfile                          |  4 +++-
 support/mesos-mini/build.sh                            | 17 ++++++++---------
 support/mesos-mini/docker_env.sh                       |  2 +-
 support/mesos-mini/mesos/agent_environment             |  1 -
 support/mesos-mini/mesos/modules/uri_disk_profile.json |  2 +-
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/support/mesos-mini/Dockerfile b/support/mesos-mini/Dockerfile
index f317359..94b0836 100644
--- a/support/mesos-mini/Dockerfile
+++ b/support/mesos-mini/Dockerfile
@@ -1,4 +1,6 @@
-FROM mesos/mesos-centos
+ARG BASE_IMAGE_NAME
+
+FROM $BASE_IMAGE_NAME
 
 RUN yum install -y java-1.8.0-openjdk iptables
 
diff --git a/support/mesos-mini/build.sh b/support/mesos-mini/build.sh
index dc9c2bb..eb9d187 100755
--- a/support/mesos-mini/build.sh
+++ b/support/mesos-mini/build.sh
@@ -8,20 +8,19 @@ set -o errexit -o nounset -o pipefail -o verbose
 CURRENT_DIR="$(cd "$(dirname "$0")"; pwd -P)"
 SUPPORT_DIR="${CURRENT_DIR}/.."
 
-DOCKER_IMAGE_MINI=${DOCKER_IMAGE_MINI:-"mesos/mesos-mini"}
-DOCKER_IMAGE_PACKAGING=${DOCKER_IMAGE_PACKAGING:-"mesos/mesos-centos-packaging"}
-DOCKER_IMAGE_DISTRO=${DOCKER_IMAGE_DISTRO:-"mesos/mesos-centos"}
+DOCKER_IMAGE=${DOCKER_IMAGE_MINI:-"mesos/mesos-mini"}
 DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG:-"latest"}
+DOCKER_IMAGE_DISTRO=${DOCKER_IMAGE_DISTRO:-"mesos/mesos-centos"}
 
 if ! [ -x "$(command -v docker)" ]; then
   echo 'Error: docker is not installed.' >&2
   exit 1
 fi
 
-DOCKER_IMAGE_PACKAGING=${DOCKER_IMAGE_PACKAGING} \
-DOCKER_IMAGE_DISTRO=${DOCKER_IMAGE_DISTRO} \
-DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG} \
-"${SUPPORT_DIR}/packaging/centos/build-docker-image.sh"
+DOCKER_IMAGE=${DOCKER_IMAGE_DISTRO} \
+"${SUPPORT_DIR}/packaging/centos/build-docker-centos.sh"
 
-docker tag ${DOCKER_IMAGE_DISTRO}:${DOCKER_IMAGE_TAG} "mesos/mesos-centos"
-docker build -t ${DOCKER_IMAGE_MINI}:${DOCKER_IMAGE_TAG} "${CURRENT_DIR}/"
+docker build \
+  --build-arg "BASE_IMAGE_NAME=${DOCKER_IMAGE_DISTRO}" \
+  -t "${DOCKER_IMAGE}:${DOCKER_IMAGE_TAG}" \
+  "${CURRENT_DIR}/"
diff --git a/support/mesos-mini/docker_env.sh b/support/mesos-mini/docker_env.sh
index ee7db85..8d89dd4 100755
--- a/support/mesos-mini/docker_env.sh
+++ b/support/mesos-mini/docker_env.sh
@@ -2,7 +2,7 @@
 
 set -o errexit -o nounset -o pipefail -o verbose
 
-CGROUP=`grep memory /proc/1/cgroup | cut -d: -f3`
+CGROUP=$(grep memory /proc/1/cgroup | cut -d: -f3)
 
 cat <<EOF > "/etc/docker/env"
 CGROUP_PARENT=${CGROUP}/docker
diff --git a/support/mesos-mini/mesos/agent_environment b/support/mesos-mini/mesos/agent_environment
index c0dccae99..4876728 100644
--- a/support/mesos-mini/mesos/agent_environment
+++ b/support/mesos-mini/mesos/agent_environment
@@ -11,7 +11,6 @@ MESOS_IMAGE_PROVISIONER_BACKEND=copy
 MESOS_NETWORK_CNI_CONFIG_DIR=/etc/mesos/cni
 MESOS_NETWORK_CNI_PLUGINS_DIR=/usr/libexec/mesos/cni/:/usr/libexec/mesos/
 MESOS_SYSTEMD_ENABLE_SUPPORT=false
-MESOS_AGENT_FEATURES=file:///etc/mesos/agent_features.json
 MESOS_RESOURCE_PROVIDER_CONFIG_DIR=/etc/mesos/resource_providers
 MESOS_DISK_PROFILE_ADAPTOR=org_apache_mesos_UriDiskProfileAdaptor
 MESOS_MODULES_DIR=/etc/mesos/modules
diff --git a/support/mesos-mini/mesos/modules/uri_disk_profile.json b/support/mesos-mini/mesos/modules/uri_disk_profile.json
index 53bdded..ab2061a 100644
--- a/support/mesos-mini/mesos/modules/uri_disk_profile.json
+++ b/support/mesos-mini/mesos/modules/uri_disk_profile.json
@@ -1,7 +1,7 @@
 {
   "libraries": [
     {
-      "file": "/usr/lib64/mesos/modules/liburi_disk_profile.so",
+      "file": "/usr/lib64/mesos/modules/liburi_disk_profile_adaptor.so",
       "modules": [
         {
           "name": "org_apache_mesos_UriDiskProfileAdaptor",


Mime
View raw message