Enabling Specific Applications

As you implement more applications in containers.git, you may not want to run all of them on all of your devices. You can use fioctl to specify what applications the device should run.

Instead of enabling the shellhttpd, which is already done as mentioned before. Let’s use fioctl to first disable and then enable the shellhttpd application. Make sure to follow the aktualizr-lite logs on your device with the following command:

sudo journalctl --follow --unit aktualizr-lite

On your host machine, disable shellhttpd by replacing the list of apps with a simple comma:

fioctl devices config updates --apps , <device-name>

Example Output:

Changing apps from: [shellhttpd] -> []
Changing packagemanager to ostree+compose_apps

In a maximum of 2 minutes, you should see aktualizr-lite remove the application.

Once aktualizr-lite finishes its changes, use docker ps to see if there are any containers running on the device:

docker ps

Example Output:

CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

On the device, open the aktualizr-lite log again and watch as you re-enable shellhttpd:

sudo journalctl --follow --unit aktualizr-lite

Enable the shellhttpd application on your device:

fioctl devices config updates --apps shellhttpd <device-name>

Example Output:

Changing apps from: [] -> [shellhttpd]
Changing packagemanager to ostree+compose_apps

Again in a maximum of 2 minutes, you should see aktualizr-lite add the application.

On your device, test the container again by running the following command:

wget -qO- 127.0.0.1:8080

Example Output:

Hello world

Check the running containers:

docker ps

Example Output:

CONTAINER ID   IMAGE                               COMMAND                  CREATED       STATUS       PORTS                    NAMES
72a3d00dbc1c   hub.foundries.io/<factory>/shellhttpd   "/usr/local/bin/http…"   2 hours ago   Up 2 hours   0.0.0.0:8080->8080/tcp   shellhttpd_httpd_1