Skip to content

Instantly share code, notes, and snippets.

@dhet
dhet / labnote-17-11-24.md
Last active Nov 25, 2017
Labnote 17-11-24: Embedded OpenDDS via Linux Containers
View labnote-17-11-24.md

Embedded OpenDDS via Linux Containers

Ultimate Goal

Deploy OpenDDS programs within containers running on different Raspberry Pis connected via a LAN switch. The OpenDDS participants need to be able to communicate with each other using RTPS. The programs must be able to use sensor data from sensors connected to the Raspberry Pi's GPIO interface. One participant should make use of the Raspberry Pi's camera.

Test Environment

  • OpenDDS 3.12
  • Three Raspberry Pis v3 Model B
  • Docker 17.11.0-ce
@dhet
dhet / labnote-29-11-24.md
Last active Nov 29, 2017
Docker swarm for Raspberry Pi cluster
View labnote-29-11-24.md

Challenges

Services are incompatible with the nodes

By default, docker swarm will assume that a service will run on x86 systems and accordingly set the services target platform to amd64. In the case of our raspis, this results in an error ("no suitable node") when inspecting the service execution list. This problem can be circumvented by specifying the --no-resolve-image flag when running docker service create.

Specifying which node a service may run on

In order to specify compatibility between nodes and services two things need to be done

  1. The node needs to be specified with a label. This can be done when running docker node create by specifying the tag --label cam=true. When updating the node: docker node update --label-add cam=true.
  2. The service needs to have a constraint. A constraint may be added via docker service create --constraint 'node.labels.cam==true' .... When updating a node: docker service update --constraint-add 'node.labels.cam==true'

Error: "`memory cgroup

@dhet
dhet / labnote-28-11-24.md
Last active Dec 1, 2017
Labnote 28-11-24: Embedded OpenDDS via Linux Containers
View labnote-28-11-24.md

Embedded OpenDDS via Linux Containers

Ultimate Goal

Deploy OpenDDS programs within containers running on different Raspberry Pis connected via a LAN switch. The OpenDDS participants need to be able to communicate with each other using RTPS. The programs must be able to use sensor data from sensors connected to the Raspberry Pi's GPIO interface. One participant should make use of the Raspberry Pi's camera.

Test Environment

  • OpenDDS 3.12
  • Three Raspberry Pis v3 Model B
  • Docker 17.11.0-ce
@dhet
dhet / performance.md
Last active Dec 21, 2017
DDS Performance
View performance.md

What causes delay?

  • Parsing and marshalling of messages
  • Transmission
  • Service discovery
  • Docker network driver
  • OS?
  • Hardware network controller

Parameters

  • Message size
@dhet
dhet / cross-compile.md
Last active Jan 4, 2018
Cross compile OpenDDS for Raspberry Pi
View cross-compile.md

Install cross compiler

sudo apt install -y build-essential \
  g++-arm-linux-gnueabihf \
  gdb-multiarch

Get OpenDDS

@dhet
dhet / tag-sbt.yml
Created May 24, 2020
Github action for tagging a repo with the project version pulled from SBT (only create tag when the SBT version differs from the previous tag)
View tag-sbt.yml
name: Create git tag from SBT
on:
push:
branch: master
jobs:
Tag:
runs-on: ubuntu-latest
steps:
@dhet
dhet / secrets.yaml
Last active Feb 7, 2021
An Ansible playbook for setting up a host which can run Docker Compose (including an unprivileged service account for deployments)
View secrets.yaml
docker_username: dhetbot
docker_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
33383361346365316566663434303530346663636261653934316366323162616137343464656438
3032616265386530393237663533323834393064343531390a626233353961363632643661376164
65336635366130663266623861613834646232393766396462316365346665613065646638333534
6364373831346235610a366639393163666234643631396464643036623536396335666336343133
6561