Commit f12016d9 by Kevin Falcone

Add an xqueue_env file

Much of our deployment infrastructure relies on having the settings and
path controlled from the environment file.  We don't have a good
way yet to define the CONFIG file since there is an auth and an env.
There's a later ticket for that.
parent c516cab1
......@@ -54,6 +54,7 @@ XQUEUE_MYSQL_HOST: 'localhost'
XQUEUE_MYSQL_PORT: '3306'
XQUEUE_MYSQL_OPTIONS: {}
XQUEUE_NEWRELIC_APPNAME: "{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}-xqueue"
XQUEUE_SETTINGS_MODULE: "xqueue.aws_settings"
# Set the number of workers explicitely for xqueue
XQUEUE_WORKERS: !!null
XQUEUE_WORKERS_PER_QUEUE: 12
......@@ -75,6 +76,11 @@ xqueue_user: "xqueue"
xqueue_gunicorn_port: 8040
xqueue_gunicorn_host: 127.0.0.1
xqueue_environment:
DJANGO_SETTINGS_MODULE: '{{ XQUEUE_SETTINGS_MODULE }}'
PATH: '{{ xqueue_venv_bin }}:{{ ansible_env.PATH }}'
xqueue_env_config:
XQUEUES: "{{ XQUEUE_QUEUES }}"
XQUEUE_WORKERS_PER_QUEUE: "{{ XQUEUE_WORKERS_PER_QUEUE }}"
......
......@@ -44,6 +44,17 @@
- install
- install:configuration
- name: setup the app env file
template:
src: "xqueue_env.j2"
dest: "{{ xqueue_app_dir }}/xqueue_env"
owner: "{{ xqueue_user }}"
group: "{{ common_web_group }}"
mode: 0644
tags:
- install
- install:configuration
# Do A Checkout
- name: "Git checkout xqueue repo into {{ xqueue_code_dir }}"
git:
......
# {{ ansible_managed }}
{% for name,value in xqueue_environment.items() -%}
{%- if value -%}
export {{ name }}="{{ value }}"
{% endif %}
{%- endfor %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment