[ 
https://issues.apache.org/jira/browse/MESOS-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15131592#comment-15131592
 ] 

popsuper1982 commented on MESOS-4572:
-------------------------------------

Yes, agree

we have a private implementation to use self-defined environment variables such 
as LINKER_CONF_SCRIPT and LINKER_CONF_PARAMS to handle the postconfig scripts.

But I do not think this is a standard implementation, we 100% agree that the 
preconfig and postconfig should be put into TaskInfo.

                {
                    "id": "redissentinel1",
                    "cpus": 0.5,
                    "mem": 1024,
                    "instances": 1,
                    "constraints": [["physicalnode", "CLUSTER", "pn-1"]],
                    "container": {
                        "type": "DOCKER",
                        "docker": {
                            "network": "BRIDGE",
                            "image": "redis_sentinel",
                            "privileged": true,
                            "forcePullImage": true
                        }
                    },
                    "env": {
                        "LINKER_CONF_SCRIPT": "/usr/local/bin/linkerconfig",
                        "LINKER_CONF_PARAMS": "/config.sh --master_name 
my_cluster_name --master_addr 172.17.200.54 --master_port 6379 --failover_num 2"
                    }
                }

> docker executor should support preconfiguration and postconfiguration steps
> ---------------------------------------------------------------------------
>
>                 Key: MESOS-4572
>                 URL: https://issues.apache.org/jira/browse/MESOS-4572
>             Project: Mesos
>          Issue Type: Improvement
>          Components: docker
>            Reporter: popsuper1982
>   Original Estimate: 672h
>  Remaining Estimate: 672h
>
> there should be one way to execute some scripts before and after the docker 
> is created.
> Preconfiguration: for example, check the environments (IP addresses, 
> Hostnames, Bridges, Volume directories) of the hosts where docker will run, 
> and form the ENV for the docker and then run the docker with those 
> environments.
> Postconfiguration: for example, use pipework to configure the docker, get the 
> ports allocated and reports to another docker to configure relationships 
> between applications between dockers.
> another postconfiguration example, after docker is shutdown, cleanup some 
> data in the volumes 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to