1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00
Commit Graph

47845 Commits

Author SHA1 Message Date
Stephen J Day
080e329cb1 Separate request data from actor in Event
To clarify the role of actor, the request data that initiates an event has been
separated. The ActorRecord is pared down to just the username. This eliminates
confusion about where event related data should be added.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-02-03 13:32:37 -08:00
Stephen J Day
0a29b59e14 Webhook notification support in registry webapp
Endpoints are now created at applications startup time, using notification
configuration. The instances are then added to a Broadcaster instance, which
becomes the main event sink for the application. At request time, an event
bridge is configured to listen to repository method calls. The actor and source
of the eventBridge are created from the requeest context and application,
respectively. The result is notifications are dispatched with calls to the
context's Repository instance and are queued to each endpoint via the
broadcaster.

This commit also adds the concept of a RequestID and App.InstanceID. The
request id uniquely identifies each request and the InstanceID uniquely
identifies a run of the registry. These identifiers can be used in the future
to correlate log messages with generated events to support rich debugging.

The fields of the app were slightly reorganized for clarity and a few horrid
util functions have been removed.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-02-03 13:32:37 -08:00
Stephen J Day
499382dd0b Add debug server to support pprof and expvar
If configured, a debug http server will be started to serve default registered
endpoints, such as pprof and expvar. The endpoint should be secured carefully
and not available to external traffic. It is disabled by default but the
development config has been modified to make it available on localhost.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-02-03 13:32:37 -08:00
Stephen J Day
e5de2594ad Remove decorator package
After implementing notifications end to end, it was found that decorating
repositories was more straightforward that previously thought. It's unfortunate
to can this package, but it led to the techniques employed in
storage/notifications/listeners.go. The ultimate result turned out much better.
2015-02-03 13:30:20 -08:00
Stephen J Day
9f0c8d6616 Implement notification endpoint webhook dispatch
This changeset implements webhook notification endpoints for dispatching
registry events. Repository instances can be decorated by a listener that
converts calls into context-aware events, using a bridge. Events generated in
the bridge are written to a sink. Implementations of sink include a broadcast
and endpoint sink which can be used to configure event dispatch. Endpoints
represent a webhook notification target, with queueing and retries built in.
They can be added to a Broadcaster, which is a simple sink that writes a block
of events to several sinks, to provide a complete dispatch mechanism.

The main caveat to the current approach is that all unsent notifications are
inmemory. Best effort is made to ensure that notifications are not dropped, to
the point where queues may back up on faulty endpoints. If the endpoint is
fixed, the events will be retried and all messages will go through.

Internally, this functionality is all made up of Sink objects. The queuing
functionality is implemented with an eventQueue sink and retries are
implemented with retryingSink. Replacing the inmemory queuing with something
persistent should be as simple as replacing broadcaster with a remote queue and
that sets up the sinks to be local workers listening to that remote queue.

Metrics are kept for each endpoint and exported via expvar. This may not be a
permanent appraoch but should provide enough information for troubleshooting
notification problems.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-02-03 13:30:20 -08:00
Stephen J Day
14fb80d6c3 Add payload and signatures method to SignedManifest
To provide easier access to digestible content, the paylaod has been made
accessible on the signed manifest type. This hides the specifics of the
interaction with libtrust with the caveat that signatures may be parsed twice.

We'll have to have a future look at the interface for manifest as we may be
making problematic architectural decisions. We'll visit this after the initial
release.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-02-03 13:30:20 -08:00
Stephen J Day
af7eb42793 Event notification message definition
This commit defines the message format used to notify external parties of
activity within a registry instance. The event includes information about which
action was taken on which registry object, including what user created the
action and which instance generated the event.

Message instances can be sent throughout an application or transmitted
externally. An envelope format along with a custom media type is defined along
with tests to detect changes to the wire format.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2015-02-03 13:30:20 -08:00
Sean Li
02c606d8b8 Merge branch 'master' into restyle
Conflicts:
	app/ContainerDetails.react.js
	app/ContainerModal.react.js
	app/styles/main.less
2015-02-03 12:58:34 -08:00
Sean Li
9e068acfea Merge branch 'master' into restyle
Conflicts:
	app/ContainerDetails.react.js
	app/ContainerModal.react.js
	app/styles/main.less
2015-02-03 12:58:34 -08:00
Victor Vieux
8475795f76 update MAINTAINERS file
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-03 19:50:46 +00:00
Evan Hazlett
4a81c4b17f Merge pull request #482 from nathanleclaire/empty_url
Make config and env return empty URL instead of error
2015-02-03 14:49:20 -05:00
Olivier Gambier
092dadde6d Merge pull request #121 from stevvooe/address-layer-upload-errors
Address server errors received during layer upload
2015-02-03 11:48:34 -08:00
Nathan LeClaire
60fdb938ec Make config and env return empty URL instead of error
This will return an empty URL and consequently the Docker client will
fail to connect instead of spitting out an illegible error with the
subshell method.  Hopefully this will tip users off to the underlying
source of the problem.

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-02-03 11:31:57 -08:00
Stephen Day
d91e4bc34d Merge pull request #130 from stevvooe/path-names-escaped
Prefix non-name path components
2015-02-03 11:24:45 -08:00
Sean Li
034dd15234 Style tweak. 2015-02-03 11:06:49 -08:00
Sean Li
2c2442783e Style tweak. 2015-02-03 11:06:49 -08:00
Evan Hazlett
44d0720fe4 Merge pull request #481 from ehazlett/fix-cli-args
fixes cli arg bugs
2015-02-03 13:08:52 -05:00
Evan Hazlett
2f6d9a2418 fixes cli arg bugs
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-03 12:44:06 -05:00
Evan Hazlett
cdd891ce7c Merge pull request #474 from ehazlett/fix-docker-deps
fix docker deps to standard rev
2015-02-03 12:24:17 -05:00
Doug Davis
989ca9b357 Merge pull request #10524 from icecrime/10513_carry_failed_tests
Ensure Dockerfile in context
2015-02-03 12:05:43 -05:00
unclejack
b71108da87 Merge pull request #10519 from jfrazelle/burn-in-a-fire-drone
Remove drone.
2015-02-03 18:40:16 +02:00
unclejack
d18f5c3808 daemon/graphdriver/aufs: enable direct io
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-02-03 18:30:37 +02:00
unclejack
196a7216a3 project/install.sh: install ca-certificates
This ensures that ca-certificates are installed and that they get
updated in case they were already installed.

Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-02-03 17:55:14 +02:00
Arnaud Porterie
22e2254c74 Fix client-side validation of Dockerfile path
Arguments to `filepath.Rel` were reversed, making all builder tests to
fail.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-02-02 23:42:18 -08:00
Tibor Vass
73d5baf585 builder: prevent Dockerfile to leave build context
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2015-02-02 23:40:24 -08:00
Doug Davis
198ff76de5 Add an API test for docker build -f Dockerfile
I noticed that while we have tests to make sure that people don't
specify a Dockerfile (via -f) that's outside of the build context
when using the docker cli, we don't check on the server side to make
sure that API users have the same check done. This would be a security
risk.

While in there I had to add a new util func for the tests to allow us to
send content to the server that isn't json encoded - in this case a tarball

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-02 23:40:20 -08:00
Alexander Morozov
01b46c21aa Merge pull request #10512 from crosbymichael/stats-prepopulate
Print zeros for initial stats collection on stopped container
2015-02-02 21:49:03 -08:00
Evan Hazlett
67dab02ab2 remove net/context
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-02 23:22:38 -05:00
Sven Dowideit
072fbf9271 The reference menu is too big to list more than the latest API docs, so the others can be hidden - they're still linked from the API summary
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2015-02-03 14:04:08 +10:00
Sven Dowideit
1da2abb596 use the same paths as in the swarm repo, so that their links magically work
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2015-02-03 13:55:08 +10:00
Victor Vieux
d03c5bb211 Merge pull request #356 from aluzzardi/dockerfile-set-host
Dockerfile: Set swarm to bind to all interfaces in container mode.
2015-02-02 18:49:40 -08:00
Victor Vieux
6f45238f74 Merge pull request #357 from aluzzardi/default-swarm-addr
Change default SWARM_ADDR to the default Docker port.
2015-02-02 18:49:29 -08:00
Andrea Luzzardi
0bf7cc8c35 Change default SWARM_ADDR to the default Docker port.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-02-02 18:46:29 -08:00
Andrea Luzzardi
00b14527b5 Dockerfile: Set swarm to bind to all interfaces in container mode.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-02-02 18:44:22 -08:00
Andrea Luzzardi
2b2114e554 Merge pull request #308 from vieux/filter_swarm_containers
Proposal: require ps -a to show swarm containers
2015-02-02 18:32:12 -08:00
Victor Vieux
4c9935cd32 Merge pull request #355 from aluzzardi/doc-discovery-flag-fix
Docs: Remove now deprecated `--discovery` flags.
2015-02-02 18:18:36 -08:00
Andrea Luzzardi
2a592974a1 Docs: Remove now deprecated --discovery flags.
Fixes #351

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-02-02 18:12:05 -08:00
Andrea Luzzardi
9541022642 Merge pull request #354 from vieux/fix_requirement
update swarm manage requirements again
2015-02-02 18:11:48 -08:00
Victor Vieux
fb167e9511 require ps -a to show swarm containers
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-03 02:09:45 +00:00
Evan Hazlett
bcc40f8f85 fix docker deps to standard rev
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-02 21:00:01 -05:00
Andrea Luzzardi
83c67a9059 Merge pull request #353 from vieux/gitcommit
add gitcommit to version
2015-02-02 17:59:41 -08:00
Victor Vieux
afed2abbea update swarm manage requirements again
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-03 01:57:13 +00:00
Sven Dowideit
e58fdaae05 Docker attach documentation didn't make sense to me
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2015-02-03 11:53:14 +10:00
Victor Vieux
e38b06fbe8 add VERSION file
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-03 01:53:01 +00:00
Tibor Vass
662dffee4f Merge pull request #10518 from LK4D4/fix_vet_errors
Fix some go vet errors
2015-02-02 20:49:19 -05:00
Andrea Luzzardi
860a3d5f6b Merge pull request #350 from vieux/add_missing_close_proxy
add missing close in proxy
2015-02-02 17:16:17 -08:00
Victor Vieux
7c504dc58b add gitcommit to version
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-03 01:15:00 +00:00
Andrea Luzzardi
39f12e3a5a Merge pull request #352 from vieux/add_docker_compose_files
add some docker-compose.yml
2015-02-02 16:52:31 -08:00
Victor Vieux
c0f97419c9 add some docker-compose.yml
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-03 00:37:35 +00:00
James Turnbull
895f9a679b Merge pull request #10509 from chenhanxiao/cli-events-since
docs: change events --since to fit RFC3339Nano
2015-02-03 01:03:40 +01:00