Skip to content

Instantly share code, notes, and snippets.

View reubenmiller's full-sized avatar

Reuben Miller reubenmiller

  • Hamburg, Germany
View GitHub Profile
@reubenmiller
reubenmiller / TEDGE_ALPINE_LINUX_DEVICE.md
Last active March 5, 2025 19:10
How to get thin-edge.io working on a Raspberry Pi device running Alpine Linux

Running thin-edge.io on Alpine Linux on a Raspberry Pi

  1. Flash the latest Raspberry Pi alpine linux image to the SD CARD. See Alpine's Documentation for details

  2. Remount the sd hard on your computer (as you'll be adding some additional files to it before the SD card is inserted into your Raspberry Pi)

  3. Download the headless.apkovl.tar.gz file from the alpine-linux-headless-bootstrap repo and add it to the to the root folder of the mounted sd card (e.g. the FAT partition).

    Note: You don't need to extract the headless.apkovl.tar.gz file, just place it there (there is a magic service which will execute it on boot)

@reubenmiller
reubenmiller / TEDGE_CUSTOM_MQTT_KEEPALIVE.md
Created January 16, 2025 09:23
Setting a custom MQTT keep-alive interval using thin-edge.io and mosquitto

Set custom MQTT keep-alive value

Warning: If you run tedge reconnect c8y or tedge connect c8y, you will need to re-edit the c8y-bridge.conf file again (as it is auto generated). thin-edge.io will be added support to configure this value, but it hasn't been implemented yet, see issues/3153.

  1. Stop all thin-edge.io related services

    tedge disconnect c8y
    systemctl stop tedge-agent
@reubenmiller
reubenmiller / c8y-proxycommand.md
Created January 13, 2025 12:08
go-c8y-cli example on using ssh to forward a port from a device connected to Cumulocity using thin-edge.io
  1. Append the ssh config to your machine's ssh config file

    The following snippet creates

    cat <<EOT >> ~/.ssh/config
    Host rpi5-d83addab8e9f
            User root
            PreferredAuthentications publickey

IdentityFile ~/.ssh/id_ed25519

@reubenmiller
reubenmiller / nanomq.conf
Created October 16, 2024 14:20
Example nanomq configuration
# NanoMQ Configuration 0.18.0
#============================================================
# NanoMQ Broker
#============================================================
system {
daemon = false
num_taskq_thread = 0
max_taskq_thread = 0
parallel = 0
}

README

Create a custom operation which will map the operation to a thin-edge.io workflow (operation).

Pre-requisites

The following components must be installed for the scripts to work.

  • jq
  • tedge (>= 1.3.1-88-g09c1d4c)
@reubenmiller
reubenmiller / README.md
Created October 15, 2024 19:25
Building nanomq on MacOS

Building nanomq on MacOS

Pre-requisite

Install Xcode and accept the license

Building

export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
@reubenmiller
reubenmiller / run.tpl
Created September 28, 2024 12:27 — forked from efrecon/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@reubenmiller
reubenmiller / go-daddy-root-cert.crt
Created July 11, 2024 17:26
go daddy root cert
-----BEGIN CERTIFICATE-----
MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx
EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT
EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRp
ZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIz
NTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQH
EwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8GA1UE
AxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIw
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKD
E6bFIEMBO4Tx5oVJnyfq9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH
@reubenmiller
reubenmiller / c8y.crt
Last active June 19, 2024 20:01
WIP: Copy/paste
-----BEGIN CERTIFICATE-----
MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4
WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu
ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY
MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc
h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+
0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U
A5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW
@reubenmiller
reubenmiller / README.md
Last active May 6, 2024 07:13
thin-edge.io upload file to Cumulocity IoT via the local c8y proxy

README

Summary

Upload files to Cumulocity IoT by creating an event and uploading a given file to it.

Usage

USAGE