Skip to content

Commit 37d5709

Browse files
author
anandkumarpatel
committed
Merge pull request #200 from CodeNow/link-rebased
Link, Rebased
2 parents f8a05ad + 66d2e63 commit 37d5709

9 files changed

Lines changed: 106 additions & 28 deletions

File tree

ansible/beta-hosts/hosts

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ beta-services
3737
[navi]
3838
beta-navi
3939

40+
[link]
41+
beta-navi
42+
43+
[mongo-navi]
44+
beta-navi
45+
4046
[charon]
4147
beta-services
4248

@@ -82,25 +88,27 @@ beta-services
8288
[docks]
8389

8490
[beta:children]
85-
bastion
86-
hipache
87-
mongodb
8891
api
89-
web
90-
redis
91-
redis-slave
92-
docks
93-
registry
94-
neo4j
95-
navi
92+
bastion
9693
charon
94+
docks
95+
eru
96+
hipache
9797
khronos
98+
link
9899
mavis
100+
mongodb
101+
mongo-navi
102+
navi
103+
neo4j
99104
optimus
100105
rabbitmq
101-
eru
106+
redis
107+
redis-slave
108+
registry
102109
shiva
103110
swarm-manager
111+
web
104112

105113
[targets]
106114
localhost ansible_connection=local bastion_name=beta-bastion

ansible/group_vars/all.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,8 @@ shiva_port: 3000
103103

104104
# swarm
105105
swarm_master_port: 2375
106+
107+
# navi/link
108+
navi_mongo_database: navi
109+
navi_mongo_host_address: "{{ hostvars[groups['mongo-navi'][0]]['ansible_default_ipv4']['address'] }}"
110+
navi_mongo_port: 27017

ansible/group_vars/alpha-link.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: link
2+
3+
container_image: registry.runnable.com/runnable/{{ name }}
4+
container_tag: "{{ git_branch }}"
5+
repo: git@github.com:CodeNow/{{ name }}.git
6+
node_version: "4.2.1"
7+
npm_version: "2.14.7"
8+
9+
container_envs: >
10+
-e API_HOST=http://{{ api_hostname }}
11+
-e DATADOG_HOST={{ datadog_host_address }}
12+
-e DATADOG_PORT={{ datadog_port }}
13+
-e HELLO_RUNNABLE_GITHUB_TOKEN=5d8f7029d3d6941b0fc62a7eb8c605d8e0bc7c29
14+
-e MONGO=mongodb://{{ navi_mongo_host_address }}:{{ navi_mongo_port }}/{{ navi_mongo_database }}
15+
-e NODE_ENV={{ node_env }}
16+
-e RABBITMQ_HOSTNAME={{ rabbit_host_address }}
17+
-e RABBITMQ_PASSWORD={{ rabbit_password }}
18+
-e RABBITMQ_PORT={{ rabbit_port }}
19+
-e RABBITMQ_USERNAME={{ rabbit_username }}
20+
-e USER_CONTENT_DOMAIN={{ user_content_domain }}
21+
22+
container_run_opts: >
23+
-h {{ name }}
24+
-d
25+
{{ container_envs }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# database vars
2+
name: mongo-navi
3+
4+
db_path: /opt/mongodb/db
5+
6+
# container_kill_start settings
7+
container_image: mongo
8+
container_tag: latest
9+
container_run_opts: >
10+
-h {{ name }}
11+
-d
12+
-p 27017:27017
13+
-v {{ db_path }}:/data/db:rw

ansible/group_vars/alpha-navi.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@ node_version: "4.1.0"
88
npm_version: "2.8.3"
99

1010
container_envs: >
11-
-e API_HOST=http://{{ api_hostname }}
11+
-e CLUSTER_WORKERS=20
1212
-e DATADOG_HOST={{ datadog_host_address }}
1313
-e DATADOG_PORT={{ datadog_port }}
1414
-e ERROR_URL=http://{{ detention_host_address }}:{{ detention_port }}
15-
-e HELLO_RUNNABLE_GITHUB_TOKEN=5d8f7029d3d6941b0fc62a7eb8c605d8e0bc7c29
1615
-e HTTP_PORT={{ hosted_ports[0] }}
16+
-e LOG_LEVEL_STDOUT=trace
17+
-e MONGO=mongodb://{{ navi_mongo_host_address }}:{{ navi_mongo_port }}/{{ navi_mongo_database }}
1718
-e NODE_ENV={{ node_env }}
1819
-e REDIS_IPADDRESS={{ redis_host_address }}
19-
-e LOG_LEVEL_STDOUT=trace
20-
-e CLUSTER_WORKERS=20
2120
2221
container_run_opts: >
2322
-h {{ name }}

ansible/link.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
- hosts: mongo-navi
3+
- hosts: rabbitmq
4+
5+
- hosts: link
6+
vars_files:
7+
- "group_vars/alpha-link.yml"
8+
roles:
9+
- { role: notify, tags: "notify" }
10+
- { role: builder, tags: "build" }
11+
- { role: container_kill_start, tags: "deploy" }

ansible/mongo-navi.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
- hosts: mongo-navi
3+
vars_files:
4+
- "group_vars/alpha-mongo-navi.yml"
5+
roles:
6+
- { role: notify, tags: "notify" }
7+
- { role: database }
8+
- { role: container_kill_start, tags: "deploy" }

ansible/navi.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
- hosts: redis
33
- hosts: detention
4+
- hosts: mongo-navi
45

56
- hosts: navi
67
vars_files:

ansible/prod-hosts/hosts

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ alpha-api-old
4343
[navi]
4444
alpha-navi
4545

46+
[link]
47+
alpha-navi
48+
49+
[mongo-navi]
50+
alpha-navi
51+
4652
[charon]
4753
alpha-api-old
4854

@@ -88,27 +94,29 @@ alpha-api-old
8894
[docks]
8995

9096
[alpha:children]
91-
bastion
92-
hipache
93-
mongodb
9497
api
95-
web
96-
redis
97-
redis-slave
98-
docks
99-
registry
100-
neo4j
101-
navi
98+
bastion
10299
charon
100+
detention
101+
docks
102+
eru
103+
hipache
104+
hubot
103105
khronos
106+
link
104107
mavis
108+
mongodb
109+
mongo-navi
110+
navi
111+
neo4j
105112
optimus
106113
rabbitmq
107-
detention
108-
hubot
109-
eru
114+
redis
115+
redis-slave
116+
registry
110117
shiva
111118
swarm-manager
119+
web
112120

113121
[targets]
114122
localhost ansible_connection=local bastion_name=alpha-bastion

0 commit comments

Comments
 (0)