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"
41 while [ $# -gt 0 ]; do
42 if [[ $1 == *"--"* ]]; then
49 if [ -z "$DB_IP_PORT" ]
51 echo "ERROR: You must specify the database IP and port"
55 if [ -z "$MYSQL_PASSWORD" ]
57 echo "ERROR: You must specify the mysql user password"
61 if [ -z "$ENCRYPTION_KEY" ]
63 echo "ERROR: You must specify the encryption key"
67 if [ -z "$UI_ADMIN_PASSWORD" ]
69 echo "ERROR: You must specify the UI admin password"
73 echo "Note: If there is a password already stored in database, the supplied UI_ADMIN_PASSWORD will be ignored."
75 IMAGE="$REGISTRY"/"$NAME":"$TAG_PRE"-"$TAG_VER"
76 docker run --detach --name $CONTAINER_NAME --network="host" -v "$(pwd)/server.xml:/usr/local/tomcat/conf/server.xml" -v "$CERTDIR/bluval.key:/usr/local/tomcat/bluval.key" -v "$CERTDIR/bluval.crt:/usr/local/tomcat/bluval.crt" -v "$(pwd)/root_index.jsp:/usr/local/tomcat/webapps/ROOT/index.jsp" -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