| arg list |
|--|
-| `remote|remote-remove docker|kube --env-file <environment-filename> [release] [auto-clean] [--stop-at-error] [--ricsim-prefix <prefix> ] [--use-local-image <app-nam>+] [--use-snapshot-image <app-nam>+] [--use-staging-image <app-nam>+] [--use-release-image <app-nam>+]` |
+| `remote|remote-remove docker|kube --env-file <environment-filename> [release] [auto-clean] [--stop-at-error] [--ricsim-prefix <prefix> ] [--use-local-image <app-nam>+] [--use-snapshot-image <app-nam>+] [--use-staging-image <app-nam>+] [--use-release-image <app-nam>+] [--image-repo <repo-address]` |
| parameter | description |
|-|-|
| `--use-snapshot-image` | The script will use images from the nexus snapshot repo for the supplied apps, space separated list of app short names |
| `--use-staging-image` | The script will use images from the nexus staging repo for the supplied apps, space separated list of app short names |
| `--use-release-image` | The script will use images from the nexus release repo for the supplied apps, space separated list of app short names |
+| `--image-repo` | Url to image repo. Only required in when running in multi-node kube cluster, otherwise optional. All used images will be re-tagged and pushed to this repo
+
| `help` | Print this info along with the test script description and the list of app short names supported |
## Function: setup_testenvironment
# <pull-policy-original> Shall be used for images that does not allow overriding
# Both var may contain: 'remote', 'remote-remove' or 'local'
__PA_imagepull() {
- __check_and_pull_image $1 "$POLICY_AGENT_DISPLAY_NAME" $POLICY_AGENT_APP_NAME $POLICY_AGENT_IMAGE
+ __check_and_pull_image $1 "$POLICY_AGENT_DISPLAY_NAME" $POLICY_AGENT_APP_NAME POLICY_AGENT_IMAGE
}
# Build image (only for simulator or interfaces stubs owned by the test environment)
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__PA_image_data() {
echo -e "$POLICY_AGENT_DISPLAY_NAME\t$(docker images --format $1 $POLICY_AGENT_IMAGE)" >> $2
+ if [ ! -z "$POLICY_AGENT_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $POLICY_AGENT_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
httpproxy="NOPROXY"
if [ $RUNMODE == "KUBE" ]; then
- if [ ! -z "$CLUSTER_KUBE_PROXY_NODEPORT" ]; then
- httpproxy="http://localhost:$CLUSTER_KUBE_PROXY_NODEPORT"
+ if [ ! -z "$KUBE_PROXY_PATH" ]; then
+ httpproxy=$KUBE_PROXY_PATH
fi
fi
httpproxy="NOPROXY"
if [ $RUNMODE == "KUBE" ]; then
- if [ ! -z "$CLUSTER_KUBE_PROXY_NODEPORT" ]; then
- httpproxy="http://localhost:$CLUSTER_KUBE_PROXY_NODEPORT"
+ if [ ! -z "$KUBE_PROXY_PATH" ]; then
+ httpproxy=$KUBE_PROXY_PATH
fi
fi
echo " (${BASH_LINENO[0]}) - ${TIMESTAMP}: ${FUNCNAME[0]}" $@ >> $HTTPLOG
proxyflag=""
if [ $RUNMODE == "KUBE" ]; then
- if [ ! -z "$CLUSTER_KUBE_PROXY_NODEPORT" ]; then
- proxyflag=" --proxy http://localhost:$CLUSTER_KUBE_PROXY_NODEPORT"
+ if [ ! -z "$KUBE_PROXY_PATH" ]; then
+ proxyflag=" --proxy $KUBE_PROXY_PATH"
fi
fi
paramError=0
# <pull-policy-original> Shall be used for images that does not allow overriding
# Both var may contain: 'remote', 'remote-remove' or 'local'
__CONSUL_imagepull() {
- __check_and_pull_image $2 "$CONSUL_DISPLAY_NAME" $CONSUL_APP_NAME $CONSUL_IMAGE
+ __check_and_pull_image $2 "$CONSUL_DISPLAY_NAME" $CONSUL_APP_NAME CONSUL_IMAGE
}
# Pull image from remote repo or use locally built image
# <pull-policy-original> Shall be used for images that does not allow overriding
# Both var may contain: 'remote', 'remote-remove' or 'local'
__CBS_imagepull() {
- __check_and_pull_image $2 "$CBS_DISPLAY_NAME" $CBS_APP_NAME $CBS_IMAGE
+ __check_and_pull_image $2 "$CBS_DISPLAY_NAME" $CBS_APP_NAME CBS_IMAGE
}
# Build image (only for simulator or interfaces stubs owned by the test environment)
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__CONSUL_image_data() {
echo -e "$CONSUL_DISPLAY_NAME\t$(docker images --format $1 $CONSUL_IMAGE)" >> $2
+ if [ ! -z "$CONSUL_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $CONSUL_IMAGE_SOURCE)" >> $2
+ fi
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__CBS_image_data() {
echo -e "$CBS_DISPLAY_NAME\t$(docker images --format $1 $CBS_IMAGE)" >> $2
+ if [ ! -z "$CBS_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $CBS_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
# <pull-policy-original> Shall be used for images that does not allow overriding
# Both var may contain: 'remote', 'remote-remove' or 'local'
__CP_imagepull() {
- __check_and_pull_image $1 "$CONTROL_PANEL_DISPLAY_NAME" $CONTROL_PANEL_APP_NAME $CONTROL_PANEL_IMAGE
+ __check_and_pull_image $1 "$CONTROL_PANEL_DISPLAY_NAME" $CONTROL_PANEL_APP_NAME CONTROL_PANEL_IMAGE
}
# Build image (only for simulator or interfaces stubs owned by the test environment)
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__CP_image_data() {
echo -e "$CONTROL_PANEL_DISPLAY_NAME\t$(docker images --format $1 $CONTROL_PANEL_IMAGE)" >> $2
+ if [ ! -z "$CONTROL_PANEL_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $CONTROL_PANEL_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
export CONTROL_PANEL_CONFIG_MOUNT_PATH
export CONTROL_PANEL_CONFIG_FILE
export CP_CONFIG_CONFIGMAP_NAME=$CONTROL_PANEL_APP_NAME"-config"
+ export CP_PROXY_CONFIGMAP_NAME=$CONTROL_PANEL_APP_NAME"-proxy"
- export NGW_DOMAIN_NAME=$NRT_GATEWAY_APP_NAME.$KUBE_NONRTRIC_NAMESPACE
+ export NGW_DOMAIN_NAME=$NRT_GATEWAY_APP_NAME.$KUBE_NONRTRIC_NAMESPACE.svc.cluster.local # suffix needed for nginx name resolution
export NRT_GATEWAY_EXTERNAL_PORT
+ export CP_NGINX_RESOLVER=$CONTROL_PANEL_NGINX_KUBE_RESOLVER
+
#Check if nonrtric namespace exists, if not create it
__kube_create_namespace $KUBE_NONRTRIC_NAMESPACE
export CONTROL_PANEL_DISPLAY_NAME
export NGW_DOMAIN_NAME=$NRT_GATEWAY_APP_NAME
+ export CP_NGINX_RESOLVER=$CONTROL_PANEL_NGINX_DOCKER_RESOLVER
+
dest_file=$SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_HOST_MNT_DIR/$CONTROL_PANEL_CONFIG_FILE
- envsubst '${NGW_DOMAIN_NAME},${NRT_GATEWAY_EXTERNAL_PORT},${POLICY_AGENT_EXTERNAL_SECURE_PORT},${ECS_EXTERNAL_SECURE_PORT},${POLICY_AGENT_DOMAIN_NAME},${ECS_DOMAIN_NAME}' < $1 > $dest_file
- #envsubst < $1 > $dest_file
+ envsubst '${NGW_DOMAIN_NAME},${CP_NGINX_RESOLVER},${NRT_GATEWAY_EXTERNAL_PORT},${POLICY_AGENT_EXTERNAL_SECURE_PORT},${ECS_EXTERNAL_SECURE_PORT},${POLICY_AGENT_DOMAIN_NAME},${ECS_DOMAIN_NAME}' < $1 > $dest_file
__start_container $CONTROL_PANEL_COMPOSE_DIR "" NODOCKERARGS 1 $CONTROL_PANEL_APP_NAME
# <pull-policy-original> Shall be used for images that does not allow overriding
# Both var may contain: 'remote', 'remote-remove' or 'local'
__SDNC_imagepull() {
- __check_and_pull_image $1 "$SDNC_DISPLAY_NAME" $SDNC_APP_NAME $SDNC_A1_CONTROLLER_IMAGE
- __check_and_pull_image $2 "SDNC DB" $SDNC_APP_NAME $SDNC_DB_IMAGE
+ __check_and_pull_image $1 "$SDNC_DISPLAY_NAME" $SDNC_APP_NAME SDNC_A1_CONTROLLER_IMAGE
+ __check_and_pull_image $2 "SDNC DB" $SDNC_APP_NAME SDNC_DB_IMAGE
}
# Build image (only for simulator or interfaces stubs owned by the test environment)
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__SDNC_image_data() {
echo -e "$SDNC_DISPLAY_NAME\t$(docker images --format $1 $SDNC_A1_CONTROLLER_IMAGE)" >> $2
+ if [ ! -z "$SDNC_A1_CONTROLLER_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $SDNC_A1_CONTROLLER_IMAGE_SOURCE)" >> $2
+ fi
echo -e "SDNC DB\t$(docker images --format $1 $SDNC_DB_IMAGE)" >> $2
+ if [ ! -z "$SDNC_DB_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $SDNC_DB_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
echo " FILE ($payload) : $json" >> $HTTPLOG
proxyflag=""
if [ $RUNMODE == "KUBE" ]; then
- if [ ! -z "$CLUSTER_KUBE_PROXY_NODEPORT" ]; then
- proxyflag=" --proxy http://localhost:$CLUSTER_KUBE_PROXY_NODEPORT"
+ if [ ! -z "$KUBE_PROXY_PATH" ]; then
+ proxyflag=" --proxy KUBE_PROXY_PATH"
fi
fi
curlString="curl -skw %{http_code} $proxyflag -X POST $SDNC_API_PATH$1 -H accept:application/json -H Content-Type:application/json --data-binary @$payload"
echo " Building CR - $CR_DISPLAY_NAME - image: $CR_IMAGE"
docker build --build-arg NEXUS_PROXY_REPO=$NEXUS_PROXY_REPO -t $CR_IMAGE . &> .dockererr
if [ $? -eq 0 ]; then
- echo -e $GREEN" Build Ok"$EGREEN
+ echo -e $GREEN" Build Ok"$EGREEN
+ __retag_and_push_image CR_IMAGE
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
else
- echo -e $RED" Build Failed"$ERED
+ echo -e $RED" Build Failed"$ERED
((RES_CONF_FAIL++))
cat .dockererr
echo -e $RED"Exiting...."$ERED
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__CR_image_data() {
echo -e "$CR_DISPLAY_NAME\t$(docker images --format $1 $CR_IMAGE)" >> $2
+ if [ ! -z "$CR_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $CR_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
# <pull-policy-original> Shall be used for images that does not allow overriding
# Both var may contain: 'remote', 'remote-remove' or 'local'
__ECS_imagepull() {
- __check_and_pull_image $1 "$ECS_DISPLAY_NAME" $ECS_APP_NAME $ECS_IMAGE
+ __check_and_pull_image $1 "$ECS_DISPLAY_NAME" $ECS_APP_NAME ECS_IMAGE
}
# Build image (only for simulator or interfaces stubs owned by the test environment)
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__ECS_image_data() {
echo -e "$ECS_DISPLAY_NAME\t$(docker images --format $1 $ECS_IMAGE)" >> $2
+ if [ ! -z "$ECS_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $ECS_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
# <pull-policy-original> Shall be used for images that does not allow overriding
# Both var may contain: 'remote', 'remote-remove' or 'local'
__NGW_imagepull() {
- __check_and_pull_image $1 "$NRT_GATEWAY_DISPLAY_NAME" $NRT_GATEWAY_APP_NAME $NRT_GATEWAY_IMAGE
+ __check_and_pull_image $1 "$NRT_GATEWAY_DISPLAY_NAME" $NRT_GATEWAY_APP_NAME NRT_GATEWAY_IMAGE
}
# Build image (only for simulator or interfaces stubs owned by the test environment)
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__NGW_image_data() {
echo -e "$NRT_GATEWAY_DISPLAY_NAME\t$(docker images --format $1 $NRT_GATEWAY_IMAGE)" >> $2
+ if [ ! -z "$NRT_GATEWAY_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $NRT_GATEWAY_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
# <pull-policy-original> Shall be used for images that does not allow overriding
# Both var may contain: 'remote', 'remote-remove' or 'local'
__HTTPPROXY_imagepull() {
- __check_and_pull_image $2 "$HTTP_PROXY_DISPLAY_NAME" $HTTP_PROXY_APP_NAME $HTTP_PROXY_IMAGE
+ __check_and_pull_image $2 "$HTTP_PROXY_DISPLAY_NAME" $HTTP_PROXY_APP_NAME HTTP_PROXY_IMAGE
}
# Build image (only for simulator or interfaces stubs owned by the test environment)
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__HTTPPROXY_image_data() {
echo -e "$HTTP_PROXY_DISPLAY_NAME\t$(docker images --format $1 $HTTP_PROXY_IMAGE)" >> $2
+ if [ ! -z "$HTTP_PROXY_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $HTTP_PROXY_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
# <pull-policy-original> Shall be used for images that does not allow overriding
# Both var may contain: 'remote', 'remote-remove' or 'local'
__KUBEPROXY_imagepull() {
- __check_and_pull_image $2 "$KUBE_PROXY_DISPLAY_NAME" $KUBE_PROXY_APP_NAME $KUBE_PROXY_IMAGE
+ __check_and_pull_image $2 "$KUBE_PROXY_DISPLAY_NAME" $KUBE_PROXY_APP_NAME KUBE_PROXY_IMAGE
}
# Build image (only for simulator or interfaces stubs owned by the test environment)
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__KUBEPROXY_image_data() {
echo -e "$KUBE_PROXY_DISPLAY_NAME\t$(docker images --format $1 $KUBE_PROXY_IMAGE)" >> $2
+ if [ ! -z "$KUBE_PROXY_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $KUBE_PROXY_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
## Access to Kube Http Proxy
# Host name may be changed if app started by kube
# Direct access from script
-KUBE_PROXY_HTTPX="http"
-KUBE_PROXY_HOST_NAME=$LOCALHOST_NAME
-KUBE_PROXY_PATH=$KUBE_PROXY_HTTPX"://"$KUBE_PROXY_HOST_NAME":"$KUBE_PROXY_WEB_EXTERNAL_PORT
+#BMXX KUBE_PROXY_HTTPX="http"
+#BMXX KUBE_PROXY_HOST_NAME=$LOCALHOST_NAME
+#BMXX KUBE_PROXY_PATH=$KUBE_PROXY_HTTPX"://"$KUBE_PROXY_HOST_NAME":"$KUBE_PROXY_WEB_EXTERNAL_PORT
#########################
### Http Proxy functions
fi
echo " Retrieving host and ports for service..."
- KUBE_PROXY_HOST_NAME=$(__kube_get_service_host $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE)
- KUBE_PROXY_WEB_EXTERNAL_PORT=$(__kube_get_service_port $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE "web")
- KUBE_PROXY_EXTERNAL_PORT=$(__kube_get_service_port $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE "http")
-
-
- minikube status > /dev/null
- if [ $? -eq 0 ]; then
- echo -e $GREEN" Running minikube inside a kubernetes cluster. No proxy needed for the test script to access services"$EGREEN
- export CLUSTER_KUBE_PROXY_NODEPORT=""
- else
- echo -e $YELLOW" Running outside the kubernetes cluster. Proxy is setup to access services from the test script"$EYELLOW
- export CLUSTER_KUBE_PROXY_NODEPORT=$(__kube_get_service_nodeport $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE "http")
+
+ CLUSTER_KUBE_PROXY="http"
+ CLUSTER_KUBE_PROXY_HOST=$(kubectl config view -o jsonpath={.clusters[0].cluster.server} | awk -F[/:] '{print $4}')
+ if [[ $CLUSTER_KUBE_PROXY_HOST == *"kubernetes"* ]]; then
+ echo -e $YELLOW" The cluster host is: $CLUSTER_KUBE_PROXY_HOST. The proxy (mitmproxy) used by test script requires an ip so the ip is assumed and set to 127.0.0.1"
+ CLUSTER_KUBE_PROXY_HOST="127.0.0.1"
fi
+ CLUSTER_KUBE_PROXY_NODEPORT=$(__kube_get_service_nodeport $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE "http") # port for proxy access
+ KUBE_PROXY_WEB_NODEPORT=$(__kube_get_service_nodeport $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE "web") # web port, only for alive test
+
+ KUBE_PROXY_WEB_PATH=$CLUSTER_KUBE_PROXY"://"$CLUSTER_KUBE_PROXY_HOST":"$KUBE_PROXY_WEB_NODEPORT
- KUBE_PROXY_PATH=$KUBE_PROXY_HTTPX"://"$KUBE_PROXY_HOST_NAME":"$KUBE_PROXY_WEB_EXTERNAL_PORT
- KUBE_PROXY_CONFIG_PORT=$KUBE_PROXY_EXTERNAL_PORT
- KUBE_PROXY_CONFIG_HOST_NAME=$KUBE_PROXY_APP_NAME"."$KUBE_SIM_NAMESPACE
+ echo " Cluster ip/host, cluster http nodeport cluster web nodeport: $CLUSTER_KUBE_PROXY_HOST $CLUSTER_KUBE_PROXY_NODEPORT $KUBE_PROXY_WEB_NODEPORT"
- echo " Host IP, http port, cluster http nodeport (may be empty): $KUBE_PROXY_HOST_NAME $KUBE_PROXY_WEB_EXTERNAL_PORT $CLUSTER_KUBE_PROXY_NODEPORT"
+ export KUBE_PROXY_PATH= # Make sure proxy is empty when checking the proxy itself
+ __check_service_start $KUBE_PROXY_APP_NAME $KUBE_PROXY_WEB_PATH$KUBE_PROXY_ALIVE_URL
- __check_service_start $KUBE_PROXY_APP_NAME $KUBE_PROXY_PATH$KUBE_PROXY_ALIVE_URL
+ # Set proxy for all subsequent calls for all services etc
+ export KUBE_PROXY_PATH=$CLUSTER_KUBE_PROXY"://"$CLUSTER_KUBE_PROXY_HOST":"$CLUSTER_KUBE_PROXY_NODEPORT
else
echo $YELLOW" Kube http proxy not needed in docker test. App not started"
# <pull-policy-original> Shall be used for images that does not allow overriding
# Both var may contain: 'remote', 'remote-remove' or 'local'
__DMAAPMR_imagepull() {
- __check_and_pull_image $2 "DMAAP Message Router" $MR_DMAAP_APP_NAME $ONAP_DMAAPMR_IMAGE
- __check_and_pull_image $2 "ZooKeeper" $MR_ZOOKEEPER_APP_NAME $ONAP_ZOOKEEPER_IMAGE
- __check_and_pull_image $2 "Kafka" $MR_KAFKA_APP_NAME $ONAP_KAFKA_IMAGE
+ __check_and_pull_image $2 "DMAAP Message Router" $MR_DMAAP_APP_NAME ONAP_DMAAPMR_IMAGE
+ __check_and_pull_image $2 "ZooKeeper" $MR_ZOOKEEPER_APP_NAME ONAP_ZOOKEEPER_IMAGE
+ __check_and_pull_image $2 "Kafka" $MR_KAFKA_APP_NAME ONAP_KAFKA_IMAGE
}
# Build image (only for simulator or interfaces stubs owned by the test environment)
echo " Building MR - $MR_STUB_DISPLAY_NAME - image: $MRSTUB_IMAGE"
docker build --build-arg NEXUS_PROXY_REPO=$NEXUS_PROXY_REPO -t $MRSTUB_IMAGE . &> .dockererr
if [ $? -eq 0 ]; then
- echo -e $GREEN" Build Ok"$EGREEN
+ echo -e $GREEN" Build Ok"$EGREEN
+ __retag_and_push_image MRSTUB_IMAGE
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
else
- echo -e $RED" Build Failed"$ERED
+ echo -e $RED" Build Failed"$ERED
((RES_CONF_FAIL++))
cat .dockererr
echo -e $RED"Exiting...."$ERED
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__MR_image_data() {
echo -e "$MR_STUB_DISPLAY_NAME\t$(docker images --format $1 $MRSTUB_IMAGE)" >> $2
+ if [ ! -z "$MRSTUB_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $MRSTUB_IMAGE_SOURCE)" >> $2
+ fi
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__DMAAPMR_image_data() {
echo -e "DMAAP Message Router\t$(docker images --format $1 $ONAP_DMAAPMR_IMAGE)" >> $2
+ if [ ! -z "$ONAP_DMAAPMR_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $ONAP_DMAAPMR_IMAGE_SOURCE)" >> $2
+ fi
echo -e "ZooKeeper\t$(docker images --format $1 $ONAP_ZOOKEEPER_IMAGE)" >> $2
+ if [ ! -z "$ONAP_ZOOKEEPER_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $ONAP_ZOOKEEPER_IMAGE_SOURCE)" >> $2
+ fi
echo -e "Kafka\t$(docker images --format $1 $ONAP_KAFKA_IMAGE)" >> $2
+ if [ ! -z "$ONAP_KAFKA_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $ONAP_KAFKA_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
echo " Building PRODSTUB - $PROD_STUB_DISPLAY_NAME - image: $PROD_STUB_IMAGE"
docker build --build-arg NEXUS_PROXY_REPO=$NEXUS_PROXY_REPO -t $PROD_STUB_IMAGE . &> .dockererr
if [ $? -eq 0 ]; then
- echo -e $GREEN" Build Ok"$EGREEN
+ echo -e $GREEN" Build Ok"$EGREEN
+ __retag_and_push_image PROD_STUB_IMAGE
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
else
- echo -e $RED" Build Failed"$ERED
+ echo -e $RED" Build Failed"$ERED
((RES_CONF_FAIL++))
cat .dockererr
echo -e $RED"Exiting...."$ERED
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__PRODSTUB_image_data() {
echo -e "$PROD_STUB_DISPLAY_NAME\t$(docker images --format $1 $PROD_STUB_IMAGE)" >> $2
+ if [ ! -z "$PROD_STUB_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $PROD_STUB_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
echo "(${BASH_LINENO[0]}) - ${TIMESTAMP}: ${FUNCNAME[0]}" $@ >> $HTTPLOG
proxyflag=""
if [ $RUNMODE == "KUBE" ]; then
- if [ ! -z "$CLUSTER_KUBE_PROXY_NODEPORT" ]; then
- proxyflag=" --proxy http://localhost:$CLUSTER_KUBE_PROXY_NODEPORT"
+ if [ ! -z "$KUBE_PROXY_PATH" ]; then
+ proxyflag=" --proxy $KUBE_PROXY_PATH"
fi
fi
echo " CMD: $3 $proxyflag" >> $HTTPLOG
# <pull-policy-original> Shall be used for images that does not allow overriding
# Both arg var may contain: 'remote', 'remote-remove' or 'local'
__RC_imagepull() {
- __check_and_pull_image $1 "$c" $RAPP_CAT_APP_NAME $RAPP_CAT_IMAGE
+ __check_and_pull_image $1 "$c" $RAPP_CAT_APP_NAME RAPP_CAT_IMAGE
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__RC_image_data() {
echo -e "$RAPP_CAT_DISPLAY_NAME\t$(docker images --format $1 $RAPP_CAT_IMAGE)" >> $2
+ if [ ! -z "$RAPP_CAT_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $RAPP_CAT_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
# <pull-policy-original> Shall be used for images that does not allow overriding
# Both var may contain: 'remote', 'remote-remove' or 'local'
__RICSIM_imagepull() {
- __check_and_pull_image $1 "$RIC_SIM_DISPLAY_NAME" $RIC_SIM_PREFIX"_"$RIC_SIM_BASE $RIC_SIM_IMAGE
+ __check_and_pull_image $1 "$RIC_SIM_DISPLAY_NAME" $RIC_SIM_PREFIX"_"$RIC_SIM_BASE RIC_SIM_IMAGE
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__RICSIM_image_data() {
echo -e "$RIC_SIM_DISPLAY_NAME\t$(docker images --format $1 $RIC_SIM_IMAGE)" >> $2
+ if [ ! -z "$RIC_SIM_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $RIC_SIM_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
echo ${FUNCNAME[1]} "line: "${BASH_LINENO[1]} >> $HTTPLOG
proxyflag=""
if [ $RUNMODE == "KUBE" ]; then
- if [ ! -z "$CLUSTER_KUBE_PROXY_NODEPORT" ]; then
- proxyflag=" --proxy http://localhost:$CLUSTER_KUBE_PROXY_NODEPORT"
+ if [ ! -z "$KUBE_PROXY_PATH" ]; then
+ proxyflag=" --proxy $KUBE_PROXY_PATH"
fi
fi
echo " CMD: $2 $proxyflag" >> $HTTPLOG
KUBE_PROXY_INTERNAL_PORT=8080 # Kube Http Proxy container internal port (container -> container)
KUBE_PROXY_WEB_EXTERNAL_PORT=8731 # Kube Http Proxy container external port (host -> container)
KUBE_PROXY_WEB_INTERNAL_PORT=8081 # Kube Http Proxy container internal port (container -> container)
-KUBE_PROXY_CONFIG_PORT=0 # Port number for proxy config, will be set if proxy is started
-KUBE_PROXY_CONFIG_HOST_NAME="" # Proxy host, will be set if proxy is started
+KUBE_PROXY_PATH="" # Proxy url path, will be set if proxy is started
KUBE_PROXY_ALIVE_URL="/" # Base path for alive check
KUBE_PROXY_COMPOSE_DIR="kubeproxy" # Dir in simulator_group for docker-compose
KUBE_PROXY_INTERNAL_PORT=8080 # Kube Http Proxy container internal port (container -> container)
KUBE_PROXY_WEB_EXTERNAL_PORT=8731 # Kube Http Proxy container external port (host -> container)
KUBE_PROXY_WEB_INTERNAL_PORT=8081 # Kube Http Proxy container internal port (container -> container)
-KUBE_PROXY_CONFIG_PORT=0 # Port number for proxy config, will be set if proxy is started
-KUBE_PROXY_CONFIG_HOST_NAME="" # Proxy host, will be set if proxy is started
+KUBE_PROXY_PATH="" # Proxy url path, will be set if proxy is started
KUBE_PROXY_ALIVE_URL="/" # Base path for alive check
KUBE_PROXY_COMPOSE_DIR="kubeproxy" # Dir in simulator_group for docker-compose
KUBE_PROXY_INTERNAL_PORT=8080 # Kube Http Proxy container internal port (container -> container)
KUBE_PROXY_WEB_EXTERNAL_PORT=8731 # Kube Http Proxy container external port (host -> container)
KUBE_PROXY_WEB_INTERNAL_PORT=8081 # Kube Http Proxy container internal port (container -> container)
-KUBE_PROXY_CONFIG_PORT=0 # Port number for proxy config, will be set if proxy is started
-KUBE_PROXY_CONFIG_HOST_NAME="" # Proxy host, will be set if proxy is started
+KUBE_PROXY_PATH="" # Proxy url path, will be set if proxy is started
KUBE_PROXY_ALIVE_URL="/" # Base path for alive check
KUBE_PROXY_COMPOSE_DIR="kubeproxy" # Dir in simulator_group for docker-compose
POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container
POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel
POLICY_AGENT_CONFIG_KEY="policy-agent" # Key for consul config
-POLICY_AGENT_PKG_NAME="org.oransc.policyagent" # Java base package name
+POLICY_AGENT_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name
POLICY_AGENT_ACTUATOR="/actuator/loggers/$POLICY_AGENT_PKG_NAME" # Url for trace/debug
POLICY_AGENT_ALIVE_URL="$PMS_API_PREFIX/v2/status" # Base path for alive check
POLICY_AGENT_COMPOSE_DIR="policy_agent" # Dir in simulator_group for docker-compose
CONTROL_PANEL_CONFIG_FILE=nginx.conf # Config file name
CONTROL_PANEL_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host
CONTROL_PANEL_CONFIG_MOUNT_PATH=/etc/nginx # Container internal path for config
+CONTROL_PANEL_NGINX_KUBE_RESOLVER="kube-dns.kube-system.svc.cluster.local valid=5s" #nginx resolver for kube
+CONTROL_PANEL_NGINX_DOCKER_RESOLVER="127.0.0.11" # nginx resolver for docker
-NRT_GATEWAY_APP_NAME="nonrtricgateway" # Name of the Gateway container
+NRT_GATEWAY_APP_NAME="nonrtricgateway" # Name of the Gateway container
NRT_GATEWAY_DISPLAY_NAME="NonRT-RIC Gateway"
NRT_GATEWAY_EXTERNAL_PORT=9090 # Gateway container external port (host -> container)
NRT_GATEWAY_INTERNAL_PORT=9090 # Gateway container internal port (container -> container)
KUBE_PROXY_INTERNAL_PORT=8080 # Kube Http Proxy container internal port (container -> container)
KUBE_PROXY_WEB_EXTERNAL_PORT=8731 # Kube Http Proxy container external port (host -> container)
KUBE_PROXY_WEB_INTERNAL_PORT=8081 # Kube Http Proxy container internal port (container -> container)
-KUBE_PROXY_CONFIG_PORT=0 # Port number for proxy config, will be set if proxy is started
-KUBE_PROXY_CONFIG_HOST_NAME="" # Proxy host, will be set if proxy is started
+KUBE_PROXY_PATH="" # Proxy url path, will be set if proxy is started
KUBE_PROXY_ALIVE_URL="/" # Base path for alive check
KUBE_PROXY_COMPOSE_DIR="kubeproxy" # Dir in simulator_group for docker-compose
__print_args() {
echo "Args: remote|remote-remove docker|kube --env-file <environment-filename> [release] [auto-clean] [--stop-at-error] "
echo " [--ricsim-prefix <prefix> ] [--use-local-image <app-nam>+] [--use-snapshot-image <app-nam>+]"
- echo " [--use-staging-image <app-nam>+] [--use-release-image <app-nam>+]"
+ echo " [--use-staging-image <app-nam>+] [--use-release-image <app-nam>+] [--image-repo <repo-address]"
}
if [ $# -eq 1 ] && [ "$1" == "help" ]; then
echo "--use-snapshot-image - The script will use images from the nexus snapshot repo for the supplied apps, space separated list of app short names"
echo "--use-staging-image - The script will use images from the nexus staging repo for the supplied apps, space separated list of app short names"
echo "--use-release-image - The script will use images from the nexus release repo for the supplied apps, space separated list of app short names"
+ echo "--image-repo - Url to image repo. Only required in when running in multi-node kube cluster, otherwise optional. All used images will be re-tagged and pushed to this repo"
echo ""
echo "List of app short names supported: "$APP_SHORT_NAMES
exit 0
TIMER_MEASUREMENTS=".timer_measurement.txt"
echo -e "Activity \t Duration" > $TIMER_MEASUREMENTS
+# If this is set, all used images will be re-tagged and pushed to this repo before any
+IMAGE_REPO_ADR=""
+
echo "-------------------------------------------------------------------------------------------------"
echo "----------------------------------- Test case: "$ATC
fi
fi
fi
+ if [ $paramerror -eq 0 ]; then
+ if [ "$1" == "--image-repo" ]; then
+ shift;
+ IMAGE_REPO_ADR=$1
+ if [ -z "$1" ]; then
+ paramerror=1
+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="No image repo url found for : '--image-repo'"
+ fi
+ else
+ echo "Option set - Image repo url: "$1
+ shift;
+ foundparm=0
+ fi
+ fi
+ fi
done
echo ""
# Check if image env var is set and if so export the env var with image to use (used by docker compose files)
# arg: <app-short-name> <target-variable-name> <image-variable-name> <image-tag-variable-name> <tag-suffix> <image name>
__check_and_create_image_var() {
+
if [ $# -ne 6 ]; then
echo "Expected arg: <app-short-name> <target-variable-name> <image-variable-name> <image-tag-variable-name> <tag-suffix> <image name>"
((IMAGE_ERR++))
tmptag=$4"_"$5
tag="${!tmptag}"
+ optional_image_repo_target=""
+
if [ -z $image ]; then
__check_ignore_image $1
if [ $? -eq 0 ]; then
echo ""
tmp=$tmp"<no-image>\t"
else
+
+ optional_image_repo_target=$image
+
#Add repo depending on image type
if [ "$5" == "REMOTE_RELEASE" ]; then
image=$NEXUS_RELEASE_REPO$image
tmp=$tmp"\t"$5
echo -e "$tmp" >> $image_list_file
#Export the env var
- export "${2}"=$image":"$tag
+ export "${2}"=$image":"$tag #Note, this var may be set to the value of the target value below in __check_and_pull_image
+ if [ ! -z "$IMAGE_REPO_ADR" ]; then
+ export "${2}_SOURCE"=$image":"$tag #Var to keep the actual source image
+ export "${2}_TARGET"=$IMAGE_REPO_ADR"/"$optional_image_repo_target":"$tag #Create image + tag for optional image repo - pushed later if needed
+ else
+ export "${2}_SOURCE"=""
+ export "${2}_TARGET"=""
+ fi
}
# Check if app uses image included in this test run
return 0
}
+# Function to re-tag and image and push to another image repo
+__retag_and_push_image() {
+ if [ ! -z "$IMAGE_REPO_ADR" ]; then
+ source_image="${!1}"
+ trg_var_name=$1_"TARGET" # This var is created in func __check_and_create_image_var
+ target_image="${!trg_var_name}"
+ echo -ne " Attempt to re-tag image to: ${BOLD}${target_image}${EBOLD}${SAMELINE}"
+ tmp=$(docker image tag $source_image ${target_image} )
+ if [ $? -ne 0 ]; then
+ docker stop $tmp &> ./tmp/.dockererr
+ ((IMAGE_ERR++))
+ echo ""
+ echo -e " Attempt to re-tag image to: ${BOLD}${target_image}${EBOLD} - ${RED}Failed${ERED}"
+ cat ./tmp/.dockererr
+ return 1
+ else
+ echo -e " Attempt to re-tag image to: ${BOLD}${target_image}${EBOLD} - ${GREEN}OK${EGREEN}"
+ fi
+ echo -ne " Attempt to push re-tagged image: ${BOLD}${target_image}${EBOLD}${SAMELINE}"
+ tmp=$(docker push ${target_image} )
+ if [ $? -ne 0 ]; then
+ docker stop $tmp &> ./tmp/.dockererr
+ ((IMAGE_ERR++))
+ echo ""
+ echo -e " Attempt to push re-tagged image: ${BOLD}${target_image}${EBOLD} - ${RED}Failed${ERED}"
+ cat ./tmp/.dockererr
+ return 1
+ else
+ echo -e " Attempt to push re-tagged image: ${BOLD}${target_image}${EBOLD} - ${GREEN}OK${EGREEN}"
+ fi
+ export "${1}"=$target_image
+ fi
+ return 0
+}
+
#Function to check if image exist and stop+remove the container+pull new images as needed
-#args <script-start-arg> <descriptive-image-name> <container-base-name> <image-with-tag>
+#args <script-start-arg> <descriptive-image-name> <container-base-name> <image-with-tag-var-name>
__check_and_pull_image() {
- echo -e " Checking $BOLD$2$EBOLD container(s) with basename: $BOLD$3$EBOLD using image: $BOLD$4$EBOLD"
+ source_image="${!4}"
+
+ echo -e " Checking $BOLD$2$EBOLD container(s) with basename: $BOLD$3$EBOLD using image: $BOLD$source_image$EBOLD"
format_string="\"{{.Repository}}\\t{{.Tag}}\\t{{.CreatedSince}}\\t{{.Size}}\""
- tmp_im=$(docker images --format $format_string ${4})
+ tmp_im=$(docker images --format $format_string $source_image)
if [ $1 == "local" ]; then
if [ -z "$tmp_im" ]; then
- echo -e " "$2" (local image): \033[1m"$4"\033[0m $RED does not exist in local registry, need to be built (or manually pulled)"$ERED
+ echo -e " "$2" (local image): \033[1m"$source_image"\033[0m $RED does not exist in local registry, need to be built (or manually pulled)"$ERED
((IMAGE_ERR++))
return 1
else
- echo -e " "$2" (local image): \033[1m"$4"\033[0m "$GREEN"OK"$EGREEN
+ echo -e " "$2" (local image): \033[1m"$source_image"\033[0m "$GREEN"OK"$EGREEN
fi
elif [ $1 == "remote" ] || [ $1 == "remote-remove" ]; then
if [ $1 == "remote-remove" ]; then
fi
if [ -z "$tmp_im" ]; then
echo -ne " Pulling image${SAMELINE}"
- out=$(docker pull $4)
+ out=$(docker pull $source_image)
if [ $? -ne 0 ]; then
echo ""
echo -e " Pulling image -$RED could not be pulled"$ERED
echo -e " Pulling image -$GREEN OK $EGREEN(exists in local repository)"
fi
fi
- return 0
+
+ __retag_and_push_image $4
+
+ return $?
}
setup_testenvironment() {
column -t -s $'\t' $docker_tmp_file | indent1
echo ""
+ if [ $RUNMODE == "KUBE" ]; then
+
+ echo "================================================================================="
+ echo "================================================================================="
+
+ CLUSTER_IP=$(kubectl config view -o jsonpath={.clusters[0].cluster.server} | awk -F[/:] '{print $4}')
+ if [[ $CLUSTER_IP != *"kubernetes"* ]]; then
+ echo -e $YELLOW" The cluster ip is: $CLUSTER_IP. This kubernetes is likely a multi-node cluster."$EYELLOW
+ echo -e $YELLOW" The image pull policy is set to 'Never'."$EYELLOW
+ export KUBE_IMAGE_PULL_POLICY="Never"
+ if [ -z "$IMAGE_REPO_ADR" ]; then
+ echo -e $RED" The flag --image-repo need to be provided to the cmd with the path to a custom image repo'."$ERED
+ exit 1
+ fi
+ else
+ echo -e $YELLOW" The cluster ip is: $CLUSTER_IP. This kubernetes is likely a single-node cluster on a local machine."$EYELLOW
+ echo -e $YELLOW" The image pull policy is set to 'Never'."$EYELLOW
+ export KUBE_IMAGE_PULL_POLICY="Never"
+ fi
+
+ echo "================================================================================="
+ echo "================================================================================="
+ echo ""
+ fi
echo -e $BOLD"======================================================="$EBOLD
echo -e $BOLD"== Common test setup completed - test script begins =="$EBOLD
# returns: The return code is 0 for ok and 1 for not ok
__do_curl() {
echo ${FUNCNAME[1]} "line: "${BASH_LINENO[1]} >> $HTTPLOG
- curlString="curl -skw %{http_code} $@"
+ proxyflag=""
if [ $RUNMODE == "KUBE" ]; then
- if [ ! -z "$CLUSTER_KUBE_PROXY_NODEPORT" ]; then
- curlString="curl -skw %{http_code} --proxy http://localhost:$CLUSTER_KUBE_PROXY_NODEPORT $@"
+ if [ ! -z "$KUBE_PROXY_PATH" ]; then
+ proxyflag=" --proxy $KUBE_PROXY_PATH"
fi
fi
+ curlString="curl -skw %{http_code} $proxyflag $@"
echo " CMD: $curlString" >> $HTTPLOG
res=$($curlString)
echo " RESP: $res" >> $HTTPLOG
containers:
- name: $CONTROL_PANEL_APP_NAME
image: $CONTROL_PANEL_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $CONTROL_PANEL_INTERNAL_PORT
http {
include /etc/nginx/mime.types;
- resolver 127.0.0.11;
+
+ resolver ${CP_NGINX_RESOLVER};
+
server {
listen 8080;
server_name localhost;
run: $CONTROL_PANEL_APP_NAME
autotest: CP
spec:
- type: ClusterIP
+ type: NodePort
ports:
- port: $CONTROL_PANEL_EXTERNAL_PORT
targetPort: $CONTROL_PANEL_INTERNAL_PORT
protocol: TCP
name: http
+ nodePort:
- port: $CONTROL_PANEL_EXTERNAL_SECURE_PORT
targetPort: $CONTROL_PANEL_INTERNAL_SECURE_PORT
protocol: TCP
name: https
+ nodePort:
selector:
run: $CONTROL_PANEL_APP_NAME
\ No newline at end of file
containers:
- name: $CR_APP_NAME
image: $CR_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $CR_INTERNAL_PORT
containers:
- name: $MR_DMAAP_KUBE_APP_NAME
image: $ONAP_DMAAPMR_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $MR_INTERNAL_PORT
containers:
- name: $MR_KAFKA_BWDS_NAME
image: $ONAP_KAFKA_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: 9092
containers:
- name: $MR_ZOOKEEPER_APP_NAME
image: $ONAP_ZOOKEEPER_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: 2181
containers:
- name: $ECS_APP_NAME
image: $ECS_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $ECS_INTERNAL_PORT
containers:
- name: $HTTP_PROXY_APP_NAME
image: $HTTP_PROXY_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $HTTP_PROXY_INTERNAL_PORT
containers:
- name: $KUBE_PROXY_APP_NAME
image: $KUBE_PROXY_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $KUBE_PROXY_INTERNAL_PORT
targetPort: $KUBE_PROXY_WEB_INTERNAL_PORT
protocol: TCP
name: web
+ nodePort:
selector:
run: $KUBE_PROXY_APP_NAME
containers:
- name: $MR_STUB_APP_NAME
image: $MRSTUB_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $MR_INTERNAL_PORT
containers:
- name: $NRT_GATEWAY_APP_NAME
image: $NRT_GATEWAY_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $NRT_GATEWAY_INTERNAL_PORT
containers:
- name: $POLICY_AGENT_APP_NAME
image: $POLICY_AGENT_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $POLICY_AGENT_INTERNAL_PORT
containers:
- name: $PROD_STUB_APP_NAME
image: $PROD_STUB_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $PROD_STUB_INTERNAL_PORT
containers:
- name: $RAPP_CAT_APP_NAME
image: $RAPP_CAT_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $RAPP_CAT_INTERNAL_PORT
value: "1"
- name: ALLOW_HTTP
value: "true"
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $RIC_SIM_INTERNAL_PORT
containers:
- name: $SDNC_APP_NAME
image: $SDNC_A1_CONTROLLER_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $SDNC_INTERNAL_PORT
containers:
- name: $SDNC_DB_APP_NAME
image: $SDNC_DB_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: 3306
containers:
- name: $SDNC_APP_NAME
image: $SDNC_A1_CONTROLLER_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: $SDNC_INTERNAL_PORT
containers:
- name: $SDNC_DB_APP_NAME
image: $SDNC_DB_IMAGE
- imagePullPolicy: Never
+ imagePullPolicy: $KUBE_IMAGE_PULL_POLICY
ports:
- name: http
containerPort: 3306