[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enhancing Environment Proto to support Docker and Process Environments.

Hi Ankur,

There is a separate related thread: "Process JobBundleFactory for portable runner". It also contains a concrete suggestion for Environment proto changes to accommodate docker and process based on a urn/payload structure and a but of discussion.

We should either continue the discussion there or bring the two proposals together here. What do you think?


On Fri, Aug 31, 2018 at 5:47 PM Ankur Goenka <goenka@xxxxxxxxxx> wrote:

We recently added the ProceessEnvironment which uses forked process instead of Docker container to run SDKHarness.
But the current Environment proto does not have a well defined structure to represent a process.
Current Proto:
message Environment {

// (Required) The URL of a container
// TODO: reconcile with Fn API's DockerContainer structure by
// adding adequate metadata to know how to interpret the container
string url = "" style="color:rgb(0,0,255)">1;
I am planning to enhance the proto to support different types of environments (Docker and Process for now). 
Here is the new proposed proto.
message Environment {

message Docker {
// (Required) URL for the container image.
string url = "" style="color:rgb(0,0,255)">1;
// Arguments to the container.
repeated string arguments = 2;
// Environment variable for the container.
repeated string environments = 3;

message Process {
// (Required) Name of the executable.
string executable = 1;
// Arguments to the process.
repeated string arguments = 2;
// Environment variable for the process.
repeated string environments = 3;

// (Required) The unique id of the environment.
string id = 1;

// (Required) Environment configuration.
oneof config {
Docker docker_config = 2;
Process process_config = 3;
Please let me know your thoughts.