Skip to content

kit-klein/iot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packet Labs IoT workshop

This workshop deploys compute, storage, networking, and an IoT application to Packet.com.

Conceptual architecture

Diagram:

TBD via https://draw.io/

Component parts:

Getting started

Everything you need to deploy this workshop is available in this repository.

1) Clone the repo

git clone https://github.com/packet-labs/iot

2) Create a bare-metal Kubernetes cluster

You will need to install Terraform for this step.

  • Set your Packet API and project ID in the .tf files in /k8s.

  • Enter the k8s folder and apply the terraform plan.

3) Install Postgres via KubeDB and helm

You will need to install helm for this step.

4) Add the MQTT Broker (Emitter.io)

More info at: https://emitter.io

  • Navigate to http://IP:port/keygen where IP is the address of your Emitter.io deployment

  • Generate a channel key for the topic drone-position

You'll need this key to configure the OpenFaaS Connector

5) Install OpenFaaS

6) Add the OpenFaaS MQTT-Connector

The MQTT-Connector is used to trigger functions and services in response to messages generated by the event source.

The topic is drone-position.

git clone https://github.com/openfaas-incubator/mqtt-connector
cd mqtt-connector

Edit chart/mqtt-connector/values.yaml and update the CHANNEL_KEY value from the step above.

Apply the changes:

cd mqtt-connector/chart/

helm template -n openfaas --namespace openfaas mqtt-connector/ --values mqtt
-connector/values.yaml | kubectl apply -f -

TBD/backlog

  • Deploy business insights software

  • Create Python or Node app to publish generated MQTT data

  • Create Postgesql schema asset for drone geo-location data

  • Create OpenFaaS Function: insert row (using node12 template)

  • Create OpenFaaS service for viewing data on mapbox (using node12 template)

  • Create OpenFaaS Function: Query drone positions for mapbox (using node12 template)

Suggested schema ('drone'):

  • ID
  • Name
  • Altitude
  • GPS Latitude
  • GPS Longitude
  • Velocity
  • Battery
  • Temperature

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 72.3%
  • JavaScript 27.7%