Code Monkey home page Code Monkey logo

commissaire-service's People

Contributors

ashcrow avatar gbraad avatar jlebon avatar mbarnes avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

commissaire-service's Issues

Redis requirement missing for storage-service

The command commissaire-storage-service depends on the requirement redis, but this is not part of the requirements.txt file.

    raise ImportError('Missing redis library (pip install redis)')
ImportError: Missing redis library (pip install redis)

Curious if there is a reason for this (because kombu allows different options). If not, I will add the dependency...

Services Error On Python 3

Example:

$ commissaire-containermgr-service 
Traceback (most recent call last):
  File "/home/steve/Tech/Envs/cenv/bin/commissaire-containermgr-service", line 11, in <module>
    load_entry_point('commissaire-service', 'console_scripts', 'commissaire-containermgr-service')()
  File "/home/steve/Tech/GITHUB/commissaire-service/src/commissaire_service/containermgr/__init__.py", line 239, in main
    config_file=args.config)
AttributeError: 'Namespace' object has no attribute 'config'

ContainerManager Service

As a user of Commissaire
I would like the Container Management features to exist in it's own microservice
so that I am able to enable, disable, and scale container management like other components of Commissaire

New storage primitive: peek

Now that I can easily observe service logs, I'm noticing the storage log is filled with etcd.EtcdKeyNotFound tracebacks when running the end-to-end test suite.

I traced this to a few HTTP handlers that test whether a host or cluster is present by calling storage.get and then handling a RemoteProcedureCallError with the assumption that it just means the key wasn't found.

Let's handle this more gracefully by introducing a new storage primitive: peek()

peek() works like get() except when the key doesn't exist it returns an empty result rather than throwing a RemoteProcedureCallError. (The StorageClient.peek() method will therefore either return a model instance or None.)

Decrease complexity

As a future developer on Commissaire
I want the complexity of the service code to be smaller
so that it's easy to digest and understand what is happening within callables.

Do we still need ServiceManager?

Since we've settled on supporting only containerized Commissaire deployments, I'm wondering if we should remove ServiceManager or at least its multi-process capability (which we don't test and I've personally never used).

It seems to me a preferable strategy to only run one service instance per container, and let your container manager (Kubernetes, OpenShift, etc.) handle service replication if multiple, say, storage or investigator service instances are desired.

@ashcrow, do you agree? You wrote ServiceManager and I get the impression it was more for rpm-based deployments.

Notification messages for storage changes

I'd like to investigate having the storage service push one-way notification messages for each save and delete request.

This would help other services be more autonomous by reacting to changes on their own instead of relying on HTTP request handlers to drive everything with explicit remote procedure calls. It would also help simplify the HTTP request handling logic in some places.

In particular, container-manager-service could be nearly self-sufficient by listening for host and cluster record changes and calling the appropriate plugin automatically. For example if the watcher-service discovers that a host is no longer accessible, it would update the host's status to "failed" and save it to storage. container-manager-service would detect this and automatically remove the node from its container manager.

The investigator-service could also kick off bootstrapping automatically in response to newly-added host records. I'm sure there will be other use cases as things progress.

I'm thinking of establishing a unique message queue for each model type (Host, Cluster, etc.), so services can effectively filter the types of change notifications received.

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.