This is an automated email from the ASF dual-hosted git repository.
markusthoemmes pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new 8e45921 Improve container factory documentation (#4255)
8e45921 is described below
commit 8e459219a7e8557ccec08e9aebb2707eab5d4c3f
Author: Sven Lange-Last <[email protected]>
AuthorDate: Thu Feb 21 10:50:32 2019 +0100
Improve container factory documentation (#4255)
* Improve container factory documentation
Explicitly list some of the expectations and requirements an actual
container factory / container implementation needs to satisfy. Addresses #4002.
* Address review feedback
---
.../core/containerpool/ContainerFactory.scala | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git
a/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerFactory.scala
b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerFactory.scala
index ad78ce2..eeb37f3 100644
---
a/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerFactory.scala
+++
b/common/scala/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerFactory.scala
@@ -52,7 +52,26 @@ case class ContainerPoolConfig(userMemory: ByteSize,
concurrentPeekFactor: Doubl
*/
trait ContainerFactory {
- /** create a new Container */
+ /**
+ * Create a new Container
+ *
+ * The created container has to satisfy following requirements:
+ * - The container's file system is based on the provided action image and
may have a read/write layer on top.
+ * Some managed action runtimes may need the capability to write files.
+ * - If the specified image is not available on the system, it is pulled
from an image
+ * repository - for example, Docker Hub.
+ * - The container needs a network setup - usually, a network interface -
such that the invoker is able
+ * to connect the action container. The container must be able to perform
DNS resolution based
+ * on the settings provided via ContainerArgsConfig. If needed by action
authors,
+ * the container should be able to connect to other systems or even the
internet to consume services.
+ * - The IP address of said interface is stored in the created Container
instance if you want to use
+ * the standard init / run behaviour defined in the Container trait.
+ * - The default process specified in the action image is run.
+ * - It is desired that all stdout / stderr written by processes in the
container is captured such
+ * that it can be obtained using the logs() method of the Container trait.
+ * - It is desired that the container supports and enforces the specified
memory limit and CPU shares.
+ * In particular, action memory limits rely on the underlying container
technology.
+ */
def createContainer(tid: TransactionId,
name: String,
actionImage: ExecManifest.ImageName,