a7e559b7d2
beam/examples/beamsh: fix 'print' to be pass-through
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: d0ca66dded29c3e5e2f78d99e9cc9205484c3b5f
Component: engine
2014-04-22 15:50:22 -07:00
df4d4ec486
beam/examples/beamsh: rename 'log' to 'logger' to avoid conflict with stdout/stderr
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: b97375fc29a88f896e14f45a34c263a4948c9ad9
Component: engine
2014-04-22 15:50:22 -07:00
05ff9d4c14
beam/examples/beamsh: 'prompt' asks the user for a value and sends it.
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: a2b88b4915acf7b1c1a165dd9193f416e5b99e3c
Component: engine
2014-04-22 15:50:22 -07:00
efaa77908b
beam/examples/beamsh: commands are messages.
...
Commands in the pipeline should either implement or pass-through command messages.
This amounts to a proof-of-concept implementation of the "pipeline"
design of Docker plugins.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: ed62ca5b2f673fde54c2ffc5edaf0e5bcbd1b721
Component: engine
2014-04-22 15:50:22 -07:00
4c6e97a76f
beam/examples/beamsh: cosmetic fix in Fatalf
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 2f4b8b7e8dbdc1861ee83b63d92ab0921045861f
Component: engine
2014-04-22 15:50:22 -07:00
dd8f545bb2
beam: replace SendPair() with the simpler SendConn()
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 4f92ffb50036f313a51020e1bfdcad7b10db65fb
Component: engine
2014-04-22 15:50:21 -07:00
d1f6c39cc9
beam/examples/beamsh: miniserver.ds demo
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 5833e7888725dcb7d0bfd3f23087deed73a75328
Component: engine
2014-04-22 15:50:21 -07:00
4b5530e072
beam: improve the API with Sender/Receiver interfaces and utilities: Copy/SendPipe/SendPair
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 70d32621615506b6622380ed6021f63be67e6e23
Component: engine
2014-04-22 15:50:21 -07:00
3822f04f53
beam: Make extracted Fds CloseOnExec
...
Grab forklock to make sure no forks accidentally inherit the new fds
before they are made CLOEXEC There is a slight race condition between
ReadMsgUnix returns and when we grap the lock, so this is not
perfect. Unfortunately There is no way to pass MSG_CMSG_CLOEXEC to
recvmsg() nor any way to implement non-blocking i/o in go, so this is
hard to fix.
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com > (github: alexlarsson)
Upstream-commit: b0228d94beeeb331f6ac58b289eba4982a42c5d4
Component: engine
2014-04-22 15:50:21 -07:00
1695eb64ac
beam/examples/beamsh: add a few example dockerscripts
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 207e604bad1bf5d69c139cb17568cfc473a391ba
Component: engine
2014-04-22 15:50:21 -07:00
dd65dea1c6
beam/examples/beamsh: simplify code by using sendWPipe utility
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 29ddf2be1e9b9349865e3d0f34b1d4fc0b960ee3
Component: engine
2014-04-22 15:50:21 -07:00
aed648b82b
beam/examples/beamsh: move code around for readability
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 1dc449e11dfaf9b376b953322b4bab19e88f7d94
Component: engine
2014-04-22 15:50:21 -07:00
609fa308ff
beam/examples/beamsh: 'exec' adds 'fromcmd' field to its output
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 3a2b31a30b49f02f6043be5790fd2a123c2c5eae
Component: engine
2014-04-22 15:50:21 -07:00
ab1a9fa4e1
beam/examples/beamsh: simple 'log' command tees streams to a local directory
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 7534f7a34b2f0d5eac5e59c1a686adc6f4410d26
Component: engine
2014-04-22 15:50:21 -07:00
0fd013996b
beam/examples/beamsh: 'render' and 'beamsh -x'
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 4f5b94d3690e3ccdcc23b68d9635dfa37b6dd0e4
Component: engine
2014-04-22 15:50:20 -07:00
75bca8866b
beam/examples/beamsh: run commands in an implicit context of pre-loaded 'plugins'
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 4ebe7aab91b67048ea0d2bbec13bfb1d79787f11
Component: engine
2014-04-22 15:50:20 -07:00
1875fe5b4e
beam/examples/beamsh: convenience commands 'devnull', 'echo' and 'stdio'
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: cd85af06fe693d849766348e505607f3bd4ff3fc
Component: engine
2014-04-22 15:50:20 -07:00
6679196850
beam/examples/beamsh: 'emit' supports key=value syntax to compose arbitrary objects
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 6d9cdbf24f1f99dd42788afcadc300128175f42f
Component: engine
2014-04-22 15:50:20 -07:00
31e10ad323
dockerscript: '=' is not a special character
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 2b81fb8424eb4ba8c815c856075509d686c383a0
Component: engine
2014-04-22 15:50:20 -07:00
e69a2729d2
beam/examples/beamsh: support for background commands with '&' terminator
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 6e0a156d9086300a34b0e1f441dd5150dde57be1
Component: engine
2014-04-22 15:50:20 -07:00
e8bf776d4f
beam/data: Message.Parse creates a message from shell-style 'key=value' arguments
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 08686f1d2108bbe93d02e870abe8b944b1fe022b
Component: engine
2014-04-22 15:50:20 -07:00
1c72cca268
dockerscript: support '#' line comments
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: ffe19414b1cc02daeb0cad4b7310ab1e96976ecf
Component: engine
2014-04-22 15:50:20 -07:00
9b009b457a
beam/examples/beamsh: scripts can be passed as filenames
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: e1c8dbba97212381874c297ba07270436ea595cc
Component: engine
2014-04-22 15:50:20 -07:00
f1d3513c36
beam/examples/beamsh: remote communication over beam (experimental).
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 222fc87ade3ed83623a3dae867f50d193b48b2a9
Component: engine
2014-04-22 15:50:20 -07:00
ea79e30c93
beam/examples/beamsh: 'in' chdirs to a directory. 'pass' does simple passthrough
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 371f6fc63d864711ee546220116f31ddb151fcce
Component: engine
2014-04-22 15:50:19 -07:00
70bbf6d2b3
beam/examples/beamsh: 'beamsend' command serializes all messages and sends them over a network connection
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 6d5c75a2242d14fda250759371fdedbcd519654a
Component: engine
2014-04-22 15:50:19 -07:00
85628de2fe
beam/examples/beamsh: 'exec' command correctly closes stdout and stderr when the process exists
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 5ddf67385164f76a2dbe1ed30442dd99c7911827
Component: engine
2014-04-22 15:50:19 -07:00
45c6418e21
beam/examples/beamsh: don't print discarded messages in Devnull
...
This avoids false alarms when process exits without printing. Devnull
doesn't require synchronization.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: e512fef42505b3d276936a563a3ea4a44a52b19c
Component: engine
2014-04-22 15:50:19 -07:00
90f7f3b975
beam/examples/beamsh: more useful debugging
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 34c5724b899ad8ceca4963ad527f246f06cb65b9
Component: engine
2014-04-22 15:50:19 -07:00
8a297e956b
beam/data: expose EncodeString for convenience access to the underlying netstring primitive
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: a5bc75d4060b3537661e02a8406ab9a270727efc
Component: engine
2014-04-22 15:50:19 -07:00
bbc54cabb7
beam/examples/beamsh: utility function 'fileToConn'
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: fb1af1f0bc87712a41a47829e12a2f273b2c8a55
Component: engine
2014-04-22 15:50:19 -07:00
9067ea4162
beam/examples/beamsh: 'connect' command
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 74b90c25d99217a2f8214960d5856a060038b58b
Component: engine
2014-04-22 15:50:19 -07:00
9230710b3f
beam/examples/beamsh: 'exec' and 'listen' commands
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: dff98543054fbccf8b6cd2b9999bdddeace951d9
Component: engine
2014-04-22 15:50:19 -07:00
6b526d5950
beam/examples/beamsh: prettier devnull
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 3686d50429db11a709bb480e29b769e808c207e7
Component: engine
2014-04-22 15:50:18 -07:00
e963a518ae
beam/data: prettier Message.Pretty()
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: c9b8e0fcac0674ec1a1387c40281a905ce351300
Component: engine
2014-04-22 15:50:18 -07:00
9b9f5c5948
beam/examples/beamsh: prettier 'trace' command
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: d7a2ae8e13f2d830688091c072878c145ac07f17
Component: engine
2014-04-22 15:50:18 -07:00
8d1ce4f1b2
beam/data: convenience Message.Pretty() function
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: eca6fecb590b1a3107beb910f8df5aef0da457e6
Component: engine
2014-04-22 15:50:18 -07:00
67a797ee49
beam/examples/beamsh: basic implementation of the pipeline design, with static handlers for now.
...
In the pipeline design, several beam commands can be run concurrently,
with their respective inputs and outputs connected in such a way that
beam messages flow from the first to last. This is similar to the way
a unix shell executes commands in a pipeline: instead of STDIN and
STDOUT, each beam command has a "BEAMIN" and "BEAMOUT".
Since beam allows for richer communication than plain byte streams, beam
pipelines can express more powerful computation, while retaining the
fundamental elegance and ease of use of unix-style composition.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: d4920b3fffb5458e8d5368f50cedea8e45b21cee
Component: engine
2014-04-22 15:50:18 -07:00
97fa55bc83
beam/examples/beamsh: better debugging messages
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: ec288895e53da11dc28a87d70fc1dd19c63433b8
Component: engine
2014-04-22 15:50:18 -07:00
a143455085
beam/examples/beamsh: simple 'exec' command
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: ab2010cfd32b50bb2ff0e4ef9449c0464253b83b
Component: engine
2014-04-22 15:50:18 -07:00
4fa458b774
beam/examples/beamsh: catch introspection calls from jobs for proper nesting
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 5689792171bc6cd5f6d5c2e574d6b976c5f3557c
Component: engine
2014-04-22 15:50:18 -07:00
bb08f36e5e
beam: fix FD leaks in SendPipe
...
This fixes file descriptor leaks in the SendPipe function.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: bcd31405cffba0334c2a71c2be908aa8299400ae
Component: engine
2014-04-22 15:50:18 -07:00
865e951d26
beam: more hooks for interactive debugging
...
This inserts low-level hooks for interactive step-by-step debugging.
Hooks are triggered by setting the *TEST* environment variable.
This is particularly useful for tracking down file descriptor leaks,
double-closing, or other issues which are difficult to debug with
the usual toolbox.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 1737063904dbcc311bee64b4c48548549006e62e
Component: engine
2014-04-22 15:50:17 -07:00
86299552de
beam/examples/beamsh: first try at nested execution
...
The "wiring" is broken because engine does not keep a reference for handling introspection calls.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 6072dec9e774f1012faa73713c404603f4a09a14
Component: engine
2014-04-22 15:50:17 -07:00
3f7c1ec59c
beam/examples/beamsh: fix a bug in the log command
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 8697490740ca3b3ae87c30e71a8baf49dddb7789
Component: engine
2014-04-22 15:50:17 -07:00
d5f3f21a43
beam/data: convenience Message.Get
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 488fe61354d772e5a4c13e4b893d976cc2361863
Component: engine
2014-04-22 15:50:17 -07:00
65cd70beaa
beam/examples/beamsh: use beam/data
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 460c98d92d6195f7833c19a5a955576842871638
Component: engine
2014-04-22 15:50:17 -07:00
3887238dfb
beam/data: Message.Bytes() convenience method
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 5bcf2a736ce154aa9cd6c664db639a35f888fd18
Component: engine
2014-04-22 15:50:17 -07:00
14e7275b78
beam/data: fix a bug in encoding of multi-value maps
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 99dda11d4525c5153a10c4c95c5f46ca3512fc69
Component: engine
2014-04-22 15:50:17 -07:00
07c76db398
beam/data: convenience Message type for chained manipulation
...
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com > (github: shykes)
Upstream-commit: 276fb1918deb19ee90495e8c88cb5c6774ec31df
Component: engine
2014-04-22 15:50:17 -07:00