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

Enhancing Environment Proto to support Docker and Process Environments.


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.