Skip to content

Commit 5972b9c

Browse files
author
anandkumarpatel
committed
Merge pull request #164 from CodeNow/khronos-workers
adding rabbit related things for khronos
2 parents ee047bb + 889938e commit 5972b9c

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

ansible/group_vars/alpha-khronos.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,28 @@ name: khronos
33
container_image: "registry.runnable.com/runnable/{{ name }}"
44
container_tag: "{{ git_branch }}"
55
repo: "git@github.com:CodeNow/{{ name }}.git"
6-
node_version: "0.12.0"
6+
node_version: "0.12.7"
77
npm_version: "2.1.18"
88

99
mongo_hosts: "{% for host in groups['mongodb'] %}{{ hostvars[host]['ansible_default_ipv4']['address'] }}:27000{% if not loop.last %},{% endif %}{% endfor %}"
1010

1111
# for container settings
1212
container_envs: >
1313
-h khronos
14-
-e NODE_ENV={{ node_env }}
1514
-e DATADOG_HOST={{ datadog_host }}
1615
-e DATADOG_PORT={{ datadog_port }}
1716
-e KHRONOS_MONGO=mongodb://{{ khronos_mongo_auth }}@{{ mongo_hosts }}/{{ khronos_mongo_database }}
17+
-e LOG_LEVEL_STDOUT=trace
18+
-e NODE_ENV={{ node_env }}
19+
-e RABBITMQ_HOSTNAME={{ rabbit_host | default(hostvars[groups['rabbitmq'][0]]['ansible_default_ipv4']['address']) }}
20+
-e RABBITMQ_PASSWORD={{ rabbit_password }}
21+
-e RABBITMQ_PORT={{ rabbit_port }}
22+
-e RABBITMQ_USERNAME={{ rabbit_username }}
23+
-e WORKER_MAX_RETRY_DELAY=3600000
1824
1925
container_run_opts: >
2026
-d
2127
-v /opt/ssl/docker/{{ name }}:/etc/ssl/docker:ro
2228
{{container_envs}}
29+
30+
npm_start_command: run start-json-output

ansible/khronos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
- hosts: rabbitmq
23
- hosts: mongodb
34

45
- hosts: khronos

ansible/roles/builder/templates/basic_node/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ RUN {{ command }}
3434
{% endif %}
3535

3636
# Define default command.
37-
CMD ulimit -c unlimited && /usr/local/bin/npm {{ npm_start_command }} > /var/log/{{ name }}.log 2>&1
37+
CMD ulimit -c unlimited && /usr/local/bin/npm {{ npm_start_command | default('start') }} > /var/log/{{ name }}.log 2>&1
38+

0 commit comments

Comments
 (0)