Okay, there are a little more to it to run a native edge-client. All the clues you need are in the Docker-file of the docker client on https://github.com/IoTOpen/docker-edge-client/. But of course it can be done!
I installed a fresh Debian 12.1 (Bookworm) in VirtualBox and this is what I needed to do to get a working edge-client on it.
Please observe, by following these instructions you will overwrite your mosquitto settings if any!
This install was done on a fresh installed Debian 12.1 (Bookworm)
We have to add some files from the docker-edge-client to get it to work. Please observe, by following these instructions you will overwrite your mosquitto settings if any!
This is what I did.
Install curl and gpg:
sudo apt-get install curl gpg
Get the iotopen - key
curl https://pkg.iotopen.se/conf/iotopen.gpg.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/iotopen.gpg > /dev/null
Add iotopen repositories
echo "deb https://pkg.iotopen.se/apt/ bookworm main" | sudo tee /etc/apt/sources.list.d/iotopen.list
Install iotopen-packages
sudo apt-get update
sudo apt-get install iotopen-verify mosquitto iotopen-edge
Create iotopen config dir (don't ask me why there is a dash in the name here) and dirs for the apps:
sudo mkdir /etc/iot-open
sudo mkdir -p /var/lib/iot-open/edge/apps
sudo mkdir -p /var/lib/iot-open/edge/configs
We also need a mosquitto-tpl file, lets take it from https://github.com/IoTOpen/docker-edge-client
curl https://raw.githubusercontent.com/IoTOpen/docker-edge-client/master/etc/iot-open/mosquitto.tpl | sudo tee /etc/iot-open/mosquitto.tpl
Then create a iotopen.json from Lynx (https://lynx.iotopen.se)
- Go to your installation
- Click Settings
- Open the Edge-client tab
- Click "Create new credentials"
- Copy a complete file with the Copy-symbol at the top.
It should look like this
{
"client_id": 9,
"installation_id": 9,
"api": "https://lynx.iotopen.se",
"aam": "https://lynx.iotopen.se",
"mqtt_broker": "lynx.iotopen.se:8883",
"mqtt_username": "box:9",
"mqtt_password": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"mqtt_client_id": "edge-9",
"timezone": "Europe/Stockholm"
}
Save it as /etc/iot-open/iotopen.json
Then we are ready to register this client.
sudo iotopen-verify
Should look like:
rejas@debian:~$ sudo iotopen-verify
iotopen-verify[1581]: Git hash:2076315 and tag:
iotopen-verify[1581]: verified
Now we have a new mosquitto.conf file created, copy that to /etc/mosquitto and restart mosquitto.
sudo cp /etc/iot-open/mosquitto.conf /etc/mosquitto/
sudo /etc/init.d/mosquitto restart
(Now there shold be a green "Edge-client" box on the Overview page of your installation.
All left to to is to start edged and you are good to go.
sudo edged &
When an Edge-app is added in Lynx it will automatically start on the Edge-client. If there were any already configured they will be downloaded and executed.
You can also testrun apps with the edge-app command.