Skip to content

Commit 2d8c8f6

Browse files
authored
Merge pull request #698 from CodeNow/revert-697-revert-685-add-new-self-hosted-environment
Revert "Revert "Add new self hosted environment Part 1""
2 parents 01327d1 + 452bd49 commit 2d8c8f6

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

+594
-89
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: 20 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"
@@ -75,6 +76,8 @@ api_port: 80
7576
api_socket_server_hostname: apisock.{{ domain }}
7677
api_socket_server_rollbar_key: cad27f265e8e473c9b293615e7ed0f3a
7778
api_url: https://{{ api_hostname }}
79+
api_mongo_user: api
80+
api_mongo_auth: "{{ api_mongo_user }}:{{ api_mongo_password }}"
7881
sendgrid_key: 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
7982

8083
# arithmancy
@@ -99,10 +102,13 @@ charon_port: 53
99102
clio_host_address: clio
100103
clio_port: 8008
101104
clio_mongo_database: clio
105+
clio_mongo_user: clio
106+
clio_mongo_auth: "{{ clio_mongo_user }}:{{ clio_mongo_password }}"
102107

103108
# consul
104109
consul_api_port: 8500
105110
consul_https_port: 8501
111+
consul_storage_size_gb: 10
106112

107113
# cream
108114
cream_port: 8899
@@ -172,9 +178,13 @@ marketing_url: https://{{ domain }}
172178
# metabase
173179
metabase_port: 3000
174180

181+
# mongo
182+
mongo_storage_size_gb: 50
183+
175184
# navi
176185
navi_host_address: navi
177186
navi_http_port: 3567
187+
navi_mongo_hosts: "mongo"
178188
navi_rollbar_token: 719269e87b9b42848472542a8b2059ae
179189

180190
# node_exporter
@@ -192,8 +202,12 @@ palantiri_rollbar_token: ed971bbca9ea44a29268afc606ab8c7d
192202
pheidi_email_github_token: 115b4d854e34e8a5ba99ab73eefe4bf7a8944d6d
193203
pheidi_rollbar_token: 6fc422ac645441bea7f6f14853eb01ab
194204

205+
# postgres
206+
postgres_storage_size_gb: 50
207+
195208
# prometheus
196209
prometheus_port: 9090
210+
prometheus_storage_size_gb: 100
197211
prometheus_aws_access_key: AKIAIFG37NSI6O2QMRRQ
198212
prometheus_aws_secret_key: 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
199213

@@ -204,10 +218,12 @@ prometheus_alert_url: http://prometheus-alerts:{{ prometheus_alert_port }}
204218
# rabbit
205219
rabbit_host_address: rabbitmq
206220
rabbit_port: 5672
221+
rabbit_storage_size_gb: 50
207222

208223
# redis
209224
redis_host_address: redis
210225
redis_port: 6379
226+
redis_storage_size_gb: 50
211227

212228
# sauron
213229
sauron_rollbar_token: 83157ae2d50d4b6398e404c0b9978d26
@@ -228,6 +244,9 @@ swarm_container_name: swarm
228244
# navi/link
229245
link_hello_runnable_token: 5d8f7029d3d6941b0fc62a7eb8c605d8e0bc7c29
230246
navi_mongo_database: navi
247+
navi_mongo_user: "navi"
248+
navi_mongo_auth: "{{ navi_mongo_user }}:{{ navi_mongo_password }}"
249+
navi_mongo_hosts: "{{ mongo_hosts }}"
231250

232251
npm_token: c0c4b32a-3de5-4e27-9d32-56c1616746d8
233252

@@ -241,6 +260,7 @@ user_vault_host_address: user-vault
241260
# local-vault
242261
vault_local_port: 31836
243262
vault_addr: http://127.0.0.1:{{ vault_local_port }}
263+
vault_consul_address: "consul.{{ domain }}"
244264

245265
# userland
246266
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)