Commit 92ef9a29 by John Jarvis

adding deploy tags, ease packages for ora

parent 10f565d7
......@@ -6,6 +6,8 @@
notify:
- discern | restart celery
- discern | restart discern
tags:
- deploy
- name: discern | create discern auth file auth.json
template: src=auth.json.j2 dest={{app_dir}}/auth.json
......@@ -13,6 +15,8 @@
notify:
- discern | restart celery
- discern | restart discern
tags:
- deploy
#Needed if using redis to prevent memory issues
- name: discern | change memory commit settings -- needed for redis
......@@ -21,6 +25,8 @@
- name: discern | set permissions on app_dir sgid for edx
file: path={{app_dir}} owner=root group=edx mode=2775 state=directory
file: path={{venv_dir}} owner=root group=edx mode=2775 state=directory
tags:
- deploy
#Grab both repos or update
- name: discern | git checkout discern repo into discern_dir
......@@ -29,6 +35,8 @@
notify:
- discern | restart celery
- discern | restart discern
tags:
- deploy
- name: discern | git checkout ease repo into ease_dir
git: dest={{ease_dir}} repo={{ease_source_repo}} version={{ease_branch}}
......@@ -36,6 +44,8 @@
notify:
- discern | restart celery
- discern | restart discern
tags:
- deploy
#Numpy has to be a pre-requirement in order for scipy to build
- name : install python pre-requirements for discern and ease
......@@ -44,6 +54,8 @@
with_items:
- "{{ discern_pre_requirements_file }}"
- "{{ discern_ease_pre_requirements_file }}"
tags:
- deploy
- name : install python requirements for discern and ease
pip: requirements="{{item}}/requirements.txt" virtualenv="{{ discern_venv_dir }}" state=present
......@@ -51,14 +63,20 @@
with_items:
- "{{ discern_post_requirements_file }}"
- "{{ discern_ease_post_requirements_file }}"
tags:
- deploy
- name: discern | install ease python package
shell: command="{{discern_venv_dir}}/bin/activate; cd {{ discern_ease_code_dir }}; python setup.py install"
tags:
- deploy
#Needed for the ease package to work
- name: discern | install nltk data using rendered shell script
shell: command="{{ discern_venv_dir }}/bin/python -m nltk.downloader -d {{ discern_nltk_data_dir }} all"
sudo_user: "{{ discern_user }}"
tags:
- deploy
#Run this instead of using the ansible module because the ansible module only support syncdb of these three, and does not
#support virtualenvs as of this comment
......@@ -69,8 +87,12 @@
- syncdb
- migrate
- collectstatic
tags:
- deploy
#Have this separate from the other three because it doesn't take the noinput flag
- name: discern | django update_index for discern
shell: "{{ discern_venv_dir}}/bin/python {{discern_code_dir}}/manage.py update_index --settings={{discern_settings}} --pythonpath={{discern_code_dir}}"
sudo_user: "{{ discern_user }}"
tags:
- deploy
......@@ -25,4 +25,9 @@
apt: pkg={{item}} state=present
with_items: ora_debian_pkgs
- name: ora | install debian packages for ease that ora needs
apt: pkg={{item}} state=present
with_items: ora_ease_debian_pkgs
- include: deploy.yml
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