ninesstack / sidecar-executor Goto Github PK
View Code? Open in Web Editor NEWRun Docker containers on Mesos with Sidecar service discovery!
License: MIT License
Run Docker containers on Mesos with Sidecar service discovery!
License: MIT License
When using the stock Singularity executor and running a job whose deploy JSON consists of something akin to:
{
"deployResult": {
"deployState": "SUCCEEDED",
"message": "Request not deployable",
"deployFailures": [],
"timestamp": 1527196408905
},
"deployMarker": {
"requestId": "dev_example_job",
"deployId": "1_28_4_f58c70e",
"timestamp": 1527196406057,
"user": "jopecko",
"message": " Deploying version 'busybox:1.28.4'"
},
"deploy": {
"requestId": "dev_example_job",
"id": "1_28_4_f58c70e",
"command": "echo 'Hi, a job here'",
"containerInfo": {
"type": "DOCKER",
"volumes": [],
"docker": {
"image": "busybox:1.28.4",
"privileged": false,
"network": "BRIDGE",
"portMappings": [],
"forcePullImage": false,
"dockerParameters": [
{
"key": "label",
"value": "SidecarDiscover=false"
},
{
"key": "env",
"value": "NEW_RELIC_LICENSE_KEY=xxxxx"
}
]
}
},
"resources": {
"cpus": 0.1,
"memoryMb": 64,
"numPorts": 0,
"diskMb": 0
},
"shell": true
},
"deployStatistics": {
"requestId": "dev_example_job",
"deployId": "1_28_4_f58c70e",
"numSuccess": 3,
"numFailures": 0,
"numSequentialRetries": 0,
"lastFinishAt": 1527197104696,
"lastTaskState": "TASK_FINISHED",
"instanceSequentialFailureTimestamps": {},
"numTasks": 3,
"averageRuntimeMillis": 1170,
"averageSchedulingDelayMillis": 2709
}
}
the job runs and behaves as expected. I.e., the stdout
log contains the text "Hi, a job here" and viewing the command displayed in the docker CLI looks as expected, e.g., "/bin/sh -c 'echo 'Hi, a job here''"
. However, when run with the sidecar executor, the docker CLI simply reports "sh"
as the command run.
An interesting idea might be to only look to Sidecar for health checking when a service has the correct health check labels deployed. But since some services could be using the defaults and don't need the labels, that would mean they would also not be health checked by Mesos which is a bummer. So maybe the right idea is to:
HealthCheck
labelsHealthCheck
label, look for another label that forces talking to SidecarAre there any better alternatives?
If the executor is killed, Mesos loses track of the Docker container and assumes that it is also gone. The executor should not die and leave the container running. This can leave a big mess behind.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.