@@ -22,99 +22,13 @@ As a result, it is a low-level tool intended to be used by infrastructure operat
22
22
environments while using shared components and consistent interfaces.
23
23
24
24
## Plugins
25
- _ InfraKit_ leverages _ Plugins_ to manage arbitrary systems in diverse environments, which can be composed to meet
26
- different needs. Technically, a Plugin is an HTTP server with a well-defined API, listening on a unix socket .
25
+ _ InfraKit_ makes extensive use of _ Plugins_ to manage arbitrary systems in diverse environments, which can be composed
26
+ to meet different needs .
27
27
28
- [ Utilities] ( pkg/rpc ) are provided as libraries to simplify Plugin development in Go.
29
-
30
- ### Plugin types
31
- #### Group
32
- When managing infrastructure like computing clusters, Groups make good abstraction, and working with groups is easier
33
- than managing individual instances. For example, a group can be made up of a collection
34
- of machines as individual instances. The machines in a group can have identical configurations (replicas, or cattle).
35
- They can also have slightly different properties like identity and ordering (as members of a quorum or pets).
36
-
37
- _ InfraKit_ provides primitives to manage Groups: a group has a given size and can shrink or grow based on some
38
- specification, whether it's human generated or machine computed.
39
- Group members can also be updated in a rolling fashion so that the configuration of the instance members reflect a new
40
- desired state. Operators can focus on Groups while _ InfraKit_ handles the necessary coordination of Instances.
41
-
42
- Since _ InfraKit_ emphasizes on declarative infrastructure, there are no operations to move machines or Groups from one
43
- state to another. Instead, you _ declare_ your desired state of the infrastructure. _ InfraKit_ is responsible
44
- for converging towards, and maintaining, that desired state.
45
-
46
- Therefore, a [ group plugin] ( pkg/spi/group/spi.go ) manages Groups of Instances and exposes the operations that are of
47
- interest to a user:
48
-
49
- + commit a group configuration, to start managing a group
50
- + inspect a group
51
- + destroy a group
52
-
53
- ##### Default Group plugin
54
- _ InfraKit_ provides a default Group plugin implementation, intended to suit common use cases. The default Group plugin
55
- manages Instances of a specific Flavor. Instance and Flavor plugins can be composed to manage different types of
56
- services on different infrastructure providers.
57
-
58
- While it's generally simplest to use the default Group plugin, custom implementations may be valuable to adapt another
59
- infrastructure management system. This would allow you to use _ InfraKit_ tooling to perform basic operations on widely
60
- different infrastructure using the same interface.
61
-
62
- #### Instance
63
- Instances are members of a group. An [ instance plugin] ( pkg/spi/instance/spi.go ) manages some physical resource instances.
64
- It knows only about individual instances and nothing about Groups. Instance is technically defined by the plugin, and
65
- need not be a physical machine at all.
66
-
67
- For compute, for example, instances can be VM instances of identical spec. Instances
68
- support the notions of attachment to auxiliary resources. Instances may be tagged, and tags are assumed to be
69
- persistent which allows the state of the cluster to be inferred and computed.
70
-
71
- In some cases, instances can be identical, while in other cases the members of a group require stronger identities and
72
- persistent, stable state. These properties are captured via the _ flavors_ of the instances.
73
-
74
- #### Flavor
75
- Flavors help distinguish members of one group from another by describing how these members should be treated.
76
- A [ flavor plugin] ( pkg/spi/flavor/spi.go ) can be thought of as defining what runs on an Instance.
77
- It is responsible for dictating commands to run services, and check the health of those services.
78
-
79
- Flavors allow a group of instances to have different characteristics. In a group of cattle,
80
- all members are treated identically and individual members do not have strong identity. In a group of pets,
81
- however, the members may require special handling and demand stronger notions of identity and state.
82
-
83
-
84
- #### Reference implementations
85
- This repository contains several Plugins which should be considered reference implementations for demonstration purposes
86
- and development aides. With the exception of those listed as
87
- [ supported] ( #supported-implementations ) , Plugins in this repository should be considered ** not** to be under active
88
- development and for use at your own risk.
89
-
90
- Over time, we would prefer to phase out reference Plugins that appear to provide real value for implementations that
91
- are developed independently. For this reason, please [ file an issue] ( https://github.com/docker/infrakit/issues/new )
92
- to start a discussion before contributing to these plugins with non-trivial code.
93
-
94
- | plugin | type | description |
95
- | :---------------------------------------------------| :---------| :----------------------------------------|
96
- | [ swarm] ( pkg/example/flavor/swarm ) | flavor | runs Docker in Swarm mode |
97
- | [ vanilla] ( pkg/example/flavor/vanilla ) | flavor | manual specification of instance fields |
98
- | [ zookeeper] ( pkg/example/flavor/zookeeper ) | flavor | run an Apache ZooKeeper ensemble |
99
- | [ infrakit/file] ( pkg/example/instance/file ) | instance | useful for development and testing |
100
- | [ infrakit/terraform] ( pkg/example/instance/terraform ) | instance | creates instances using Terraform |
101
- | [ infrakit/vagrant] ( pkg/example/instance/vagrant ) | instance | creates Vagrant VMs |
102
-
103
-
104
- #### Supported implementations
105
- The following Plugins are supported for active development. Note that these Plugins may not be part of the InfraKit
106
- project, so please double-check where the code lives before filing InfraKit issues.
107
-
108
- | plugin | type | description |
109
- | :--------------------------------------------------------------| :---------| :------------------------------------------------------|
110
- | [ infrakit/group] ( cmd/group ) | group | supports Instance and Flavor plugins, rolling updates |
111
- | [ docker/infrakit.aws] ( https://github.com/docker/infrakit.aws ) | instance | creates Amazon EC2 instances |
112
-
113
- Have a Plugin you'd like to share? Submit a Pull Request to add yourself to the list!
28
+ See the [ plugins] ( docs/plugins.md ) documentation for more details.
114
29
115
30
116
31
## Building
117
-
118
32
### Your Environment
119
33
120
34
Make sure you check out the project following a convention for building Go projects. For example,
@@ -280,19 +194,6 @@ Updating the group tells the Group plugin that your configuration may have chang
280
194
then determine the changes necessary to ensure the state of the infrastructure matches the new
281
195
specification.
282
196
283
- ## Plugin Discovery
284
-
285
- Multiple _ InfraKit_ plugins are typically used together to support a declared configuration. These plugins discover
286
- each other by looking for socket files in a common plugin directory, and communicate via HTTP.
287
-
288
- The default plugin directory is ` ~/.infrakit/plugins ` , and can be overridden with the environment variable
289
- ` INFRAKIT_PLUGINS_DIR ` .
290
-
291
- Note that multiple instances of a plugin may run, provided they have different names for discovery. This may be useful,
292
- for example, if a plugin can be configured to behave differently. For example:
293
-
294
- The CLI shows which plugins are [ discoverable] ( cmd/cli/README.md#list-plugins ) .
295
-
296
197
## Docs
297
198
298
199
Additional documentation can be found [ here] ( docs ) .
0 commit comments