Testing Applications¶
Use fioctl
to enable your new applications but before, make sure to follow
the aktualizr-lite
logs on your device with the following command:
On your host machine, enable all the new application with the command below:
Example Output:
In a maximum of 2 minutes, you should see aktualizr-lite
add the application.
Once aktualizr-lite
finishes, check the running containers:
Example Output:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9c563d12b2c6 hub.foundries.io/cavel/shellhttpd-mqtt "/usr/local/bin/http…" 9 minutes ago Up 9 minutes 0.0.0.0:8082->8082/tcp shellhttpd-mqtt_httpd-mqtt_1
ab91fca6c88b eclipse-mosquitto "/docker-entrypoint.…" 9 minutes ago Up 9 minutes 0.0.0.0:1883->1883/tcp mosquitto_mosquitto_1
0b88c1dc7bbf nginx "/docker-entrypoint.…" 10 minutes ago Up About a minute 0.0.0.0:80->80/tcp flask-mqtt-nginx_nginx_1
129a54e5821b hub.foundries.io/cavel/flask-mqtt "python3 -m flask ru…" 10 minutes ago Up 7 minutes flask-mqtt-nginx_flask-mqtt_1
On your device, follow the shellhttpd-mqtt_httpd-mqtt_1
container logs:
Using a second terminal, test your applications using curl
in any external device connected to the same network (e.g. your host machine: the same computer you use to access your device with ssh).
Example Output:
At the same time, in the first terminal connected to your device,
shellhttpd-mqtt_httpd-mqtt_1
application logs should show:
Example Output:
Now, test the flask-mqtt-nginx_flask-mqtt_1
application. First, follow the
container log on your device with the command:
Using a second terminal, test your applications using curl
in any external
device connected to the same network (e.g. your host machine: the same computer
you use to access your device with ssh).
Example Output:
At the same time, in the first terminal connected to your device,
flask-mqtt-nginx_flask-mqtt_1
application logs should show:
Example Output:
Now, as you access the shellhttpd-mqtt_httpd-mqtt_1
application,
the flask-mqtt-nginx_flask-mqtt_1
will know how many accesses it had and
will display it when you check the port 80.
Access shellhttpd-mqtt_httpd-mqtt_1
a few more times
Example Output:
Verify if flask-mqtt-nginx_flask-mqtt_1
received all messages and updated the flask page:
Example Output: