Giter VIP home page Giter VIP logo

equinix-labs / metal-iot Goto Github PK

View Code? Open in Web Editor NEW
86.0 10.0 14.0 15.65 MB

An IoT showcase for the power of bare metal compute and Sprint Curiosity 5G Network

Home Page: https://deploy.equinix.com/labs

License: MIT License

HCL 4.76% JavaScript 28.18% Shell 12.97% Dockerfile 1.32% HTML 0.90% CSS 1.41% Python 1.44% PLpgSQL 2.23% TypeScript 39.14% Mustache 7.66%
packet sprint iot mqtt-connector mqtt-broker emitter metabase openfaas

metal-iot's Introduction

Equinix Labs IoT workshop

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

This repository is Experimental meaning that it's based on untested ideas or techniques and not yet established or finalized or involves a radically new and innovative style! This means that support is best effort (at best!) and we strongly encourage you to NOT use this in production.

Conceptual architecture

Diagram:

Conceptual architecture

Private components:

Components exposed with TLS / Ingress or NodePort:

  • Ingress Controller - Traefik v1 (HostPort 80/443)
  • Serverless compute platform - OpenFaaS
  • MQTT Broker - emitter.io (NodePort) - 30080/30443
  • Business intelligence - Metabase (Ingress/TLS)
  • Metrics visualization - Grafana (Ingress/TLS)

Getting started

Before you begin using this repo you will need an Equinix Metal account.

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

Note: This repository is designed to be used with your own domain name and a number of DNS records. This enables TLS termination (HTTPS) to be used for exposed services. If you are working in development, you can skip the domain and TLS steps.

You can register for a domain at Google Domains or Namecheap.com for a few dollars. You can also configure your domain there, after purchase.

1) Clone the repo

git clone https://github.com/equinix-labs/metal-iot

2) Create a bare-metal Kubernetes cluster

You will need to install Terraform for this step.

  • Set your Equinix Metal API and project ID in a terraform.tfvar file in /k8s.

  • Enter the k8s folder and apply the terraform plan.

  • Find the IP of one of the nodes in the cluster from your Equinix Metal dashboard or the state file in /k8s/

Create four DNS A records (replace example.com with your domain):

  • A gateway.example.com - IP
  • A grafana.example.com - IP
  • A metabase.example.com - IP
  • A emitter.example.com - IP

Some commands will be run from your laptop, so make sure you install Kubectl

3) Install Postgres via KubeDB and helm

You will need to install helm for this step.

4) Install OpenFaaS

You will also deploy the schema.sql at this time for drone_position and drone_event.

65 TLS for OpenFaaS

  • Install cert-manager

    k3sup app install cert-manager
  • Install an Ingress record for your OpenFaaS gateway

    k3sup app install openfaas-ingress \
    --domain gateway.example.com \
    --email [email protected] \
    --ingress-class traefik
  • Add TLS for Grafana

    Edit ./openfaas/grafana-ingress.yaml and edit grafana.example.com replacing example.com with your domain.

    Now run:

    kubectl apply -f ./openfaas/grafana-ingress.yaml

6) Add the MQTT Broker (Emitter.io)

7) Add the OpenFaaS MQTT-Connector

The MQTT-Connector is used to trigger functions and services in response to messages generated by the event source. It runs inside the Kubernetes cluster and is private with no ingress.

8) Add Grafana for function/service visualization

Grafana packages a pre-compiled dashboard for OpenFaaS to show metrics like throughput and latency.

9) Send Drone Data

You can now send data to emitter from your drone clients. Use the drone simulator to generate realistic data for use with visualization tools.

metal-iot's People

Contributors

alexellis avatar allspiritseve avatar c0dyhi11 avatar demarius avatar dependabot[bot] avatar displague avatar edolnx avatar kit-klein avatar rainleander avatar vielmetti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

metal-iot's Issues

Uniform Standards Request: Experimental Repository

Hello!

We believe this repository is Experimental and therefore needs the following files updated:

If you feel the repository should be maintained or end of life or that you'll need assistance to create these files, please let us know by filing an issue with https://github.com/packethost/standards.

Equinix Metal maintains a number of public repositories that help customers to run various workloads on Equinix Metal. These repositories are in various states of completeness and quality, and being public, developers often find them and start using them. This creates problems:

  • Developers using low-quality repositories may infer that Equinix Metal generally provides a low quality experience.
  • Many of our repositories are put online with no formal communication with, or training for, customer success. This leads to a below average support experience when things do go wrong.
  • We spend a huge amount of time supporting users through various channels when with better upfront planning, documentation and testing much of this support work could be eliminated.

To that end, we propose three tiers of repositories: Private, Experimental, and Maintained.

As a resource and example of a maintained repository, we've created https://github.com/packethost/standards. This is also where you can file any requests for assistance or modification of scope.

The Goal

Our repositories should be the example from which adjacent, competing, projects look for inspiration.

Each repository should not look entirely different from other repositories in the ecosystem, having a different layout, a different testing model, or a different logging model, for example, without reason or recommendation from the subject matter experts from the community.

We should share our improvements with each ecosystem while seeking and respecting the feedback of these communities.

Whether or not strict guidelines have been provided for the project type, our repositories should ensure that the same components are offered across the board. How these components are provided may vary, based on the conventions of the project type. GitHub provides general guidance on this which they have integrated into their user experience.

packet-labs/iot will be removed!

This repository will be deleted by November 1, 2021.

While the concepts and instruction provided in this repository may be helpful to some users and carry some relevance, this repository has seen few recent changes. Packet became Equinix Metal over a year ago.

This repository requires maintenance and owners to ensure that the documentation is up to date and relevant. A repository like this one may need to update the version of dependencies and tools for safe consumption.

If you are affected by this deletion, please comment by the November 1, 2021 date.

Alternatives:

  • Repo is Archived. This is not preferable, it is intended that the 'packet-labs' GH org is vacated.
  • Repo is moved to github.com/equinix-labs. This is only preferably after Packet branding and tooling has been updated to Equinix Metal.

Update to Helm3

The Helm + Tiller combination dependencies should be updated to use newer versions of Helm.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.