diff options
author | Alexander Dehn <alexander.dehn@highstreet-technologies.com> | 2022-04-28 16:14:09 +0000 |
---|---|---|
committer | Alexander Dehn <alexander.dehn@highstreet-technologies.com> | 2022-04-28 16:43:53 +0000 |
commit | 9d8ae6d68ea8427052ec45326e22f3a2ea7ed081 (patch) | |
tree | aa20199a924275a7b48eb508001bc143385bc7d7 /csit/scripts/sdnr/docker-compose | |
parent | 427fac36830315046ac811cadde056fabb8c60f9 (diff) |
Refactore SDNC/R robot test suite for K-Release
add improvements SDNC ready state detection
Issue-ID: SDNC-1682
Signed-off-by: Alexander Dehn <alexander.dehn@highstreet-technologies.com>
Change-Id: I6b9829b5187f9c27ff9c2fab6b9a7381ce563b25
Former-commit-id: 83da3b4380d992d5891ed8e35b305358db9af4ff
Diffstat (limited to 'csit/scripts/sdnr/docker-compose')
3 files changed, 27 insertions, 5 deletions
diff --git a/csit/scripts/sdnr/docker-compose/.env b/csit/scripts/sdnr/docker-compose/.env index be8448bc..a2bea441 100644 --- a/csit/scripts/sdnr/docker-compose/.env +++ b/csit/scripts/sdnr/docker-compose/.env @@ -47,4 +47,4 @@ VESCOLLECTOR_IP=172.40.0.90 NTS_NF_SDN_CONTROLLER_IP=127.0.0.1 NTS_NF_SDN_CONTROLLER_PORT=8181 NTS_HOST_IP=172.40.0.1 - +NTS_NF_MOUNT_POINT_ADDRESSING_METHOD=docker-mapping diff --git a/csit/scripts/sdnr/docker-compose/docker-compose-nts-networkfunction.yaml b/csit/scripts/sdnr/docker-compose/docker-compose-nts-networkfunction.yaml index 05ab6a98..a4ae7feb 100644 --- a/csit/scripts/sdnr/docker-compose/docker-compose-nts-networkfunction.yaml +++ b/csit/scripts/sdnr/docker-compose/docker-compose-nts-networkfunction.yaml @@ -1,18 +1,34 @@ +# ******************************************************************************* +# * ============LICENSE_START======================================================================== +# * Copyright (C) 2021 highstreet technologies GmbH Intellectual Property. All rights reserved. +# * ================================================================================================= +# * 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. +# * ============LICENSE_END========================================================================== version: "3" services: nts-function: image: ${NTS_NF_DOCKER_REPOSITORY}${NTS_NF_IMAGE_NAME}:${NTS_NF_IMAGE_TAG} container_name: ${NTS_NF_IMAGE_NAME} stop_grace_period: 5m + cap_add: + - NET_ADMIN ports: - "::${NTS_HOST_NETCONF_SSH_BASE_PORT}-${NTS_HOST_NETCONF_SSH_BASE_PORT_PLUS_SSH_CON}:${EXPOSE_PORT_SSH}-${EXPOSE_PORT_SSH_PLUS_CON}" - "::${NTS_HOST_NETCONF_TLS_BASE_PORT}-${NTS_HOST_NETCONF_TLS_BASE_PORT_PLUS_TLS_CON}:${EXPOSE_PORT_TLS}-${EXPOSE_PORT_TLS_PLUS_CON}" environment: - NTS_NF_STANDALONE_START_FEATURES: "datastore-populate ves-heartbeat ves-pnf-registration web-cut-through manual-notification-generation netconf-call-home" - NTS_NF_MOUNT_POINT_ADDRESSING_METHOD: "host-mapping" + NTS_NF_STANDALONE_START_FEATURES: "datastore-populate ves-heartbeat ves-pnf-registration web-cut-through manual-notification-generation" + NTS_NF_MOUNT_POINT_ADDRESSING_METHOD: ${NTS_NF_MOUNT_POINT_ADDRESSING_METHOD} # mapping types: host-mapping, docker-mapping NTS_HOST_IP: ${NTS_HOST_IP} HOSTNAME: ${NTS_NF_CONTAINER_NAME} - IPv6Enabled: ${IPV6_ENABLED} + IPv6_ENABLED: ${IPV6_ENABLED} SSH_CONNECTIONS: ${NTS_NF_SSH_CONNECTIONS} TLS_CONNECTIONS: ${NTS_NF_TLS_CONNECTIONS} diff --git a/csit/scripts/sdnr/docker-compose/nts-networkfunctions-launch.sh b/csit/scripts/sdnr/docker-compose/nts-networkfunctions-launch.sh index 1f0939c6..3b1e8265 100755 --- a/csit/scripts/sdnr/docker-compose/nts-networkfunctions-launch.sh +++ b/csit/scripts/sdnr/docker-compose/nts-networkfunctions-launch.sh @@ -15,6 +15,7 @@ # * ============LICENSE_END========================================================================== set -o xtrace +set +e csvfile=$1 export DOCKER_ENGINE_VERSION=$(docker version --format '{{.Server.APIVersion}}') @@ -34,7 +35,9 @@ fi firstline=0 # read each line of nts-networkfunctions.csv and put in into the corresponding variables -while IFS=',' read NAME NTS_NF_DOCKER_REPOSITORY NTS_NF_IMAGE_NAME NTS_NF_IMAGE_TAG NTS_NF_IP NTS_HOST_NETCONF_SSH_BASE_PORT NTS_HOST_NETCONF_TLS_BASE_PORT NTS_NF_SSH_CONNECTIONS NTS_NF_TLS_CONNECTIONS; do +while IFS=',' read NAME NTS_NF_DOCKER_REPOSITORY NTS_NF_IMAGE_NAME NTS_NF_IMAGE_TAG NTS_NF_IP NTS_NF_IPv6 \ + NTS_HOST_NETCONF_SSH_BASE_PORT NTS_HOST_NETCONF_TLS_BASE_PORT NTS_NF_SSH_CONNECTIONS NTS_NF_TLS_CONNECTIONS \ + PORT NETCONF_HOST USER PASSWORD NTS_FUNCTION_TYPE; do if [ $firstline -eq 0 ]; then firstline=1 continue @@ -45,9 +48,11 @@ while IFS=',' read NAME NTS_NF_DOCKER_REPOSITORY NTS_NF_IMAGE_NAME NTS_NF_IMAGE_ if [[ -z ${USE_DEFAULT_REPO} ]]; then export NTS_NF_DOCKER_REPOSITORY=$NTS_NF_DOCKER_REPOSITORY fi + export NAME=$NAME export NTS_NF_IMAGE_NAME=$NTS_NF_IMAGE_NAME export NTS_NF_IMAGE_TAG=$NTS_NF_IMAGE_TAG export NTS_NF_IP=$NTS_NF_IP + export NTS_NF_IPv6=$NTS_NF_IPv6 export NTS_HOST_NETCONF_SSH_BASE_PORT=$NTS_HOST_NETCONF_SSH_BASE_PORT export NTS_HOST_NETCONF_TLS_BASE_PORT=$NTS_HOST_NETCONF_TLS_BASE_PORT export NTS_HOST_NETCONF_SSH_BASE_PORT_PLUS_SSH_CON=$(expr $NTS_HOST_NETCONF_SSH_BASE_PORT + $NTS_NF_SSH_CONNECTIONS - 1) @@ -71,3 +76,4 @@ while IFS=',' read NAME NTS_NF_DOCKER_REPOSITORY NTS_NF_IMAGE_NAME NTS_NF_IMAGE_ docker-compose -p ${NAME} --env-file $CUR_PATH/.env -f $CUR_PATH/docker-compose-nts-networkfunction.yaml up -d done <$csvfile docker ps -a --format "table |{{.Names}}\t|{{.Image}}\t|{{printf \"%.70s\" .Ports}}|"| { head -1; sort --field-separator='|' -k 4;} +set -e |