3 # Copyright (c) 2019 AT&T Intellectual Property. All other rights reserved.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
20 CONTAINER_NAME="akraino-validation-ui"
26 # Container input parameters
29 JENKINS_URL="https://jenkins.akraino.org/"
30 JENKINS_USERNAME="demo"
31 JENKINS_USER_PASSWORD="demo"
32 JENKINS_JOB_NAME="validation"
40 USE_NETWORK_HOST="false"
42 while [ $# -gt 0 ]; do
43 if [[ $1 == *"--"* ]]; then
50 if [ -z "$DB_IP_PORT" ]
52 echo "ERROR: You must specify the database IP and port"
56 if [ -z "$MYSQL_PASSWORD" ]
58 echo "ERROR: You must specify the mysql user password"
62 if [ -z "$ENCRYPTION_KEY" ]
64 echo "ERROR: You must specify the encryption key"
68 if [ -z "$UI_ADMIN_PASSWORD" ]
70 echo "ERROR: You must specify the UI admin password"
74 echo "Note: If there is a password already stored in database, the supplied UI_ADMIN_PASSWORD will be ignored."
76 IMAGE="$REGISTRY"/"$NAME":"$TAG_PRE"-"$TAG_VER"
77 if [[ $USE_NETWORK_HOST = "true" ]]
79 docker run --detach --name $CONTAINER_NAME --network="host" -v "$CERTDIR/bluval.key:/usr/local/tomcat/bluval.key" -v "$CERTDIR/bluval.crt:/usr/local/tomcat/bluval.crt" -e DB_IP_PORT="$DB_IP_PORT" -e MYSQL_USER="$MYSQL_USER" -e MYSQL_PASSWORD="$MYSQL_PASSWORD" -e JENKINS_URL="$JENKINS_URL" -e JENKINS_USERNAME="$JENKINS_USERNAME" -e JENKINS_USER_PASSWORD="$JENKINS_USER_PASSWORD" -e JENKINS_JOB_NAME="$JENKINS_JOB_NAME" -e NEXUS_PROXY="$NEXUS_PROXY" -e JENKINS_PROXY="$JENKINS_PROXY" -e ENCRYPTION_KEY="$ENCRYPTION_KEY" -e UI_ADMIN_PASSWORD="$UI_ADMIN_PASSWORD" -e TRUST_ALL="$TRUST_ALL" $IMAGE
81 docker run --detach --name $CONTAINER_NAME -v "$CERTDIR/bluval.key:/usr/local/tomcat/bluval.key" -v "$CERTDIR/bluval.crt:/usr/local/tomcat/bluval.crt" -e DB_IP_PORT="$DB_IP_PORT" -e MYSQL_USER="$MYSQL_USER" -e MYSQL_PASSWORD="$MYSQL_PASSWORD" -e JENKINS_URL="$JENKINS_URL" -e JENKINS_USERNAME="$JENKINS_USERNAME" -e JENKINS_USER_PASSWORD="$JENKINS_USER_PASSWORD" -e JENKINS_JOB_NAME="$JENKINS_JOB_NAME" -e NEXUS_PROXY="$NEXUS_PROXY" -e JENKINS_PROXY="$JENKINS_PROXY" -e ENCRYPTION_KEY="$ENCRYPTION_KEY" -e UI_ADMIN_PASSWORD="$UI_ADMIN_PASSWORD" -e TRUST_ALL="$TRUST_ALL" $IMAGE