GithubHelp home page GithubHelp logo

knot-cloud's Introduction

KNoT Cloud

KNoT Cloud is a cloud computing solution that enables operating on IoT devices by providing a minimum messaging and management infrastructure. It includes device and authentication management services as well as APIs for sending commands to the things and collect data from their sensors. Also, the KNoT Cloud uses some services from the Mainflux platform, which is a lightweight platform for running IoT cloud computing on the edge. Please, check out the official documentation for more information.

Installation and usage

Stacks for development and production environments are provided in order to assist the user's needs. The development stack must be used if one needs to modify any of the components of the stack. A command line tool will download the source for each component and plug it into the containers, which all have hot reload enabled. The production stack must be used in all other cases.

Development only preparation

If you intend to use the development stack, a command line tool that downloads and configures the stack is required.

Install CLI tool

npm install -g @cesarbr/knot-cloud

Choose the stack

Development

The development stack must be created using the tool described in the previous section. Choose a <path> where the stack should be created (defaults to the current directory) and then run:

NOTE: The following command assumes you don't have a workspace with the repositories and clone them. To disable this, run it with the --no-clone flag.

knot-cloud init [path]

The source code and stack template files will be created under <path>/stack.

Production

There are two production deployment strategies: all-in-one and multinode. The former will deploy all the services on a single machine while the latter will deploy them in multiple nodes (at least two). The files for the two flavours are available at stacks/cloud/prod. The file multi-node.yml can be added to the deploy command if you want to enable the multinode strategy.

Initialize Swarm mode

In your deployment machine, initialize Docker Swarm mode:

docker swarm init

In case you are deploying to multiple nodes, all the nodes must be connected to the same swarm. In this case, run the command above in the machine that must be the swarm manager and run docker swarm join in all other nodes, as instructed by the execution of docker swarm init in the manager machine. Check the Docker Swarm documentation for more on how to setup your cluster.

Deploying stack

After this point, follow the specific instructions to configure and deploy the created stack:

Tear Down

If you want to stop your stack from running or even leave the Docker Swarm mode, execute the commands below:

docker stack rm knot-cloud

and

docker swarm leave

knot-cloud's People

Contributors

esdrasjnr avatar figueredo avatar lcbm avatar netoax avatar pauloserrafh avatar ramonhpr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

knot-cloud's Issues

Help use KNoT Cloud

As an application developer, I want to have resources that help me use KNoT Cloud, so that I can easily create my solutions with the platform.

DoD:

  • Developers have resources to help them deploy KNoT Cloud
  • Developers have resources to explain each configuration item it might find while deploying KNoT Cloud
  • Developers have resources to help them create applications: how to generate credentials and how to use credentials to perform KNoT operations
  • Developers have resources to help them create gateways: how to generate credentials, how to connect KNoT Gateway to KNoT Cloud
  • Developers have resources to help them create devices: how to generate credentials, how to use credentials to perform KNoT device operations.

Support main platforms

As a developer, I want to be able to develop a KNoT solution using my platform of choice, so that I don't need to create another environment only for this purpose.

DoD:

  • Support development on Mac OS X
  • Support development on Ubuntu, Arch Linux, ?
  • Support development on Windows 10 (desired)

Disable gateway

As a developer, I want to be able to disable a gateway I own, so that I can restore it later in a different hardware.

Add CI/CD automation to services and libraries

As a developer, I want to have an automated way to build and test the services when a new tag is released, and publish to NPM if it's a library. Moreover, I want to be notified if anything fails.

DoD:

  • Investigate CI/CD automation tools: TravisCI, CircleCI and Jenkins;
  • Add building and testing steps;
  • Add publishing to NPM;
  • Send notifications to slack;
  • Generate CHANGELOG files;

Automate stack deployment

As an application developer, I want to have an automated way to bring a KNoT Cloud stack up, so that I can easily work with KNoT.

DoD:

  • Stack can be brought automatically with one or a few commands
  • No external tools (such as openssl) except tools provided by KNoT or docker itself (or some other deployment related tool, e.g. Ansible) must be used.
  • No manual edit of files must be required.

Add Python SDK

As an application developer, I want to be able to write my applications using Python so that I don't need to change my development environment.

DoD:

  • Be able to interact with WebSocket protocol adapter using Python
  • Be able to interact with authenticator service using Python
  • Be able to interact with storage service using Python
  • Be able to fetch the libraries in a public package repository

Create KNoT Cloud client

As a developer, I want to have a tool that I can use to operate on the KNoT Cloud, so that I don't need to write my own client to interact with it.

DoD:

  • A tool that can be download/compiled/installed.
  • Must require only that I have a user created on the cloud.
  • Must provide all the operations provided by the protocol adapter and support all the device types (gateway, app, thing).

Revoke apps from managing devices

As a developer, I want to disable an application from managing things, i.e. create, update, remove and search them.

DoD:

  • Disable apps to create things on protocol adapter;
  • Add an option to app creation card on UI in order to enable the developer setup this ability;
  • When listing the apps on UI, we must see if the app is able to manage things (it could be through a property on device).

Init stack command isn't working properly

The KNoT CLI init command is shown in the help menu but when running it nothing happens. The weird thing about it is that if the filename and the command name are differente it works correctly. So, I'd suggest investigating if some bug was introduced when the other cloud commands were added to the CLI or if there is a bug in the yargs package.

Problem with node device authentication

During testing with the knot device, I found a problem with the thing-token authentication. The knot is confirming the device authentication message without re-verifying the thing token. My test:
My device sends the registration message and receives the confirmation along with a think token, then an authentication request is sent to the knot without informing the thing token, and the confirmation is received without errors. In the image the babeltower receives an authentication message without any token and confirms normally.
Screenshot from 2022-03-10 10-11-53
Screenshot from 2022-03-10 10-11-03

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.