From commits-return-25195-archive-asf-public=cust-asf.ponee.io@mesos.apache.org Sun Oct 28 06:33:30 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 22B96180789 for ; Sun, 28 Oct 2018 06:33:28 +0100 (CET) Received: (qmail 34601 invoked by uid 500); 28 Oct 2018 05:33:28 -0000 Mailing-List: contact commits-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list commits@mesos.apache.org Received: (qmail 34423 invoked by uid 99); 28 Oct 2018 05:33:28 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Oct 2018 05:33:27 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id EA5B882974; Sun, 28 Oct 2018 05:33:26 +0000 (UTC) Date: Sun, 28 Oct 2018 05:33:28 +0000 To: "commits@mesos.apache.org" Subject: [mesos] 02/10: Updated Mesos-mini scripts. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: jieyu@apache.org In-Reply-To: <154070480650.26650.9276807102578961770@gitbox.apache.org> References: <154070480650.26650.9276807102578961770@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: mesos X-Git-Refname: refs/heads/1.7.x X-Git-Reftype: branch X-Git-Rev: f267be6abf3747d609969f1bd955be3e5e1af2f1 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20181028053326.EA5B882974@gitbox.apache.org> 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 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 < "/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",