kolla-mesos/services/default.chronos.j2
Angus Salkeld 1f95680a32 Use a new per-service format
Note: whilst this is a large patch, most of it is just moving stuff around.

This has a number of benefits now:
- generate the marathon/chronos files
- one file per running container (easier to manage changes)
- no need to redefine lots of marathon attributes
- to create special marathon attributes specify them under
  "service"/"task" or "container" depending on the attribute
  and it will override the value in services/default.marathon.j2
- render the command's files just before running the command
  (previously there was a risk of rendering the files too early)

We can benefit from the changes with a little more work:
- any update tasks can be easily separated from the service

Change-Id: I007c2859b9d4bf8e9b984cbeba93456a9ce06f29
2016-02-08 18:30:15 +10:00

23 lines
997 B
Django/Jinja

{
"name": "{{ deployment_id }}-{{ service_name }}",
"mem": 512.0,
"cpus": 0.3,
"command": "kolla_start",
"container": {
"type": "DOCKER",
"image": "{{ kolla_toolbox_image }}:{{ kolla_toolbox_tag }}",
"network": "HOST"
},
"environmentVariables": [
{"name": "KOLLA_CONFIG_STRATEGY", "value": "{{ config_strategy }}"},
{"name": "KOLLA_CONFIG", "value": "{{ kolla_config }}"},
{"name": "KOLLA_LOGLEVEL", "value": "{{ init_log_level }}"},
{"name": "KOLLA_GROUP", "value": "{{ group }}"},
{"name": "KOLLA_ROLE", "value": "{{ role }}"},
{"name": "KOLLA_ZK_HOSTS", "value": "{{ zookeeper_hosts }}"},
{"name": "KOLLA_PRIVATE_INTERFACE", "value": "{{ private_interface }}"},
{"name": "KOLLA_PUBLIC_INTERFACE", "value": "{{ public_interface }}"},
{"name": "KOLLA_DEPLOYMENT_ID", "value": "{{ deployment_id }}"},
{"name": "ANSIBLE_LIBRARY", "value": "/usr/share/ansible/"}]
}