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
3 changes: 3 additions & 0 deletions ansible/delta-hosts/hosts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ localhost
[link]
localhost

[keymaker]
localhost

[khronos]
localhost

Expand Down
6 changes: 6 additions & 0 deletions ansible/delta-hosts/variables
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ eru_mongodb_replset=delta-rs0
eru_mongodb_username=eru
eru_subdomain=eru

[keymaker:vars]
keymaker_pg_host=delta-big-poppa.cnksgdqarobf.us-west-2.rds.amazonaws.com:{{ pg_port }}
keymaker_pg_pass=8MsajH7RQuJ+fTCh
keymaker_pg_user=keymaker
keymaker_new_relic_app_name=delta-keymaker

[khronos:vars]
khronos_intercom_api_key=14771f14efb617900724a16345e57beb55ba9beb
khronos_intercom_app_id=wqzm3rju
Expand Down
3 changes: 3 additions & 0 deletions ansible/gamma-hosts/hosts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ localhost
[charon]
localhost

[keymaker]
localhost

[khronos]
localhost

Expand Down
5 changes: 5 additions & 0 deletions ansible/gamma-hosts/variables
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ eru_subdomain=eru
[kartographer:vars]
kartographer_hello_runnable_github_token=000cb6b65858ad0a7590bc2370b5118ff1bc95db

[keymaker:vars]
keymaker_pg_host=gamma-big-poppa.cnksgdqarobf.us-west-2.rds.amazonaws.com:32659
keymaker_pg_pass=n4CsuCiWgbx.2BVJ
keymaker_pg_user=keymaker

[khronos:vars]
khronos_intercom_api_key=9b4ee7b4f9818b36e368985fda0befa611928876
khronos_intercom_app_id=xs5g95pd
Expand Down
7 changes: 7 additions & 0 deletions ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ github_varnish_port: 80
# kartographer
kartographer_rollbar_token: a7f85fda20bd4b9fb7b1197fc04d3c89

# keymaker
keymaker_pg_database: keymaker
keymaker_port: 3008
keymaker_host_address: keymaker
keymaker_http_rollbar_token: 4cfd134be18b4f1ca8e05925088360ff
keymaker_worker_rollbar_token: b6685a5db05d4550afe1c8545c095b29

# khronos
rollbar_khronos_token: 5a140828cce14410812d34a3ef936f25

Expand Down
36 changes: 36 additions & 0 deletions ansible/group_vars/alpha-keymaker-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
node_version: 6.10.2

inject_ca: false
repo: "[email protected]:CodeNow/keymaker.git"

keymaker_base_container_envs:
- name: DATADOG_HOST
valueFrom: "spec.nodeName"
- name: DATADOG_PORT
value: "{{ datadog_port }}"
- name: NODE_ENV
value: "{{ node_env }}"
- name: POSTGRES_CONNECT_STRING
value: "postgres://{{ keymaker_pg_user }}:{{ keymaker_pg_pass }}@{{ keymaker_pg_host }}/{{ keymaker_pg_database }}"
- name: RABBITMQ_HOSTNAME
value: "{{ rabbit_host_address }}"
- name: RABBITMQ_PASSWORD
value: "{{ rabbit_password }}"
- name: RABBITMQ_PORT
value: "{{ rabbit_port }}"
- name: RABBITMQ_USERNAME
value: "{{ rabbit_username }}"
- name: GITHUB_VARNISH_HOST
value: "{{ github_varnish_host }}"
- name: GITHUB_VARNISH_PORT
value: "{{ github_varnish_port }}"
- name: GITHUB_PROTOCOL
value: "http"
- name: NEW_RELIC_APP_NAME
value: "{{ keymaker_new_relic_app_name | default('ansible_undefined') }}"
- name: NEW_RELIC_LICENSE_KEY
value: "{{ new_relic_license_key | default('ansible_undefined') }}"
- name: NEW_RELIC_LOG_LEVEL
value: "fatal"
- name: NEW_RELIC_NO_CONFIG_FILE
value: "true"
14 changes: 14 additions & 0 deletions ansible/group_vars/alpha-keymaker-http.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: keymaker-http
service_name: keymaker

hosted_ports: ["{{ keymaker_port }}"]

envs:
- name: PORT
value: "{{ keymaker_port }}"
- name: ROLLBAR_KEY
value: "{{ keymaker_http_rollbar_token }}"

container_envs: "{{ keymaker_base_container_envs + envs }}"

container_run_args: npm run start-http
10 changes: 10 additions & 0 deletions ansible/group_vars/alpha-keymaker-worker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: keymaker-worker

envs:
- name: ROLLBAR_KEY
value: "{{ big_poppa_worker_rollbar_token }}"

container_envs: "{{ keymaker_base_container_envs + envs }}"

container_run_args: npm run start-worker

9 changes: 9 additions & 0 deletions ansible/keymaker-http.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- hosts: keymaker
vars_files:
- group_vars/alpha-keymaker-base.yml
- group_vars/alpha-keymaker-http.yml
roles:
- role: builder
- role: k8-deployment
- role: k8-service
8 changes: 8 additions & 0 deletions ansible/keymaker-worker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- hosts: keymaker
vars_files:
- group_vars/alpha-keymaker-base.yml
- group_vars/alpha-keymaker-worker.yml
roles:
- role: builder

Choose a reason for hiding this comment

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

remove builder here, no need to build 2 times :)

Copy link
Author

Choose a reason for hiding this comment

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

Sadly, untrue, builder pushes the image to the remote and it's a different name, keymaker-worker vs keymaker-http

- role: k8-deployment
2 changes: 2 additions & 0 deletions ansible/keymaker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- include: keymaker-http.yml
- include: keymaker-worker.yml