Skip to content

Commit ebb11d8

Browse files
author
Christopher M. Neill
committed
Merge branch 'master' into SAN-3816-move-logs-or-dont-its-up-to-you
2 parents d974e12 + d9f637a commit ebb11d8

8 files changed

Lines changed: 34 additions & 26 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/eru.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
- hosts: redis
3+
- hosts: consul
34

45
- hosts: eru
56
vars_files:

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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ loggly_username: ops
3333
##
3434

3535
app_log_dir: /var/log
36+
core_file_dir: /var/log/core
3637

3738
##
3839
## shared application configs
@@ -102,8 +103,6 @@ fluffy_rollbar_token: 6eb108bab1f54687b9b023e5b485967a
102103

103104
# khronos
104105
rollbar_khronos_token: 5a140828cce14410812d34a3ef936f25
105-
khronos_canary_logs_instance_id: undefined
106-
khronos_canary_github_branches_instance_id: undefined
107106

108107
# krain
109108
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/docker/tasks/main.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@
1616
owner=root
1717
group=root
1818

19+
- name: create core file dir
20+
become: true
21+
when: docker_config == "runnable" and core_file_dir != "/var/log"
22+
tags: coreDump
23+
file:
24+
path="{{ core_file_dir }}"
25+
state=directory
26+
user=root
27+
group=root
28+
mode=0755
29+
1930
- name: change core dump path
2031
become: true
2132
when: docker_config == "runnable"
@@ -24,7 +35,7 @@
2435
name=kernel.core_pattern
2536
reload=true
2637
state=present
27-
value="/var/log/core.%h.%e.%t"
38+
value="{{ core_file_dir }}/core.%h.%e.%t"
2839

2940
- name: install aufs with linux-image-extra-{{ ansible_kernel }}
3041
become: true

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)