Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 1.91 KB

step-4-deploying.md

File metadata and controls

22 lines (15 loc) · 1.91 KB

Hack Challenge 'Passenger Welcome'

Step 4 - Build and deploy to a device

Once you've got your stack up and running on your development environment or within the IDE, you may want to deploy the package and run your app on a real device, such as a Raspberry Pi.

You may even need to connect multiple devices to your system. Each may play a different role in the overall architecture. Does your team have all the hardware necessary? A Raspberry Pi with network connection is minimum, but you also want to set up a system with multiple devices (Laptops, Raspberries etc) playing different roles, such as the Vehicle simulator, the Vehicle Compute Unit, the Infotainment Unit.

Before deploying though, you need to build and package your applications and dependencies.

Remember to plan for cross-compilation to the target CPU of your device.

Hints

  • Build your app. The example GitHub Actions workflow in the Velocitas example is a good start.
  • Don't forgot to include the runtime dependencies and also cross-compile your app for arm64 before deploying to a Raspberry.
  • Package it as an OCI Container. You may want to use multiarch containers.
  • Push the container image to a container registry, e.g. GitHub Packages or https://ttl.sh

Deployment on Eclipse Leda

  • For the hackathon, you don't need a full Over-the-Air (OTA) update system, so we're going to use local deployments of apps and containers. Once the container image is pushed to a registry, it can be pulled by the container runtime onto the device.
  • Write a k8s Pod or k8s Deployment spec for your app and put it into /data/server/manifests/ on the Eclipse Leda quickstart image, or apply it with kubectl apply -f myapp.yml
  • On Eclipse Leda, you can use k9s to manage the containers, watch log files etc.