Coder Social home page Coder Social logo

edge-controller's Introduction

Edge-Controller

Edge Controller for the Service Net.

The Edge Controller is a component that will be deployed on the user premises and it is in charge of managing a collection of agents.

The EC connects to the management cluster through a VPN. Receives Alive Messages from agents and can determine their IP.

It is capable of sending orders received from the management cluster to agents and works with a plugin system

Getting Started

The EC runs in a virtual machine. The component includes an installation of a VM with vagrant. To run it, you need to follow the steps bellow:

  1. To join an EC, a join token is required. This token is generated in authx component and we can ask for it executing a public-api command:
./bin/public-api-cli edgecontroller create-join-token --outputPath=_token_file_path
  1. Configure the EC updating the file configs/config.yaml
joinTokenPath: /tmp/joinToken.json
useBBoltProviders: true
bboltpath: /home/vagrant/database.db
name: <EC_name>
labels: "name:test"
geolocation: "Madrid, Madrid, Spain" 
  1. Run the VM executing make vagrant

The edge-controller is started!!

Some commands that can help...

vagrant ssh: command to entry to VM

vi /etc/edge-controller/credentials.json : file with credentials info

sudo journalctl -u edge-controller.service -f: command to see the edge-controller logs

Set debug on the vagrant environment

vagrant@ubuntu-bionic:~$ sudo systemctl stop edge-controller
vagrant@ubuntu-bionic:~$ sudo vim /etc/systemd/system/edge-controller.service
vagrant@ubuntu-bionic:~$ sudo systemctl daemon-reload
vagrant@ubuntu-bionic:~$ sudo systemctl start edge-controller

Build and compile

In order to build and compile this repository use the provided Makefile:

make all

This operation generates the binaries for this repo, download dependencies, run existing tests and generate ready-to-deploy Kubernetes files.

Run tests

Tests are executed using Ginkgo. To run all the available tests:

make test

Update dependencies

Dependencies are managed using Godep. For an automatic dependencies download use:

make dep

In order to have all dependencies up-to-date run:

dep ensure -update -v

Install VM

As commented above, you can install a VM executing

make vagrant

Stop, Start, Destroy, etc the VM

There are more commands to manage the virtual machine

make vagrant-stop
make vagrant-destroy
make vagrant-up
make vagrant-restart-service

and

vagrant-rebuild

Contributing

Please read contributing.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the Apache 2.0 License - see the LICENSE-2.0.txt file for details.

edge-controller's People

Contributors

carmendelope avatar dhiguero avatar gaizkadc avatar gi-el avatar mariaglezg avatar nalej-jarvis avatar rodynnz avatar

Watchers

 avatar

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.