Skip to content

Commit 3705fe0

Browse files
authored
SAN-4317; Github Varnish Proxy (#483)
* Changed api to use cache. * Added github protocol and delta inventory configuration. * Added deploy song for github-proxy * Removed whitespace.
1 parent 8a6227e commit 3705fe0

11 files changed

Lines changed: 78 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ It is the custom at Runnable to play a song to the entire team when deploying. F
136136
| detention | [Unbreakable Kimmy Schmidt](https://youtu.be/CV9xF8CjhJk?t=21s) |
137137
| docker-listener | [Call Me Maybe - Carly Rae Jepsen](https://www.youtube.com/watch?v=fWNaR-rxAic) |
138138
| filibuster | [He's a Pirate - Pirates Of The Caribbean](https://www.youtube.com/watch?v=yRh-dzrI4Z4) |
139+
| github-proxy | [Proxy - Martin Garrix](https://www.youtube.com/watch?v=NWB6-PJw4Mk) |
139140
| khronos | [Time After Time - Cyndi Lauper](https://www.youtube.com/watch?v=VdQY7BusJNU) |
140141
| krain | [Men at Work - Down Under](https://www.youtube.com/watch?v=XfR9iY5y94s) |
141142
| link | [Zelda Main Theme Song](https://www.youtube.com/watch?v=cGufy1PAeTU) |

ansible/delta-hosts/hosts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ delta-app-services
112112
[pheidi]
113113
delta-app-services
114114

115+
[github-varnish]
116+
delta-app-services
117+
115118
[delta:children]
116119
api
117120
bastion
@@ -122,6 +125,7 @@ docker-listener
122125
docks
123126
drake
124127
eru
128+
github-varnish
125129
hipache
126130
khronos
127131
mavis

ansible/epsilon-hosts/hosts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ epsilon-app-services
107107
[pheidi]
108108
epsilon-app-services
109109

110+
[github-varnish]
111+
epsilon-app-services
112+
110113
[epsilon:children]
111114
api
112115
bastion
@@ -117,6 +120,7 @@ docker-listener
117120
docks
118121
drake
119122
eru
123+
github-varnish
120124
hipache
121125
khronos
122126
mavis

ansible/gamma-hosts/hosts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ gamma-app-services
108108
[pheidi]
109109
gamma-app-services
110110

111+
[github-varnish]
112+
gamma-app-services
113+
111114
[docks]
112115

113116
[dock]
@@ -122,6 +125,7 @@ docker-listener
122125
docks
123126
drake
124127
eru
128+
github-varnish
125129
hipache
126130
khronos
127131
mavis

ansible/github-varnish.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
3+
- hosts: github-varnish
4+
vars_files:
5+
- group_vars/alpha-github-varnish.yml
6+
roles:
7+
- { role: build_with_dockerfile, tags: [ build ] }
8+
- { role: container_kill_start }

ansible/group_vars/all.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ detention_port: 9123
7474
detention_hostname: detention.{{ domain }}
7575

7676
# docker log driver
77-
7877
log_driver: syslog
7978
log_facility: local7
8079

@@ -104,6 +103,10 @@ fluffy_port: 80
104103
fluffy_hostname: "fluffy.{{ domain }}"
105104
fluffy_rollbar_token: 6eb108bab1f54687b9b023e5b485967a
106105

106+
# github-varnish
107+
github_varnish_host: "{{ hostvars[groups['github-varnish'][0]]['ansible_default_ipv4']['address'] }}"
108+
github_varnish_port: 8765
109+
107110
# khronos
108111
rollbar_khronos_token: 5a140828cce14410812d34a3ef936f25
109112

ansible/group_vars/alpha-api-base.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ api_base_container_envs: >-
2323
-e GITHUB_DEPLOY_KEYS_BUCKET={{ api_github_deploy_keys_bucket }}
2424
-e GITHUB_HOOK_URL={{ api_url }}/actions/github
2525
-e GITHUB_WEBHOOK_URL=https://{{ drake_hostname }}/github
26+
-e GITHUB_VARNISH_HOST={{ github_varnish_host }}
27+
-e GITHUB_VARNISH_PORT={{ github_varnish_port }}
28+
-e GITHUB_PROTOCOL=http
2629
-e HELLO_RUNNABLE_GITHUB_TOKEN={{ api_hello_runnable_github_token }}
2730
-e KRAIN_PORT={{ krain_port }}
2831
-e MAVIS_HOST=http://{{ mavis_hostname }}:80
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: github-varnish
3+
4+
container_image: registry.runnable.com/runnable/{{ name }}
5+
container_tag: "{{ git_branch }}"
6+
repo: git@github.com:CodeNow/{{ name }}.git
7+
8+
container_envs: >-
9+
-e VARNISH_PORT=80
10+
-e VARNISH_MALLOC=100M
11+
12+
container_run_opts: >
13+
-h {{ name }}
14+
-d
15+
-p {{ github_varnish_port }}:80
16+
{{ container_envs }}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
build_dir: /opts/builds/docker_build
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
dependencies:
3+
- { role: apt_update }
4+
- { role: docker }

0 commit comments

Comments
 (0)