Skip to content

Commit 981b9ff

Browse files
committed
Merge pull request #410 from CodeNow/SAN-3921-container-stati
SAN-3921 Container Metrics
2 parents f0de878 + 23a8123 commit 981b9ff

6 files changed

Lines changed: 19 additions & 0 deletions

File tree

ansible/delta-hosts/variables

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ khronos_canary_rebuild_instance_id=56df6674058d592500f76c9f
3939
khronos_canary_rebuild_navi_url=http://canary-build-staging-runnabletest.runnableapp.com:8000/
4040
khronos_canary_logs_instance_id=56f07f5c1e089a200077f2a3
4141
khronos_canary_github_branches_instance_id=56f05754a443842400b66a53
42+
intercom_app_id=wqzm3rju
43+
intercom_api_key=14771f14efb617900724a16345e57beb55ba9beb
4244

4345
[metis:vars]
4446
metis_rollbar_key=fdc8565a7ce64c6d9432c34be425937c

ansible/gamma-hosts/variables

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ khronos_mongo_replset_name=gamma
3636
khronos_canary_token=d939b612d75244947c9e07b3fec22c9fe95f13ae
3737
khronos_canary_rebuild_instance_id=56e077e595ba23200046ce7a
3838
khronos_canary_rebuild_navi_url=http://canary-build-staging-runnabletest.runnable.ninja:8000/
39+
intercom_app_id=xs5g95pd
40+
intercom_api_key=037d14f2758eac144de1d2657b2ef9a4f26aef1a
3941

4042
[metis:vars]
4143
metis_rollbar_key=fdc8565a7ce64c6d9432c34be425937c

ansible/group_vars/all.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ fluffy_rollbar_token: 6eb108bab1f54687b9b023e5b485967a
9696

9797
# khronos
9898
rollbar_khronos_token: 5a140828cce14410812d34a3ef936f25
99+
khronos_canary_logs_instance_id: undefined
100+
khronos_canary_github_branches_instance_id: undefined
99101

100102
# krain
101103
krain_port: 3100

ansible/group_vars/alpha-khronos.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ cron_build_canary_command: "/khronos/bin/cli.js --queue khronos:canary:build --j
2121
cron_log_canary_command: "/khronos/bin/cli.js --queue khronos:canary:log --job '{}' --host {{ cron_rabbit_host_address }} {{ cron_rabbit_auth }}"
2222
# This is the github-branch canary cron command
2323
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 }}"
2425

2526
# for container settings
2627
container_envs: >
@@ -49,6 +50,8 @@ container_envs: >
4950
-e CANARY_LOG_TERMINAL_SLEEP=10
5051
-e CANARY_LOG_INSTANCE_ID={{khronos_canary_logs_instance_id}}
5152
-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 }}
5255
5356
container_run_opts: >
5457
-h {{ name }}

ansible/roles/khronos/tasks/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- build-canary.sh
1111
- log-canary.sh
1212
- github-branch-canary.sh
13+
- container-metrics.sh
1314

1415
- name: Put Khronos script into crontab
1516
become: yes
@@ -36,6 +37,10 @@
3637
minute: "*/5"
3738
script: log-canary.sh
3839
state: "{% if node_env == 'production-delta' %}present{% else %}absent{% endif %}"
40+
- name: Container Metrics
41+
minute: "*/5"
42+
script: container-metrics.sh
43+
state: "{% if node_env == 'production-delta' %}present{% else %}absent{% endif %}"
3944

4045
- name: make directory for mongo certificates
4146
become: yes
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# THIS FILE IS MANAGED BY ANSIBLE. PLEASE DO NOT MODIFY. MODIFICATIONS WILL NOT BE SAVED.
3+
# AUTHOR: BRYAN KENDALL
4+
5+
docker run --rm {{ container_image }}:{{ container_tag }} {{ cron_container_metrics_command }}

0 commit comments

Comments
 (0)