Skip to content

Commit 5330bce

Browse files
authored
Merge pull request #685 from CodeNow/add-new-self-hosted-environment
Add new self hosted environment Part 1
2 parents 2d7ab01 + be9ac2d commit 5330bce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+571
-82
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ environments/*/secrets/**/*
1414
# Leaving for now while PR is merged
1515
environments/*/k8
1616
# Meant to not break anything. Might remove later
17-
environments/self-hosted-test
17+
environments/runnable-on-prem-test
1818
*.retry
1919
*.tfstate*
2020
terraform/credentials.tfvars

ansible/consul-values-job.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
- hosts: consul
3+
vars_files:
4+
- "group_vars/alpha-consul.yml"
5+
- "group_vars/alpha-consul-values.yml"
6+
roles:
7+
- role: k8-job

ansible/consul-values.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
tasks:
66
- name: make sure httplib2 is installed
77
become: true
8-
apt: package=python-httplib2 state=present
8+
pip:
9+
name: httplib2
10+
executable: pip
911

1012
- name: put values into consul
1113
run_once: true
1214
when: write_values is defined
1315
uri:
1416
method=PUT
15-
url=http://{{ ansible_default_ipv4.address }}:8500/v1/kv/{{ item.key }}
17+
url={{ consul_url }}/v1/kv/{{ item.key }}
1618
body="{{ item.value }}"
1719
with_items: "{{ consul_seed }}"
1820

@@ -22,7 +24,7 @@
2224
when: read_values is defined
2325
uri:
2426
method=GET
25-
url=http://{{ ansible_default_ipv4.address }}:8500/v1/kv/{{ item.key }}
27+
url={{ consul_url }}/v1/kv/{{ item.key }}
2628
with_items: "{{ consul_seed }}"
2729
register: values
2830

ansible/enterprise-sign-in.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
- group_vars/alpha-enterprise-sign-in.yml
55
roles:
66
- { role: builder, tags: "build" }
7-
- { role: container_start }
8-
- { role: wait_for_container_exit }
7+
- { role: k8-job }

ansible/group_vars/all.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ docker_client_root: "{{ secrets_root }}/docker-client/"
1414
config_maps_path: "{{ opts_root }}/configMaps"
1515
services_path: "{{ opts_root }}/services"
1616
deployments_path: "{{ opts_root }}/deployments"
17+
jobs_path: "{{ opts_root }}/jobs"
1718
cron_jobs_path: "{{ opts_root }}/crons"
1819
volumes_path: "{{ opts_root }}/volumes"
1920
daemon_sets_path: "{{ opts_root }}/daemonSets"
@@ -103,6 +104,7 @@ clio_mongo_database: clio
103104
# consul
104105
consul_api_port: 8500
105106
consul_https_port: 8501
107+
consul_storage_size_gb: 10
106108

107109
# cream
108110
cream_port: 8899
@@ -172,6 +174,9 @@ marketing_url: https://{{ domain }}
172174
# metabase
173175
metabase_port: 3000
174176

177+
# mongo
178+
mongo_storage_size_gb: 50
179+
175180
# navi
176181
navi_host_address: navi
177182
navi_http_port: 3567
@@ -192,8 +197,12 @@ palantiri_rollbar_token: ed971bbca9ea44a29268afc606ab8c7d
192197
pheidi_email_github_token: 115b4d854e34e8a5ba99ab73eefe4bf7a8944d6d
193198
pheidi_rollbar_token: 6fc422ac645441bea7f6f14853eb01ab
194199

200+
# postgres
201+
postgres_storage_size_gb: 50
202+
195203
# prometheus
196204
prometheus_port: 9090
205+
prometheus_storage_size_gb: 100
197206
prometheus_aws_access_key: AKIAIFG37NSI6O2QMRRQ
198207
prometheus_aws_secret_key: 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
199208

@@ -204,10 +213,12 @@ prometheus_alert_url: http://prometheus-alerts:{{ prometheus_alert_port }}
204213
# rabbit
205214
rabbit_host_address: rabbitmq
206215
rabbit_port: 5672
216+
rabbit_storage_size_gb: 50
207217

208218
# redis
209219
redis_host_address: redis
210220
redis_port: 6379
221+
redis_storage_size_gb: 50
211222

212223
# sauron
213224
sauron_rollbar_token: 83157ae2d50d4b6398e404c0b9978d26
@@ -241,6 +252,7 @@ user_vault_host_address: user-vault
241252
# local-vault
242253
vault_local_port: 31836
243254
vault_addr: http://127.0.0.1:{{ vault_local_port }}
255+
vault_consul_address: "consul.{{ domain }}"
244256

245257
# userland
246258
userland_host_address: userland

ansible/group_vars/alpha-api-base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ api_base_container_envs:
7373
- name: KRAIN_PORT
7474
value: "{{ krain_port }}"
7575
- name: MIXPANEL_APP_ID
76-
value: "{{ api_mixpanel_app_id }}"
76+
value: "{{ api_mixpanel_app_id | default('ansible_undefined') }}"
7777
- name: MONGO_AUTH
7878
value: "{{ api_mongo_auth }}"
7979
- name: MONGO_DB

ansible/group_vars/alpha-api.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ num_replicas: 16
88

99
envs:
1010
- name: ROLLBAR_KEY
11-
value: "{{ api_rollbar_key }}"
11+
value: "{{ api_rollbar_key | default('ansible_undefined') }}"
1212

1313
volume_mounts:
1414
- name: "{{ name }}-docker-ssl-certs"

ansible/group_vars/alpha-arithmancy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ container_envs:
2323
- name: RABBITMQ_USERNAME
2424
value: "{{ rabbit_username }}"
2525
- name: ROLLBAR_KEY
26-
value: "{{ arithmancy_rollbar_key }}"
26+
value: "{{ arithmancy_rollbar_key | default('ansible_undefined') }}"

ansible/group_vars/alpha-big-poppa-base.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ big_poppa_base_container_envs:
5858
- name: GITHUB_PROTOCOL
5959
value: "http"
6060
- name: STRIPE_API_KEY
61-
value: "{{ cream_stripe_secret_key }}"
61+
value: "{{ cream_stripe_secret_key | default('ansible_undefined') }}"
6262
- name: STRIPE_PUBLISHABLE_KEY
63-
value: "{{ cream_stripe_publishable_key }}"
63+
value: "{{ cream_stripe_publishable_key | default('ansible_undefined') }}"

ansible/group_vars/alpha-big-poppa-http.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ envs:
88
- name: PORT
99
value: "{{ big_poppa_port }}"
1010
- name: ROLLBAR_KEY
11-
value: "{{ big_poppa_http_rollbar_token }}"
11+
value: "{{ big_poppa_http_rollbar_token | default('ansible_undefined') }}"
1212
- name: NEW_RELIC_APP_NAME
1313
value: "{{ big_poppa_new_relic_app_name | default('ansible_undefined') }}"
1414
- name: NEW_RELIC_LICENSE_KEY

0 commit comments

Comments
 (0)