Skip to content

Applications and services

Persistent service

Alnoda workspaces enable you to make any application or service persistently operational. This is facilitated by the supervisord process control system, which serves a function similar to that of the systemd service manager found in many Linux distributions, though systemd is not included in Alnoda workspaces.

Supervisord ensures that all persistent services are initiated whenever a workspace container starts, facilitating the concurrent operation of multiple processes within the workspaces.

While it's possible for you to manually adjust supervisord configuration files, the Alnoda Admin offers a user interface tool for this task. Within the 'Apps & Services' tab, you'll have the ability to create and delete services operating within the workspace.

apps-services

Here you can also see the logs and errors from the runninng or failed to start services.

Warning

After creating a new persistent service it is required to restart the worksapce for the new service to get up and runnig. You can do it with wrk kill command.

As an example, let's create a service for a built-in static file server that will serve /home/project folder and listen to port 8028 makig it accessble via the shortcut "My app on port 8028" of the "My apps" tab. To do this perform the following steps:

  • Open "Admin" tab of the workspace UI and then "Workspace admin"
  • Go to the tab "Apps & Services"
  • Select "START NEW" from the picklist
  • Enter the following command
cd /home/project/; python -m http.server 8028
  • Give it any name you want
  • Click "Save"
  • Restart workspace

static-server

After workspace is restarted you can open "My app on port 8028" and see that static file server is operational.

Application shortcuts

If a persistent application has browser-based user interface you can create a shortcut and place it on one of the tabs: Home, My apps or Admin. Such functionality is provided on the 'Interface tab' of the Workspace Admin.

As an example let's add shortcut for the persistent static file server, that we have created in the previous section of this doc. To do this follow the next steps:

  • Upload the shortcut image to the workspace, i.e. with file browser
  • Go to the "Interface" tab of the Workspace Admin
  • chose the workspace tab and select "CREATE NEW" from the picklist
  • Give it any title and description
  • In the field "Port" enter port 8028
  • In the file picker find your image
  • Leave field "path" blank and click "Save"

interface

You will see that the new shortcut has appeared on the respective page of the workspace UI

Hint

Rather than following the steps indicated in this example, you can simply employ the command wrk install static-server-python to install the static file server from the Alnoda Hub. The installation of apps from the Alnoda Hub automatically creates persistent services and adds application shortcuts.