Add copy of MCP CA cert if existing into tacker container 87/50387/1
authorBryan Sullivan <bryan.sullivan@att.com>
Thu, 11 Jan 2018 00:21:24 +0000 (16:21 -0800)
committerBryan Sullivan <bryan.sullivan@att.com>
Thu, 11 Jan 2018 00:21:24 +0000 (16:21 -0800)
JIRA: MODELS-2

Change-Id: I9ee0490b5d78910d1e09a53c0596d9eceb69763c
Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
build/tacker/start.sh
tests/utils/tacker-setup.sh

index b824589..c948d62 100644 (file)
@@ -33,6 +33,9 @@ mysql --user=root --password=$MYSQL_PASSWORD -e "CREATE DATABASE tacker; GRANT A
 
 log "Setup OpenStack CLI environment"
 source /opt/tacker/admin-openrc.sh
+if [[ -f /opt/tacker/mcp_os_cacert ]]; then
+  cp /opt/tacker/mcp_os_cacert /etc/ssl/certs/mcp_os_cacert
+fi
 
 uid=$(openstack user list | awk "/ tacker / { print \$2 }")
 if [[ $uid ]]; then
index 5ebf1f4..569840b 100644 (file)
@@ -94,7 +94,10 @@ EOF
   sudo mkdir -p /opt/tacker
   sudo chown $USER /opt/tacker
   cp $openrc /opt/tacker/admin-openrc.sh
-
+  if [[ -f /etc/ssl/certs/mcp_os_cacert ]]; then
+    cp /etc/ssl/certs/mcp_os_cacert /opt/tacker/mcp_os_cacert
+  fi
   if [[ "$branch" == "" ]]; then branch="latest"; fi
   log "Start tacker container with image blsaws/models-tacker:$branch"
   OS_TENANT_ID=$(openstack project show admin | awk '/ id / {print $4}')