Deploy a Caddy file server for COS for robotics

Warning

Beta Notice: COS for robotics is currently in beta. Content and features may change, and some functionality may be incomplete or experimental. Feedback is welcome as we continue to improve.

In this how-to, we will deploy a simple Caddy file server in the Canonical Observability Stack (COS) for robotics. We therefore assume that a COS for robotics stack is up and running. You may refer to the tutorial ‘Deploy COS for robotics server in the cloud’. to do so.

By the end of this guide, We will have a cloud storage available in COS for robotics so that devices can push rosbags for later use.

Deploy Caddy

To deploy Caddy, hit the following command:

juju deploy ros2bag-fileserver-k8s --resource caddy-fileserver-image=ghcr.io/ubuntu-robotics/ros2bag-fileserver:dev --storage database:=10G --config ssh-port=2222

Once deployed, we can integrate the file storage with COS for robotics:

juju relate ros2bag-fileserver:ingress-tcp traefik:ingress-per-unit
juju relate ros2bag-fileserver:ingress-http traefik:ingress
juju relate ros2bag-fileserver:catalogue catalogue:catalogue
juju relate cos-registration-server:auth-devices-keys ros2bag-fileserver:auth-devices-keys

We can monitor the deployment, including the relations with:

juju status --watch 5s --color --relations

Once everything is green, the storage is ready to receive rosbags from the devices.


Next steps: device setup

Now that the storage is set up, let’s see how to configure a device to upload rosbags: ‘Send rosbags to COS for robotics’.