Comments (7)
What's the SPI for this? Is this something that needs to be applied more broadly to other plugin types as well? I was thinking an 'environment' plugin along these lines -- one that encapsulates state, plugin discovery and leader / non-leader into one common plugin that is run as a singleton per installation.
from deploykit.
What's the SPI for this?
That's what i intended to sort out in the issue discussion :-)
Is this something that needs to be applied more broadly to other plugin types as well?
You mean state for other plugins? I was planning to start small and focus on flexible primitives, but focus on wiring it only to the group plugin as that's the immediate need.
I was thinking an 'environment' plugin along these lines -- one that encapsulates state, plugin discovery and leader / non-leader into one common plugin that is run as a singleton per installation.
Those seem like distinct behaviors so my inclination was to introduce them as separate plugins.
from deploykit.
Ok - I think it's reasonable to keep it simple and just focus on helping Group manage state.
Since the group plugin doesn't have a strict schema, I am thinking along the lines of simple POST/PUT/GET/DELETE by path (namespace) with the payload as a blob with a content-type (just to make it general). This is pretty generic and can be easily backed by a variety of existing tooling - from local disk (the default) to kv stores or full-on document databases (eg. couchdb).
(Path, value) are nice since we can define namespaces for the plugins when there are many groups with different implementations.
However I think it'd be nice for the group to store its state in one atomic document / blob. So while the state store supports (path, value), a given plugin instance in practice always CRUD with a fix key/path. So maybe something (the "state" plugin) should assign the key and the plugin only needs to hand over a blob to persist or do a get
to read.
On the Go side, I'd imagine something that does upsert / delete? Deletion can be a funny thing and should warrant discussion.
Or do you have something more narrowly defined?
from deploykit.
Or do you have something more narrowly defined?
I have nothing defined. I tend to file issues before shaping the design, so what you see is what you get :-)
from deploykit.
I am going to introduce a PR that has only a simple Golang API to save / load a blob of some sort. This follows from the comment earlier #244 (comment)
So the API is even simpler than a key-value store in that it's not meant to be a general key/value store. Rather, some entity will use this to persist a blob and the key / how to retrieve are implicit in the implementations. For example - if we are storing something in a swarm as an annotation then it's up to the implementation to use a defined label rather than exposing the ability to set arbitrary labels.
from deploykit.
Removing this from v0.1.0 as there's more work to complete this in a pluggable way (i.e. the manager Group implementation in #283 includes some state which could partially satisfy this issue).
from deploykit.
Implemented in #282. Available since v0.2.0.
from deploykit.
Related Issues (20)
- New local CLI returning 0 if the plugin does not exist
- Enrollment controller template indexing rendering "<no value>" HOT 2
- Move repo to infrakit/infrakit
- Group controller always calling instance plugin with "properties=true" HOT 4
- Force manager leadership change on during manager rolling update HOT 3
- Cascading deletes using the terraform plugin HOT 3
- Pacing of Rolling updates HOT 1
- Swarm node garbage collection HOT 4
- Error: Property 'Box' must be set
- Request canceled client timeout HOT 2
- Update group rolling update polices
- Confusing/Outdated LinuxKit tutorial HOT 5
- Issues with the Cloudformation Example
- feat: Homebrew HOT 2
- Tutorial Fails with Client.Timeout HOT 2
- Use case documentation needed: provisioning VM using libvirt HOT 9
- Libvirt init section doesn't work: Permission denied
- Please upgrade libvirt HOT 1
- Renaming this project HOT 6
- Is deploykit going to support Apache CloudStack?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deploykit.