You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/08/08 16:37:18 UTC

[GitHub] dangogh closed pull request #2640: Fixing monitor

dangogh closed pull request #2640: Fixing monitor
URL: https://github.com/apache/trafficcontrol/pull/2640
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/infrastructure/cdn-in-a-box/edge/Dockerfile b/infrastructure/cdn-in-a-box/edge/Dockerfile
index 0c886ea76..0f4c2cfd9 100644
--- a/infrastructure/cdn-in-a-box/edge/Dockerfile
+++ b/infrastructure/cdn-in-a-box/edge/Dockerfile
@@ -25,6 +25,7 @@ FROM centos:7
 
 ARG RPM=https://ci.trafficserver.apache.org/RPMS/CentOS7/trafficserver-7.1.2-4.el7.centos.x86_64.rpm
 ADD $RPM /trafficserver.rpm
+ADD traffic_ops_ort.rpm /
 
 RUN yum install -y /trafficserver.rpm iproute net-tools nmap-ncat epel-release
 RUN yum install -y jq && yum clean all
diff --git a/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile b/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile
index ad9c88dbb..e416eb384 100644
--- a/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile
@@ -30,10 +30,19 @@ RUN yum install -y \
         initscripts && \
     yum install -y \
         jq \
+        nmap-ncat \
+        iproute \
+        net-tools \
         /$(basename $RPM) && \
     rm /$(basename $RPM) && \
     yum clean all
 
+ADD parameters.json /
+ADD profile.json /
+ADD server.json /
+RUN mkdir -p /opt/traffic_monitor/conf
+ADD traffic_monitor.cfg /opt/traffic_monitor/conf/
+
 EXPOSE 80
 ADD run.sh /
 ENTRYPOINT /run.sh
diff --git a/infrastructure/cdn-in-a-box/traffic_monitor/parameters.json b/infrastructure/cdn-in-a-box/traffic_monitor/parameters.json
new file mode 100644
index 000000000..fb2bd63ba
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/traffic_monitor/parameters.json
@@ -0,0 +1,74 @@
+[
+	{
+		"value": "2000",
+		"name": "heartbeat.polling.interval",
+		"configFile": "rascal-config.txt",
+		"secure": 0
+	},
+	{
+		"value": "6000",
+		"name": "health.polling.interval",
+		"configFile": "rascal-config.txt",
+		"secure": 0
+	},
+	{
+		"value": "http://${tmHostname}:81/CRConfig-Snapshots/${cdnName}/CRConfig.xml",
+		"name": "tm.crConfig.polling.url",
+		"configFile": "rascal-config.txt",
+		"secure": 0
+	},
+	{
+		"value": "http://${tmHostname}:81/dataserver/orderby/id",
+		"name": "tm.dataServer.polling.url",
+		"configFile": "rascal-config.txt",
+		"secure": 0
+	},
+	{
+		"value": "http://${tmHostname}:81/health/${cdnName}",
+		"name": "tm.healthParams.polling.url",
+		"configFile": "rascal-config.txt",
+		"secure": 0
+	},
+	{
+		"value": "60000",
+		"name": "tm.polling.interval",
+		"configFile": "rascal-config.txt",
+		"secure": 0
+	},
+	{
+		"value": "/opt/traffic_monitor/conf",
+		"name": "location",
+		"configFile": "rascal-config.txt",
+		"secure": 0
+	},
+	{
+		"value": "1",
+		"name": "health.threadPool",
+		"configFile": "rascal-config.txt",
+		"secure": 0
+	},
+	{
+		"value": "200",
+		"name": "health.event-count",
+		"configFile": "rascal-config.txt",
+		"secure": 0
+	},
+	{
+		"value": "30",
+		"name": "hack.ttl",
+		"configFile": "rascal-config.txt",
+		"secure": 0
+	},
+	{
+		"value": "0",
+		"name": "health.timepad",
+		"configFile": "rascal-config.txt",
+		"secure": 0
+	},
+	{
+		"value": "1000",
+		"name": "peers.polling.interval",
+		"configFile": "rascal-config.txt",
+		"secure": 0
+	}
+]
diff --git a/infrastructure/cdn-in-a-box/traffic_monitor/profile.json b/infrastructure/cdn-in-a-box/traffic_monitor/profile.json
new file mode 100644
index 000000000..7583eb33c
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/traffic_monitor/profile.json
@@ -0,0 +1,7 @@
+{
+	"cdn": CDN_ID,
+	"name": "RASCAL-Traffic_Monitor",
+	"type": "TM_PROFILE",
+	"description": "Traffic Monitor for CDN-in-a-Box",
+	"routingDisabled": false
+}
diff --git a/infrastructure/cdn-in-a-box/traffic_monitor/run.sh b/infrastructure/cdn-in-a-box/traffic_monitor/run.sh
index f936b454b..8e2c85c6c 100755
--- a/infrastructure/cdn-in-a-box/traffic_monitor/run.sh
+++ b/infrastructure/cdn-in-a-box/traffic_monitor/run.sh
@@ -21,131 +21,117 @@
 # This script, which should be run when the container is run (it's the ENTRYPOINT), will configure the container.
 #
 # The following environment variables must be set (ordinarily by `docker run -e` arguments):
-# TRAFFIC_OPS_URI
-# TRAFFIC_OPS_USER
-# TRAFFIC_OPS_PASS
+# TO_HOST
+# TO_PORT
+# TM_USER
+# TM_PASSWORD
 
 # Check that env vars are set
-envvars=( TRAFFIC_OPS_URI TRAFFIC_OPS_USER TRAFFIC_OPS_PASS )
+
+set -e
+set -x
+set -m
+
+envvars=( TP_HOST TO_HOST TO_PORT TM_USER TM_PASSWORD TO_ADMIN_USER TO_ADMIN_PASSWORD)
 for v in $envvars
 do
 	if [[ -z $$v ]]; then echo "$v is unset"; exit 1; fi
 done
 
-start() {
-	service traffic_monitor start
-	touch /opt/traffic_monitor/var/log/traffic_monitor.log
-	exec tail -f /opt/traffic_monitor/var/log/traffic_monitor.log
+IP=$(ip addr | grep 'global' | grep -v "inet6" | head -n1 | awk '{print $2}' | cut -f1 -d'/')
+NETMASK=$(ifconfig eth0 | grep 'inet ' | tr -s ' ' | cut -d ' ' -f4)
+GATEWAY="$(ip route | grep default | awk '{print $3}')"
+
+cat > /opt/traffic_monitor/conf/traffic_ops.cfg <<- ENDOFMESSAGE
+{
+	"username": "$TM_USER",
+	"password": "$TM_PASSWORD",
+	"url": "https://$TO_HOST:$TO_PORT",
+	"insecure": true,
+	"cdnName": "CDN-in-a-Box",
+	"httpListener": ":80"
 }
-
-init() {
-	[ ! -z $IP ]            || IP=$(ip addr | grep 'global' | awk '{print $2}' | cut -f1 -d'/')
-	[ ! -z $DOMAIN ]        || DOMAIN="localdomain"
-	[ ! -z $CACHEGROUP ]    || CACHEGROUP="mid-east"
-	[ ! -z $TYPE ]          || TYPE="RASCAL"
-	[ ! -z $PROFILE ]       || PROFILE="RASCAL_CDN1"
-	[ ! -z $PHYS_LOCATION ] || PHYS_LOCATION="plocation-nyc-1"
-	[ ! -z $INTERFACE ]     || INTERFACE="eth0"
-	[ ! -z $NETMASK ]       || NETMASK="255.255.0.0"
-	[ ! -z $MTU ]           || MTU="9000"
-	[ ! -z $PORT ]          || PORT="80"
-	[ ! -z $GATEWAY ]       || GATEWAY="$(ip route | grep default | awk '{print $3}')"
-	[ ! -z $CDN ]           || CDN="cdn"
-	echo "IP: $IP"
-	echo "Domain: $DOMAIN"
-	echo "Cachegroup: $CACHEGROUP"
-	echo "Type: $TYPE"
-	echo "Profile: $PROFILE"
-	echo "PhysLocation: $PHYS_LOCATION"
-	echo "Interface: $INTERFACE"
-	echo "NetMask: $NETMASK"
-	echo "MTU: $MTU"
-	echo "Port: $PORT"
-	echo "Gateway: $GATEWAY"
-	echo "CDN: $CDN"
-	echo "Create Server: $CREATE_TO_SERVER"
-
-	mkdir -p /opt/traffic_monitor/conf
-	cat > /opt/traffic_monitor/conf/traffic_monitor.cfg <<- ENDOFMESSAGE
-		{
-				"cache_health_polling_interval_ms": 6000,
-				"cache_stat_polling_interval_ms": 6000,
-				"monitor_config_polling_interval_ms": 15000,
-				"http_timeout_ms": 2000,
-				"peer_polling_interval_ms": 5000,
-				"peer_optimistic": true,
-				"max_events": 200,
-				"max_stat_history": 5,
-				"max_health_history": 5,
-				"health_flush_interval_ms": 20,
-				"stat_flush_interval_ms": 20,
-				"log_location_event": "/opt/traffic_monitor/var/log/event.log",
-				"log_location_error": "/opt/traffic_monitor/var/log/traffic_monitor.log",
-				"log_location_warning": "/opt/traffic_monitor/var/log/traffic_monitor.log",
-				"log_location_info": "null",
-				"log_location_debug": "null",
-				"serve_read_timeout_ms": 10000,
-				"serve_write_timeout_ms": 10000,
-				"http_poll_no_sleep": false,
-				"static_file_dir": "/opt/traffic_monitor/static/"
-		}
 ENDOFMESSAGE
 
-	cat > /opt/traffic_monitor/conf/traffic_ops.cfg <<- ENDOFMESSAGE
-		{
-				"username": "$TRAFFIC_OPS_USER",
-				"password": "$TRAFFIC_OPS_PASS",
-				"url": "$TRAFFIC_OPS_URI",
-				"insecure": true,
-				"cdnName": "$CDN",
-				"httpListener": ":$PORT"
-				}
-	ENDOFMESSAGE
-
-	TO_COOKIE="$(curl -v -s -k -X POST --data '{ "u":"'"$TRAFFIC_OPS_USER"'", "p":"'"$TRAFFIC_OPS_PASS"'" }' $TRAFFIC_OPS_URI/api/1.2/user/login 2>&1 | grep 'Set-Cookie' | sed -e 's/.*mojolicious=\(.*\); expires.*/\1/')"
-	echo "Got Cookie: $TO_COOKIE"
-
-	if [ ! -z "$CREATE_TO_SERVER" ] ; then
-		echo "Creating Server in Traffic Ops!"
-		# curl -v -k -X POST -H "Cookie: mojolicious=$TO_COOKIE" -F "filename=Traffic_Monitor_Dockerfile_profile.traffic_ops" -F "profile_to_import=@/Traffic_Monitor_Dockerfile_profile.traffic_ops" $TRAFFIC_OPS_URI/profile/doImport
-
-		CACHEGROUP_ID="$( curl -s -k -X GET -H "Cookie: mojolicious=$TO_COOKIE" $TRAFFIC_OPS_URI/api/1.2/cachegroups.json | jq '.response | .[] | select(.name=='"\"$CACHEGROUP\""') | .id')"
-		echo "Got cachegroup ID: $CACHEGROUP_ID"
-
-		SERVER_TYPE_ID="$(curl -s -k -X GET -H "Cookie: mojolicious=$TO_COOKIE" $TRAFFIC_OPS_URI/api/1.2/types.json | jq '.response | .[] | select(.name=='"\"$TYPE\""') | .id')"
-		echo "Got server type ID: $SERVER_TYPE_ID"
-
-		SERVER_PROFILE_ID="$(curl -s -k -X GET -H "Cookie: mojolicious=$TO_COOKIE" $TRAFFIC_OPS_URI/api/1.2/profiles.json | jq '.response | .[] | select(.name=='"\"$PROFILE\""') | .id')"
-		echo "Got server profile ID: $SERVER_PROFILE_ID"
-
-		PHYS_LOCATION_ID="$(curl -s -k -X GET -H "Cookie: mojolicious=$TO_COOKIE" $TRAFFIC_OPS_URI/api/1.2/phys_locations.json | jq '.response | .[] | select(.shortName=='"\"$PHYS_LOCATION\""') | .id')"
-		echo "Got phys location ID: $PHYS_LOCATION_ID"
-
-		CDN_ID="$(curl -s -k -X GET -H "Cookie: mojolicious=$TO_COOKIE" $TRAFFIC_OPS_URI/api/1.2/cdns.json | jq '.response | .[] | select(.name=='"\"$CDN\""') | .id')"
-		echo "Got cdn ID: $CDN_ID"
+sed -ie "s;MY_HOSTNAME;$(hostname -s);g" /server.json
+sed -ie "s;MY_DOMAINNAME;$(dnsdomainname);g" /server.json
+sed -ie "s;MY_GATEWAY;$GATEWAY;g" /server.json
+sed -ie "s;MY_NETMASK;$NETMASK;g" /server.json
+sed -ie "s;MY_IP;$IP;g" /server.json
 
-		# Create Server in Traffic Ops
-		curl -v -k -X POST -H "Cookie: mojolicious=$TO_COOKIE" --data-urlencode "host_name=$HOSTNAME" --data-urlencode "domain_name=$DOMAIN" --data-urlencode "interface_name=$INTERFACE" --data-urlencode "ip_address=$IP" --data-urlencode "ip_netmask=$NETMASK" --data-urlencode "ip_gateway=$GATEWAY" --data-urlencode "interface_mtu=$MTU" --data-urlencode "cdn=$CDN_ID" --data-urlencode "cachegroup=$CACHEGROUP_ID" --data-urlencode "phys_location=$PHYS_LOCATION_ID" --data-urlencode "type=$SERVER_TYPE_ID" --data-urlencode "profile=$SERVER_PROFILE_ID" --data-urlencode "tcp_port=$PORT" --data-urlencode "offline_reason=creation" $TRAFFIC_OPS_URI/server/create
-
-		# Add Monitor IP to `allow_ip` Parameters
-		IP_ALLOW_PARAMS=$(curl -Lsk --cookie "mojolicious=$TO_COOKIE" $TRAFFIC_OPS_URI/api/1.2/parameters?name=allow_ip | jq '.response | .[] | .id, .value')
-		while IFS= read -r id; do
-			IFS= read -r ipallow
-			ipallow=$(echo ${ipallow} | sed -e 's/^"//' -e 's/"$//')
-			IPALLOW_UPDATE_JSON="{\"id\": ${id}, \"value\": \"${ipallow},${IP}\"}"
-			curl -Lsk --cookie "mojolicious=$TO_COOKIE" -H 'Content-Type: application/json' -X PUT -d "$IPALLOW_UPDATE_JSON" $TRAFFIC_OPS_URI/api/1.2/parameters/${id}
-		done <<< "$IP_ALLOW_PARAMS"
-	fi
-
-	SERVER_ID="$(curl -s -k -X GET -H "Cookie: mojolicious=$TO_COOKIE" $TRAFFIC_OPS_URI/api/1.2/servers.json | jq '.response | .[] | select(.hostName=='"\"$HOSTNAME\""') | .id')"
-	echo "Got server ID: $SERVER_ID"
-
-	# Set Server to Online in Traffic Ops
-	curl -v -k -H "Content-Type: application/x-www-form-urlencoded" -H "Cookie: mojolicious=$TO_COOKIE" -X POST --data-urlencode "id=$SERVER_ID" --data-urlencode "status=ONLINE" $TRAFFIC_OPS_URI/server/updatestatus
+while ! nc "$TO_HOST" "$TO_PORT" </dev/null; do
+	echo "waiting for traffic_ops_golang:6443"
+	sleep 3
+done
 
-	echo "INITIALIZED=1" >> /etc/environment
-}
+RESPONSE=$(curl -sk -d '{ "u":"'"$TM_USER"'", "p":"'"$TM_PASSWORD"'" }' https://$TP_HOST/api/1.3/user/login)
+while [[ "$RESPONSE" == '{"alerts":[{"text":"Invalid username or password.","level":"error"}]}' ]]; do
+	echo "Waiting for traffic_ops_init"
+	RESPONSE=$(curl -sk -d '{ "u":"'"$TM_USER"'", "p":"'"$TM_PASSWORD"'" }' https://$TP_HOST/api/1.3/user/login)
+	sleep 3
+done
+curl -ksc cookie.jar -d "{\"u\":\"$TO_ADMIN_USER\",\"p\":\"${TO_ADMIN_PASSWORD}\"}" https://$TP_HOST/api/1.3/user/login
+echo "Got Cookie: $(tail -n1 cookie.jar | tr '\t' ' ')"
+
+# Gets our CDN ID
+CDN=$(curl -ksb cookie.jar https://trafficportal/api/1.3/cdns)
+CDN=$(echo $CDN | tr '}' '\n' | grep CDN-in-a-Box | tr ',' '\n' | grep '"id"' | cut -d : -f2)
+while [[ -z "$CDN" ]]; do
+	echo "waiting for trafficops setup to complete..."
+	sleep 3
+	CDN=$(curl -ksb cookie.jar https://trafficportal/api/1.3/cdns)
+	CDN=$(echo $CDN | tr '}' '\n' | grep CDN-in-a-Box | tr ',' '\n' | grep '"id"' | cut -d : -f2)
+done
 
-source /etc/environment
-if [ -z "$INITIALIZED" ]; then init; fi
-start
+# Now we upload a profile for later use
+sed -ie "s;CDN_ID;$CDN;g" /profile.json
+cat /profile.json
+PROFILE=$(curl -ksb cookie.jar -d @/profile.json https://trafficportal/api/1.3/profiles)
+PROFILENAME=$(echo $PROFILE | tr ',' '\n' | grep '"name"' | cut -d : -f2 | tr -d '"')
+PROFILEID=$(echo $PROFILE | tr ',{' '\n' | grep '"id"' | cut -d : -f2)
+curl -ksb cookie.jar -d @/parameters.json https://trafficportal/api/1.3/profiles/name/$PROFILENAME/parameters
+echo
+
+# Gets the location ID
+location=$(curl -ksb cookie.jar https://trafficportal/api/1.3/phys_locations)
+while [[ "$location" == '{"response":[]}' ]]; do
+	echo "Waiting for location setup"
+	sleep 3
+	location=$(curl -ksb cookie.jar https://trafficportal/api/1.3/phys_locations)
+done
+location=$(echo $location | tr ']' '\n' | grep CDN_in_a_Box | tr ',' '\n' | grep '"id"' | cut -d ':' -f2)
+
+# Gets the id of a RASCAL server type
+TYPE=$(curl -ksb cookie.jar https://trafficportal/api/1.3/types)
+TYPE=$(echo $TYPE | tr '}' '\n' | grep '"RASCAL"' | tr ',' '\n' | grep '"id"' | cut -d : -f2)
+
+# Gets the id of the 'ONLINE' status
+ONLINE=$(curl -ksb cookie.jar https://trafficportal/api/1.3/statuses)
+ONLINE=$(echo $ONLINE | tr '}' '\n' | grep ONLINE | tr ',' '\n' | grep '"id"' | cut -d : -f2)
+
+# Gets the cachegroup ID
+CACHEGROUP=$(curl -ksb cookie.jar https://trafficportal/api/1.3/cachegroups)
+while [[ CACHEGROUP == '{"response":[]}' ]]; do
+	echo "waiting for trafficops setup to complete..."
+	sleep 3
+	CACHEGROUP=$(curl -ksb cookie.jar https://trafficportal/api/1.3/cachegroups)
+done
+CACHEGROUP=$(echo $CACHEGROUP | tr '{' '\n' | grep CDN_in_a_Box_Mid | tr ',' '\n' | grep '"id"' | cut -d : -f2)
+
+# Now put it all together and send it up
+sed -ie "s;MY_LOCATION;$location;g" /server.json
+sed -ie "s;MY_TYPE;$TYPE;g" /server.json
+sed -ie "s;MY_CDN_ID;$CDN;g" /server.json
+sed -ie "s;MY_STATUS;$ONLINE;g" /server.json
+sed -ie "s;CACHE_GROUP_ID;$CACHEGROUP;g" /server.json
+sed -ie "s;MY_PROFILE_ID;$PROFILEID;g" /server.json
+cat /server.json
+curl -ksb cookie.jar -d @/server.json https://trafficportal/api/1.3/servers
+echo
+
+touch /opt/traffic_monitor/var/log/traffic_monitor.log
+
+cd /opt/traffic_monitor
+/opt/traffic_monitor/bin/traffic_monitor -opsCfg /opt/traffic_monitor/conf/traffic_ops.cfg -config /opt/traffic_monitor/conf/traffic_monitor.cfg &
+disown
+exec tail -f /opt/traffic_monitor/var/log/traffic_monitor.log
diff --git a/infrastructure/cdn-in-a-box/traffic_monitor/server.json b/infrastructure/cdn-in-a-box/traffic_monitor/server.json
new file mode 100644
index 000000000..ae78ca215
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/traffic_monitor/server.json
@@ -0,0 +1,17 @@
+{
+	"hostName": "MY_HOSTNAME",
+	"domainName": "MY_DOMAINNAME",
+	"cachegroupId": CACHE_GROUP_ID,
+	"interfaceName": "eth0",
+	"ipAddress": "MY_IP",
+	"ipNetmask": "MY_NETMASK",
+	"ipGateway": "MY_GATEWAY",
+	"interfaceMtu": 9000,
+	"physLocationId": MY_LOCATION,
+	"typeId": MY_TYPE,
+	"profileId": MY_PROFILE_ID,
+	"cdnId": MY_CDN_ID,
+	"updPending": false,
+	"statusId": MY_STATUS,
+	"tcpPort": 80
+}
diff --git a/infrastructure/cdn-in-a-box/traffic_monitor/traffic_monitor.cfg b/infrastructure/cdn-in-a-box/traffic_monitor/traffic_monitor.cfg
new file mode 100644
index 000000000..b5223b1f7
--- /dev/null
+++ b/infrastructure/cdn-in-a-box/traffic_monitor/traffic_monitor.cfg
@@ -0,0 +1,22 @@
+{
+	"cache_health_polling_interval_ms": 6000,
+	"cache_stat_polling_interval_ms": 6000,
+	"monitor_config_polling_interval_ms": 15000,
+	"http_timeout_ms": 2000,
+	"peer_polling_interval_ms": 5000,
+	"peer_optimistic": true,
+	"max_events": 200,
+	"max_stat_history": 5,
+	"max_health_history": 5,
+	"health_flush_interval_ms": 20,
+	"stat_flush_interval_ms": 20,
+	"log_location_event": "/opt/traffic_monitor/var/log/traffic_monitor.log",
+	"log_location_error": "/opt/traffic_monitor/var/log/traffic_monitor.log",
+	"log_location_warning": "/opt/traffic_monitor/var/log/traffic_monitor.log",
+	"log_location_info": "/opt/traffic_monitor/var/log/traffic_monitor.log",
+	"log_location_debug": "/opt/traffic_monitor/var/log/traffic_monitor.log",
+	"serve_read_timeout_ms": 10000,
+	"serve_write_timeout_ms": 10000,
+	"http_poll_no_sleep": false,
+	"static_file_dir": "/opt/traffic_monitor/static/"
+}
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/edge_cachegroup.json b/infrastructure/cdn-in-a-box/traffic_ops/edge_cachegroup.json
index ff4e26dfa..efc18c42b 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/edge_cachegroup.json
+++ b/infrastructure/cdn-in-a-box/traffic_ops/edge_cachegroup.json
@@ -1,5 +1,7 @@
 {
 "name": "CDN_in_a_Box_Edge",
 "shortName": "ciabEdge",
+"latitude": 38.897663,
+"longitude": -77.036574,
 "typeId": EDGE_LOC_ID
 }
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/mid_cachegroup.json b/infrastructure/cdn-in-a-box/traffic_ops/mid_cachegroup.json
index 600465f4c..26f6c56c9 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/mid_cachegroup.json
+++ b/infrastructure/cdn-in-a-box/traffic_ops/mid_cachegroup.json
@@ -1,5 +1,7 @@
 {
 "name": "CDN_in_a_Box_Mid",
-"shortName": "ciab",
+"shortName": "ciabMid",
+"latitude": 38.897663,
+"longitude": -77.036574,
 "typeId": MID_LOC_ID
 }
diff --git a/infrastructure/cdn-in-a-box/variables.env b/infrastructure/cdn-in-a-box/variables.env
index 3c474f74e..dcba01289 100644
--- a/infrastructure/cdn-in-a-box/variables.env
+++ b/infrastructure/cdn-in-a-box/variables.env
@@ -27,8 +27,8 @@ DBIC_TRACE=0
 DOMAIN=cdn.local
 PGPASSWORD=twelve
 POSTGRES_PASSWORD=twelve
-TM_PASSWORD=twelve
-TM_USER=tmonitor
+TM_PASSWORD=jhdslvhdfsuklvfhsuvlhs
+TM_USER=tmon
 TO_ADMIN_PASSWORD=twelve
 TO_ADMIN_USER=admin
 TO_EMAIL=cdnadmin@example.com


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services