Skip to content

Commit 343f836

Browse files
committed
Create hourly canary script
for Failover
1 parent 15e118e commit 343f836

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

ansible/delta-hosts/variables

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ khronos_canary_logs_instance_id=56f07f5c1e089a200077f2a3
5050
khronos_canary_rebuild_instance_id=571b39b9d35173300021667d
5151
khronos_canary_rebuild_navi_url=http://canary-build-staging-runnabletest.runnableapp.com:8000/
5252
khronos_canary_token=24592325a6f881e77a01e3bacf0952c49f4e9f1c
53+
khronos_canary_failover_token=84549e76545306de61d47f23b1d1831e1c95a400
5354
khronos_mongo_auth=api:72192e5a-a5e1-11e5-add9-0270db32f7ad
5455
khronos_mongo_database=delta
5556
khronos_mongo_replset_name=delta

ansible/group_vars/alpha-khronos.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ canary_cron_queues: "\
2222
khronos:canary:network \
2323
khronos:metrics:container-status"
2424

25+
hourly_canary_cron_queues: "\
26+
khronos:canary:failover \"
27+
2528
# a nice version of the rabbitmq host
2629
cron_rabbit_host_address: "{{ rabbit_host_address }}:{{ rabbit_port }}"
2730
# a quick version of authentication for rabbit for cron
@@ -33,6 +36,7 @@ container_envs: >
3336
-e API_URL={{ api_url }}
3437
-e CONSUL_HOST={{ consul_host_address }}:{{ consul_api_port }}
3538
-e CANARY_API_TOKEN={{ khronos_canary_token | default('undefined') }}
39+
-e CANARY_API_FAILOVER_TOKEN={{ khronos_canary_failover_token | default('undefined') }}
3640
-e CANARY_GITHUB_BRANCHES_INSTANCE_ID={{ khronos_canary_github_branches_instance_id | default('undefined') }}
3741
-e CANARY_LOG_INSTANCE_ID={{ khronos_canary_logs_instance_id | default('undefined') }}
3842
-e CANARY_LOG_TERMINAL_SLEEP=10

ansible/roles/khronos/tasks/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
with_items:
99
- { cron_queues: "{{ main_cron_queues }}", script: "main-cron.sh"}
1010
- { cron_queues: "{{ canary_cron_queues }}", script: "canary-cron.sh"}
11+
- { cron_queues: "{{ hourly_canary_cron_queues }}", script: "hourly-canary-cron.sh"}
1112

1213
- name: Put Khronos script into crontab
1314
become: yes
@@ -27,6 +28,10 @@
2728
minute: "*/5"
2829
script: canary-cron.sh
2930
state: "{% if node_env == 'production-delta' %}present{% else %}absent{% endif %}"
31+
- name: Khronos CLI - Hourly Canary
32+
hour: "*/1"
33+
script: hourly-canary-cron.sh
34+
state: "{% if node_env == 'production-delta' %}present{% else %}absent{% endif %}"
3035

3136
- name: make directory for mongo certificates
3237
become: yes

0 commit comments

Comments
 (0)