0.0.2 • Published 7 years ago
marathon-env v0.0.2
marathon-env
Manage the environment variables of your Marathon applications easily with a tool cli
Quickstart
Create an yml file: my-website.yml
and add these content:
groups:
- name: my_website_backend
envs:
NODE_ENV: production
DB_HOST: db.internal.myapp
DB_PORT: 3306
- name: my_website_frontend
envs:
GOOGLE_ANALYTICS_ID: "UA-12345"
JQUERY_VERSION: "2.2.5"
- name: my_website_general
envs:
YOU_CAN_PUT_ANY: "NAME"
Add ENV_GROUP
label with all groups (comma-separated) that you want to apply environment variables in your Marathon application.
Example:
{
"id": "http",
"cmd": "python -m SimpleHTTPServer $PORT",
"mem": 50,
"cpus": 0.1,
"instances": 1,
"labels": {
"ENV_GROUP": "my_website_backend,my_website_general"
}
}
Done! Now, everytime you want to redefine environment variables, just change your yml file and apply with:
marathon-env --url <YOUR-MARATHON-URL> --username <YOU-MARATHON-HTTP-USER> --password <YOU-MARATHON-HTTP-PASSWORD>