@@ -8,33 +8,41 @@ npm_version: 2
88
99# for cron job
1010# this is the list of queues we want to enqueue a job into
11- cron_queues : khronos:containers:orphan:prune khronos:context-versions:prune-expired khronos:images:prune khronos:weave:prune
11+ main_cron_queues : " \
12+ khronos:containers:orphan:prune \
13+ khronos:context-versions:prune-expired \
14+ khronos:images:prune \
15+ khronos:weave:prune"
16+
17+ canary_cron_queues : " \
18+ khronos:canary:build \
19+ khronos:canary:github-branch \
20+ khronos:canary:log \
21+ khronos:canary:network \
22+ khronos:metrics:container-status"
23+
1224# a nice version of the rabbitmq host
1325cron_rabbit_host_address : " {{ rabbit_host_address }}:{{ rabbit_port }}"
1426# a quick version of authentication for rabbit for cron
1527cron_rabbit_auth : --username {{ rabbit_username }} --password {{ rabbit_password }}
16- # this is the command we want to run in the container.
17- cron_command : " bash -c \" for QUEUE in {{ cron_queues }}; do /khronos/bin/cli.js --queue \\ $QUEUE --job '{}' --host {{ cron_rabbit_host_address }} {{ cron_rabbit_auth }}; done\" "
18- # This is the build canary cron command
19- cron_build_canary_command : " /khronos/bin/cli.js --queue khronos:canary:build --job '{}' --host {{ cron_rabbit_host_address }} {{ cron_rabbit_auth }}"
20- # This is the log canary cron command
21- cron_log_canary_command : " /khronos/bin/cli.js --queue khronos:canary:log --job '{}' --host {{ cron_rabbit_host_address }} {{ cron_rabbit_auth }}"
22- # This is the github-branch canary cron command
23- cron_github_branch_canary_command : " /khronos/bin/cli.js --queue khronos:canary:github-branch --job '{}' --host {{ cron_rabbit_host_address }} {{ cron_rabbit_auth }}"
24- cron_container_metrics_command : " /khronos/bin/cli.js --queue khronos:metrics:container-status --job '{}' --host {{ cron_rabbit_host_address }} {{ cron_rabbit_auth }}"
2528
2629# for container settings
2730container_envs : >
28- -e API_URL={{ api_url }}
2931 -e API_SOCKET_SERVER=https://{{ api_socket_server_hostname }}
30- -e CANARY_API_TOKEN={{ khronos_canary_token }}
31- -e CANARY_REBUILD_INSTANCE_ID={{ khronos_canary_rebuild_instance_id }}
32- -e CANARY_REBUILD_NAVI_URL={{ khronos_canary_rebuild_navi_url }}
32+ -e API_URL={{ api_url }}
33+ -e CANARY_API_TOKEN={{ khronos_canary_token | default('undefined') }}
34+ -e CANARY_GITHUB_BRANCHES_INSTANCE_ID={{ khronos_canary_github_branches_instance_id | default('undefined') }}
35+ -e CANARY_LOG_INSTANCE_ID={{ khronos_canary_logs_instance_id | default('undefined') }}
36+ -e CANARY_LOG_TERMINAL_SLEEP=10
37+ -e CANARY_REBUILD_INSTANCE_ID={{ khronos_canary_rebuild_instance_id | default('undefined') }}
38+ -e CANARY_REBUILD_NAVI_URL={{ khronos_canary_rebuild_navi_url | default('undefined') }}
3339 -e DATADOG_HOST={{ datadog_host_address }}
3440 -e DATADOG_PORT={{ datadog_port }}
35- -e KHRONOS_PREFETCH=6
41+ -e INTERCOM_API_KEY={{ intercom_api_key | default('undefined') }}
42+ -e INTERCOM_APP_ID={{ intercom_app_id | default('undefined') }}
3643 -e KHRONOS_MAVIS=http://{{ mavis_hostname }}
3744 -e KHRONOS_MONGO=mongodb://{{ khronos_mongo_auth }}@{{ mongo_hosts }}/{{ khronos_mongo_database }}
45+ -e KHRONOS_PREFETCH=6
3846 -e LOG_LEVEL=error
3947 {% if node_env != "production-epsilon" %}
4048 -e MONGO_CACERT=/opt/ssl/mongo-client/ca.pem
@@ -46,12 +54,8 @@ container_envs: >
4654 -e RABBITMQ_PASSWORD={{ rabbit_password }}
4755 -e RABBITMQ_PORT={{ rabbit_port }}
4856 -e RABBITMQ_USERNAME={{ rabbit_username }}
57+ -e SWARM_HOST=http://{{ swarm_host_address }}:{{ swarm_master_port }}
4958 -e WORKER_MAX_RETRY_DELAY=3600000
50- -e CANARY_LOG_TERMINAL_SLEEP=10
51- -e CANARY_LOG_INSTANCE_ID={{khronos_canary_logs_instance_id}}
52- -e CANARY_GITHUB_BRANCHES_INSTANCE_ID={{khronos_canary_github_branches_instance_id}}
53- -e INTERCOM_APP_ID={{ intercom_app_id }}
54- -e INTERCOM_API_KEY={{ intercom_api_key }}
5559
5660container_run_opts : >
5761 -h {{ name }}
@@ -60,5 +64,3 @@ container_run_opts: >
6064 -v /opt/ssl/mongo-client:/opt/ssl/mongo-client:ro
6165 --memory=1500m
6266 {{container_envs}}
63-
64- npm_start_command : run start-json-output
0 commit comments