Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@ jobs:
# other environment variables (although the working directory can use the `~` character,
# but environment variables cannot), so to avoid having to override the GOPATH for every
# run command, just hard code in the directory to be CircleCI expects it to be.
# FIXME: this still needs to be docker/swarmkit, as that's how it's referenced in protobuf
working_directory: /home/circleci/.go_workspace/src/github.com/docker/swarmkit
environment:
# Needed to install go
OS: linux
ARCH: amd64
GOVERSION: 1.17.9
GOVERSION: 1.18.8
GO111MODULE: "on"
# Needed to install protoc
PROTOC_VERSION: 3.6.1

# Note(cyli): We create a tmpfs mount to be used for temporary files created by tests
# to mitigate the excessive I/O latencies that sometimes cause the tests to fail.
# See https://github.com/docker/swarmkit/pull/2254.
# See https://github.com/moby/swarmkit/pull/2254.

# There is no way to mount tmpfs volumes in the docker executor, so we are using
# the machine executor. However, this incur a performance overhead
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/docker/swarmkit/blob/master/CONTRIBUTING.md
https://github.com/moby/swarmkit/blob/master/CONTRIBUTING.md

** Make sure all your commits include a signature generated with `git commit -s` **

Expand Down
60 changes: 30 additions & 30 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ When setup correctly, you should have a GOROOT and GOPATH set in the environment
After you set up the Go development environment, use `go get` to check out
`swarmkit`:

go get -d github.com/docker/swarmkit
go get -d github.com/moby/swarmkit/v2@latest

This command installs the source repository into the `GOPATH`.

It is not mandatory to use `go get` to checkout the SwarmKit project. However,
for these instructions to work, you need to check out the project to the
correct subdirectory of the `GOPATH`: `$GOPATH/src/github.com/docker/swarmkit`.
correct subdirectory of the `GOPATH`: `$GOPATH/src/github.com/moby/swarmkit`.

### Repeatable Builds

For the full development experience, one should `cd` into
`$GOPATH/src/github.com/docker/swarmkit`. From there, the regular `go`
`$GOPATH/src/github.com/moby/swarmkit`. From there, the regular `go`
commands, such as `go test`, should work per package (please see
[Developing](#developing) if they don't work).

Expand All @@ -41,35 +41,35 @@ build:
🐳 vet
🐳 lint
🐳 build
github.com/docker/swarmkit
github.com/docker/swarmkit/vendor/github.com/davecgh/go-spew/spew
github.com/docker/swarmkit/vendor/github.com/pmezard/go-difflib/difflib
github.com/docker/swarmkit/cmd/protoc-gen-gogoswarm
github.com/docker/swarmkit/cmd/swarm-bench
github.com/docker/swarmkit/cmd/swarmctl
github.com/docker/swarmkit/vendor/github.com/stretchr/testify/assert
github.com/docker/swarmkit/ca/testutils
github.com/docker/swarmkit/cmd/swarmd
github.com/docker/swarmkit/vendor/code.cloudfoundry.org/clock/fakeclock
github.com/docker/swarmkit/vendor/github.com/stretchr/testify/require
github.com/docker/swarmkit/manager/state/raft/testutils
github.com/docker/swarmkit/manager/testcluster
github.com/docker/swarmkit/protobuf/plugin/deepcopy/test
github.com/docker/swarmkit/protobuf/plugin/raftproxy/test
github.com/moby/swarmkit
github.com/moby/swarmkit/vendor/github.com/davecgh/go-spew/spew
github.com/moby/swarmkit/vendor/github.com/pmezard/go-difflib/difflib
github.com/moby/swarmkit/cmd/protoc-gen-gogoswarm
github.com/moby/swarmkit/cmd/swarm-bench
github.com/moby/swarmkit/cmd/swarmctl
github.com/moby/swarmkit/vendor/github.com/stretchr/testify/assert
github.com/moby/swarmkit/ca/testutils
github.com/moby/swarmkit/cmd/swarmd
github.com/moby/swarmkit/vendor/code.cloudfoundry.org/clock/fakeclock
github.com/moby/swarmkit/vendor/github.com/stretchr/testify/require
github.com/moby/swarmkit/manager/state/raft/testutils
github.com/moby/swarmkit/manager/testcluster
github.com/moby/swarmkit/protobuf/plugin/deepcopy/test
github.com/moby/swarmkit/protobuf/plugin/raftproxy/test
🐳 test
? github.com/docker/swarmkit [no test files]
? github.com/docker/swarmkit [no test files]
ok github.com/docker/swarmkit/agent 2.264s
ok github.com/docker/swarmkit/agent/exec 1.055s
ok github.com/docker/swarmkit/agent/exec/container 1.094s
? github.com/docker/swarmkit/api [no test files]
? github.com/docker/swarmkit/api/duration [no test files]
? github.com/docker/swarmkit/api/timestamp [no test files]
ok github.com/docker/swarmkit/ca 15.634s
? github.com/moby/swarmkit [no test files]
? github.com/moby/swarmkit [no test files]
ok github.com/moby/swarmkit/agent 2.264s
ok github.com/moby/swarmkit/agent/exec 1.055s
ok github.com/moby/swarmkit/agent/exec/container 1.094s
? github.com/moby/swarmkit/api [no test files]
? github.com/moby/swarmkit/api/duration [no test files]
? github.com/moby/swarmkit/api/timestamp [no test files]
ok github.com/moby/swarmkit/ca 15.634s
...
ok github.com/docker/swarmkit/protobuf/plugin/raftproxy/test 1.084s
ok github.com/docker/swarmkit/protobuf/ptypes 1.025s
? github.com/docker/swarmkit/version [no test files]
ok github.com/moby/swarmkit/protobuf/plugin/raftproxy/test 1.084s
ok github.com/moby/swarmkit/protobuf/ptypes 1.025s
? github.com/moby/swarmkit/version [no test files]

The above provides a repeatable build using the contents of the vendored
`./vendor` directory. This includes formatting, vetting, linting, building,
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ A great way to contribute to the project is to send a detailed report when you
encounter an issue. We always appreciate a well-written, thorough bug report,
and will thank you for it!

Check that [our issue database](https://github.com/docker/swarmkit/issues)
Check that [our issue database](https://github.com/moby/swarmkit/issues)
doesn't already include that problem or suggestion before submitting an issue.
If you find a match, you can use the "subscribe" button to get notified on
updates. Do *not* leave random "+1" or "I have this too" comments, as they
Expand All @@ -64,7 +64,7 @@ This section gives the experienced contributor some tips and guidelines.

Not sure if that typo is worth a pull request? Found a bug and know how to fix
it? Do it! We will appreciate it. Any significant improvement should be
documented as [a GitHub issue](https://github.com/docker/swarmkit/issues) before
documented as [a GitHub issue](https://github.com/moby/swarmkit/issues) before
anybody starts working on it.

We are always thrilled to receive pull requests. We do our best to process them
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE(dperny): for some reason, alpine was giving me trouble
ARG GO_VERSION=1.17.4
ARG GO_VERSION=1.18.8
ARG DEBIAN_FRONTEND=noninteractive
ARG BASE_DEBIAN_DISTRO="buster"
ARG BASE_DEBIAN_DISTRO="bullseye"
ARG GOLANG_IMAGE="golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO}"

FROM ${GOLANG_IMAGE}
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file describes who runs the docker/swarmkit project and how.
# This file describes who runs the moby/swarmkit project and how.
# This file is compiled into the MAINTAINERS file in docker/opensource.
#
[Org]
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# [SwarmKit](https://github.com/docker/swarmkit)
# [SwarmKit](https://github.com/moby/swarmkit)

[![GoDoc](https://godoc.org/github.com/docker/swarmkit?status.svg)](https://godoc.org/github.com/docker/swarmkit)
[![Circle CI](https://circleci.com/gh/docker/swarmkit.svg?style=shield&circle-token=a7bf494e28963703a59de71cf19b73ad546058a7)](https://circleci.com/gh/docker/swarmkit)
[![codecov.io](https://codecov.io/github/docker/swarmkit/coverage.svg?branch=master&token=LqD1dzTjsN)](https://codecov.io/github/docker/swarmkit?branch=master)
[![Badge Badge](http://doyouevenbadge.com/github.com/docker/swarmkit)](http://doyouevenbadge.com/report/github.com/docker/swarmkit)
[![GoDoc](https://godoc.org/github.com/moby/swarmkit?status.svg)](https://godoc.org/github.com/moby/swarmkit)
[![Circle CI](https://circleci.com/gh/moby/swarmkit.svg?style=shield&circle-token=a7bf494e28963703a59de71cf19b73ad546058a7)](https://circleci.com/gh/moby/swarmkit)
[![codecov.io](https://codecov.io/github/moby/swarmkit/coverage.svg?branch=master&token=LqD1dzTjsN)](https://codecov.io/github/moby/swarmkit?branch=master)
[![Badge Badge](http://doyouevenbadge.com/github.com/moby/swarmkit)](http://doyouevenbadge.com/report/github.com/moby/swarmkit)

*SwarmKit* is a toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.

Expand Down
2 changes: 1 addition & 1 deletion agent/exec/controller_stub.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (sc *StubController) called() {
if !ok {
panic("Failed to find caller of function")
}
// longName looks like 'github.com/docker/swarmkit/agent/exec.(*StubController).Prepare:1'
// longName looks like 'github.com/moby/swarmkit/agent/exec.(*StubController).Prepare:1'
longName := runtime.FuncForPC(pc).Name()
parts := strings.Split(longName, ".")
tail := strings.Split(parts[len(parts)-1], ":")
Expand Down
2 changes: 1 addition & 1 deletion agent/exec/dockerapi/docker_client_stub.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (sa *StubAPIClient) called() {
if !ok {
panic("failed to update counts")
}
// longName looks like 'github.com/docker/swarmkit/agent/exec.(*StubController).Prepare:1'
// longName looks like 'github.com/moby/swarmkit/agent/exec.(*StubController).Prepare:1'
longName := runtime.FuncForPC(pc).Name()
parts := strings.Split(longName, ".")
tail := strings.Split(parts[len(parts)-1], ":")
Expand Down
4 changes: 2 additions & 2 deletions agent/exec/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ type VolumesManager interface {
Plugins() VolumePluginManager
}

// PluginManager is the interface for accessing the volume plugin manager from
// VolumePluginManager is the interface for accessing the volume plugin manager from
// the executor. This is identical to
// github.com/docker/swarmkit/agent/csi/plugin.PluginManager, except the former
// github.com/moby/swarmkit/agent/csi/plugin.PluginManager, except the former
// also includes a Get method for the VolumesManager to use. This does not
// contain that Get method, to avoid having to import the Plugin type, and
// because in this context, it is not needed.
Expand Down
2 changes: 1 addition & 1 deletion cmd/external-ca-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
To get started, build and install the go program in this directory:

```
$ go install github.com/docker/swarmkit/cmd/external-ca-example
$ go install github.com/moby/swarmkit/v2/cmd/external-ca-example@latest
```

Now, run `external-ca-example`:
Expand Down
8 changes: 4 additions & 4 deletions design/generic_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ to be cluster wide in order to satisfy other use cases (e.g: pool of licenses)

## Related Issues

* [Support abstract resource](https://github.com/docker/swarmkit/issues/594)
* [Support abstract resource](https://github.com/moby/swarmkit/issues/594)
* [Add new node filter to scheduler](https://github.com/docker/swarm/issues/2223)
* [Add support for devices](https://github.com/docker/swarmkit/issues/1244)
* [Resource Control](https://github.com/docker/swarmkit/issues/211)
* [Add support for devices](https://github.com/moby/swarmkit/issues/1244)
* [Resource Control](https://github.com/moby/swarmkit/issues/211)
* [NVIDIA GPU support](https://github.com/docker/docker/issues/23917)
* [Does Docker have plan to support allocating GPU](https://github.com/docker/docker/issues/24582)
* [Docker Swarm to orchestrate "Swarm Cluster" which supports GPU](https://github.com/docker/docker/issues/24750)
* [Use accelerator in docker container](https://github.com/docker/docker/issues/28642)
* [Specify resource selectors](https://github.com/docker/swarmkit/issues/206)
* [Specify resource selectors](https://github.com/moby/swarmkit/issues/206)

## Objectives

Expand Down
2 changes: 1 addition & 1 deletion design/orchestrators.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ number of tasks running on multiple nodes, it prefers to remove tasks that
aren't running (in terms of observed state) over tasks that are currently
running. Note that scale-down decisions are made by the orchestrator, and don't
quite match the state the scheduler would arrive at when scaling up. This is an
area for future improvement; see https://github.com/docker/swarmkit/issues/2320
area for future improvement; see https://github.com/moby/swarmkit/issues/2320
for more details.

In both of these cases, and also in the case where the number of replicas is
Expand Down
4 changes: 2 additions & 2 deletions design/raft.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SwarmKit uses the Raft consensus protocol to synchronize state between manager
nodes and support high availability. The lowest level portions of this are
provided by the `go.etcd.io/etcd/raft/v3` package. SwarmKit's
`github.com/docker/swarmkit/manager/state/raft` package builds a complete
`github.com/moby/swarmkit/manager/state/raft` package builds a complete
solution on top of this, adding things like saving and loading state on disk,
an RPC layer so nodes can pass Raft messages over a network, and dynamic cluster
membership.
Expand Down Expand Up @@ -201,7 +201,7 @@ invoke RPCs on the leader, so the communication would only happen in one
direction. It would normally be impossible for the node to catch up. With
`ResolveAddress`, it can query other cluster members for the leader's address,
and restore two-way communication. See
https://github.com/docker/swarmkit/issues/436 more details on this situation.
https://github.com/moby/swarmkit/issues/436 more details on this situation.

SwarmKit's `raft/transport` package abstracts the mechanism for keeping track of
peers, and sending messages to them over gRPC in a specific message order.
Expand Down
2 changes: 1 addition & 1 deletion design/store.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ There is a watch server that provides a very similar interface to the `Watch`
call. See `api/watch.proto` for the relevant protobuf definitions.

A full gRPC API for the store has been proposed, but not yet merged at the time
this document was written. See https://github.com/docker/swarmkit/pull/1998 for
this document was written. See https://github.com/moby/swarmkit/pull/1998 for
draft code. In this proposal, the gRPC store API did not support full
transactions, but did allow creations and updates to happen in atomic sets.
Implementing full transactions over gRPC presents some challenges, because of
Expand Down
1 change: 1 addition & 0 deletions direct.mk
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ dep-validate: go-mod-vendor

.PHONY: go-mod-vendor
go-mod-vendor:
@go mod tidy
@go mod vendor
@# ensure that key protobuf spec files are in vendor dir
@module=github.com/gogo/protobuf ; \
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/moby/swarmkit/v2

go 1.17
go 1.18

require (
code.cloudfoundry.org/clock v1.0.0
Expand Down
5 changes: 0 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5PW5zdZ39xEwfS9an067BirqA+P4QaLI=
github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
Expand Down Expand Up @@ -188,14 +187,12 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
Expand Down Expand Up @@ -677,7 +674,6 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/rs/cors v1.8.0/go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM=
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
Expand Down Expand Up @@ -781,7 +777,6 @@ go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0=
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
go.etcd.io/etcd/api/v3 v3.5.0-alpha.0/go.mod h1:mPcW6aZJukV6Aa81LSKpBjQXTWlXB5r74ymPoSWa3Sw=
go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
Expand Down