Squashed commit of the following:
chore(env): injecting postgres db name with connection string
chore(install): fail if postgresql migration failed
fix(variable): templating for chalice
fix(postgres): variable name
chore(vars): overriding variables for
- s3
- postgres
- aws credentials
This commit is contained in:
parent
26a0aad2a3
commit
91110489fb
9 changed files with 21 additions and 6 deletions
|
|
@ -21,7 +21,7 @@
|
|||
file="{{ item|basename }}"
|
||||
kubectl exec -n db postgresql-postgresql-0 -- /bin/bash -c "rm -rf /tmp/$file"
|
||||
kubectl cp -n db $file postgresql-postgresql-0:/tmp/
|
||||
kubectl exec -n db postgresql-postgresql-0 -- /bin/bash -c "PGPASSWORD=asayerPostgres psql -U postgres -f /tmp/$file" &> "{{ playbook_dir }}"/postgresql_init.log
|
||||
kubectl exec -n db postgresql-postgresql-0 -- /bin/bash -c "PGPASSWORD=asayerPostgres psql -v ON_ERROR_STOP=1 -U postgres -f /tmp/$file" &> "{{ playbook_dir }}"/postgresql_init.log
|
||||
args:
|
||||
chdir: db/init_dbs/postgresql
|
||||
with_fileglob:
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ image:
|
|||
{% endif %}
|
||||
env:
|
||||
LICENSE_KEY: "{{ enterprise_edition_license }}"
|
||||
POSTGRES_STRING: "postgres://{{postgres_db_user}}:{{postgres_db_password}}@{{postgres_endpoint}}:{{postgres_port}}"
|
||||
POSTGRES_STRING: "postgres://{{postgres_db_user}}:{{postgres_db_password}}@{{postgres_endpoint}}:{{postgres_port}}/{{ postgres_db_name }}"
|
||||
|
||||
{% if not (docker_registry_username is defined and docker_registry_username and docker_registry_password is defined and docker_registry_password) %}
|
||||
imagePullSecrets: []
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ image:
|
|||
env:
|
||||
AWS_ACCESS_KEY_ID: "{{ minio_access_key }}"
|
||||
AWS_SECRET_ACCESS_KEY: "{{ minio_secret_key }}"
|
||||
S3_BUCKET_ASSETS: "{{ assets_bucket }}"
|
||||
LICENSE_KEY: "{{ enterprise_edition_license }}"
|
||||
AWS_ENDPOINT: "{{ s3_endpoint }}"
|
||||
AWS_REGION: "{{ aws_region }}"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ env:
|
|||
S3_SECRET: "{{ minio_secret_key }}"
|
||||
sourcemaps_bucket_key: "{{ minio_access_key }}"
|
||||
sourcemaps_bucket_secret: "{{ minio_secret_key }}"
|
||||
S3_HOST: "https://{{ domain_name }}"
|
||||
SITE_URL: "https://{{ domain_name }}"
|
||||
jwt_secret: "{{ jwt_secret_key }}"
|
||||
pg_host: "{{ postgres_endpoint }}"
|
||||
|
|
@ -31,6 +30,16 @@ env:
|
|||
EMAIL_FROM: "{{ email_from }}"
|
||||
AWS_DEFAULT_REGION: "{{ aws_region }}"
|
||||
sessions_region: "{{ aws_region }}"
|
||||
sessions_bucket: "{{ recordings_bucket }}"
|
||||
sourcemaps_bucket: "{{ sourcemaps_bucket }}"
|
||||
js_cache_bucket: "{{ assets_bucket }}"
|
||||
# In case of minio, the instance is running inside kuberntes,
|
||||
# which is accessible via nginx ingress.
|
||||
{% if s3_endpoint == "http://minio.db.svc.cluster.local:9000" %}
|
||||
S3_HOST: "https://{{ domain_name }}"
|
||||
{% else %}
|
||||
S3_HOST: "{{ s3_endpoint }}"
|
||||
{% endif %}
|
||||
{% if env is defined and env.chalice is defined and env.chalice%}
|
||||
{{ env.chalice | to_nice_yaml | trim | indent(2) }}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ image:
|
|||
{% endif %}
|
||||
env:
|
||||
LICENSE_KEY: "{{ enterprise_edition_license }}"
|
||||
POSTGRES_STRING: "postgres://{{ postgres_db_user }}:{{ postgres_db_password }}@{{ postgres_endpoint }}:{{ postgres_port }}"
|
||||
POSTGRES_STRING: "postgres://{{ postgres_db_user }}:{{ postgres_db_password }}@{{ postgres_endpoint }}:{{ postgres_port }}/{{ postgres_db_name }}"
|
||||
REDIS_STRING: "{{ redis_endpoint }}"
|
||||
KAFKA_SERVERS: "{{ kafka_endpoint }}"
|
||||
KAFKA_USE_SSL: "{{ kafka_ssl }}"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ env:
|
|||
AWS_SECRET_ACCESS_KEY: "{{ minio_secret_key }}"
|
||||
LICENSE_KEY: "{{ enterprise_edition_license }}"
|
||||
AWS_REGION: "{{ aws_region }}"
|
||||
POSTGRES_STRING: "postgres://{{ postgres_db_user }}:{{ postgres_db_password }}@{{ postgres_endpoint }}:{{ postgres_port }}"
|
||||
POSTGRES_STRING: "postgres://{{ postgres_db_user }}:{{ postgres_db_password }}@{{ postgres_endpoint }}:{{ postgres_port }}/{{ postgres_db_name }}"
|
||||
REDIS_STRING: "{{ redis_endpoint }}"
|
||||
KAFKA_SERVERS: "{{ kafka_endpoint }}"
|
||||
KAFKA_USE_SSL: "{{ kafka_ssl }}"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ image:
|
|||
{% endif %}
|
||||
env:
|
||||
LICENSE_KEY: "{{ enterprise_edition_license }}"
|
||||
POSTGRES_STRING: "postgres://{{ postgres_db_user }}:{{ postgres_db_password }}@{{ postgres_endpoint }}:{{ postgres_port }}"
|
||||
POSTGRES_STRING: "postgres://{{ postgres_db_user }}:{{ postgres_db_password }}@{{ postgres_endpoint }}:{{ postgres_port }}/{{ postgres_db_name }}"
|
||||
#
|
||||
REDIS_STRING: "{{ redis_endpoint }}"
|
||||
KAFKA_SERVERS: "{{ kafka_endpoint }}"
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ env:
|
|||
AWS_ENDPOINT: "{{ s3_endpoint }}"
|
||||
AWS_REGION_WEB: "{{ aws_region }}"
|
||||
AWS_REGION_IOS: "{{ aws_region }}"
|
||||
S3_BUCKET_WEB: "{{ recordings_bucket }}"
|
||||
S3_BUCKET_IOS: "{{ recordings_bucket }}"
|
||||
REDIS_STRING: "{{ redis_endpoint }}"
|
||||
KAFKA_SERVERS: "{{ kafka_endpoint }}"
|
||||
KAFKA_USE_SSL: "{{ kafka_ssl }}"
|
||||
|
|
|
|||
|
|
@ -90,6 +90,9 @@ db_resource_override:
|
|||
## Sane defaults
|
||||
s3_endpoint: "http://minio.db.svc.cluster.local:9000"
|
||||
aws_region: "us-east-1"
|
||||
assets_bucket: sessions-assets
|
||||
recordings_bucket: mobs
|
||||
sourcemaps_bucket: sourcemaps
|
||||
kafka_endpoint: kafka.db.svc.cluster.local:9042
|
||||
kafka_ssl: false
|
||||
postgres_endpoint: postgresql.db.svc.cluster.local
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue