Commit 4a9fc07b by John Jarvis

ora virtualenv bootstrap

parent 83205603
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
# portions of the deploy needs to be incorporated here. # portions of the deploy needs to be incorporated here.
# Install the python pre requirements into {{ venv_dir }} # Install the python pre requirements into {{ ora_venv_dir }}
- name: install python pre-requirements - name: install python pre-requirements
pip: requirements="{{ora_pre_requirements_file}}" virtualenv="{{venv_dir}}" state=present pip: requirements="{{ora_pre_requirements_file}}" virtualenv="{{venv_dir}}" state=present
notify: notify:
...@@ -64,9 +64,9 @@ ...@@ -64,9 +64,9 @@
- ora - ora
- deploy - deploy
# Install the python post requirements into {{ venv_dir }} # Install the python post requirements into {{ ora_venv_dir }}
- name: install python post-requirements - name: install python post-requirements
pip: requirements="{{ora_post_requirements_file}}" virtualenv="{{venv_dir}}" state=present pip: requirements="{{ora_post_requirements_file}}" virtualenv="{{ora_venv_dir}}" state=present
notify: notify:
- restart edx-ora - restart edx-ora
- restart edx-ora-celery - restart edx-ora-celery
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
- deploy - deploy
- name: syncdb and migrate - name: syncdb and migrate
shell: sudo -u www-data {{venv_dir}}/bin/django-admin.py syncdb --migrate --noinput --settings=edx_ora.aws --pythonpath={{ora_code_dir}} shell: sudo -u www-data {{ora_venv_dir}}/bin/django-admin.py syncdb --migrate --noinput --settings=edx_ora.aws --pythonpath={{ora_code_dir}}
when: migrate_db when: migrate_db
notify: notify:
- restart edx-ora - restart edx-ora
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
- deploy - deploy
- name: create users - name: create users
shell: sudo -u www-data {{venv_dir}}/bin/django-admin.py update_users --settings=edx_ora.aws --pythonpath={{ora_code_dir}} shell: sudo -u www-data {{ora_venv_dir}}/bin/django-admin.py update_users --settings=edx_ora.aws --pythonpath={{ora_code_dir}}
notify: notify:
- restart edx-ora - restart edx-ora
- restart edx-ora-celery - restart edx-ora-celery
......
...@@ -51,6 +51,16 @@ ...@@ -51,6 +51,16 @@
tags: tags:
- ora - ora
- name: create the ora virtual environment
file: path={{ ora_venv_dir }} owner=root group=adm mode=2775 state=directory
tags:
- ora
- name: bootstrap the ora virtual environment
command: /usr/local/bin/virtualenv {{ ora_venv_dir }} --distribute creates={{ora_venv_dir}}/bin/activate
tags:
- ora
# Install nginx site # Install nginx site
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=ora - include: ../../nginx/tasks/nginx_site.yml state=link site_name=ora
......
...@@ -4,7 +4,7 @@ ora_code_dir: "{{ app_base_dir }}/edx-ora" ...@@ -4,7 +4,7 @@ ora_code_dir: "{{ app_base_dir }}/edx-ora"
# Default nginx listen port # Default nginx listen port
# These should be overrided if you want # These should be overrided if you want
# to serve all content on port 80 # to serve all content on port 80
ora_venv_dir: "/opt/edx"
ora_gunicorn_workers: 4 ora_gunicorn_workers: 4
ora_nginx_port: 18091 ora_nginx_port: 18091
ora_gunicorn_port: 8091 ora_gunicorn_port: 8091
......
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