Commit 3269926c by Jason Bau

Merge pull request #126 from edx/jbau/fix/xqueue_underscore

Jbau/fix/xqueue underscore
parents 99211c1a 93f27192
- hosts: tag_Name_jumpbox_prod
sudo: True
vars_files:
- "{{ secure_dir }}/vars/users.yml"
vars:
secure_dir: '../../../configuration-secure/ansible'
# this indicates the path to site-specific (with precedence)
# things like nginx template files
local_dir: '../../../configuration-secure/ansible/local'
roles:
- common
\ No newline at end of file
# this gets all running prod webservers
- hosts: tag_environment_prod:&tag_function_xqueue
# or we can get subsets of them by name
#- hosts: ~tag_Name_xserver(1|2)_prod
#- hosts: security_group_edx-prod-EdxappServerSecurityGroup-NSKCQTMZIPQB
sudo: True
vars:
secure_dir: '../../../configuration-secure/ansible'
# this indicates the path to site-specific (with precedence)
# things like nginx template files
local_dir: '../../../configuration-secure/ansible/local'
vars_files:
- "{{ secure_dir }}/vars/edxapp_prod_vars.yml"
- "{{ secure_dir }}/vars/users.yml"
- "{{ secure_dir }}/vars/edxapp_prod_users.yml"
roles:
- common
- nginx
- xqueue
# this gets all running prod webservers
- hosts: tag_environment_prod:&tag_function_xserver
# or we can get subsets of them by name
#- hosts: ~tag_Name_xserver(1|2)_prod
#- hosts: security_group_edx-prod-EdxappServerSecurityGroup-NSKCQTMZIPQB
sudo: True
vars:
secure_dir: '../../../configuration-secure/ansible'
# this indicates the path to site-specific (with precedence)
# things like nginx template files
local_dir: '../../../configuration-secure/ansible/local'
vars_files:
- "{{ secure_dir }}/vars/edxapp_prod_vars.yml"
- "{{ secure_dir }}/vars/users.yml"
- "{{ secure_dir }}/vars/edxapp_prod_users.yml"
roles:
- common
- nginx
- xserver
upstream app_server {
# For a TCP configuration:
server 127.0.0.1:{{ xqueue.gunicorn_port }} fail_timeout=0;
server 127.0.0.1:{{ xqueue_gunicorn_port }} fail_timeout=0;
}
server {
listen {{ xqueue.nginx_port }} default_server;
listen {{ xqueue_nginx_port }} default_server;
location / {
try_files $uri @proxy_to_app;
......
......@@ -21,19 +21,21 @@
- xqueue
- name: create xqueue application config
template: src=xqueue_env.json.j2 dest=$app_base_dir/env.json mode=640 owner=www-data group=adm
template: src=xqueue.env.json.j2 dest=$app_base_dir/env.json mode=0640 owner=www-data group=adm
tags:
- xqueue
- name: create xqueue auth file
template: src=xqueue_auth.json.j2 dest=$app_base_dir/auth.json mode=640 owner=www-data group=adm
template: src=xqueue.auth.json.j2 dest=$app_base_dir/auth.json mode=0640 owner=www-data group=adm
tags:
- xqueue
- name: creating xqueue upstart script
sudo: True
template: src=xqueue_conf.j2 dest=/etc/init/xqueue_conf owner=root group=root
template: src=xqueue.conf.j2 dest=/etc/init/xqueue.conf mode=0640 owner=root group=adm
tags:
- xqueue
# Install nginx site
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=xqueue
- include: deploy.yml
#/etc/init/xqueue_conf
#/etc/init/xqueue.conf
description "xqueue server"
author "edX <info@edx.org>"
......@@ -6,15 +6,15 @@ author "edX <info@edx.org>"
respawn
respawn limit 3 30
env PID=/var/tmp/xqueue_pid
env PID=/var/tmp/xqueue.pid
env WORKERS={{ ansible_processor_cores * 2 }}
env PORT={{ xqueue_gunicorn_port }}
env LANG=en_US.UTF-8
env DJANGO_SETTINGS_MODULE=xqueue_aws_settings
env DJANGO_SETTINGS_MODULE=xqueue.aws_settings
env SERVICE_VARIANT="xqueue"
chdir {{ xqueue_code_dir }}
setuid www-data
exec {{ venv_dir }}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{ xqueue_code_dir }} xqueue_wsgi
exec {{ venv_dir }}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=300 --pythonpath={{ xqueue_code_dir }} xqueue.wsgi
......@@ -14,7 +14,7 @@ xqueue_gunicorn_port: 8040
xqueue_auth_config: {}
xqueue_env_config: {}
xqueue_source_repo: https://github.com/edx/xqueue_git
xqueue_source_repo: https://github.com/edx/xqueue.git
xqueue_version: 'HEAD'
xqueue_pre_requirements_file: "{{ xqueue_code_dir }}/pre-requirements.txt"
xqueue_post_requirements_file: "{{ xqueue_code_dir }}/requirements.txt"
......
......@@ -25,15 +25,14 @@
#see http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/
xqueue:
env_config:
xqueue_env_config:
'XQUEUES':
# push queue
- 'edX-DemoX': 'http://localhost:18050'
'edX-DemoX': 'http://localhost:18050'
# pull queues
- 'test-pull': !!null
- 'certificates': !!null
- 'open-ended': !!null
'test-pull': !!null
'certificates': !!null
'open-ended': !!null
'XQUEUE_WORKERS_PER_QUEUE': 12
'LOGGING_ENV' : 'sandbox'
'LOG_DIR' : '/mnt/logs'
......@@ -41,7 +40,7 @@ xqueue:
'RABBIT_HOST' : 'localhost'
'S3_BUCKET_PREFIX' : 'sandbox-bucket'
auth_config:
xqueue_auth_config:
'AWS_ACCESS_KEY_ID' : ''
'AWS_SECRET_ACCESS_KEY' : ''
'REQUESTS_BASIC_AUTH': ['edx', 'edx']
......
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