Skip to content

Commit e9e7d11

Browse files
Merge pull request #412 from CodeNow/SAN-3094-khronos-swarm
Khronos Swarm
2 parents ba287e8 + de63493 commit e9e7d11

6 files changed

Lines changed: 20 additions & 25 deletions

File tree

ansible/delta-hosts/variables

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ eru_github_id=46a23f5f99f0aa9460f8
3131
eru_github_secret=a0336d72e3d540fb9fbbed2c123a81e1cb329dab
3232

3333
[khronos:vars]
34+
intercom_api_key=14771f14efb617900724a16345e57beb55ba9beb
35+
intercom_app_id=wqzm3rju
36+
khronos_canary_github_branches_instance_id=56f05754a443842400b66a53
37+
khronos_canary_logs_instance_id=56f07f5c1e089a200077f2a3
38+
khronos_canary_rebuild_instance_id=56df6674058d592500f76c9f
39+
khronos_canary_rebuild_navi_url=http://canary-build-staging-runnabletest.runnableapp.com:8000/
40+
khronos_canary_token=24592325a6f881e77a01e3bacf0952c49f4e9f1c
3441
khronos_mongo_auth=api:72192e5a-a5e1-11e5-add9-0270db32f7ad
3542
khronos_mongo_database=delta
3643
khronos_mongo_replset_name=delta
37-
khronos_canary_token=24592325a6f881e77a01e3bacf0952c49f4e9f1c
38-
khronos_canary_rebuild_instance_id=56df6674058d592500f76c9f
39-
khronos_canary_rebuild_navi_url=http://canary-build-staging-runnabletest.runnableapp.com:8000/
40-
khronos_canary_logs_instance_id=56f07f5c1e089a200077f2a3
41-
khronos_canary_github_branches_instance_id=56f05754a443842400b66a53
42-
intercom_app_id=wqzm3rju
43-
intercom_api_key=14771f14efb617900724a16345e57beb55ba9beb
4444

4545
[metis:vars]
4646
metis_rollbar_key=fdc8565a7ce64c6d9432c34be425937c

ansible/gamma-hosts/variables

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ eru_github_secret=74a23ee56486d57b14f292283cb04625f600917c
3333
khronos_mongo_auth=api:3f5210b8-8fe3-11e5-8e62-07b6eff19ecb
3434
khronos_mongo_database=gamma
3535
khronos_mongo_replset_name=gamma
36-
khronos_canary_token=d939b612d75244947c9e07b3fec22c9fe95f13ae
37-
khronos_canary_rebuild_instance_id=56e077e595ba23200046ce7a
38-
khronos_canary_rebuild_navi_url=http://canary-build-staging-runnabletest.runnable.ninja:8000/
39-
intercom_app_id=xs5g95pd
40-
intercom_api_key=037d14f2758eac144de1d2657b2ef9a4f26aef1a
4136

4237
[metis:vars]
4338
metis_rollbar_key=fdc8565a7ce64c6d9432c34be425937c

ansible/group_vars/all.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ 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
10199

102100
# krain
103101
krain_port: 3100

ansible/group_vars/alpha-khronos.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,21 @@ cron_container_metrics_command: "/khronos/bin/cli.js --queue khronos:metrics:con
2525

2626
# for container settings
2727
container_envs: >
28-
-e API_URL={{ api_url }}
2928
-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 }}
29+
-e API_URL={{ api_url }}
30+
-e CANARY_API_TOKEN={{ khronos_canary_token | default('undefined') }}
31+
-e CANARY_GITHUB_BRANCHES_INSTANCE_ID={{ khronos_canary_github_branches_instance_id | default('undefined') }}
32+
-e CANARY_LOG_INSTANCE_ID={{ khronos_canary_logs_instance_id | default('undefined') }}
33+
-e CANARY_LOG_TERMINAL_SLEEP=10
34+
-e CANARY_REBUILD_INSTANCE_ID={{ khronos_canary_rebuild_instance_id | default('undefined') }}
35+
-e CANARY_REBUILD_NAVI_URL={{ khronos_canary_rebuild_navi_url | default('undefined') }}
3336
-e DATADOG_HOST={{ datadog_host_address }}
3437
-e DATADOG_PORT={{ datadog_port }}
35-
-e KHRONOS_PREFETCH=6
38+
-e INTERCOM_API_KEY={{ intercom_api_key | default('undefined') }}
39+
-e INTERCOM_APP_ID={{ intercom_app_id | default('undefined') }}
3640
-e KHRONOS_MAVIS=http://{{ mavis_hostname }}
3741
-e KHRONOS_MONGO=mongodb://{{ khronos_mongo_auth }}@{{ mongo_hosts }}/{{ khronos_mongo_database }}
42+
-e KHRONOS_PREFETCH=6
3843
-e LOG_LEVEL=error
3944
{% if node_env != "production-epsilon" %}
4045
-e MONGO_CACERT=/opt/ssl/mongo-client/ca.pem
@@ -46,12 +51,8 @@ container_envs: >
4651
-e RABBITMQ_PASSWORD={{ rabbit_password }}
4752
-e RABBITMQ_PORT={{ rabbit_port }}
4853
-e RABBITMQ_USERNAME={{ rabbit_username }}
54+
-e SWARM_HOST=http://{{ swarm_host_address }}:{{ swarm_master_port }}
4955
-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 }}
5556
5657
container_run_opts: >
5758
-h {{ name }}

ansible/khronos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- hosts: rabbitmq
33
- hosts: mongodb
44
- hosts: consul
5+
- hosts: swarm-manager
56

67
- hosts: khronos
78
vars_files:
@@ -14,4 +15,3 @@
1415
- { role: builder, tags: [ build ] }
1516
- { role: khronos, tags: [ deploy ] }
1617
- { role: container_kill_start }
17-

ansible/roles/khronos/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
- name: Khronos CLI - Github Branch Canary
3434
minute: "*/5"
3535
script: github-branch-canary.sh
36+
state: "{% if node_env == 'production-delta' %}present{% else %}absent{% endif %}"
3637
- name: Khronos CLI - Log Canary
3738
minute: "*/5"
3839
script: log-canary.sh

0 commit comments

Comments
 (0)