mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 10:31:35 +00:00
swarmd: Update README.md
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
parent
4437fe84e2
commit
f0ca8cdabd
@ -3,27 +3,33 @@
|
|||||||
This adds a `swarmd` package for Moby which contains the standalone
|
This adds a `swarmd` package for Moby which contains the standalone
|
||||||
swarmkit orchestration daemon (`swarmd`) and CLI tool (`swarmctl`).
|
swarmkit orchestration daemon (`swarmd`) and CLI tool (`swarmctl`).
|
||||||
|
|
||||||
The package tracks [docker/swarmkit#1965][PR1965] which
|
The package tracks [ijc's `container-wip` branch][containerd-wip].
|
||||||
is a WIP PR adding a containerd executor to swarmkit.
|
Compared with mainline swarmkit (which container a basic containerd
|
||||||
|
executor merged in [PR1965]) this reworks the executor to use the
|
||||||
|
container client library and adds support for CNI networking.
|
||||||
|
|
||||||
With a suitable moby image (such as `swarmd.yml` from this directory)
|
With a suitable LinuxKit image (such as `swarmd.yml` from this
|
||||||
something like this should work:
|
directory) something like this should work:
|
||||||
|
|
||||||
runc exec swarmd swarmctl service create --image docker.io/library/nginx:alpine --name nginx
|
ctr exec -- swarmd swarmd swarmctl service create --image docker.io/library/nginx:alpine --name nginx
|
||||||
runc exec swarmd swarmctl service ls
|
ctr exec -- swarmd swarmd swarmctl service ls
|
||||||
|
|
||||||
|
Note that `swarmd` uses the "swarmd" containerd namespace, so to see
|
||||||
|
swarmd managed containers you will need to use `-n swarmd` on all
|
||||||
|
`ctr` commands e.g.:
|
||||||
|
|
||||||
|
ctr -n swarmd containers ls
|
||||||
|
|
||||||
|
Alternatively you may export `CONTAINERD_NAMESPACE=swarmd`.
|
||||||
|
|
||||||
### TODO
|
### TODO
|
||||||
|
|
||||||
Currently the swarm state directory needs to be at a path which is
|
Bootstrapping a cluster needs more investigation. Tokens and join
|
||||||
identical from the PoV of both the `containerd` and `swarmd`
|
|
||||||
processes. For now this means that the swarmkit state is put in
|
|
||||||
`/var/lib/containerd/swarmd`.
|
|
||||||
|
|
||||||
Bootstrapping a cluster needs more invesigation. Tokens and join
|
|
||||||
addresses can currently only be passed on the `swarmd` command line
|
addresses can currently only be passed on the `swarmd` command line
|
||||||
which is inconvenient for automated image deployment.
|
which is inconvenient for automated image deployment.
|
||||||
|
|
||||||
Swarmkit [PR 1965][PR1965] also contains a number of TODOs which are not
|
Swarmkit [PR 1965][PR1965] also contains a number of TODOs which are not
|
||||||
separately listed here.
|
separately listed here.
|
||||||
|
|
||||||
[PR1665]: https://github.com/docker/swarmkit/pull/1965
|
[PR1965]: https://github.com/docker/swarmkit/pull/1965
|
||||||
|
[containerd-wip]: https://github.com/ijc/swarmkit/tree/containerd-wip
|
||||||
|
@ -39,7 +39,7 @@ RUN mkdir -p /out/usr/bin/ /out/etc /out/opt/cni/bin /out/etc/cni/net.d
|
|||||||
#####################################################################
|
#####################################################################
|
||||||
# Swarmd
|
# Swarmd
|
||||||
|
|
||||||
# https://github.com/ijc25/swarmkit/tree/containerd-wip
|
# https://github.com/ijc/swarmkit/tree/containerd-wip
|
||||||
ENV SWARMKIT_REPO=https://github.com/ijc25/swarmkit
|
ENV SWARMKIT_REPO=https://github.com/ijc25/swarmkit
|
||||||
ENV SWARMKIT_BRANCH=containerd-wip
|
ENV SWARMKIT_BRANCH=containerd-wip
|
||||||
ENV SWARMKIT_COMMIT=4a484ccb498bee117fe6167d5a5e7ea0f6d4f2e9
|
ENV SWARMKIT_COMMIT=4a484ccb498bee117fe6167d5a5e7ea0f6d4f2e9
|
||||||
|
Loading…
Reference in New Issue
Block a user