Skip to content

Commit 4f356fe

Browse files
committed
Merge pull request #182 from CodeNow/metis
SAN-2671; Added Metis Playboook.
2 parents a59f1a6 + 1cb2b08 commit 4f356fe

4 files changed

Lines changed: 56 additions & 0 deletions

File tree

ansible/beta-hosts/hosts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ beta-redis-slave
6262
[shiva]
6363
beta-services
6464

65+
[metis]
66+
beta-services
67+
6568
[registry]
6669
beta-registry
6770

ansible/group_vars/alpha-metis.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "metis"
2+
container_image: "registry.runnable.com/runnable/{{ name }}"
3+
container_tag: "{{ git_branch }}"
4+
repo: "git@github.com:CodeNow/astral.git"
5+
node_version: "4.2.1"
6+
npm_version: "2.8.3"
7+
8+
# Overrides the start command in the builder role
9+
npm_start_command: "run metis-start"
10+
11+
# Not actually needed, just allows container-kill-start to work
12+
hosted_ports: ["3000"]
13+
14+
# Needed for the UserData script in shiva
15+
redis_host: "{{ hostvars[groups['redis'][0]]['ansible_default_ipv4']['address'] }}"
16+
redis_port: 6379
17+
18+
# container settings
19+
container_envs: >
20+
-e DATADOG_HOST={{ datadog_host }}
21+
-e DATADOG_PORT={{ datadog_port }}
22+
-e RABBITMQ_HOSTNAME={{ rabbit_host | default(hostvars[groups['rabbitmq'][0]]['ansible_default_ipv4']['address']) }}
23+
-e RABBITMQ_PASSWORD={{ rabbit_password }}
24+
-e RABBITMQ_PORT={{ rabbit_port }}
25+
-e RABBITMQ_USERNAME={{ rabbit_username }}
26+
-e POSTGRES_CONNECT_STRING=postgres://{{ pg_user }}:{{ pg_pass }}@{{ pg_host }}/{{ pg_database }}
27+
-e AWS_ACCESS_KEY_ID={{ aws_access_key_id }}
28+
-e AWS_SECRET_ACCESS_KEY={{ aws_secret_access_key }}
29+
-e NODE_ENV={{ node_env }}
30+
-e REDIS_HOST={{ redis_host }}
31+
-e REDIS_PORT={{ redis_port }}
32+
-e REDIS_IPADDRESS={{ redis_host }}
33+
-e REGISTRY_HOST={{ registry_host }}
34+
-e ROLLBAR_KEY={{ shiva_rollbar_key }}
35+
-e DOCKER_PORT={{ docker_port }}
36+
-e SWARM_TOKEN={{ swarm_token }}
37+
--hostname={{ name }}
38+
39+
container_run_opts: "-d -P {{container_envs}}"

ansible/metis.yml

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

ansible/prod-hosts/hosts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ alpha-registry
7171
[shiva]
7272
alpha-api-old
7373

74+
[metis]
75+
alpha-api-old
76+
7477
[swarm-manager]
7578
alpha-api-old
7679

0 commit comments

Comments
 (0)