diff options
author | Victor Morales <v.morales@samsung.com> | 2020-06-16 18:00:04 -0700 |
---|---|---|
committer | Victor Morales <v.morales@samsung.com> | 2020-06-17 08:15:40 -0700 |
commit | dd79554660e0f81cc8723243235e82e8769490f7 (patch) | |
tree | 3bf0c12317e8cbd59a2ad85cfbc3cfa2284b76b1 /kud/tests/cFW/sink | |
parent | 7b860ae60bf9686b449ab2fe3f18c33944bdd71c (diff) |
Update cFW instruction set
The cFW example has been changed since 1.3.0 version. This commit
reduces the steps to setup and provision this CNF. Its main goal
is to simplify deployment process.
Issue-ID: MULTICLOUD-301
Change-Id: Id96ea4b427aff4c42ecfd43b42fa5d6970c4a6df
Signed-off-by: Victor Morales <v.morales@samsung.com>
Diffstat (limited to 'kud/tests/cFW/sink')
-rw-r--r-- | kud/tests/cFW/sink/Dockerfile | 28 | ||||
-rwxr-xr-x | kud/tests/cFW/sink/init.sh | 17 | ||||
-rw-r--r-- | kud/tests/cFW/sink/wrapper_v_sink_init.sh | 10 |
3 files changed, 26 insertions, 29 deletions
diff --git a/kud/tests/cFW/sink/Dockerfile b/kud/tests/cFW/sink/Dockerfile index 5e3da088..3d934135 100644 --- a/kud/tests/cFW/sink/Dockerfile +++ b/kud/tests/cFW/sink/Dockerfile @@ -1,24 +1,14 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 MAINTAINER Ritu Sood <ritu.sood@intel.com> -ARG HTTP_PROXY=${HTTP_PROXY} -ARG HTTPS_PROXY=${HTTPS_PROXY} +COPY init.sh /opt/init.sh -ENV http_proxy $HTTP_PROXY -ENV https_proxy $HTTPS_PROXY +ENV PROTECTED_NET_GW "192.168.20.100" +ENV UNPROTECTED_NET "192.168.10.0/24" -ENV repo_url "https://nexus.onap.org/content/repositories/staging/org/onap/demo/vnf" -ENV demo_artifacts_version "1.5.0" +RUN apt-get update && apt-get install -y -qq --no-install-recommends \ + iproute2 darkstat +EXPOSE 667 -RUN apt-get update && apt-get install -y -qq wget net-tools unzip - -WORKDIR /opt - -RUN wget "${repo_url}/vfw/vfw-scripts/${demo_artifacts_version}/vfw-scripts-${demo_artifacts_version}.zip" \ - && unzip "vfw-scripts-${demo_artifacts_version}.zip" \ - && chmod +x v_sink_init.sh - -COPY wrapper_v_sink_init.sh . -RUN chmod +x wrapper_v_sink_init.sh - -CMD ["./wrapper_v_sink_init.sh"] +ENTRYPOINT ["/bin/bash"] +CMD ["/opt/init.sh"] diff --git a/kud/tests/cFW/sink/init.sh b/kud/tests/cFW/sink/init.sh new file mode 100755 index 00000000..58c32bdc --- /dev/null +++ b/kud/tests/cFW/sink/init.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2020 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +set -o pipefail +set -o xtrace +set -o errexit +set -o nounset + +ip route add $UNPROTECTED_NET via $PROTECTED_NET_GW +/usr/sbin/darkstat --no-daemon --verbose -i eth0 diff --git a/kud/tests/cFW/sink/wrapper_v_sink_init.sh b/kud/tests/cFW/sink/wrapper_v_sink_init.sh deleted file mode 100644 index e3a3e35e..00000000 --- a/kud/tests/cFW/sink/wrapper_v_sink_init.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -mkdir -p /opt/config/ -echo "$protected_net_gw" > /opt/config/protected_net_gw.txt -echo "$protected_private_net_cidr" > /opt/config/unprotected_net.txt - -# NOTE: this script executes $ route add -net 192.168.10.0 netmask 255.255.255.0 gw 192.168.20.100 -# which results in this error if doesn't have all nics required -> SIOCADDRT: File exists -./v_sink_init.sh -sleep infinity |