tutorials.Time-Series-Data icon indicating copy to clipboard operation
tutorials.Time-Series-Data copied to clipboard

Services ports

Open drypatrick opened this issue 2 years ago • 0 comments

In the shell scripts, the ports should be inherited from .env file, not hard coded as I found in

for example, in services

waitForOrion and waitForIoTAgent fuction the ports should be referenced as environment variable (${ORION_PORT} and ${IOTA_NORTH_PORT} instead of 1026 and 4041), as in other parts of the script.

waitForOrion () {
	echo -e "\n⏳ Waiting for \033[1;34mOrion\033[0m to be available\n"

	while ! [ `docker inspect --format='{{.State.Health.Status}}' fiware-orion` == "healthy" ]
	do
	  echo -e "Context Broker HTTP state: " `curl -s -o /dev/null -w %{http_code} 'http://localhost:1026/version'` " (waiting for 200)"
	  sleep 1
	done
}

waitForIoTAgent () {
	echo -e "\n⏳ Waiting for \033[1;36mIoT-Agent\033[0m to be available\n"
	while ! [ `docker inspect --format='{{.State.Health.Status}}' fiware-iot-agent` == "healthy" ]

	do 
	  echo -e "IoT Agent HTTP state: " `curl -s -o /dev/null -w %{http_code} 'http://localhost:4041/version'` " (waiting for 200)"
	  sleep 1
	done
}

drypatrick avatar Jan 21 '23 16:01 drypatrick