Commit Graph

20 Commits

Author SHA1 Message Date
ab0a17f568 Fix GitHub spelling
Signed-off-by: Frieder Bluemle <frieder.bluemle@gmail.com>
Upstream-commit: 45c9b9b6c1
Component: cli
2017-10-05 01:14:31 +08:00
c16c5f3db8 Fix repo references in docs
Since CLI was moved to a separate repo, these references are incorrect.
Fixed with the help of sed script, verified manually.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 6d85a4f5f8
Component: cli
2017-07-28 10:32:42 -07:00
c564ad3f69 Add support for metrics plugins
Allows for a plugin type that can be used to scrape metrics.
This is useful because metrics are not neccessarily at a standard
location... `--metrics-addr` must be set, and must currently be a TCP
socket.
Even if metrics are done via a unix socket, there's no guarentee where
the socket may be located on the system, making bind-mounting such a
socket into a container difficult (and racey, failure-prone on daemon
restart).

Metrics plugins side-step this issue by always listening on a unix
socket and then bind-mounting that into a known path in the plugin
container.

Note there has been similar work in the past (and ultimately punted at
the time) for consistent access to the Docker API from within a
container.

Why not add metrics to the Docker API and just provide a plugin with
access to the Docker API? Certainly this can be useful, but gives a lot
of control/access to a plugin that may only need the metrics. We can
look at supporting API plugins separately for this reason.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d8e04f68d3
Component: cli
2017-06-02 00:11:05 +00:00
ea8bb1038b fix errors in config
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 852a861b8e
Component: cli
2017-06-02 00:11:04 +00:00
672083e3c3 Implement plugins for logging drivers
Logging plugins use the same HTTP interface as other plugins for basic
command operations meanwhile actual logging operations are handled (on
Unix) via a fifo.

The plugin interface looks like so:

```go
type loggingPlugin interface {
  StartLogging(fifoPath string, loggingContext Context) error
  StopLogging(fifoPath)
```

This means a plugin must implement `LoggingDriver.StartLogging` and
`LoggingDriver.StopLogging` endpoints and be able to consume the passed
in fifo.

Logs are sent via stream encoder to the fifo encoded with protobuf.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 114cc6ca3a
Component: cli
2017-06-02 00:11:02 +00:00
8d5753a63e Add pid host support
Tested using global-net-plugin-ipc which sets PidHost in config.json.

Plugins might need access to host pid namespace. Add support for that.
Tested using aragunathan/global-net-plugin-ipc which sets "pidhost" in
config.json. Observed using `readlink /proc/self/ns/pid` that plugin and
host have the same ns.

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: c9f1050226
Component: cli
2017-06-02 00:10:59 +00:00
fa8eda09f4 Add support in plugin config for accessing host ipc namespace.
Plugins might need access to host ipc namespace. A good usecase is
a volume plugin running iscsi multipath commands that need access to
host kernel locks.
Tested with a custom plugin (aragunathan/global-net-plugin-full) that's
built with `"ipchost" : true` in config.json. Observed using
`readlink /proc/self/ns/ipc` that plugin and host have the same ns.

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 9111051d98
Component: cli
2017-06-02 00:10:59 +00:00
6a8ef9223f Make propagated mount persist outside rootfs
This persists the "propagated mount" for plugins outside the main
rootfs. This enables `docker plugin upgrade` to not remove potentially
important data during upgrade rather than forcing plugin authors to hard
code a host path to persist data to.

Also migrates old plugins that have a propagated mount which is in the
rootfs on daemon startup.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: df4e570ff4
Component: cli
2017-06-02 00:10:52 +00:00
1397dfc743 Add capability filter to docker plugin ls
This fix adds `--filter capability=[volumedriver|authz]` to `docker plugin ls`.

The related docs has been updated.

An integration test has been added.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ecfe6ab218
Component: cli
2017-06-02 00:10:51 +00:00
ad57980f55 plugins: rename DeviceCreation to AllowAllDevices
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 8c3f18ca6d
Component: cli
2017-06-02 00:10:48 +00:00
7632076475 replace no-remove by sample-volume-plugin in docs
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 63aa05d3f7
Component: cli
2017-06-02 00:10:47 +00:00
bd7f8f8f9e remove old media type compat for plugins
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 5bfa17e58b
Component: cli
2017-06-02 00:10:44 +00:00
f865a2ecbe replace env description with args in extend config
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 2373288938
Component: cli
2017-06-02 00:10:44 +00:00
47e77de42d plugins: container-rootfs-relative paths
Legacy plugins expect host-relative paths (such as for Volume.Mount).
However, a containerized plugin cannot respond with a host-relative
path. Therefore, this commit modifies new volume plugins' paths in Mount
and List to prepend the container's rootfs path.

This introduces a new PropagatedMount field in the Plugin Config.
When it is set for volume plugins, RootfsPropagation is set to rshared
and the path specified by PropagatedMount is bind-mounted with rshared
prior to launching the container. This is so that the daemon code can
access the paths returned by the plugin from the host mount namespace.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 5a84f77819
Component: cli
2017-06-02 00:10:43 +00:00
9d6e16b26b update plugin example
Signed-off-by: Victor Vieux <victorvieux@gmail.com>

cleanup whitespace formatting

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b82e761088
Component: cli
2017-06-02 00:10:42 +00:00
7b298b591a Fix some redirect loops and problems
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: d5b3df0c2f
Component: cli
2017-06-02 00:10:42 +00:00
faac82a415 plugins: misc fixes
Rename variable to reflect manifest -> config renaming
Populate Description fields when computing privileges.
Refactor/reuse code from daemon/oci_linux.go

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: b70edf410d
Component: cli
2017-06-02 00:10:40 +00:00
c8586e1312 Edits to plugin docs after building authz plugin
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 6393eac011
Component: cli
2017-06-02 00:10:39 +00:00
914e0a35ac move plugins out of experimental
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 410d4ce7ae
Component: cli
2017-06-02 00:10:37 +00:00
2b025b2eb9 rename plugin manifest
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: fdfcbe778a
Component: cli
2017-06-02 00:10:36 +00:00