Commit 6f550707 by Vik Paruchuri

Rename ml-service-api to discern

parent 0b3651e6
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
service: name=nginx state=stopped service: name=nginx state=stopped
sudo: True sudo: True
- name: stop ml-service-api - name: stop discern
service: name=ml-service-api state=stopped service: name=discern state=stopped
sudo: True sudo: True
- name: create mlapi application config env.json file - name: create mlapi application config env.json file
...@@ -43,27 +43,27 @@ ...@@ -43,27 +43,27 @@
file: path={{ml_dir}} owner={{remote_user}} group=edx mode=2775 state=directory file: path={{ml_dir}} owner={{remote_user}} group=edx mode=2775 state=directory
sudo: True sudo: True
- name: git checkout ml-service-api repo into ml_api_dir - name: git checkout discern repo into ml_api_dir
git: dest={{ml_api_dir}} repo={{mlapi_source_repo}} version={{ml_api_branch}} git: dest={{ml_api_dir}} repo={{mlapi_source_repo}} version={{ml_api_branch}}
- name: git checkout machine-learning repo into ml_dir - name: git checkout machine-learning repo into ml_dir
git: dest={{ml_dir}} repo={{ml_source_repo}} version={{ml_branch}} git: dest={{ml_dir}} repo={{ml_source_repo}} version={{ml_branch}}
- name: install ml-service-api apt packages - name: install discern apt packages
command: xargs -a $app_base_dir/ml-service-api/apt-packages.txt apt-get install -y command: xargs -a $app_base_dir/discern/apt-packages.txt apt-get install -y
sudo: yes sudo: yes
- name: install machine-learning apt packages - name: install machine-learning apt packages
command: xargs -a $app_base_dir/machine-learning/apt-packages.txt apt-get install -y command: xargs -a $app_base_dir/machine-learning/apt-packages.txt apt-get install -y
sudo: yes sudo: yes
- name : install python pre-requirements for ml-service-api - name : install python pre-requirements for discern
pip: requirements="{{ml_api_dir}}/pre-requirements.txt" virtualenv="{{venv_dir}}" state=present pip: requirements="{{ml_api_dir}}/pre-requirements.txt" virtualenv="{{venv_dir}}" state=present
- name : install python pre-requirements for machine-learning - name : install python pre-requirements for machine-learning
pip: requirements="{{ml_dir}}/pre-requirements.txt" virtualenv="{{venv_dir}}" state=present pip: requirements="{{ml_dir}}/pre-requirements.txt" virtualenv="{{venv_dir}}" state=present
- name : install python requirements for ml-service-api - name : install python requirements for discern
pip: requirements="{{ml_api_dir}}/requirements.txt" virtualenv="{{venv_dir}}" state=present pip: requirements="{{ml_api_dir}}/requirements.txt" virtualenv="{{venv_dir}}" state=present
- name : install python requirements for machine-learning - name : install python requirements for machine-learning
...@@ -79,24 +79,24 @@ ...@@ -79,24 +79,24 @@
file: path={{nltk_data_dir}} owner={{remote_user}} group=edx mode=2775 state=directory file: path={{nltk_data_dir}} owner={{remote_user}} group=edx mode=2775 state=directory
sudo: True sudo: True
- name: django syncdb for ml-service-api - name: django syncdb for discern
shell: ls; {{venv_dir}}/bin/python {{ml_api_dir}}/manage.py syncdb --noinput --settings={{ml_api_settings}} --pythonpath={{ml_api_dir}} shell: ls; {{venv_dir}}/bin/python {{ml_api_dir}}/manage.py syncdb --noinput --settings={{ml_api_settings}} --pythonpath={{ml_api_dir}}
- name: django migrate for ml-service-api - name: django migrate for discern
shell: ls; {{venv_dir}}/bin/python {{ml_api_dir}}/manage.py migrate --noinput --settings={{ml_api_settings}} --pythonpath={{ml_api_dir}} shell: ls; {{venv_dir}}/bin/python {{ml_api_dir}}/manage.py migrate --noinput --settings={{ml_api_settings}} --pythonpath={{ml_api_dir}}
- name: django collectstatic for ml-service-api - name: django collectstatic for discern
shell: ls; {{venv_dir}}/bin/python {{ml_api_dir}}/manage.py collectstatic --noinput --settings={{ml_api_settings}} --pythonpath={{ml_api_dir}} shell: ls; {{venv_dir}}/bin/python {{ml_api_dir}}/manage.py collectstatic --noinput --settings={{ml_api_settings}} --pythonpath={{ml_api_dir}}
- name: django update_index for ml-service-api - name: django update_index for discern
shell: ls; {{venv_dir}}/bin/python {{ml_api_dir}}/manage.py update_index --settings={{ml_api_settings}} --pythonpath={{ml_api_dir}} shell: ls; {{venv_dir}}/bin/python {{ml_api_dir}}/manage.py update_index --settings={{ml_api_settings}} --pythonpath={{ml_api_dir}}
- name: render celery service from template - name: render celery service from template
template: src=celery.conf.j2 dest=/etc/init/celery.conf template: src=celery.conf.j2 dest=/etc/init/celery.conf
sudo: True sudo: True
- name: render ml-service-api service from template - name: render discern service from template
template: src=ml-service-api.conf.j2 dest=/etc/init/ml-service-api.conf template: src=discern.conf.j2 dest=/etc/init/discern.conf
sudo: True sudo: True
- name: create nginx directory and set perms - name: create nginx directory and set perms
...@@ -115,6 +115,6 @@ ...@@ -115,6 +115,6 @@
service: name=nginx state=started service: name=nginx state=started
sudo: True sudo: True
- name: start ml-service-api - name: start discern
service: name=ml-service-api state=started service: name=discern state=started
sudo: True sudo: True
...@@ -9,7 +9,7 @@ stop on runlevel [!2345] ...@@ -9,7 +9,7 @@ stop on runlevel [!2345]
respawn respawn
respawn limit 3 30 respawn limit 3 30
env PID=/var/run/gunicorn/ml-service-api.pid env PID=/var/run/gunicorn/discern.pid
env WORKERS=4 env WORKERS=4
env PORT=7999 env PORT=7999
env LANG=en_US.UTF-8 env LANG=en_US.UTF-8
...@@ -18,4 +18,4 @@ env DJANGO_SETTINGS_MODULE={{ml_api_settings}} ...@@ -18,4 +18,4 @@ env DJANGO_SETTINGS_MODULE={{ml_api_settings}}
chdir {{ml_api_dir}} chdir {{ml_api_dir}}
setuid {{remote_user}} setuid {{remote_user}}
exec {{venv_dir}}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=30 --pythonpath={{ml_api_dir}} ml_service_api.wsgi exec {{venv_dir}}/bin/gunicorn --preload -b 127.0.0.1:$PORT -w $WORKERS --timeout=30 --pythonpath={{ml_api_dir}} discern.wsgi
\ No newline at end of file \ No newline at end of file
mlapi_source_repo: git@github.com:edx/ml-service-api.git mlapi_source_repo: git@github.com:edx/discern.git
ml_source_repo: git@github.com:edx/machine-learning.git ml_source_repo: git@github.com:edx/machine-learning.git
ml_dir: $app_base_dir/machine-learning ml_dir: $app_base_dir/machine-learning
ml_api_dir: $app_base_dir/ml-service-api ml_api_dir: $app_base_dir/discern
ml_api_settings: ml_service_api.aws ml_api_settings: discern.aws
nltk_data_dir: /usr/share/nltk_data nltk_data_dir: /usr/share/nltk_data
remote_user: ubuntu remote_user: ubuntu
ml_branch: master ml_branch: master
......
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