Giter VIP home page Giter VIP logo

Comments (1)

gianarb avatar gianarb commented on May 25, 2024

The autodetection is implemented only for swarm. Because at the moment DigitalOcean doesn't support this kind of strategy.

At the moment the code is a mess but it's working. If you don't specify a configuration file when you start orbiter

orbiter daemon -config

The daemon fallback to autodetection mode. It's only implemented for Swarm and it works in this way:

  1. Check for EnvVar and it creates a new Docker client and it checks if there is a daemon up and running. If there is not the daemon is going to exit because the autodetection didn't discover anything.
  2. If there is a daemon up and running it checks if swarm mode is enabled. If it's not orbiter exit.
  3. It gets list of services and it checks for the label orbiter if it exists it register a new autoscaler called autodetect_swarm/wikidiff_worker. Where wikidiff_worker is the service name.
  4. It also looks for other 2 labels orbiter.up and orbiter.down to set the right scaling value. If they doesn't exist is using 1 and 1.

At this point you have all the services registered and you can do something like:

curl -v -d '{"direction": true}'  http://localhost:8000/handle/autodetect_swarm/wikidiff_worker

To scale as usual.

What do to

There is something to do:

  1. Move the autodetection logic into the provider. If the provider is not supporting autodetecting it can just return an error.
  2. Make smarter the fallback function in order to scale and to call all the autodetection provider to self-configure orbiter.

This two points are necessary to make the codebase flexible and maintainable. But the POC is there and it's working.

Follow up issues #13

from orbiter.

Related Issues (20)

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.