@@ -25,7 +25,7 @@ environments while using shared components and consistent interfaces.
25
25
_ InfraKit_ leverages _ Plugins_ to manage arbitrary systems in diverse environments, which can be composed to meet
26
26
different needs. Technically, a Plugin is an HTTP server with a well-defined API, listening on a unix socket.
27
27
28
- [ Utilities] ( spi/http ) are provided as libraries to simplify Plugin development in Go.
28
+ [ Utilities] ( pkg/rpc ) are provided as libraries to simplify Plugin development in Go.
29
29
30
30
### Plugin types
31
31
#### Group
@@ -43,7 +43,7 @@ Since _InfraKit_ emphasizes on declarative infrastructure, there are no operatio
43
43
state to another. Instead, you _ declare_ your desired state of the infrastructure. _ InfraKit_ is responsible
44
44
for converging towards, and maintaining, that desired state.
45
45
46
- Therefore, a [ group plugin] ( spi/group/spi.go ) manages Groups of Instances and exposes the operations that are of
46
+ Therefore, a [ group plugin] ( pkg/ spi/group/spi.go) manages Groups of Instances and exposes the operations that are of
47
47
interest to a user:
48
48
49
49
+ commit a group configuration, to start managing a group
@@ -60,7 +60,7 @@ infrastructure management system. This would allow you to use _InfraKit_ toolin
60
60
different infrastructure using the same interface.
61
61
62
62
#### Instance
63
- Instances are members of a group. An [ instance plugin] ( spi/instance/spi.go ) manages some physical resource instances.
63
+ Instances are members of a group. An [ instance plugin] ( pkg/ spi/instance/spi.go) manages some physical resource instances.
64
64
It knows only about individual instances and nothing about Groups. Instance is technically defined by the plugin, and
65
65
need not be a physical machine at all.
66
66
@@ -73,7 +73,7 @@ persistent, stable state. These properties are captured via the _flavors_ of the
73
73
74
74
#### Flavor
75
75
Flavors help distinguish members of one group from another by describing how these members should be treated.
76
- A [ flavor plugin] ( spi/flavor/spi.go ) can be thought of as defining what runs on an Instance.
76
+ A [ flavor plugin] ( pkg/ spi/flavor/spi.go) can be thought of as defining what runs on an Instance.
77
77
It is responsible for dictating commands to run services, and check the health of those services.
78
78
79
79
Flavors allow a group of instances to have different characteristics. In a group of cattle,
@@ -93,12 +93,12 @@ to start a discussion before contributing to these plugins with non-trivial code
93
93
94
94
| plugin | type | description |
95
95
| :---------------------------------------------------| :---------| :----------------------------------------|
96
- | [ swarm] ( example/flavor/swarm ) | flavor | runs Docker in Swarm mode |
97
- | [ vanilla] ( example/flavor/vanilla ) | flavor | manual specification of instance fields |
98
- | [ zookeeper] ( example/flavor/zookeeper ) | flavor | run an Apache ZooKeeper ensemble |
99
- | [ infrakit/file] ( example/instance/file ) | instance | useful for development and testing |
100
- | [ infrakit/terraform] ( example/instance/terraform ) | instance | creates instances using Terraform |
101
- | [ infrakit/vagrant] ( example/instance/vagrant ) | instance | creates Vagrant VMs |
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
102
103
103
104
104
#### Supported implementations
@@ -154,32 +154,22 @@ $ make binaries
154
154
```
155
155
Executables will be placed in the ` ./build ` directory.
156
156
This will produce binaries for tools and several reference Plugin implementations:
157
- + [ ` infrakit ` ] ( ./ cmd/cli/README.md) : a command line interface to interact with plugins
158
- + [ ` infrakit-group-default ` ] ( ./ cmd/group/README.md) : the default [ Group plugin] ( ./spi/group )
159
- + [ ` infrakit-instance-file ` ] ( . /example/instance/file) : an Instance plugin using dummy files to represent instances
160
- + [ ` infrakit-instance-terraform ` ] ( . /example/instance/terraform) :
157
+ + [ ` infrakit ` ] ( cmd/cli/README.md ) : a command line interface to interact with plugins
158
+ + [ ` infrakit-group-default ` ] ( cmd/group/README.md ) : the default [ Group plugin] ( ./spi/group )
159
+ + [ ` infrakit-instance-file ` ] ( pkg /example/instance/file) : an Instance plugin using dummy files to represent instances
160
+ + [ ` infrakit-instance-terraform ` ] ( pkg /example/instance/terraform) :
161
161
an Instance plugin integrating [ Terraform] ( https://www.terraform.io )
162
- + [ ` infrakit-instance-vagrant ` ] ( . /example/instance/vagrant) :
162
+ + [ ` infrakit-instance-vagrant ` ] ( pkg /example/instance/vagrant) :
163
163
an Instance plugin using [ Vagrant] ( https://www.vagrantup.com/ )
164
- + [ ` infrakit-flavor-vanilla ` ] ( . /example/flavor/vanilla) :
164
+ + [ ` infrakit-flavor-vanilla ` ] ( pkg /example/flavor/vanilla) :
165
165
a Flavor plugin for plain vanilla set up with user data and labels
166
- + [ ` infrakit-flavor-zookeeper ` ] ( . /example/flavor/zookeeper) :
166
+ + [ ` infrakit-flavor-zookeeper ` ] ( pkg /example/flavor/zookeeper) :
167
167
a Flavor plugin for [ Apache ZooKeeper] ( https://zookeeper.apache.org/ ) ensemble members
168
- + [ ` infrakit-flavor-swarm ` ] ( . /example/flavor/swarm) :
168
+ + [ ` infrakit-flavor-swarm ` ] ( pkg /example/flavor/swarm) :
169
169
a Flavor plugin for Docker in [ Swarm mode] ( https://docs.docker.com/engine/swarm/ ) .
170
170
171
171
All provided binaries have a ` help ` sub-command to get usage and a ` version ` sub-command to identify the build revision.
172
172
173
- ## Examples
174
- There are a few examples of _ InfraKit_ plugins:
175
-
176
- + Terraform Instance Plugin
177
- - [ README] ( ./example/instance/terraform/README.md )
178
- - [ Code] (./example/instance/terraform/plugin.go) and [ configs] ( ./example/instance/terraform/aws-two-tier )
179
- + Zookeeper / Vagrant
180
- - [ README] ( ./example/flavor/zookeeper/README.md )
181
- - [ Code] (./plugin/flavor/zookeeper)
182
-
183
173
184
174
# Design
185
175
@@ -200,10 +190,10 @@ A common pattern for a JSON object looks like this:
200
190
201
191
There is only one ` Properties ` field in this JSON and its value is a JSON object. The opaque
202
192
JSON value for ` Properties ` is decoded via the Go ` Spec ` struct defined within the package of the plugin --
203
- for example -- [ ` vanilla.Spec ` ] ( /plugin/flavor/vanilla/flavor.go ) .
193
+ for example -- [ ` vanilla.Spec ` ] ( pkg /plugin/flavor/vanilla/flavor.go) .
204
194
205
195
The JSON above is a _ value_ , but the type of the value belongs outside the structure. For example, the
206
- default Group [ Spec] ( /plugin/group/types/types.go ) is composed of an Instance plugin, a Flavor plugin, and an
196
+ default Group [ Spec] ( pkg /plugin/group/types/types.go) is composed of an Instance plugin, a Flavor plugin, and an
207
197
Allocation:
208
198
209
199
``` json
@@ -305,7 +295,7 @@ The CLI shows which plugins are [discoverable](cmd/cli/README.md#list-plugins).
305
295
306
296
## Docs
307
297
308
- Design docs can be found [ here] ( ./ docs) .
298
+ Additional documentation can be found [ here] ( docs ) .
309
299
310
300
## Reporting security issues
311
301
@@ -327,7 +317,7 @@ _InfraKit_ is currently focused on supporting setup and management of base infra
327
317
orchestrator. The image below illustrates an architecture we are working towards supporting - a Docker cluster in Swarm
328
318
mode.
329
319
330
- ![ arch image] ( images/arch.png )
320
+ ![ arch image] ( docs/ images/arch.png)
331
321
332
322
This configuration co-locates _ InfraKit_ with Swarm manager nodes and offers high availability of _ InfraKit_ itself and
333
323
Swarm managers (using attached storage). _ InfraKit_ is shown managing two groups - managers and workers that will be
0 commit comments