Skip to content

Commit 8ee8f74

Browse files
author
Ryan Sandor Richards
committed
Updated playbook for charon (to work as dock service).
1 parent ed4c55f commit 8ee8f74

5 files changed

Lines changed: 14 additions & 25 deletions

File tree

ansible/charon.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
- hosts: redis
33

4-
- hosts: charon
4+
- hosts: docks
55
vars_files:
66
- "group_vars/alpha-charon.yml"
77
roles:
88
- { role: notify, tags: "notify" }
9-
- { role: builder, tags: "build" }
10-
- { role: container_kill_start, tags: "deploy" }
9+
- { role: git_node_service, tags: "deploy" }

ansible/group_vars/alpha-api.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ container_envs: >
2424
-h api
2525
-e AWS_ACCESS_KEY_ID={{ api_aws_access_key_id }}
2626
-e AWS_SECRET_ACCESS_KEY={{ api_aws_secret_access_key }}
27-
-e CHARON_HOST={{ hostvars[groups['charon'][0]]['ansible_default_ipv4']['address'] }}
2827
-e DATADOG_HOST={{ datadog_host }}
2928
-e DATADOG_PORT={{ datadog_port }}
3029
-e DOMAIN={{ domain }}
Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
name: "charon"
2-
3-
container_image: "registry.runnable.com/runnable/{{ name }}"
4-
container_tag: "{{ git_branch }}"
5-
repo: "git@github.com:CodeNow/{{ name }}.git"
2+
app_name: "charon"
3+
app_repo: "git@github.com:CodeNow/{{ name }}.git"
64
hosted_ports: ["53"]
7-
node_version: "0.10.31"
8-
npm_version: "2.1.18"
95

106
redis_host: "{{ hostvars[groups['redis'][0]]['ansible_default_ipv4']['address'] }}"
117
redis_port: 6379
128

13-
container_envs: >
14-
-h charon
15-
-e NODE_ENV={{ node_env }}
16-
-e API_HOST=api.{{ domain }}
17-
-e API_TOKEN=51c61b779f3de616a9639cfc44a22c79fbd8e328
18-
-e DATADOG_HOST={{ datadog_host }}
19-
-e DATADOG_PORT={{ datadog_port }}
20-
-e DOMAIN_FILTER={{ user_content_domain }}
21-
-e PORT={{ hosted_ports[0] }}
22-
-e REDIS_HOST={{ redis_host }}
23-
-e REDIS_PORT={{ redis_port }}
24-
25-
container_run_opts: "-d -p {{ hosted_ports[0] }}:{{ hosted_ports[0] }} -p {{ hosted_ports[0] }}:{{ hosted_ports[0] }}/udp {{container_envs}}"
9+
enviroment_vars:
10+
API_HOST: "api.{{ domain }}"
11+
API_TOKEN: "51c61b779f3de616a9639cfc44a22c79fbd8e328"
12+
DATADOG_HOST: "{{ datadog_host }}"
13+
DATADOG_PORT: "{{ datadog_port }}"
14+
DOMAIN_FILTER: "{{ user_content_domain }}"
15+
PORT: "{{ hosted_ports[0] }}"
16+
REDIS_HOST: "{{ redis_host }}"
17+
REDIS_PORT: "{{ redis_port }}"

ansible/group_vars/alpha-workers.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ container_envs: >
2020
-h api-worker
2121
-e AWS_ACCESS_KEY_ID={{ api_aws_access_key_id }}
2222
-e AWS_SECRET_ACCESS_KEY={{ api_aws_secret_access_key }}
23-
-e CHARON_HOST={{ hostvars[groups['charon'][0]]['ansible_default_ipv4']['address'] }}
2423
-e DATADOG_HOST={{ datadog_host }}
2524
-e DATADOG_PORT={{ datadog_port }}
2625
-e DOMAIN={{ domain }}

ansible/roles/git_node_service/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
update=yes
2525
accept_hostkey=True
2626
force=yes
27-
key_file=/opt/runnable/dock-init/key/id_rsa_{{ app_name | replace("-","_")}}
27+
key_file=/opt/runnable/dock-init/key/id_rsa_runnabledock
2828
notify:
2929
- npm install {{ app_name }}
3030
- restart service {{ app_name }}

0 commit comments

Comments
 (0)