Skip to content

Commit 735b19a

Browse files
author
Bryan Kendall
committed
Merge remote-tracking branch 'origin/master' into consul-value
2 parents aa997be + 21b7039 commit 735b19a

38 files changed

Lines changed: 372 additions & 141 deletions

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ ansible-playbook -i ./[stage-hosts, prod-hosts] [appname].yml -t deploy -e git_b
6060
This will redeploy the current deploy without rebuilding
6161

6262
```
63-
ansible-playbook -i./[stage-hosts, prod-hosts] [appname].yml -e git_branch=some-branch-name -e build_args=--no-cache
63+
ansible-playbook -i ./[stage-hosts, prod-hosts] [appname].yml -e git_branch=some-branch-name -e build_args=--no-cache
6464
```
6565

6666
deploy latest version of the branch
@@ -99,4 +99,6 @@ It is the custom at Runnable to play a song to the entire team when deploying. F
9999

100100
[swarm-deamon: Pink Floyd - Another Brick In The Wall](https://www.youtube.com/watch?v=5IpYOF4Hi6Q)
101101

102+
[vault / vault-values: Seal - Kiss From A Rose](https://www.youtube.com/watch?v=zP3so2hY4CM)
103+
102104
**IMPORTANT:** Make sure the play the song loud and proud when deploying!

ansible/api-core.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- hosts: charon
66
- hosts: rabbitmq
77
- hosts: redis
8+
- hosts: swarm-manager
89

910
- hosts: api
1011
vars_files:

ansible/beta-hosts/hosts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ beta-api
3434
[eru]
3535
beta-services
3636

37+
[fluffy]
38+
beta-services
39+
3740
[navi]
3841
beta-navi
3942

@@ -73,6 +76,9 @@ beta-redis
7376
[redis-slave]
7477
beta-redis-slave
7578

79+
[sauron]
80+
beta-services
81+
7682
[shiva]
7783
beta-services
7884

@@ -93,6 +99,7 @@ bastion
9399
charon
94100
docks
95101
eru
102+
fluffy
96103
hipache
97104
khronos
98105
link
@@ -106,6 +113,7 @@ rabbitmq
106113
redis
107114
redis-slave
108115
registry
116+
sauron
109117
shiva
110118
swarm-manager
111119
web

ansible/beta-hosts/variables

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ api_aws_secret_access_key=A6XOpeEElvvIulfAzVLohqKtpKij5ZE8h0FFx0Jn
44
api_github_client_id=baa5c868b6d17d7ae002
55
api_github_client_secret=ad4f8527ae98d7eea15a32ee5abbead5c9a25abc
66
api_github_deploy_keys_bucket=runnable.deploykeys.production-beta
7-
api_hello_runnable_github_token=88ddc423c2312d02a8bbcaad76dd4c374a30e4af
87
api_mixpanel_app_id=c41affa4b08818443365c526cbb51606
98
api_mongo_auth=api:oW4c7x9Wiv28oiNBy2Bc
109
api_mongo_database=beta
@@ -50,6 +49,7 @@ ansible_ssh_private_key_file=~/.ssh/oregon.pem
5049
datadog_host_address=10.20.1.59
5150
datadog_tags=env:beta
5251
domain=runnable-beta.com
52+
mongo_port=27000
5353
new_relic_license_key=338516e0826451c297d44dc60aeaf0a0ca4bfead
5454
node_env=production-beta
5555
pg_host=beta-infrastructure-db.cnksgdqarobf.us-west-2.rds.amazonaws.com
@@ -59,3 +59,4 @@ rabbit_username=o2mdLh9N9Ke2GzhoK8xsruYPhIQFN7iEL44dQJoq7OM
5959
registry_host=10.20.1.55
6060
swarm_token=d363b783f03a845a2c82b081bfe8443e
6161
user_content_domain=runnablecloud.com
62+
api_hello_runnable_github_token=88ddc423c2312d02a8bbcaad76dd4c374a30e4af

ansible/consul-values.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
- name: print values to screen
2929
run_once: true
3030
when: read_values is defined
31-
debug: msg='{{ item.item.key }}: {{ item.json[0].Value | b64decode }}'
31+
debug: msg="{{ item.item.key }}" -> "{{ item.json[0].Value | b64decode }}"
3232
with_items: "{{ values.results }}"

ansible/fluffy.yml

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

ansible/gamma-hosts/hosts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ gamma-redis
6767
[redis-slave]
6868
gamma-redis-slave
6969

70+
[sauron]
71+
gamma-services
72+
7073
[shiva]
7174
gamma-services
7275

@@ -96,6 +99,7 @@ mavis
9699
optimus
97100
rabbitmq
98101
eru
102+
sauron
99103
shiva
100104
swarm-manager
101105

ansible/gamma-hosts/variables

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
[api_group:vars]
22
api_aws_access_key_id=AKIAIDC4WVMTCGV7KRVQ
33
api_aws_secret_access_key=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
4-
api_github_client_id=baa5c868b6d17d7ae002
5-
api_github_client_secret=ad4f8527ae98d7eea15a32ee5abbead5c9a25abc
6-
api_github_deploy_keys_bucket=runnable.deploykeys.production-gamma
7-
api_hello_runnable_github_token=88ddc423c2312d02a8bbcaad76dd4c374a30e4af
4+
api_github_client_id=b6072dc57062faca7fcb
5+
api_github_client_secret=ba73a9294dc4bfaa7ed02ba187f73918506e4293
6+
api_github_deploy_keys_bucket=runnable.deploykeys.production-beta
87
api_mixpanel_app_id=c41affa4b08818443365c526cbb51606
9-
api_mongo_auth=api:oW4c7x9Wiv28oiNBy2Bc
8+
api_mongo_auth=api:3f5210b8-8fe3-11e5-8e62-07b6eff19ecb
109
api_mongo_database=gamma
11-
api_mongo_replset_name=gamma
10+
api_mongo_replset_name=gamma-rs0
1211
api_neo4j_auth=neo4j:oqGlRV1KTpaqbHDkdlJz
1312
api_new_relic_app_name=gamma-api-production
1413
api_rollbar_key=a90d9c262c7c48cfabbd32fd0a1bc61c
15-
api_s3_context_bucket=runnable.context.resources.production-gamma
14+
api_s3_context_bucket=runnable.context.resources.production-beta
1615

1716
[docks:vars]
1817
docker_config=docks
@@ -29,15 +28,15 @@ khronos_mongo_replset_name=gamma
2928
[optimus:vars]
3029
optimus_aws_access_id=AKIAJPA2ZYSVVA5V7XXQ
3130
optimus_aws_secret_id=5V70AUxfIyHeLvlYZe0xaYevDAdgTOWOn5G7nHlt
32-
optimus_github_deploy_keys_bucket=runnable.deploykeys.production-gamma
31+
optimus_github_deploy_keys_bucket=runnable.deploykeys.production-beta
3332

3433
[palantiri:vars]
3534
palantiri_rollbar_key=f675e9090d6f483ca4e742af2c7f2f83
3635

3736
[registry:vars]
38-
registry_s3_access_key=AKIAJZQHOFYKTZP52XCQ
37+
registry_s3_access_key=AKIAJK5EN7W6E62A3C3Q
3938
registry_s3_bucket=runnableimages.beta
40-
registry_s3_secret_key=iOKNwff7HhUnTmHxt1HrJj1lUkrccZTqWvrKi54C
39+
registry_s3_secret_key=ZFLePZdrHUNhTzuV4Ir/NgwPWOnU41Ur9DbH6UAp
4140
registry_s3_region=us-east-1
4241

4342
[shiva:vars]
@@ -60,6 +59,7 @@ ansible_ssh_private_key_file=~/.ssh/gamma.pem
6059
datadog_host_address=10.4.6.251
6160
datadog_tags=env:gamma
6261
domain=runnable-gamma.com
62+
mongo_port=27017
6363
new_relic_license_key=338516e0826451c297d44dc60aeaf0a0ca4bfead
6464
node_env=production-gamma
6565
pg_host=gamma-infrastructure-db.cnksgdqarobf.us-west-2.rds.amazonaws.com
@@ -69,3 +69,4 @@ rabbit_username=o2mdLh9N9Ke2GzhoK8xsruYPhIQFN7iEL44dQJoq7OM
6969
registry_host=10.4.4.82
7070
swarm_token=d363b783f03a845a2c82b081bfe8443e
7171
user_content_domain=runnable.ninja
72+
api_hello_runnable_github_token=88ddc423c2312d02a8bbcaad76dd4c374a30e4af

ansible/group_vars/all.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ loggly_username: ops
3434

3535
# api
3636
api_github_hook_secret: 3V3RYTHINGisAW3S0ME!
37+
api_hostname: api.{{ domain }}
3738
api_neo4j_port: 7474
3839
api_neo4j_protocol: http://
39-
api_hostname: api.{{ domain }}
4040
api_port: 80
4141

4242
# astral
@@ -45,6 +45,10 @@ pg_database: astral
4545
# charon
4646
charon_port: 53
4747

48+
# consul
49+
consul_host_address: "{{ hostvars[groups['consul'][0]]['ansible_default_ipv4']['address'] }}"
50+
consul_api_port: 8500
51+
4852
# datadog
4953
datadog_api_key: 6488896fe0c811965ef233b96809d70d
5054
datadog_host_address: "{{ ansible_default_ipv4.address }}"
@@ -65,6 +69,10 @@ docker_port: 4242
6569
eru_port: 57831
6670
eru_hostname: admin.{{ domain }}
6771

72+
# fluffy
73+
fluffy_port: 80
74+
fluffy_hostname: "fluffy.{{ domain }}"
75+
6876
# mavis
6977
mavis_hostname: mavis.{{ domain }}
7078
mavis_port: 3000
@@ -73,7 +81,7 @@ mavis_port: 3000
7381
metis_port: 3000
7482

7583
# mongo
76-
mongo_hosts: "{% for host in groups['mongodb'] %}{{ hostvars[host]['ansible_default_ipv4']['address'] }}:27000{% if not loop.last %},{% endif %}{% endfor %}"
84+
mongo_hosts: "{% for host in groups['mongodb'] %}{{ hostvars[host]['ansible_default_ipv4']['address'] }}:{{ mongo_port }}{% if not loop.last %},{% endif %}{% endfor %}"
7785

7886
# navi
7987
navi_host_address: "{{ hostvars[groups['navi'][0]]['ansible_default_ipv4']['address'] }}"
@@ -94,15 +102,13 @@ rabbit_port: 54321
94102
redis_host_address: "{{ hostvars[groups['redis'][0]]['ansible_default_ipv4']['address'] }}"
95103
redis_port: 6379
96104

97-
# sauron
98-
weave_path: /usr/local/bin/weave
99-
100105
# shiva
101106
pg_user: shiva
102107
shiva_port: 3000
103108

104109
# swarm
105110
swarm_master_port: 2375
111+
swarm_host_address: "{{ hostvars[groups['swarm-manager'][0]]['ansible_default_ipv4']['address'] }}"
106112

107113
# navi/link
108114
navi_mongo_database: navi

ansible/group_vars/alpha-api.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ npm_version: "2.8.3"
1414
redis_key: "frontend:{{ api_hostname }}"
1515
is_redis_update_required: 'yes'
1616

17+
# for sendGrid
18+
sendgrid_key: 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
19+
1720
# for container settings
1821
container_envs: >
1922
-e AWS_ACCESS_KEY_ID={{ api_aws_access_key_id }}
@@ -48,8 +51,9 @@ container_envs: >
4851
-e REDIS_PORT={{ redis_port }}
4952
-e ROLLBAR_KEY={{ api_rollbar_key }}
5053
-e S3_CONTEXT_RESOURCE_BUCKET={{ api_s3_context_bucket }}
54+
-e SENDGRID_KEY={{ sendgrid_key }}
5155
-e USER_CONTENT_DOMAIN={{ user_content_domain }}
52-
-e DOCKER_IMAGE_BUILDER_WEAVE_PATH={{ weave_path }}
56+
-e SWARM_HOST=http://{{ swarm_host_address }}:{{ swarm_master_port }}
5357
5458
container_run_opts: >
5559
-h {{ name }}

0 commit comments

Comments
 (0)