Commit graph

316 commits

Author SHA1 Message Date
Brian Bland
0e1b1cc04e Adds push/pull client functionality
These methods rely on an ObjectStore interface, which is meant to
approximate the storage behavior of the docker engine. This is very much
subject to change.
2014-11-17 16:50:02 -08:00
Olivier Gambier
de4e976ef2 Merge pull request #739 from BrianBland/drone-lint
Lots of various golint fixes
2014-11-17 16:32:16 -08:00
Brian Bland
88795e0a14 Lots of various golint fixes
Changes some names to match go conventions
Comments all exported methods
Removes dot imports
2014-11-17 15:46:06 -08:00
Stephen Day
b5cf681458 Merge pull request #738 from docker/test-drone
Test
2014-11-17 15:38:31 -08:00
Olivier Gambier
b02ca32ac8 Fix drone 2014-11-17 14:44:36 -08:00
Olivier Gambier
815acfd6e7 Merge pull request #736 from stevvooe/repository-name-clarification
Clarify repository naming constraints for registry API
2014-11-17 14:19:46 -08:00
Stephen Day
e1798d1ffb Merge pull request #737 from BrianBland/drone-vet
Fixes "go vet" for drone CI
2014-11-17 14:19:20 -08:00
Brian Bland
8ad7819b1b Fixes "go vet" for drone CI
Removes "go get" commands for go cmd packages to use the default
versions
Also updates client/client.go to conform to go vet style
2014-11-17 13:35:58 -08:00
Stephen J Day
a650f0f854 Clarify repository naming constraints for registry API
After discussion, it was found that one of the proposed regular expressions
incorrectly limited separator delimited compoonents to two characters. The
desired restriction is to have repository name components limited to two
characters minimum. This changeset accomplishes this by wrapping the regular
expressions in a validation function, returning detailed feedback on the
validation error.

With this change, the repository name regular expressions are no longer enough
to respond with 404s on invalid repo names. Changes to the router will need to
be added to support this.
2014-11-17 11:42:54 -08:00
Olivier Gambier
3127ffcfb1 Merge pull request #733 from BrianBland/drone-fmt
Fixes drone build
2014-11-15 20:01:38 -08:00
Brian Bland
39fee7d40a Fixes formatting in errors_test.go to match gofmt rules 2014-11-14 16:00:41 -08:00
Olivier Gambier
8a64db69ec Merge pull request #729 from stevvooe/storage-path-mapper
Initial implementation of storage layer path mapper
2014-11-14 11:06:19 -08:00
Stephen Day
8217760a4d Merge pull request #725 from docker/test-drone
Test drone
2014-11-13 17:42:05 -08:00
Stephen J Day
8e44c1d209 Initial implementation of storage layer path mapper
We've added a path mapper to support simple mapping between path objects used
in the storage layer and the underlying file system. The target of this is to
ensure that paths are only calculated in a single place and their format is
separated from the data that makes up the path components.

This commit only includes spec implementation to support layer reads. Further
specs will come along with their implementations.
2014-11-13 16:02:17 -08:00
Olivier Gambier
0c999bd2da Merge pull request #727 from stevvooe/next-generation
Add route test case with dangerous path
2014-11-13 15:55:48 -08:00
Olivier Gambier
dd47af5feb Test 2014-11-13 15:40:06 -08:00
Stephen J Day
89c6bb2a90 Add route test case with dangerous path 2014-11-13 14:39:13 -08:00
Olivier Gambier
9fd57ab42b Test drone 2014-11-13 13:58:52 -08:00
Olivier Gambier
378256de47 Merge pull request #690 from BrianBland/storagedriver-process-management
Adds logic for tracking ipc storage driver process status
2014-11-13 11:24:46 -08:00
Olivier Gambier
d1bcfd6a08 Merge pull request #721 from stevvooe/disambiguate-url-routes
Disambiguate routing for multi-level repository names
2014-11-12 21:01:49 -08:00
Olivier Gambier
a32680eb53 Merge pull request #722 from BrianBland/vet-fix
Miscellaneous go vet fixes
2014-11-12 21:01:38 -08:00
Stephen J Day
15c651b732 Simplify repository name component regexp 2014-11-12 18:06:54 -08:00
Olivier Gambier
6a0c888af7 Merge pull request #713 from BrianBland/ng-client
Adds a low level registry http client interface and implementation
2014-11-12 17:27:28 -08:00
Brian Bland
c8ea224f9c Miscellaneous go vet fixes
Fixes some format strings and uses keyed fields for struct construction
2014-11-12 17:19:19 -08:00
Stephen J Day
145c89bb94 Disambiguate routing for multi-level repository names
To be able to support multi-level repository names, the API has been adjusted
to disabiguate routes tagged image manifest routes and tag list routes. With
this effort, the regular expressions have been defined in a single place to
reduce repitition and ensure that validation is consistent across the registry.

The router was also refactored to remove the use of subrouters, simplifying the
route definition code. This also reduces the number of regular expression match
checks during the routing process.
2014-11-12 17:07:44 -08:00
Stephen J Day
375f3cc136 Define common regexps used across registry application
This commit adds regular expression definitions for several string identifiers
used througout the registry. The repository name regex supports up to five path
path components and restricts repeated periods, dashes and underscores. The tag
regex simply validates the length of the tag and that printable characters are
required.

Though we define a new package common, these definition should land in docker
core.
2014-11-12 16:53:55 -08:00
Brian Bland
b25e16a56c Adds Raw bytes field to ImageManifest
This can be used for proper json signature validation
2014-11-12 15:26:35 -08:00
Brian Bland
53bd19b98f Adds a low level registry http client interface and implementation 2014-11-11 17:43:39 -08:00
Brian Bland
31df62064d Adds logic for tracking ipc storage driver process status
This allows requests to not hang if the child process exits
2014-11-11 13:54:12 -08:00
Olivier Gambier
d245a502b2 Merge pull request #712 from stevvooe/application-structure
Carve out initial application structure
2014-11-11 08:23:57 -08:00
Stephen J Day
22c9f45598 Carve out initial application structure
This changeset defines the application structure to be used for the http side
of the new registry. The main components are the App and Context structs. The
App context is instance global and manages global configuration and resources.
Context contains request-specific resources that may be created as a by-product
of an in-flight request.

To latently construct per-request handlers and leverage gorilla/mux, a dispatch
structure has been propped up next to the main handler flow. Without this, a
router and all handlers need to be constructed on every request. By
constructing handlers on each request, we ensure thread isolation and can
carefully control the security context of in-flight requests. There are unit
tests covering this functionality.
2014-11-10 19:03:49 -08:00
Stephen J Day
0618a2ebd7 Clearer names for layer upload routes 2014-11-10 18:26:06 -08:00
Olivier Gambier
7f75e6368d Merge pull request #711 from stevvooe/errors-marshaling
Initial implementation of API errors data structure
2014-11-10 16:54:12 -08:00
Stephen J Day
da7eef2e04 Allow Errors to be an error itself
This has Errors implement the error interface, allowing it to pose as an error
itself. Use of this in the server may be minimal, for now, but it's useful for
passing around opaque client errors.

A method, PushErr, has also been add to allow arbitrary errors to be passed
into the Errors list. This keeps the errors list flexible, allowing the app to
collect and errors before we have codes properly mapped.
2014-11-10 16:02:45 -08:00
Stephen J Day
af0411420a Initial implementation of API errors data structure 2014-11-10 15:29:30 -08:00
Stephen Day
364b11e876 Merge pull request #642 from docker/init
Initial open-design proposal
2014-11-10 10:47:17 -08:00
Olivier Gambier
2b7b8fa2ca Initial open-design proposal 2014-11-10 09:39:20 -08:00
Stephen Day
0e8647f1ce Merge pull request #701 from stevvooe/initial-api-routes
Initial V2 API Router Implementation
2014-11-07 17:09:27 -08:00
Stephen J Day
fec2afc93f Initial V2 API Router Implementation
This commit includes the initial API router, based on gorilla mux and a test
suite ensuring the expected variables are extracted. Currently unexported, the
structure here will likely change as this definition will be shared with the
API client.
2014-11-07 16:08:14 -08:00
Olivier Gambier
da205085f3 Merge pull request #686 from BrianBland/storagedriver-versioning
Adds versioning for out-of-process storage driver
2014-11-07 14:55:13 -08:00
Olivier Gambier
57ad37163e Merge pull request #699 from BrianBland/storagedriver-api-rename
Renames ResumeWritePosition to CurrentSize in storage driver api
2014-11-07 14:51:50 -08:00
Brian Bland
cb1bdacbe3 Renames ResumeWritePosition to CurrentSize in storage driver api 2014-11-07 12:58:48 -08:00
Olivier Gambier
abdf927c40 Merge pull request #685 from BrianBland/storagedriver
Expects storage driver executables to be of the form registry-storage-<name>
2014-11-07 01:28:43 -08:00
Brian Bland
150677f1f5 Expects storage driver executables to be of the form registry-storage-name
Moves main packages to sub-packages of the individual storage drivers
2014-11-06 18:32:06 -08:00
Olivier Gambier
e31b7d8d9a Initial open-design proposal 2014-11-06 13:28:27 -08:00
Brian Bland
1ae5485998 Adds versioning for out-of-process storage driver
The registry currently only accepts storage driver versions with the
same major version and an equal or lower minor version as its own
current storage driver api version, but this may be changed in the
future if we decide to implement specific version cross-compatibility.
2014-11-06 12:16:14 -08:00
Olivier Gambier
f02cfee950 Merge pull request #652 from BrianBland/configuration
NG: Configuration parser
2014-11-05 15:44:10 -08:00
Brian Bland
96d26842f8 Refactors configuration parser, removes Registry level from config file
Most conditional parsing code has been moved into UnmarshalYAML
functions for simplicity

Uses the BrianBland fork of goyaml in configuration.go temporarily until
fix https://github.com/go-yaml/yaml/pull/52 is merged in
2014-11-04 22:31:59 -08:00
Brian Bland
2b51a8ab43 Adds README.md to the configuration package 2014-11-04 22:31:59 -08:00
Brian Bland
2013ef5a5b Adds documentation for the configuration parser and tests 2014-11-04 22:31:59 -08:00