Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ansible/delta-hosts/hosts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ delta-app-services
[drake]
delta-app-services

[pheidi]
delta-app-services

[delta:children]
api
bastion
Expand All @@ -125,6 +128,7 @@ mongodb
navi
neo4j
optimus
pheidi
rabbitmq
redis
redis-slave
Expand Down
5 changes: 5 additions & 0 deletions ansible/delta-hosts/variables
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ optimus_github_deploy_keys_bucket=runnable.deploykeys.production
[palantiri:vars]
palantiri_rollbar_key=f675e9090d6f483ca4e742af2c7f2f83

[pheidi:vars]
pheidi_mongo_auth=pheidi:septa-mauve-enquiry-clipper-history
pheidi_mongo_database=delta
pheidi_mongo_replset_name=delta

[sauron:vars]
sauron_rollbar_key=83157ae2d50d4b6398e404c0b9978d26

Expand Down
4 changes: 4 additions & 0 deletions ansible/epsilon-hosts/hosts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ epsilon-app-services
[drake]
epsilon-app-services

[pheidi]
epsilon-app-services

[epsilon:children]
api
bastion
Expand All @@ -122,6 +125,7 @@ neo4j
optimus
rabbitmq
redis
pheidi
registry
sauron
shiva
Expand Down
5 changes: 5 additions & 0 deletions ansible/epsilon-hosts/variables
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ optimus_github_deploy_keys_bucket=runnable.deploykeys.production-beta
[palantiri:vars]
palantiri_rollbar_key=f675e9090d6f483ca4e742af2c7f2f83

[pheidi:vars]
pheidi_mongo_auth=api:3f5210b8-8fe3-11e5-8e62-07b6eff19ecb
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

source of the auth?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied it from api and krhonos

pheidi_mongo_database=epsilon
pheidi_mongo_replset_name=epsilon

[sauron:vars]
sauron_rollbar_key=83157ae2d50d4b6398e404c0b9978d26

Expand Down
9 changes: 8 additions & 1 deletion ansible/gamma-hosts/hosts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ gamma-app-services
[drake]
gamma-app-services

[pheidi]
gamma-app-services

[docks]

[dock]
Expand All @@ -126,6 +129,7 @@ mongodb
navi
neo4j
optimus
pheidi
rabbitmq
redis
redis-slave
Expand All @@ -139,8 +143,11 @@ web
web
worker

[ec2]
[local]
127.0.0.1

[ec2]
local

[targets]
localhost ansible_connection=local bastion_name=gamma-bastion
5 changes: 5 additions & 0 deletions ansible/gamma-hosts/variables
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ optimus_github_deploy_keys_bucket=runnable.deploykeys.production-beta
[palantiri:vars]
palantiri_rollbar_key=f675e9090d6f483ca4e742af2c7f2f83

[pheidi:vars]
pheidi_mongo_auth=api:3f5210b8-8fe3-11e5-8e62-07b6eff19ecb
pheidi_mongo_database=gamma
pheidi_mongo_replset_name=gamma

[sauron:vars]
sauron_rollbar_key=83157ae2d50d4b6398e404c0b9978d26

Expand Down
3 changes: 3 additions & 0 deletions ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ optimus_rollbar_token: a49f9cce09ee46f09df3f603178fba75
# palantiri
palantiri_rollbar_token: f675e9090d6f483ca4e742af2c7f2f83

# pheidi
pheidi_rollbar_token: 6fc422ac645441bea7f6f14853eb01ab

# rabbit
rabbit_host_address: "{{ hostvars[groups['rabbitmq'][0]]['ansible_default_ipv4']['address'] }}"
rabbit_port: 54321
Expand Down
33 changes: 33 additions & 0 deletions ansible/group_vars/alpha-pheidi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: pheidi

container_image: "registry.runnable.com/runnable/{{ name }}"
container_tag: "{{ git_branch }}"
repo: "git@github.com:CodeNow/{{ name }}.git"
node_version: "4.2.2"
npm_version: "2.14.7"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit newline

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

container_envs: >
-e DATADOG_HOST={{ datadog_host_address }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing API_URL ? and APP_URL?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are API_URL and APP_URL? Did you mean FULL_API_DOMAIN and WEB_URL?

-e DATADOG_PORT={{ datadog_port }}
-e DOMAIN={{ domain }}
-e LOGGLY_TOKEN="{{ loggly_token }}"
-e NODE_ENV="{{ node_env }}"
-e FULL_API_DOMAIN=https://api.{{ domain }}
-e RABBITMQ_HOSTNAME="{{ rabbit_host_address }}"
-e RABBITMQ_PASSWORD="{{ rabbit_password }}"
-e RABBITMQ_PORT="{{ rabbit_port }}"
-e RABBITMQ_USERNAME="{{ rabbit_username }}"
-e ROLLBAR_KEY={{ pheidi_rollbar_token }}
{% if node_env != "production-epsilon" %} -e MONGO_CACERT=/opt/ssl/mongo-client/ca.pem {% endif %}
{% if node_env != "production-epsilon" %} -e MONGO_CERT=/opt/ssl/mongo-client/cert.pem {% endif %}
{% if node_env != "production-epsilon" %} -e MONGO_KEY=/opt/ssl/mongo-client/key.pem {% endif %}
-e MONGO_REPLSET_NAME={{ pheidi_mongo_replset_name }}
-e MONGO=mongodb://{{ pheidi_mongo_auth }}@{{ mongo_hosts }}/{{ pheidi_mongo_database }}
-e USER_CONTENT_DOMAIN={{ user_content_domain }}
-e WEB_URL=https://app.{{ domain }}

container_run_opts: >
-h {{ name }}
-d
-v /opt/ssl/mongodb-client:/opt/ssl/mongo-client:ro
{{ container_envs }}
15 changes: 15 additions & 0 deletions ansible/pheidi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
- hosts: consul
- hosts: mongodb
- hosts: rabbitmq

- hosts: pheidi
vars_files:
- group_vars/alpha-pheidi.yml
roles:
- role: notify
rollbar_token: "{{ pheidi_rollbar_token }}"
tags: [ notify ]
- { role: builder, tags: [build] }
- { role: tls-client, tls_service: mongodb, tags: [ tls ] }
- { role: container_kill_start }
4 changes: 4 additions & 0 deletions ansible/roles/ec2/sg_configure/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@
from_port: 27000
to_port: 27020
group_id: "{{ sg_dock_services }}"
- proto: tcp
from_port: 27000
to_port: 27020
group_id: "{{ sg_app_services }}"

- name: Navi SG
tags:
Expand Down