Change-Id: If1b4a67fb5fda5125dc65b801974d1d1badc1364
Signed-off-by: platania <platania@research.att.com>
chmod +x /data/scripts/docker_run.sh
chmod +x /data/scripts/docker_health.sh
chmod +x /data/scripts/docker_run.sh
chmod +x /data/scripts/docker_health.sh
-IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
+if [ -e /opt/config/public_ip.txt ]
+then
+ IP_ADDRESS=$(cat /opt/config/public_ip.txt)
+else
+ IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
+fi
+
cat /data/environments/Template.json | sed "s/yyy/"$IP_ADDRESS"/g" > /data/environments/$ENV_NAME.json
sed -i "s/xxx/"$ENV_NAME"/g" /data/environments/$ENV_NAME.json
sed -i "s/\"ueb_url_list\":.*/\"ueb_url_list\": \""$MR_IP_ADDR","$MR_IP_ADDR"\",/g" /data/environments/$ENV_NAME.json
cat /data/environments/Template.json | sed "s/yyy/"$IP_ADDRESS"/g" > /data/environments/$ENV_NAME.json
sed -i "s/xxx/"$ENV_NAME"/g" /data/environments/$ENV_NAME.json
sed -i "s/\"ueb_url_list\":.*/\"ueb_url_list\": \""$MR_IP_ADDR","$MR_IP_ADDR"\",/g" /data/environments/$ENV_NAME.json
DMAAP_TOPIC=$(cat /opt/config/dmaap_topic.txt)
export MSO_DOCKER_IMAGE_VERSION=latest
DMAAP_TOPIC=$(cat /opt/config/dmaap_topic.txt)
export MSO_DOCKER_IMAGE_VERSION=latest
+if [ -e /opt/config/keystone.txt ]
+then
+ KEYSTONE_URL=$(cat /opt/config/keystone.txt)
+else
+ KEYSTONE_URL="https://identity.api.rackspacecloud.com/v2.0"
+fi
+
# Update the MSO configuration file.
read -d '' MSO_CONFIG_UPDATES <<-EOF
{
# Update the MSO configuration file.
read -d '' MSO_CONFIG_UPDATES <<-EOF
{
"identity_services":
[
{"dcp_clli": "RAX_KEYSTONE",
"identity_services":
[
{"dcp_clli": "RAX_KEYSTONE",
- "identity_url": "https://identity.api.rackspacecloud.com/v2.0",
+ "identity_url": "$KEYSTONE_URL",
"mso_id": "$OPENSTACK_USERNAME",
"mso_pass": "$OPENSTACK_APIKEY",
"admin_tenant": "service",
"mso_id": "$OPENSTACK_USERNAME",
"mso_pass": "$OPENSTACK_APIKEY",
"admin_tenant": "service",
git pull
chmod +x config/drools/drools-tweaks.sh
git pull
chmod +x config/drools/drools-tweaks.sh
-IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
+
+if [ -e /opt/config/public_ip.txt ]
+then
+ IP_ADDRESS=$(cat /opt/config/public_ip.txt)
+else
+ IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
+fi
+
echo $IP_ADDRESS > config/pe/ip_addr.txt
docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
echo $IP_ADDRESS > config/pe/ip_addr.txt
docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
if [ ! -e /opt/config/boot.txt ]
then
if [ ! -e /opt/config/boot.txt ]
then
- IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
+ if [ -e /opt/config/public_ip.txt ]
+ then
+ IP_ADDRESS=$(cat /opt/config/public_ip.txt)
+ else
+ IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
+ fi
mysql -u root -p'Aa123456' -h $IP_ADDRESS < /opt/portal/deliveries/Apps_Users_OnBoarding_Script.sql
echo "yes" > /opt/config/boot.txt
fi
mysql -u root -p'Aa123456' -h $IP_ADDRESS < /opt/portal/deliveries/Apps_Users_OnBoarding_Script.sql
echo "yes" > /opt/config/boot.txt
fi