App::MarathonDeployer - deployment to mesos-marathon
A simple script for deploying docker images to marathon-based cloud.
docker run \
-v /path/to/your/marathon.json:/marathon.json \
-e MARATHON_URL=<your_marathon_url> avastsoftware/marathon-deployer
It will simply do the POST or PUT request to deploy your app.
Optionally you can also provide these environment variables:
- MARATHON_JSON - name of your JSON file (default is marathon.json)
- MARATHON_APPLICATION_NAME - name of the application (id), this will be replaced in marathon json before submitting it
- MARATHON_INSTANCES - number of instances, this will be replaced in marathon json before submitting it
- DOCKER_IMAGE_NAME - name of the docker image, this will be replaced in marathon json before submitting it
- CPU_PROFILE - one of low|normal|high. If cpus is not set in marathon.json, it gets computed from total cloud's CPU/memory ratio. If you choose normal profile, the cpus is set to mem * ratio, low = 0.3 * normal, high = 3 * normal.
What it does for you:
- construct the URL to deploy
- do PUT request to marathon with provided JSON file
- parse response and set the return code accordingly
Copyright (C) Avast Software
Miroslav Tynovsky tynovsky@avast.com