From patchwork Sat Oct 26 01:45:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: aginwala aginwala X-Patchwork-Id: 1184539 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pCXwDp+X"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 470P2n1W3hz9sPV for ; Sat, 26 Oct 2019 12:46:08 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id C2164EDC; Sat, 26 Oct 2019 01:46:03 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 1153ADD1 for ; Sat, 26 Oct 2019 01:46:02 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 0BC7287B for ; Sat, 26 Oct 2019 01:45:59 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id v4so2846737pff.6 for ; Fri, 25 Oct 2019 18:45:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=//3vZEdQyigAJPzFm0L0NodLXwYiXLJoKI/cGLF7NXA=; b=pCXwDp+XGQGQaNPMyrue6+5SAsyxQPt6cDJ4sBL3PrS6iKH+1HKklSNt9vG5zXwC57 Ut1w+oCgncdxDhQf2J1b/kmv60zsMo+ADJ18aDUf7/TdJlrQR5DmBrvQ3F85ibAR1F5R b1fV89VzCSjOEeYDb2mYrFt70x4/Yg6Ct+XKfnMvF7nWJ7S3RGfhfaLLJR6hmWth8LeA bysDzVEss8afeRNlYbT0szelAMAkwxgU7/66TjxcYbUdnARrpUNIKyfm19Y3kNG6ZSyw ZBcs36YeRu2ExM9qesP0cfvb58bO7vVz7ZFZdoLcHgqp54QeLuKLyEPDy2pqIoc6GWdw +Xtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=//3vZEdQyigAJPzFm0L0NodLXwYiXLJoKI/cGLF7NXA=; b=mZpPuhPZPJOuKAfHFrZqZGR/P8orD1Mrowo7OomDeOrh9IOPSzhFqUrsm+Ebc626rS aY9jtnRkLxrW+ROFuPdp4zcH4Q+BuAMbJc+hbpjnpucW/2DV+lO3AJC4nYis9GSsxecZ Ai4j9flkwz8mgdJjWoBAMDnmF/povaU6doYRg478AH9do81G9ta6ts+LybAhFk1rNmGH 4fYwYaaCy1rCj95T+OErJsSTxO4n79wOpUzP5T2nIgZQFbcI/fPmHCJyGC1mJ1Vrhdb3 Slpd7MlVxyeyzHxCyRFdVNiNpcc4FXxnSsMK1QYpG8iYYzSK03Gx1BR2PG2Wcn98L3gl n+6A== X-Gm-Message-State: APjAAAVPqwK0xeg7b2/K2YtPCDI96B5YHTbr7EAikgIFNgYK9n89cob0 o7FIULVUchHv3TjQHsN+od0lEAy8 X-Google-Smtp-Source: APXvYqxfdIxraBKauThjurWI5+Rf/GqVc4Wh2zFgb3/ZP4Gqk6H3zXNkpRf7MAe45T6Ya7C87QC5+Q== X-Received: by 2002:a17:90a:bd10:: with SMTP id y16mr7553809pjr.111.1572054359202; Fri, 25 Oct 2019 18:45:59 -0700 (PDT) Received: from LM-SJC-11015761.corp.ebay.com ([216.113.160.77]) by smtp.gmail.com with ESMTPSA id x70sm4803869pfd.132.2019.10.25.18.45.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Oct 2019 18:45:58 -0700 (PDT) From: amginwal@gmail.com To: dev@openvswitch.org Date: Fri, 25 Oct 2019 18:45:53 -0700 Message-Id: <20191026014555.4993-1-amginwal@gmail.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Aliasgar Ginwala Subject: [ovs-dev] [PATCH ovn 1/3] Skip using with-linux for ovn container build scripts X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Aliasgar Ginwala Signed-off-by: Aliasgar Ginwala --- utilities/docker/Makefile | 2 -- utilities/docker/debian/Dockerfile | 3 +-- utilities/docker/debian/build.sh | 13 +++++-------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/utilities/docker/Makefile b/utilities/docker/Makefile index e2b2c2a17..304723f8f 100644 --- a/utilities/docker/Makefile +++ b/utilities/docker/Makefile @@ -1,6 +1,5 @@ #export OVN_BRANCH=master #export OVN_VERSION=2.12 -#export KERNEL_VERSION=4.15.0-54-generic #export DISTRO=debian #export GITHUB_SRC=https://github.com/ovn-org/ovn.git #export DOCKER_REPO=ovn-org/ovn @@ -14,7 +13,6 @@ tag = ${OVN_VERSION}_${KERNEL_VERSION} build: ;docker build -t ${REPO}:${tag} --build-arg DISTRO=${DISTRO} \ --build-arg OVN_BRANCH=${OVN_BRANCH} \ ---build-arg KERNEL_VERSION=${KERNEL_VERSION} \ --build-arg GITHUB_SRC=${GITHUB_SRC} -f ${DISTRO}/Dockerfile . .PHONY: build diff --git a/utilities/docker/debian/Dockerfile b/utilities/docker/debian/Dockerfile index 30504480d..9c35f6b16 100644 --- a/utilities/docker/debian/Dockerfile +++ b/utilities/docker/debian/Dockerfile @@ -2,12 +2,11 @@ FROM ubuntu:16.04 MAINTAINER "Aliasgar Ginwala" ARG OVN_BRANCH -ARG KERNEL_VERSION ARG GITHUB_SRC ARG DISTRO copy $DISTRO/build.sh /build.sh -RUN /build.sh $KERNEL_VERSION $OVN_BRANCH $GITHUB_SRC +RUN /build.sh $OVN_BRANCH $GITHUB_SRC COPY ovn_default_nb_port /etc/ovn/ovn_default_nb_port COPY ovn_default_sb_port /etc/ovn/ovn_default_sb_port diff --git a/utilities/docker/debian/build.sh b/utilities/docker/debian/build.sh index 981ff796e..8e492bf76 100755 --- a/utilities/docker/debian/build.sh +++ b/utilities/docker/debian/build.sh @@ -12,18 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -KERNEL_VERSION=$1 -OVN_BRANCH=$2 -GITHUB_SRC=$3 +OVN_BRANCH=$1 +GITHUB_SRC=$2 # Install deps -linux="linux-image-$KERNEL_VERSION linux-headers-$KERNEL_VERSION" build_deps="apt-utils libelf-dev build-essential libssl-dev python3 \ python3-six wget gdb autoconf libtool git automake bzip2 debhelper \ dh-autoreconf openssl" apt-get update -apt-get install -y ${linux} ${build_deps} +apt-get install -y ${build_deps} # get ovs source always from master as its needed as dependency mkdir /build; cd /build @@ -35,7 +33,7 @@ mkdir _gcc; ./boot.sh cd _gcc ../configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \ ---with-linux=/lib/modules/$KERNEL_VERSION/build --enable-ssl +--enable-ssl cd ..; make -C _gcc install; cd .. @@ -46,8 +44,7 @@ cd ovn # build and install ./boot.sh ./configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \ ---with-linux=/lib/modules/$KERNEL_VERSION/build --enable-ssl \ ---with-ovs-source=/build/ovs/ --with-ovs-build=/build/ovs/_gcc +--enable-ssl --with-ovs-source=/build/ovs/ --with-ovs-build=/build/ovs/_gcc make -j8; make install # remove deps to make the container light weight. From patchwork Sat Oct 26 01:45:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: aginwala aginwala X-Patchwork-Id: 1184541 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QF/4AkMs"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 470P3y5hhPz9sPV for ; Sat, 26 Oct 2019 12:47:10 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 2B0EDEDA; Sat, 26 Oct 2019 01:46:06 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 9F29EDD1 for ; Sat, 26 Oct 2019 01:46:02 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E88D787E for ; Sat, 26 Oct 2019 01:46:00 +0000 (UTC) Received: by mail-pg1-f172.google.com with SMTP id k20so2778215pgi.1 for ; Fri, 25 Oct 2019 18:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qG3riic5ehxrZtAnkOvFgVDLTDKFcqsgTFN60u3IuZQ=; b=QF/4AkMsKca2OhszPeCer43PnvHEr8odZ6J1QtOp+1rJhPvQCpBS4SDvG3gnsVdia+ 9OPNjB/nRRC3T0jE3TKJ7OO4BVkmMfnm9AG8b1Y8UDtS0MQdozD9hvaVO+R/Gb1caWiy zUxnT+EaTeA0hAR5CtbELPK0jGP3ZgoQW5TNi4tXcMHJMIVbPieenMBho8Vxj4k0eWQb +GeDQONAjwM5BELpI5j2fXYOrYNafQYOSj0MUw/GyHbywOp47CaeBvfTr5vcsPId3nN8 yMJfYgbMs1KjBvHi2aAeQIlCAkhjfW/HPm884yr8SsWSzaFg6cPOPmBfCcezzxPOk7xP G97A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qG3riic5ehxrZtAnkOvFgVDLTDKFcqsgTFN60u3IuZQ=; b=BLExDgJPW76w93bjBWDsjUsdbBP95NjsfFqGQ7Ym+B7sHubyoM0qDd5Xraq2hw+5Ss 6Obre6RZDIx8JiAAdPxlDhgV+HHTiv/cONzlwwsFHsHzzv2td95ZQIWZmbf+AEOn7ROs aTBVlFCsT4VfN3HbyMM0Csj045QgPhzobHz558x7TrW1Ok/KkNrthSDfGdoMcYEpesbT YLgiUOlkCwnRS0S31tHH2ORoRLmwFnEQd3g1ZaEb0WSfZr2FDrBfDsc2KPET1Na3uQTk L8Ww3U7aB3aCxjr3uuNwSYTTBpvtpLx8/xOwLaDtyYMyFoiTHdRD0WyQh2Tj7spnpgZO 6PPw== X-Gm-Message-State: APjAAAUy/63DF17zqM45E7xHv3IpQLJENBXIghtFDW2x4bSjqStq0DcX dF0e++Dqq7887e+TVjzhykgjTmuI X-Google-Smtp-Source: APXvYqzEsgqv01ofmU40S0ZSNg1xEUv8C/XRRUN8zht0Lda7qYXNTDLyUF7q3U8t46KRm0dtLaxthg== X-Received: by 2002:a63:81:: with SMTP id 123mr8057637pga.47.1572054360146; Fri, 25 Oct 2019 18:46:00 -0700 (PDT) Received: from LM-SJC-11015761.corp.ebay.com ([216.113.160.77]) by smtp.gmail.com with ESMTPSA id x70sm4803869pfd.132.2019.10.25.18.45.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Oct 2019 18:45:59 -0700 (PDT) From: amginwal@gmail.com To: dev@openvswitch.org Date: Fri, 25 Oct 2019 18:45:54 -0700 Message-Id: <20191026014555.4993-2-amginwal@gmail.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20191026014555.4993-1-amginwal@gmail.com> References: <20191026014555.4993-1-amginwal@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Aliasgar Ginwala Subject: [ovs-dev] [PATCH ovn 2/3] Refactor install scripts for ovn container X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Aliasgar Ginwala Signed-off-by: Aliasgar Ginwala --- utilities/automake.mk | 3 ++- utilities/docker/Makefile | 2 +- utilities/docker/debian/Dockerfile | 1 + utilities/docker/debian/build.sh | 24 +----------------- utilities/docker/install_ovn.sh | 40 ++++++++++++++++++++++++++++++ 5 files changed, 45 insertions(+), 25 deletions(-) create mode 100755 utilities/docker/install_ovn.sh diff --git a/utilities/automake.mk b/utilities/automake.mk index 197cc7011..0b7e38dc0 100644 --- a/utilities/automake.mk +++ b/utilities/automake.mk @@ -39,7 +39,8 @@ EXTRA_DIST += \ utilities/docker/ovn_default_sb_port \ utilities/docker/ovn_default_northd_host \ utilities/docker/debian/Dockerfile \ - utilities/docker/debian/build.sh + utilities/docker/debian/build.sh \ + utilities/docker/install_ovn.sh CLEANFILES += \ utilities/ovn-ctl.8 \ diff --git a/utilities/docker/Makefile b/utilities/docker/Makefile index 304723f8f..57e95651c 100644 --- a/utilities/docker/Makefile +++ b/utilities/docker/Makefile @@ -9,7 +9,7 @@ # make push REPO = ${DOCKER_REPO} -tag = ${OVN_VERSION}_${KERNEL_VERSION} +tag = ${OVN_VERSION}_${DISTRO}_${OVN_BRANCH} build: ;docker build -t ${REPO}:${tag} --build-arg DISTRO=${DISTRO} \ --build-arg OVN_BRANCH=${OVN_BRANCH} \ diff --git a/utilities/docker/debian/Dockerfile b/utilities/docker/debian/Dockerfile index 9c35f6b16..366ad6d4f 100644 --- a/utilities/docker/debian/Dockerfile +++ b/utilities/docker/debian/Dockerfile @@ -6,6 +6,7 @@ ARG GITHUB_SRC ARG DISTRO copy $DISTRO/build.sh /build.sh +copy install_ovn.sh /install_ovn.sh RUN /build.sh $OVN_BRANCH $GITHUB_SRC COPY ovn_default_nb_port /etc/ovn/ovn_default_nb_port diff --git a/utilities/docker/debian/build.sh b/utilities/docker/debian/build.sh index 8e492bf76..0d0c8cfd8 100755 --- a/utilities/docker/debian/build.sh +++ b/utilities/docker/debian/build.sh @@ -23,29 +23,7 @@ dh-autoreconf openssl" apt-get update apt-get install -y ${build_deps} -# get ovs source always from master as its needed as dependency -mkdir /build; cd /build -git clone --depth 1 -b master https://github.com/openvswitch/ovs.git -cd ovs; -mkdir _gcc; - -# build and install -./boot.sh -cd _gcc -../configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \ ---enable-ssl -cd ..; make -C _gcc install; cd .. - - -# get ovn source -git clone --depth 1 -b $OVN_BRANCH $GITHUB_SRC -cd ovn - -# build and install -./boot.sh -./configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \ ---enable-ssl --with-ovs-source=/build/ovs/ --with-ovs-build=/build/ovs/_gcc -make -j8; make install +./install_ovn.sh $OVN_BRANCH $GITHUB_SRC # remove deps to make the container light weight. apt-get remove --purge -y ${build_deps} diff --git a/utilities/docker/install_ovn.sh b/utilities/docker/install_ovn.sh new file mode 100755 index 000000000..55c189aae --- /dev/null +++ b/utilities/docker/install_ovn.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# +# Licensed 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. + +OVN_BRANCH=$1 +GITHUB_SRC=$2 + +# get ovs source always from master as its needed as dependency +mkdir /build; cd /build +git clone --depth 1 -b master https://github.com/openvswitch/ovs.git +cd ovs; +mkdir _gcc; + +# build and install +./boot.sh +cd _gcc +../configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \ +--enable-ssl +cd ..; make -C _gcc install; cd .. + + +# get ovn source +git clone --depth 1 -b $OVN_BRANCH $GITHUB_SRC +cd ovn + +# build and install +./boot.sh +./configure --localstatedir="/var" --sysconfdir="/etc" --prefix="/usr" \ +--enable-ssl --with-ovs-source=/build/ovs/ --with-ovs-build=/build/ovs/_gcc +make -j8; make install From patchwork Sat Oct 26 01:45:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: aginwala aginwala X-Patchwork-Id: 1184540 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="AOIstHz/"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 470P3L4wm0z9sPV for ; Sat, 26 Oct 2019 12:46:38 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 1BD90ED9; Sat, 26 Oct 2019 01:46:05 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 604E0DD1 for ; Sat, 26 Oct 2019 01:46:02 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id DD74989E for ; Sat, 26 Oct 2019 01:46:01 +0000 (UTC) Received: by mail-pf1-f181.google.com with SMTP id x127so2845480pfb.7 for ; Fri, 25 Oct 2019 18:46:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A3P0QrNBOrXb8FJUdRjY7JGZJv+kBmkZrLsuGwRjzmU=; b=AOIstHz/ovD0XzLmhR/8Js3JRXIWXAedk3A8O8Lh9KfDUJaXwsZd1kOw2nKS49YybJ jB4xrOh8VdQfIgcRi52Ki/UgCJ9OmlCuj4DuFUhDqTyFNVV1aS2PpVfrofcgr+ZEhMfi 30Z4tTbvTv1kVA2zE2X20zLUqEdc+OcDXRDpOOpyFPT5oQsA07/iZ1gYCeTDFYnGS4/H 2ImJvWgG2cU2aQkao/VjOi8BMOyPC3h6T2AVafvnYjKmv1wnE+uE/eUHH29WvWzPOzUo 1ECJoeJ8nuXKXs16Z2fqQMkxy5XYgubDbKfs4Q5fjfIlvVBLFHZ8LgXHQ8kZesAkJbQu ZR1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=A3P0QrNBOrXb8FJUdRjY7JGZJv+kBmkZrLsuGwRjzmU=; b=OM901trs2jfESWYuRpcMGoTCJQolmqhTy6WwDHCbojQ9r57vWFUwKcMprbwiziME0m GeAbVY9NllDs2f3wq5ZhGzPE9mO42+pCfzAJbhIQHdnbNHuuKOWYcW6G9RgPfMCpttle bc4UsHlrBtPNZZoBtIVg/DBJ+6pHaLy8wnMonv86K96dH8krt9arOR0xJOPS/skOO35l FE6un/Iji5FDegvMRCMWrzUuOtm5uFLWaPFgKteBceBxV/N17e89N9A90PlW4ify5qSf TX0OQFAQvqD0Gfb/71shRinnRP+ut76IFzMIfe7K0d0sRzZgZ31aox55JBQTmclbDwzU RYVw== X-Gm-Message-State: APjAAAWNCBQUhPi9fRV+oc3VVVKADrVTFjDy0ETaFjvQ1zenIxH2QFOI IyXZZ73XO/NfP+YQ4CNrf5XKfNfE X-Google-Smtp-Source: APXvYqwTjnRKF3TgcfGbmAvKL5okd+lhLlsxsAJixo5C86qIveB5G4XpYBX+FT0D7gHTgwbqBg25Ug== X-Received: by 2002:aa7:8583:: with SMTP id w3mr8125970pfn.182.1572054361072; Fri, 25 Oct 2019 18:46:01 -0700 (PDT) Received: from LM-SJC-11015761.corp.ebay.com ([216.113.160.77]) by smtp.gmail.com with ESMTPSA id x70sm4803869pfd.132.2019.10.25.18.46.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Oct 2019 18:46:00 -0700 (PDT) From: amginwal@gmail.com To: dev@openvswitch.org Date: Fri, 25 Oct 2019 18:45:55 -0700 Message-Id: <20191026014555.4993-3-amginwal@gmail.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20191026014555.4993-1-amginwal@gmail.com> References: <20191026014555.4993-1-amginwal@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Aliasgar Ginwala Subject: [ovs-dev] [PATCH ovn 3/3] rhel support for ovn container X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Aliasgar Ginwala Current code only had support for starting ovn in ubuntu containers. This patch adds supprt for rhel using centos7 as a base image Signed-off-by: Aliasgar Ginwala --- Documentation/intro/install/general.rst | 2 +- utilities/automake.mk | 2 ++ utilities/docker/rhel/Dockerfile | 20 +++++++++++++ utilities/docker/rhel/build.sh | 38 +++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100755 utilities/docker/rhel/Dockerfile create mode 100755 utilities/docker/rhel/build.sh diff --git a/Documentation/intro/install/general.rst b/Documentation/intro/install/general.rst index cdd78f7f7..52bfd7d18 100644 --- a/Documentation/intro/install/general.rst +++ b/Documentation/intro/install/general.rst @@ -471,7 +471,7 @@ Start OVN containers using unix socket:: User can use any other base image for debian, e.g. u14.04, etc. - RHEL based docker build support needs to be added. + RHEL based docker support is now added with centos7 as a base image. Starting OVN host service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/utilities/automake.mk b/utilities/automake.mk index 0b7e38dc0..73018ca66 100644 --- a/utilities/automake.mk +++ b/utilities/automake.mk @@ -40,6 +40,8 @@ EXTRA_DIST += \ utilities/docker/ovn_default_northd_host \ utilities/docker/debian/Dockerfile \ utilities/docker/debian/build.sh \ + utilities/docker/rhel/Dockerfile \ + utilities/docker/rhel/build.sh \ utilities/docker/install_ovn.sh CLEANFILES += \ diff --git a/utilities/docker/rhel/Dockerfile b/utilities/docker/rhel/Dockerfile new file mode 100755 index 000000000..e4f5cfece --- /dev/null +++ b/utilities/docker/rhel/Dockerfile @@ -0,0 +1,20 @@ +FROM centos:7 +MAINTAINER "Aliasgar Ginwala" + +ARG OVN_BRANCH +ARG GITHUB_SRC +ARG DISTRO + +copy $DISTRO/build.sh /build.sh +copy install_ovn.sh /install_ovn.sh +RUN /build.sh $OVN_BRANCH $GITHUB_SRC + +COPY ovn_default_nb_port /etc/ovn/ovn_default_nb_port +COPY ovn_default_sb_port /etc/ovn/ovn_default_sb_port +COPY ovn_default_northd_host /etc/ovn/ovn_default_northd_host + +COPY start-ovn /bin/start-ovn +VOLUME ["/var/log/openvswitch", \ +"/var/lib/openvswitch", "/var/run/openvswitch", "/etc/openvswitch", \ +"/var/log/ovn", "/var/lib/ovn", "/var/run/ovn", "/etc/ovn"] +ENTRYPOINT ["start-ovn"] diff --git a/utilities/docker/rhel/build.sh b/utilities/docker/rhel/build.sh new file mode 100755 index 000000000..eb6f85a4a --- /dev/null +++ b/utilities/docker/rhel/build.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# +# Licensed 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. + +OVN_BRANCH=$1 +GITHUB_SRC=$2 + +# Install deps +build_deps="rpm-build yum-utils yum-builddep automake autoconf openssl-devel \ +epel-release python3 gdb libtool git bzip2 perl-core zlib-devel openssl git \ +libtool" + +yum update -y +yum install @'Development Tools' ${build_deps} -y +pip3 install six + +./install_ovn.sh $OVN_BRANCH $GITHUB_SRC + +# remove unused packages to make the container light weight. +for i in $(package-cleanup --leaves --all); + do yum remove -y $i; yum autoremove -y; +done +yum remove ${build_deps} -y +cd ..; rm -rf ovs; rm -rf ovn + +# Install basic utils +basic_utils="vim-minimal.x86_64 net-tools.x86_64 uuid.x86_64 iproute.x86_64" +yum install -y ${basic_utils}