- Download the custom camera image file to build the camera operating system on the SD card. Note! The camera modules are installed one-by-one. Finish all steps for camera1 before you continue to install camera2, etc.
- Add the custom image to one of the SD cards with Raspberry Pi Imager, make sure to change the settings (gear icon) before choosing write, change [NR] for the current camera number that you want to install:
- Change hostname into
mlmocap-camera[NR]
- Select SSH enabled
- Choose prefererred username and password for your controller, defaults are:
pi
andraspberry
- Optional: Fill in the credentials of your WiFi network (controller will provide the network including WiFi settings.)
- Save settings and now press write to flash the card, this takes a while wait for the progress to finish.
- Change hostname into
- Insert the SD card into the camera module Pi and connect it to the power supply (via PoE, just insert the ethernet cable).
- Set a static and unique IP address:
- Connect to new camera module via ssh in your terminal type:
ssh pi@mlmocap-camera[NR].local
- When prompted "Are you sure you want to continue", type:
yes
, enter - Fill in password chosen in settings of Pi Imager, default:
raspberry
- Open network settings by typing:
sudo nano /etc/dhcpcd.conf
- Scroll down untill you see the internet settings, change [CAMERA NUMBER] to an increasing number above 10 and below 24, like camera1 = 11, camera2 = 12 etc. replace this row:
static ip_address=10.1.1.[CAMERA NUMBER]/24
- To close and save the changes in this file:
Ctrl+x, then Y followed by Enter
- Now reboot the camera module by typing:
sudo reboot
- Reconnect to the camera with ssh, wait a few seconds for the module to finish restart:
ssh pi@mlmocap-camera[NR].local
- Connect to new camera module via ssh in your terminal type:
- Add K3S to Camera module
- Open a second terminal, to connect to the controller:
ssh [email protected]
- In this terminal (on the controller) get node-token, run following command:
sudo cat /var/lib/rancher/k3s/server/node-token
- Copy the output
- Go to the terminal that is connected to the camera module. Add the copied token to the following command at [REPLACE WITH TOKEN]. Than paste the complete total to the current camera command line:
curl -sfL https://get.k3s.io | K3S_URL=https://10.1.1.1:6443 K3S_TOKEN=[REPLACE WITH TOKEN] sh -
- Finally, we will change the node role, via controller. Go to the terminal connected to the controller and run this command after changing the current camera number:
kubectl label node mlmocap-camera[NR] kubernetes.io/role=camera
- Connect to the webapp to see if the camera's appear, this might take a while, be patient :)
- Open a second terminal, to connect to the controller: