Commit 4bc3c22d by John Jarvis

Merge pull request #658 from edx/jarv/no-deploy

Jarv/no deploy
parents 89026d06 0cf9434c
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
- name: analytics-server | stop the analytics service - name: analytics-server | stop the analytics service
service: name=analytics state=stopped service: name=analytics state=stopped
tags: deploy
- name: analytics-server | start the analytics service - name: analytics-server | start the analytics service
service: name=analytics state=started service: name=analytics state=started
tags: deploy
...@@ -2,12 +2,11 @@ ...@@ -2,12 +2,11 @@
# TODO: Needed while this repo is private # TODO: Needed while this repo is private
# #
- name: analytics-server | upload ssh script - name: analytics-server | upload ssh script
template: template:
src=tmp/{{ as_role_name }}.git_ssh.sh.j2 dest={{ as_git_ssh }} src=tmp/{{ as_role_name }}.git_ssh.sh.j2 dest={{ as_git_ssh }}
force=yes owner=root group=adm mode=750 force=yes owner=root group=adm mode=750
tags: tags:
- analytics-server - analytics-server
- deploy
- install - install
- update - update
...@@ -15,18 +14,17 @@ ...@@ -15,18 +14,17 @@
# TODO: Needed while this repo is private # TODO: Needed while this repo is private
# #
- name: analytics-server | install read-only ssh key required for checkout - name: analytics-server | install read-only ssh key required for checkout
copy: copy:
src={{ as_git_identity_path }} dest={{ as_git_identity_dest }} src={{ as_git_identity_path }} dest={{ as_git_identity_dest }}
force=yes owner=ubuntu group=adm mode=0600 force=yes owner=ubuntu group=adm mode=0600
tags: tags:
- analytics-server - analytics-server
- deploy
- install - install
- update - update
- name: analytics-server | checkout code - name: analytics-server | checkout code
git: git:
dest={{ as_code_dir }} repo={{ as_source_repo }} dest={{ as_code_dir }} repo={{ as_source_repo }}
version={{ as_version }} force=true version={{ as_version }} force=true
environment: environment:
GIT_SSH: $as_git_ssh GIT_SSH: $as_git_ssh
...@@ -34,7 +32,6 @@ ...@@ -34,7 +32,6 @@
notify: analytics-server | start the analytics service notify: analytics-server | start the analytics service
tags: tags:
- analytics-server - analytics-server
- deploy
- install - install
- update - update
...@@ -42,12 +39,11 @@ ...@@ -42,12 +39,11 @@
# TODO: Needed while this repo is private # TODO: Needed while this repo is private
# #
- name: analytics-server | update src permissions - name: analytics-server | update src permissions
file: file:
path={{ as_code_dir }} state=directory owner={{ as_user }} path={{ as_code_dir }} state=directory owner={{ as_user }}
group={{ as_web_user }} mode=2750 recurse=yes group={{ as_web_user }} mode=2750 recurse=yes
tags: tags:
- analytics-server - analytics-server
- deploy
- install - install
- update - update
...@@ -58,7 +54,6 @@ ...@@ -58,7 +54,6 @@
file: path={{ as_git_identity_dest }} state=absent file: path={{ as_git_identity_dest }} state=absent
tags: tags:
- analytics-server - analytics-server
- deploy
- install - install
- update - update
...@@ -69,19 +64,17 @@ ...@@ -69,19 +64,17 @@
file: path={{ as_git_ssh }} state=absent file: path={{ as_git_ssh }} state=absent
tags: tags:
- analytics-server - analytics-server
- deploy
- install - install
- update - update
- name: analytics-server | install application requirements - name: analytics-server | install application requirements
pip: pip:
requirements={{ as_requirements_file }} requirements={{ as_requirements_file }}
virtualenv={{ as_venv_dir }} state=present virtualenv={{ as_venv_dir }} state=present
sudo: true sudo: true
sudo_user: "{{ as_user }}" sudo_user: "{{ as_user }}"
notify: analytics-server | start the analytics service notify: analytics-server | start the analytics service
tags: tags:
- analytics-server - analytics-server
- deploy
- install - install
- update - update
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# #
# Tasks for role analytics-server # Tasks for role analytics-server
# #
# Overview: # Overview:
# #
# Installs the edX analytics-server Django application which provides # Installs the edX analytics-server Django application which provides
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
# common role # common role
# #
# Depends upon the automated role # Depends upon the automated role
# #
# Example play: # Example play:
# #
# - name: Configure analytics instance(s) # - name: Configure analytics instance(s)
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
- update - update
- name: analytics-server | create analytics-server user {{ as_user }} - name: analytics-server | create analytics-server user {{ as_user }}
user: user:
name={{ as_user }} state=present shell=/bin/bash name={{ as_user }} state=present shell=/bin/bash
home={{ as_home }} createhome=yes home={{ as_home }} createhome=yes
tags: tags:
- analytics-server - analytics-server
...@@ -54,9 +54,9 @@ ...@@ -54,9 +54,9 @@
- update - update
- name: analytics-server | setup the analytics-server env - name: analytics-server | setup the analytics-server env
template: template:
src=opt/wwc/analytics-server/{{ as_env }}.j2 src=opt/wwc/analytics-server/{{ as_env }}.j2
dest={{ as_home }}/{{ as_env }} dest={{ as_home }}/{{ as_env }}
owner="{{ as_user }}" group="{{ as_user }}" owner="{{ as_user }}" group="{{ as_user }}"
tags: tags:
- analytics-server - analytics-server
...@@ -65,15 +65,15 @@ ...@@ -65,15 +65,15 @@
- name: analytics-server | drop a bash_profile - name: analytics-server | drop a bash_profile
copy: > copy: >
src=../../common/files/bash_profile src=../../common/files/bash_profile
dest={{ as_home }}/.bash_profile dest={{ as_home }}/.bash_profile
owner={{ as_user }} owner={{ as_user }}
group={{ as_user }} group={{ as_user }}
# Awaiting next ansible release. # Awaiting next ansible release.
#- name: analytics-server | ensure .bashrc exists #- name: analytics-server | ensure .bashrc exists
# file: path={{ as_home }}/.bashrc state=touch # file: path={{ as_home }}/.bashrc state=touch
# sudo: true # sudo: true
# sudo_user: "{{ as_user }}" # sudo_user: "{{ as_user }}"
# tags: # tags:
# - analytics-server # - analytics-server
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
- name: analytics-server | ensure .bashrc exists - name: analytics-server | ensure .bashrc exists
shell: touch {{ as_home }}/.bashrc shell: touch {{ as_home }}/.bashrc
sudo: true sudo: true
sudo_user: "{{ as_user }}" sudo_user: "{{ as_user }}"
tags: tags:
- analytics-server - analytics-server
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
- name: analytics-server | add source of analytics-server_env to .bashrc - name: analytics-server | add source of analytics-server_env to .bashrc
lineinfile: lineinfile:
dest={{ as_home }}/.bashrc dest={{ as_home }}/.bashrc
regexp='. {{ as_home }}/analytics-server_env' regexp='. {{ as_home }}/analytics-server_env'
line='. {{ as_home }}/analytics_server_env' line='. {{ as_home }}/analytics_server_env'
tags: tags:
- analytics-server - analytics-server
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
- name: analytics-server | add source venv to .bashrc - name: analytics-server | add source venv to .bashrc
lineinfile: lineinfile:
dest={{ as_home }}/.bashrc dest={{ as_home }}/.bashrc
regexp='. {{ as_venv_dir }}/bin/activate' regexp='. {{ as_venv_dir }}/bin/activate'
line='. {{ as_venv_dir }}/bin/activate' line='. {{ as_venv_dir }}/bin/activate'
tags: tags:
- analytics-server - analytics-server
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
- update - update
- name: analytics-server | create config - name: analytics-server | create config
template: template:
src=opt/wwc/analytics.auth.json.j2 src=opt/wwc/analytics.auth.json.j2
dest=/opt/wwc/analytics.auth.json dest=/opt/wwc/analytics.auth.json
mode=0600 mode=0600
...@@ -127,10 +127,10 @@ ...@@ -127,10 +127,10 @@
- analytics-server - analytics-server
- install - install
- update - update
- name: analytics-server | install service - name: analytics-server | install service
template: template:
src=etc/init/analytics.conf.j2 dest=/etc/init/analytics.conf src=etc/init/analytics.conf.j2 dest=/etc/init/analytics.conf
owner=root group=root owner=root group=root
- include: deploy.yml - include: deploy.yml tags=deploy
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
- name: analytics | stop the analytics service - name: analytics | stop the analytics service
service: name=analytics state=stopped service: name=analytics state=stopped
tags: deploy
- name: analytics | start the analytics service - name: analytics | start the analytics service
service: name=analytics state=started service: name=analytics state=started
tags: deploy
...@@ -2,12 +2,11 @@ ...@@ -2,12 +2,11 @@
# TODO: Needed while this repo is private # TODO: Needed while this repo is private
# #
- name: analytics | upload ssh script - name: analytics | upload ssh script
template: template:
src=tmp/{{ analytics_role_name }}.git_ssh.sh.j2 dest={{ analytics_git_ssh }} src=tmp/{{ analytics_role_name }}.git_ssh.sh.j2 dest={{ analytics_git_ssh }}
force=yes owner=root group=adm mode=750 force=yes owner=root group=adm mode=750
tags: tags:
- analytics - analytics
- deploy
- install - install
- update - update
...@@ -15,18 +14,17 @@ ...@@ -15,18 +14,17 @@
# TODO: Needed while this repo is private # TODO: Needed while this repo is private
# #
- name: analytics | install read-only ssh key required for checkout - name: analytics | install read-only ssh key required for checkout
copy: copy:
src={{ analytics_git_identity_path }} dest={{ analytics_git_identity_dest }} src={{ analytics_git_identity_path }} dest={{ analytics_git_identity_dest }}
force=yes owner=ubuntu group=adm mode=0600 force=yes owner=ubuntu group=adm mode=0600
tags: tags:
- analytics - analytics
- deploy
- install - install
- update - update
- name: analytics | checkout code - name: analytics | checkout code
git: git:
dest={{ analytics_code_dir }} repo={{ analytics_source_repo }} dest={{ analytics_code_dir }} repo={{ analytics_source_repo }}
version={{ analytics_version }} force=true version={{ analytics_version }} force=true
environment: environment:
GIT_SSH: $analytics_git_ssh GIT_SSH: $analytics_git_ssh
...@@ -34,7 +32,6 @@ ...@@ -34,7 +32,6 @@
notify: analytics | start the analytics service notify: analytics | start the analytics service
tags: tags:
- analytics - analytics
- deploy
- install - install
- update - update
...@@ -42,12 +39,11 @@ ...@@ -42,12 +39,11 @@
# TODO: Needed while this repo is private # TODO: Needed while this repo is private
# #
- name: analytics | update src permissions - name: analytics | update src permissions
file: file:
path={{ analytics_code_dir }} state=directory owner={{ analytics_user }} path={{ analytics_code_dir }} state=directory owner={{ analytics_user }}
group={{ analytics_web_user }} mode=2750 recurse=yes group={{ analytics_web_user }} mode=2750 recurse=yes
tags: tags:
- analytics - analytics
- deploy
- install - install
- update - update
...@@ -58,7 +54,6 @@ ...@@ -58,7 +54,6 @@
file: path={{ analytics_git_identity_dest }} state=absent file: path={{ analytics_git_identity_dest }} state=absent
tags: tags:
- analytics - analytics
- deploy
- install - install
- update - update
...@@ -69,19 +64,17 @@ ...@@ -69,19 +64,17 @@
file: path={{ analytics_git_ssh }} state=absent file: path={{ analytics_git_ssh }} state=absent
tags: tags:
- analytics - analytics
- deploy
- install - install
- update - update
- name: analytics | install application requirements - name: analytics | install application requirements
pip: pip:
requirements={{ analytics_requirements_file }} requirements={{ analytics_requirements_file }}
virtualenv={{ analytics_venv_dir }} state=present virtualenv={{ analytics_venv_dir }} state=present
sudo: true sudo: true
sudo_user: "{{ analytics_user }}" sudo_user: "{{ analytics_user }}"
notify: analytics | start the analytics service notify: analytics | start the analytics service
tags: tags:
- analytics - analytics
- deploy
- install - install
- update - update
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# #
# Tasks for role analytics # Tasks for role analytics
# #
# Overview: # Overview:
# #
# Installs the edX analytics Django application which provides # Installs the edX analytics Django application which provides
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
# common role # common role
# #
# Depends upon the automated role # Depends upon the automated role
# #
# Example play: # Example play:
# #
# - name: Configure analytics instance(s) # - name: Configure analytics instance(s)
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
- update - update
- name: analytics | create analytics user {{ analytics_user }} - name: analytics | create analytics user {{ analytics_user }}
user: user:
name={{ analytics_user }} state=present shell=/bin/bash name={{ analytics_user }} state=present shell=/bin/bash
home={{ analytics_home }} createhome=yes home={{ analytics_home }} createhome=yes
tags: tags:
- analytics - analytics
...@@ -54,9 +54,9 @@ ...@@ -54,9 +54,9 @@
- update - update
- name: analytics | setup the analytics env - name: analytics | setup the analytics env
template: template:
src=opt/wwc/analytics/{{ analytics_env }}.j2 src=opt/wwc/analytics/{{ analytics_env }}.j2
dest={{ analytics_home }}/{{ analytics_env }} dest={{ analytics_home }}/{{ analytics_env }}
owner="{{ analytics_user }}" group="{{ analytics_user }}" owner="{{ analytics_user }}" group="{{ analytics_user }}"
tags: tags:
- analytics - analytics
...@@ -65,15 +65,15 @@ ...@@ -65,15 +65,15 @@
- name: analytics | drop a bash_profile - name: analytics | drop a bash_profile
copy: > copy: >
src=../../common/files/bash_profile src=../../common/files/bash_profile
dest={{ analytics_home }}/.bash_profile dest={{ analytics_home }}/.bash_profile
owner={{ analytics_user }} owner={{ analytics_user }}
group={{ analytics_user }} group={{ analytics_user }}
# Awaiting next ansible release. # Awaiting next ansible release.
#- name: analytics | ensure .bashrc exists #- name: analytics | ensure .bashrc exists
# file: path={{ analytics_home }}/.bashrc state=touch # file: path={{ analytics_home }}/.bashrc state=touch
# sudo: true # sudo: true
# sudo_user: "{{ analytics_user }}" # sudo_user: "{{ analytics_user }}"
# tags: # tags:
# - analytics # - analytics
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
- name: analytics | ensure .bashrc exists - name: analytics | ensure .bashrc exists
shell: touch {{ analytics_home }}/.bashrc shell: touch {{ analytics_home }}/.bashrc
sudo: true sudo: true
sudo_user: "{{ analytics_user }}" sudo_user: "{{ analytics_user }}"
tags: tags:
- analytics - analytics
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
- name: analytics | add source of analytics_env to .bashrc - name: analytics | add source of analytics_env to .bashrc
lineinfile: lineinfile:
dest={{ analytics_home }}/.bashrc dest={{ analytics_home }}/.bashrc
regexp='. {{ analytics_home }}/analytics_env' regexp='. {{ analytics_home }}/analytics_env'
line='. {{ analytics_home }}/analytics_env' line='. {{ analytics_home }}/analytics_env'
tags: tags:
- analytics - analytics
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
- name: analytics | add source venv to .bashrc - name: analytics | add source venv to .bashrc
lineinfile: lineinfile:
dest={{ analytics_home }}/.bashrc dest={{ analytics_home }}/.bashrc
regexp='. {{ analytics_venv_dir }}/bin/activate' regexp='. {{ analytics_venv_dir }}/bin/activate'
line='. {{ analytics_venv_dir }}/bin/activate' line='. {{ analytics_venv_dir }}/bin/activate'
tags: tags:
- analytics - analytics
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
- update - update
- name: analytics | create config - name: analytics | create config
template: template:
src=opt/wwc/analytics.auth.json.j2 src=opt/wwc/analytics.auth.json.j2
dest=/opt/wwc/analytics.auth.json dest=/opt/wwc/analytics.auth.json
mode=0600 mode=0600
...@@ -127,10 +127,10 @@ ...@@ -127,10 +127,10 @@
- analytics - analytics
- install - install
- update - update
- name: analytics | install service - name: analytics | install service
template: template:
src=etc/init/analytics.conf.j2 dest=/etc/init/analytics.conf src=etc/init/analytics.conf.j2 dest=/etc/init/analytics.conf
owner=root group=root owner=root group=root
- include: deploy.yml - include: deploy.yml tags=deploy
--- ---
- name: apache | restart apache - name: apache | restart apache
service: name=apache2 state=restarted service: name=apache2 state=restarted
tags: deploy
...@@ -20,5 +20,4 @@ ...@@ -20,5 +20,4 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
tags: deploy
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
dest={{ certs_app_dir }}/env.json dest={{ certs_app_dir }}/env.json
sudo_user: "{{ certs_user }}" sudo_user: "{{ certs_user }}"
notify: certs | restart certs notify: certs | restart certs
tags: deploy
- name: certs | create certificate auth file - name: certs | create certificate auth file
template: > template: >
...@@ -14,28 +13,24 @@ ...@@ -14,28 +13,24 @@
dest={{ certs_app_dir }}/auth.json dest={{ certs_app_dir }}/auth.json
sudo_user: "{{ certs_user }}" sudo_user: "{{ certs_user }}"
notify: certs | restart certs notify: certs | restart certs
tags: deploy
- name: certs | writing supervisor script for certificates - name: certs | writing supervisor script for certificates
template: > template: >
src=certs.conf.j2 dest={{ supervisor_cfg_dir }}/certs.conf src=certs.conf.j2 dest={{ supervisor_cfg_dir }}/certs.conf
owner={{ supervisor_user }} mode=0644 owner={{ supervisor_user }} mode=0644
notify: certs | restart certs notify: certs | restart certs
tags: deploy
- name: certs | create ssh script for git - name: certs | create ssh script for git
template: > template: >
src={{ certs_git_ssh|basename }}.j2 dest={{ certs_git_ssh }} src={{ certs_git_ssh|basename }}.j2 dest={{ certs_git_ssh }}
owner={{ certs_user }} mode=750 owner={{ certs_user }} mode=750
notify: certs | restart certs notify: certs | restart certs
tags: deploy
- name: certs | install read-only ssh key for the certs repo - name: certs | install read-only ssh key for the certs repo
copy: > copy: >
src={{ CERTS_LOCAL_GIT_IDENTITY }} dest={{ certs_git_identity }} src={{ CERTS_LOCAL_GIT_IDENTITY }} dest={{ certs_git_identity }}
force=yes owner={{ certs_user }} mode=0600 force=yes owner={{ certs_user }} mode=0600
notify: certs | restart certs notify: certs | restart certs
tags: deploy
- name: certs | checkout certificates repo into {{ certs_code_dir }} - name: certs | checkout certificates repo into {{ certs_code_dir }}
git: dest={{ certs_code_dir }} repo={{ certs_repo }} version={{ certs_version }} git: dest={{ certs_code_dir }} repo={{ certs_repo }} version={{ certs_version }}
...@@ -43,18 +38,15 @@ ...@@ -43,18 +38,15 @@
environment: environment:
GIT_SSH: "{{ certs_git_ssh }}" GIT_SSH: "{{ certs_git_ssh }}"
notify: certs | restart certs notify: certs | restart certs
tags: deploy
- name: certs | remove read-only ssh key for the certs repo - name: certs | remove read-only ssh key for the certs repo
file: path={{ certs_git_identity }} state=absent file: path={{ certs_git_identity }} state=absent
notify: certs | restart certs notify: certs | restart certs
tags: deploy
- name : install python requirements - name : install python requirements
pip: requirements="{{ certs_requirements_file }}" virtualenv="{{ certs_venv_dir }}" state=present pip: requirements="{{ certs_requirements_file }}" virtualenv="{{ certs_venv_dir }}" state=present
sudo_user: "{{ certs_user }}" sudo_user: "{{ certs_user }}"
notify: certs | restart certs notify: certs | restart certs
tags: deploy
# call supervisorctl update. this reloads # call supervisorctl update. this reloads
# the supervisorctl config and restarts # the supervisorctl config and restarts
...@@ -74,3 +66,13 @@ ...@@ -74,3 +66,13 @@
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=started
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
- name: certs | create a symlink for venv python
file: >
src="{{ certs_venv_bin }}/{{ item }}"
dest={{ COMMON_BIN_DIR }}/{{ item }}.certs
state=link
notify: certs | restart certs
with_items:
- python
- pip
...@@ -77,14 +77,4 @@ ...@@ -77,14 +77,4 @@
when: certs_gpg_key.changed when: certs_gpg_key.changed
notify: certs | restart certs notify: certs | restart certs
- include: deploy.yml - include: deploy.yml tags=deploy
- name: certs | create a symlink for venv python
file: >
src="{{ certs_venv_bin }}/{{ item }}"
dest={{ COMMON_BIN_DIR }}/{{ item }}.certs
state=link
notify: certs | restart certs
with_items:
- python
- pip
...@@ -2,4 +2,3 @@ ...@@ -2,4 +2,3 @@
- name: common | restart rsyslogd - name: common | restart rsyslogd
service: name=rsyslog state=restarted service: name=rsyslog state=restarted
sudo: True sudo: True
tags: deploy
...@@ -2,4 +2,3 @@ ...@@ -2,4 +2,3 @@
- name: datadog | restart the datadog service - name: datadog | restart the datadog service
service: name=datadog-agent state=restarted service: name=datadog-agent state=restarted
tags: deploy
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
git: dest={{ demo_code_dir }} repo={{ demo_repo }} version={{ demo_version }} git: dest={{ demo_code_dir }} repo={{ demo_repo }} version={{ demo_version }}
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
register: demo_checkout register: demo_checkout
tags: deploy
- name: demo | import demo course - name: demo | import demo course
shell: > shell: >
...@@ -12,7 +11,6 @@ ...@@ -12,7 +11,6 @@
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
sudo_user: "{{ common_web_user }}" sudo_user: "{{ common_web_user }}"
when: demo_checkout.changed when: demo_checkout.changed
tags: deploy
- name: demo | create some test users and enroll them in the course - name: demo | create some test users and enroll them in the course
shell: > shell: >
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
sudo_user: "{{ common_web_user }}" sudo_user: "{{ common_web_user }}"
with_items: demo_test_users with_items: demo_test_users
when: demo_checkout.changed when: demo_checkout.changed
tags: deploy
- name: demo | create staff user - name: demo | create staff user
shell: > shell: >
...@@ -29,7 +26,6 @@ ...@@ -29,7 +26,6 @@
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
sudo_user: "{{ common_web_user }}" sudo_user: "{{ common_web_user }}"
when: demo_checkout.changed when: demo_checkout.changed
tags: deploy
- name: demo | add test users to the certificate whitelist - name: demo | add test users to the certificate whitelist
shell: > shell: >
...@@ -37,7 +33,6 @@ ...@@ -37,7 +33,6 @@
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
with_items: demo_test_users with_items: demo_test_users
when: demo_checkout.changed when: demo_checkout.changed
tags: deploy
- name: demo | seed the forums for the demo course - name: demo | seed the forums for the demo course
shell: > shell: >
...@@ -45,5 +40,4 @@ ...@@ -45,5 +40,4 @@
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
with_items: demo_test_users with_items: demo_test_users
when: demo_checkout.changed when: demo_checkout.changed
tags: deploy
...@@ -35,4 +35,4 @@ ...@@ -35,4 +35,4 @@
path="{{ demo_app_dir }}" state=directory path="{{ demo_app_dir }}" state=directory
owner="{{ edxapp_user }}" group="{{ common_web_group }}" owner="{{ edxapp_user }}" group="{{ common_web_group }}"
- include: deploy.yml - include: deploy.yml tags=deploy
...@@ -18,4 +18,3 @@ ...@@ -18,4 +18,3 @@
config={{ devpi_supervisor_cfg }} config={{ devpi_supervisor_cfg }}
name=devpi-server name=devpi-server
sudo_user: "{{ devpi_supervisor_user }}" sudo_user: "{{ devpi_supervisor_user }}"
tags: deploy
...@@ -104,7 +104,6 @@ ...@@ -104,7 +104,6 @@
shell: "{{ devpi_supervisor_ctl }} -c {{ devpi_supervisor_cfg }} update" shell: "{{ devpi_supervisor_ctl }} -c {{ devpi_supervisor_cfg }} update"
register: supervisor_update register: supervisor_update
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
tags: deploy
- name: devpi | ensure devpi is started - name: devpi | ensure devpi is started
supervisorctl_local: > supervisorctl_local: >
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
when: discern_installed is defined
with_items: with_items:
- discern - discern
- discern_celery - discern_celery
tags: deploy
...@@ -13,32 +13,24 @@ ...@@ -13,32 +13,24 @@
sudo_user: "{{ discern_user }}" sudo_user: "{{ discern_user }}"
notify: notify:
- discern | restart discern - discern | restart discern
tags:
- deploy
- name: discern | create discern auth file auth.json - name: discern | create discern auth file auth.json
template: src=auth.json.j2 dest={{ discern_app_dir }}/auth.json template: src=auth.json.j2 dest={{ discern_app_dir }}/auth.json
sudo_user: "{{ discern_user }}" sudo_user: "{{ discern_user }}"
notify: notify:
- discern | restart discern - discern | restart discern
tags:
- deploy
- name: discern | git checkout discern repo into discern_code_dir - name: discern | git checkout discern repo into discern_code_dir
git: dest={{ discern_code_dir }} repo={{ discern_source_repo }} version={{ discern_version }} git: dest={{ discern_code_dir }} repo={{ discern_source_repo }} version={{ discern_version }}
sudo_user: "{{ discern_user }}" sudo_user: "{{ discern_user }}"
notify: notify:
- discern | restart discern - discern | restart discern
tags:
- deploy
- name: discern | git checkout ease repo into discern_ease_code_dir - name: discern | git checkout ease repo into discern_ease_code_dir
git: dest={{ discern_ease_code_dir}} repo={{ discern_ease_source_repo }} version={{ discern_ease_version }} git: dest={{ discern_ease_code_dir}} repo={{ discern_ease_source_repo }} version={{ discern_ease_version }}
sudo_user: "{{ discern_user }}" sudo_user: "{{ discern_user }}"
notify: notify:
- discern | restart discern - discern | restart discern
tags:
- deploy
#Numpy has to be a pre-requirement in order for scipy to build #Numpy has to be a pre-requirement in order for scipy to build
- name : discern | install python pre-requirements for discern and ease - name : discern | install python pre-requirements for discern and ease
...@@ -49,8 +41,6 @@ ...@@ -49,8 +41,6 @@
with_items: with_items:
- "{{ discern_pre_requirements_file }}" - "{{ discern_pre_requirements_file }}"
- "{{ discern_ease_pre_requirements_file }}" - "{{ discern_ease_pre_requirements_file }}"
tags:
- deploy
- name : discern | install python requirements for discern and ease - name : discern | install python requirements for discern and ease
pip: requirements={{item}} virtualenv={{ discern_venv_dir }} state=present pip: requirements={{item}} virtualenv={{ discern_venv_dir }} state=present
...@@ -60,16 +50,12 @@ ...@@ -60,16 +50,12 @@
with_items: with_items:
- "{{ discern_post_requirements_file }}" - "{{ discern_post_requirements_file }}"
- "{{ discern_ease_post_requirements_file }}" - "{{ discern_ease_post_requirements_file }}"
tags:
- deploy
- name: discern | install ease python package - name: discern | install ease python package
shell: > shell: >
{{ discern_venv_dir }}/bin/activate; cd {{ discern_ease_code_dir }}; python setup.py install {{ discern_venv_dir }}/bin/activate; cd {{ discern_ease_code_dir }}; python setup.py install
notify: notify:
- discern | restart discern - discern | restart discern
tags:
- deploy
- name: discern | download and install nltk - name: discern | download and install nltk
shell: | shell: |
...@@ -83,8 +69,6 @@ ...@@ -83,8 +69,6 @@
sudo_user: "{{ discern_user }}" sudo_user: "{{ discern_user }}"
notify: notify:
- discern | restart discern - discern | restart discern
tags:
- deploy
#Run this instead of using the ansible module because the ansible module only support syncdb of these three, and does not #Run this instead of using the ansible module because the ansible module only support syncdb of these three, and does not
...@@ -100,8 +84,6 @@ ...@@ -100,8 +84,6 @@
- syncdb - syncdb
- migrate - migrate
- collectstatic - collectstatic
tags:
- deploy
#Have this separate from the other three because it doesn't take the noinput flag #Have this separate from the other three because it doesn't take the noinput flag
- name: discern | django update_index for discern - name: discern | django update_index for discern
shell: > shell: >
...@@ -110,8 +92,6 @@ ...@@ -110,8 +92,6 @@
sudo_user: "{{ discern_user }}" sudo_user: "{{ discern_user }}"
notify: notify:
- discern | restart discern - discern | restart discern
tags:
- deploy
# call supervisorctl update. this reloads # call supervisorctl update. this reloads
...@@ -124,7 +104,6 @@ ...@@ -124,7 +104,6 @@
register: supervisor_update register: supervisor_update
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
tags: deploy
- name: discern | ensure discern, discern_celery has started - name: discern | ensure discern, discern_celery has started
supervisorctl_local: > supervisorctl_local: >
...@@ -135,4 +114,12 @@ ...@@ -135,4 +114,12 @@
with_items: with_items:
- discern - discern
- discern_celery - discern_celery
tags: deploy
- name: discern | create a symlink for venv python
file: >
src="{{ discern_venv_bin }}/python"
dest={{ COMMON_BIN_DIR }}/python.discern
state=link
- set_fact: discern_installed=true
...@@ -53,10 +53,4 @@ ...@@ -53,10 +53,4 @@
notify: notify:
- discern | restart discern - discern | restart discern
- include: deploy.yml - include: deploy.yml tags=deploy
- name: discern | create a symlink for venv python
file: >
src="{{ discern_venv_bin }}/python"
dest={{ COMMON_BIN_DIR }}/python.discern
state=link
...@@ -2,29 +2,24 @@ ...@@ -2,29 +2,24 @@
- name: edx_ansible | git checkout edx_ansible repo into edx_ansible_code_dir - name: edx_ansible | git checkout edx_ansible repo into edx_ansible_code_dir
git: dest={{ edx_ansible_code_dir }} repo={{ edx_ansible_source_repo }} version={{ configuration_version }} git: dest={{ edx_ansible_code_dir }} repo={{ edx_ansible_source_repo }} version={{ configuration_version }}
sudo_user: "{{ edx_ansible_user }}" sudo_user: "{{ edx_ansible_user }}"
tags: deploy
- name : edx_ansible | install edx_ansible venv requirements - name : edx_ansible | install edx_ansible venv requirements
pip: requirements="{{ edx_ansible_requirements_file }}" virtualenv="{{ edx_ansible_venv_dir }}" state=present pip: requirements="{{ edx_ansible_requirements_file }}" virtualenv="{{ edx_ansible_venv_dir }}" state=present
sudo_user: "{{ edx_ansible_user }}" sudo_user: "{{ edx_ansible_user }}"
tags: deploy
- name: edx_ansible | create update script - name: edx_ansible | create update script
template: > template: >
dest={{ edx_ansible_app_dir}}/update dest={{ edx_ansible_app_dir}}/update
src=update.j2 owner={{ edx_ansible_user }} group={{ edx_ansible_user }} mode=755 src=update.j2 owner={{ edx_ansible_user }} group={{ edx_ansible_user }} mode=755
tags: deploy
- name: edx_ansible | create a symlink for update.sh - name: edx_ansible | create a symlink for update.sh
file: > file: >
src={{ edx_ansible_app_dir }}/update src={{ edx_ansible_app_dir }}/update
dest={{ COMMON_BIN_DIR }}/update dest={{ COMMON_BIN_DIR }}/update
state=link state=link
tags: deploy
- name: edx_ansible | dump all vars to yaml - name: edx_ansible | dump all vars to yaml
template: src=dumpall.yml.j2 dest={{ edx_ansible_var_file }} mode=0600 template: src=dumpall.yml.j2 dest={{ edx_ansible_var_file }} mode=0600
tags: deploy
- name: edx_ansible | clean up var file, removing all version vars - name: edx_ansible | clean up var file, removing all version vars
shell: sed -i -e "/{{item}}/d" {{ edx_ansible_var_file }} shell: sed -i -e "/{{item}}/d" {{ edx_ansible_var_file }}
...@@ -41,15 +36,12 @@ ...@@ -41,15 +36,12 @@
- configuration_version - configuration_version
- ease_version - ease_version
- certs_version - certs_version
tags: deploy
- name: edx_ansible | remove the special _original_file var - name: edx_ansible | remove the special _original_file var
shell: sed -i -e "/_original_file/d" {{ edx_ansible_var_file }} shell: sed -i -e "/_original_file/d" {{ edx_ansible_var_file }}
tags: deploy
- name: edxapp | create a symlink for var file - name: edxapp | create a symlink for var file
file: > file: >
src={{ edx_ansible_var_file }} src={{ edx_ansible_var_file }}
dest={{ COMMON_CFG_DIR }}/{{ edx_ansible_var_file|basename }} dest={{ COMMON_CFG_DIR }}/{{ edx_ansible_var_file|basename }}
state=link state=link
tags: deploy
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
- name: edx_ansible | install a bunch of system packages on which edx_ansible relies - name: edx_ansible | install a bunch of system packages on which edx_ansible relies
apt: pkg={{','.join(edx_ansible_debian_pkgs)}} state=present apt: pkg={{','.join(edx_ansible_debian_pkgs)}} state=present
- include: deploy.yml - include: deploy.yml tags=deploy
...@@ -5,10 +5,9 @@ ...@@ -5,10 +5,9 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
name="edxapp:{{ item }}" name="edxapp:{{ item }}"
when: celery_worker is not defined and not devstack when: edxapp_installed is defined and celery_worker is not defined and not devstack
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
with_items: service_variants_enabled with_items: service_variants_enabled
tags: deploy
- name: edxapp | restart edxapp_workers - name: edxapp | restart edxapp_workers
supervisorctl_local: > supervisorctl_local: >
...@@ -16,7 +15,6 @@ ...@@ -16,7 +15,6 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
when: celery_worker is defined and not devstack when: edxapp_installed is defined and celery_worker is defined and not devstack
with_items: edxapp_workers with_items: edxapp_workers
sudo_user: "{{ common_web_user }}" sudo_user: "{{ common_web_user }}"
tags: deploy
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
src=edxapp_env.j2 dest={{ edxapp_app_dir }}/edxapp_env src=edxapp_env.j2 dest={{ edxapp_app_dir }}/edxapp_env
owner={{ edxapp_user }} group={{ common_web_user }} owner={{ edxapp_user }} group={{ common_web_user }}
mode=0644 mode=0644
tags: deploy
# Do A Checkout # Do A Checkout
- name: edxapp | checkout edx-platform repo into {{edxapp_code_dir}} - name: edxapp | checkout edx-platform repo into {{edxapp_code_dir}}
...@@ -16,7 +15,6 @@ ...@@ -16,7 +15,6 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags: deploy
- name: edxapp | git clean after checking out edx-platform - name: edxapp | git clean after checking out edx-platform
shell: cd {{edxapp_code_dir}} && git clean -xdf shell: cd {{edxapp_code_dir}} && git clean -xdf
...@@ -24,7 +22,6 @@ ...@@ -24,7 +22,6 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags: deploy
- name: edxapp | checkout theme - name: edxapp | checkout theme
git: dest={{ edxapp_app_dir }}/themes/{{edxapp_theme_name}} repo={{edxapp_theme_source_repo}} version={{edxapp_theme_version}} git: dest={{ edxapp_app_dir }}/themes/{{edxapp_theme_name}} repo={{edxapp_theme_source_repo}} version={{edxapp_theme_version}}
...@@ -33,26 +30,20 @@ ...@@ -33,26 +30,20 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags:
- deploy
- name: edxapp | create checksum for requirements, package.json and Gemfile - name: edxapp | create checksum for requirements, package.json and Gemfile
shell: > shell: >
/usr/bin/md5sum {{ " ".join(edxapp_chksum_req_files) }} 2>/dev/null > /var/tmp/edxapp.req.new /usr/bin/md5sum {{ " ".join(edxapp_chksum_req_files) }} 2>/dev/null > /var/tmp/edxapp.req.new
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
ignore_errors: true ignore_errors: true
tags:
- deploy
- stat: path=/var/tmp/edxapp.req.new - stat: path=/var/tmp/edxapp.req.new
register: new register: new
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
tags: deploy
- stat: path=/var/tmp/edxapp.req.installed - stat: path=/var/tmp/edxapp.req.installed
register: inst register: inst
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
tags: deploy
# Substitute github mirror in all requirements files # Substitute github mirror in all requirements files
# This is run on every single deploy # This is run on every single deploy
...@@ -63,7 +54,6 @@ ...@@ -63,7 +54,6 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags: deploy
# Ruby plays that need to be run after platform updates. # Ruby plays that need to be run after platform updates.
- name: edxapp | gem install bundler - name: edxapp | gem install bundler
...@@ -76,7 +66,6 @@ ...@@ -76,7 +66,6 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags: deploy
- name: edxapp | bundle install - name: edxapp | bundle install
shell: > shell: >
...@@ -88,7 +77,6 @@ ...@@ -88,7 +77,6 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags: deploy
# Set the npm registry # Set the npm registry
- name: edxapp | Set the npm registry - name: edxapp | Set the npm registry
...@@ -100,7 +88,6 @@ ...@@ -100,7 +88,6 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags: deploy
# Node play that need to be run after platform updates. # Node play that need to be run after platform updates.
- name: edxapp | Install edx-platform npm dependencies - name: edxapp | Install edx-platform npm dependencies
...@@ -110,7 +97,6 @@ ...@@ -110,7 +97,6 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags: deploy
# Install the python pre requirements into {{ edxapp_venv_dir }} # Install the python pre requirements into {{ edxapp_venv_dir }}
...@@ -126,7 +112,6 @@ ...@@ -126,7 +112,6 @@
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
when: not inst.stat.exists or new.stat.md5 != inst.stat.md5 when: not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags: deploy
# Install the python modules into {{ edxapp_venv_dir }} # Install the python modules into {{ edxapp_venv_dir }}
- name : edxapp | install python base-requirements - name : edxapp | install python base-requirements
...@@ -142,7 +127,6 @@ ...@@ -142,7 +127,6 @@
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
when: not inst.stat.exists or new.stat.md5 != inst.stat.md5 when: not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags: deploy
# Install the python post requirements into {{ edxapp_venv_dir }} # Install the python post requirements into {{ edxapp_venv_dir }}
- name : edxapp | install python post-requirements - name : edxapp | install python post-requirements
...@@ -157,7 +141,6 @@ ...@@ -157,7 +141,6 @@
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
when: not inst.stat.exists or new.stat.md5 != inst.stat.md5 when: not inst.stat.exists or new.stat.md5 != inst.stat.md5
tags: deploy
# Install the final python modules into {{ edxapp_venv_dir }} # Install the final python modules into {{ edxapp_venv_dir }}
- name : edxapp | install python post-post requirements - name : edxapp | install python post-post requirements
...@@ -175,7 +158,6 @@ ...@@ -175,7 +158,6 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags: deploy
# Install the sandbox python modules into {{ edxapp_venv_dir }} # Install the sandbox python modules into {{ edxapp_venv_dir }}
...@@ -195,7 +177,6 @@ ...@@ -195,7 +177,6 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags: deploy
# The next few tasks set up the python code sandbox # The next few tasks set up the python code sandbox
...@@ -205,7 +186,6 @@ ...@@ -205,7 +186,6 @@
command: /usr/sbin/aa-complain /etc/apparmor.d/code.sandbox command: /usr/sbin/aa-complain /etc/apparmor.d/code.sandbox
when: EDXAPP_PYTHON_SANDBOX when: EDXAPP_PYTHON_SANDBOX
tags: tags:
- deploy
- edxapp-sandbox - edxapp-sandbox
- name: edxapp | code sandbox | Install base sandbox requirements and create sandbox virtualenv - name: edxapp | code sandbox | Install base sandbox requirements and create sandbox virtualenv
...@@ -220,7 +200,6 @@ ...@@ -220,7 +200,6 @@
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags: tags:
- deploy
- edxapp-sandbox - edxapp-sandbox
- name: edxapp | code sandbox | Install sandbox requirements into sandbox venv - name: edxapp | code sandbox | Install sandbox requirements into sandbox venv
...@@ -238,14 +217,12 @@ ...@@ -238,14 +217,12 @@
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags: tags:
- deploy
- edxapp-sandbox - edxapp-sandbox
- name: edxapp | code sandbox | put code sandbox into aa-enforce or aa-complain mode, depending on EDXAPP_SANDBOX_ENFORCE - name: edxapp | code sandbox | put code sandbox into aa-enforce or aa-complain mode, depending on EDXAPP_SANDBOX_ENFORCE
command: /usr/sbin/{{ edxapp_aa_command }} /etc/apparmor.d/code.sandbox command: /usr/sbin/{{ edxapp_aa_command }} /etc/apparmor.d/code.sandbox
when: EDXAPP_PYTHON_SANDBOX when: EDXAPP_PYTHON_SANDBOX
tags: tags:
- deploy
- edxapp-sandbox - edxapp-sandbox
- name: edxapp | compiling all py files in the edx-platform repo - name: edxapp | compiling all py files in the edx-platform repo
...@@ -254,7 +231,6 @@ ...@@ -254,7 +231,6 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags: deploy
# alternative would be to give {{ common_web_user }} read access # alternative would be to give {{ common_web_user }} read access
# to the virtualenv but that permission change will require # to the virtualenv but that permission change will require
...@@ -265,13 +241,11 @@ ...@@ -265,13 +241,11 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags: deploy
- name: edxapp | create checksum for installed requirements - name: edxapp | create checksum for installed requirements
shell: cp /var/tmp/edxapp.req.new /var/tmp/edxapp.req.installed shell: cp /var/tmp/edxapp.req.new /var/tmp/edxapp.req.installed
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
notify: "edxapp | restart edxapp" notify: "edxapp | restart edxapp"
tags: deploy
# https://code.launchpad.net/~wligtenberg/django-openid-auth/mysql_fix/+merge/22726 # https://code.launchpad.net/~wligtenberg/django-openid-auth/mysql_fix/+merge/22726
...@@ -284,8 +258,6 @@ ...@@ -284,8 +258,6 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags:
- deploy
# creates the supervisor jobs for the # creates the supervisor jobs for the
# service variants configured, runs # service variants configured, runs
...@@ -303,7 +275,6 @@ ...@@ -303,7 +275,6 @@
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
when: not devstack when: not devstack
tags: deploy
- name: edxapp | ensure edxapp has started - name: edxapp | ensure edxapp has started
supervisorctl_local: > supervisorctl_local: >
...@@ -314,7 +285,6 @@ ...@@ -314,7 +285,6 @@
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
when: celery_worker is not defined and not devstack when: celery_worker is not defined and not devstack
with_items: service_variants_enabled with_items: service_variants_enabled
tags: deploy
- name: edxapp | ensure edxapp_workers has started - name: edxapp | ensure edxapp_workers has started
supervisorctl_local: > supervisorctl_local: >
...@@ -325,4 +295,5 @@ ...@@ -325,4 +295,5 @@
when: celery_worker is defined and not devstack when: celery_worker is defined and not devstack
with_items: edxapp_workers with_items: edxapp_workers
sudo_user: "{{ supervisor_service_user }}" sudo_user: "{{ supervisor_service_user }}"
tags: deploy
- set_fact: edxapp_installed=true
...@@ -72,14 +72,4 @@ ...@@ -72,14 +72,4 @@
- include: python_sandbox_env.yml - include: python_sandbox_env.yml
when: EDXAPP_PYTHON_SANDBOX when: EDXAPP_PYTHON_SANDBOX
- include: deploy.yml - include: deploy.yml tags=deploy
- name: edxapp | create a symlink for venv python
file: >
src="{{ edxapp_venv_bin }}/{{ item }}"
dest={{ COMMON_BIN_DIR }}/{{ item }}.edxapp
state=link
with_items:
- python
- pip
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags:
- deploy
- name: "create {{ item }} auth file" - name: "create {{ item }} auth file"
template: > template: >
...@@ -19,8 +17,6 @@ ...@@ -19,8 +17,6 @@
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
with_items: service_variants_enabled with_items: service_variants_enabled
tags:
- deploy
# write the supervisor scripts for the service variants # write the supervisor scripts for the service variants
...@@ -31,8 +27,6 @@ ...@@ -31,8 +27,6 @@
with_items: service_variants_enabled with_items: service_variants_enabled
when: celery_worker is not defined and not devstack when: celery_worker is not defined and not devstack
sudo_user: "{{ supervisor_user }}" sudo_user: "{{ supervisor_user }}"
tags:
- deploy
- name: edxapp | writing edxapp supervisor script - name: edxapp | writing edxapp supervisor script
template: > template: >
...@@ -40,8 +34,6 @@ ...@@ -40,8 +34,6 @@
owner={{ supervisor_user }} owner={{ supervisor_user }}
when: celery_worker is not defined and not devstack when: celery_worker is not defined and not devstack
sudo_user: "{{ supervisor_user }}" sudo_user: "{{ supervisor_user }}"
tags:
- deploy
# write the supervisor script for celery workers # write the supervisor script for celery workers
...@@ -51,8 +43,6 @@ ...@@ -51,8 +43,6 @@
owner={{ supervisor_user }} owner={{ supervisor_user }}
when: celery_worker is defined and not devstack when: celery_worker is defined and not devstack
sudo_user: "{{ supervisor_user }}" sudo_user: "{{ supervisor_user }}"
tags:
- deploy
# Gather assets using rake if possible # Gather assets using rake if possible
...@@ -69,8 +59,6 @@ ...@@ -69,8 +59,6 @@
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
environment: "{{ edxapp_environment }}" environment: "{{ edxapp_environment }}"
tags:
- deploy
- name: edxapp | syncdb and migrate - name: edxapp | syncdb and migrate
...@@ -80,8 +68,6 @@ ...@@ -80,8 +68,6 @@
notify: notify:
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
tags:
- deploy
- name: edxapp | db migrate - name: edxapp | db migrate
shell: SERVICE_VARIANT=lms {{ edxapp_venv_bin }}/django-admin.py migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }} shell: SERVICE_VARIANT=lms {{ edxapp_venv_bin }}/django-admin.py migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }}
...@@ -90,5 +76,3 @@ ...@@ -90,5 +76,3 @@
- "edxapp | restart edxapp" - "edxapp | restart edxapp"
- "edxapp | restart edxapp_workers" - "edxapp | restart edxapp_workers"
sudo_user: "{{ edxapp_user }}" sudo_user: "{{ edxapp_user }}"
tags:
- deploy
...@@ -5,5 +5,4 @@ ...@@ -5,5 +5,4 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
when: not devstack when: forum_installed is defined and not devstack
tags: deploy
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
sudo_user: "{{ supervisor_user }}" sudo_user: "{{ supervisor_user }}"
when: not devstack when: not devstack
register: forum_supervisor register: forum_supervisor
tags: deploy
- name: forum | create the supervisor wrapper - name: forum | create the supervisor wrapper
template: > template: >
...@@ -18,13 +17,11 @@ ...@@ -18,13 +17,11 @@
sudo_user: "{{ forum_user }}" sudo_user: "{{ forum_user }}"
when: not devstack when: not devstack
notify: forum | restart the forum service notify: forum | restart the forum service
tags: deploy
- name: forum | git checkout forum repo into {{ forum_code_dir }} - name: forum | git checkout forum repo into {{ forum_code_dir }}
git: dest={{ forum_code_dir }} repo={{ forum_source_repo }} version={{ forum_version }} git: dest={{ forum_code_dir }} repo={{ forum_source_repo }} version={{ forum_version }}
sudo_user: "{{ forum_user }}" sudo_user: "{{ forum_user }}"
notify: forum | restart the forum service notify: forum | restart the forum service
tags: deploy
# TODO: This is done as the common_web_user # TODO: This is done as the common_web_user
# since the process owner needs write access # since the process owner needs write access
...@@ -34,7 +31,6 @@ ...@@ -34,7 +31,6 @@
sudo_user: "{{ common_web_user }}" sudo_user: "{{ common_web_user }}"
environment: "{{ forum_environment }}" environment: "{{ forum_environment }}"
notify: forum | restart the forum service notify: forum | restart the forum service
tags: deploy
# call supervisorctl update. this reloads # call supervisorctl update. this reloads
# the supervisorctl config and restarts # the supervisorctl config and restarts
...@@ -46,7 +42,6 @@ ...@@ -46,7 +42,6 @@
register: supervisor_update register: supervisor_update
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
when: not devstack when: not devstack
tags: deploy
- name: forum | ensure forum is started - name: forum | ensure forum is started
supervisorctl_local: > supervisorctl_local: >
...@@ -55,4 +50,5 @@ ...@@ -55,4 +50,5 @@
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=started
when: not devstack when: not devstack
tags: deploy
- set_fact: forum_installed=true
...@@ -42,6 +42,5 @@ ...@@ -42,6 +42,5 @@
notify: notify:
- forum | restart the forum service - forum | restart the forum service
- include: deploy.yml - include: deploy.yml tags=deploy
- include: test.yml
...@@ -4,14 +4,8 @@ ...@@ -4,14 +4,8 @@
wait_for: port={{ item.port }} host={{ item.host }} timeout=30 wait_for: port={{ item.port }} host={{ item.host }} timeout=30
with_items: "{{ forum_services }}" with_items: "{{ forum_services }}"
when: not devstack when: not devstack
tags:
- forum
- test
- name: forum | test that mongo replica set members are listing - name: forum | test that mongo replica set members are listing
wait_for: port={{ FORUM_MONGO_PORT }} host={{ item }} timeout=30 wait_for: port={{ FORUM_MONGO_PORT }} host={{ item }} timeout=30
with_items: "{{ FORUM_MONGO_HOSTS }}" with_items: "{{ FORUM_MONGO_HOSTS }}"
when: not devstack when: not devstack
tags:
- forum
- test
...@@ -18,21 +18,17 @@ ...@@ -18,21 +18,17 @@
- name: legacy_ora | create ora application config - name: legacy_ora | create ora application config
copy: copy:
src={{secure_dir}}/files/{{COMMON_ENV_TYPE}}/legacy_ora/ora.env.json src={{secure_dir}}/files/{{COMMON_ENV_TYPE}}/legacy_ora/ora.env.json
dest={{ora_app_dir}}/env.json dest={{ora_app_dir}}/env.json
sudo_user: "{{ ora_user }}" sudo_user: "{{ ora_user }}"
register: env_state register: env_state
tags:
- deploy
- name: legacy_ora | create ora auth file - name: legacy_ora | create ora auth file
copy: copy:
src={{secure_dir}}/files/{{COMMON_ENV_TYPE}}/legacy_ora/ora.auth.json src={{secure_dir}}/files/{{COMMON_ENV_TYPE}}/legacy_ora/ora.auth.json
dest={{ora_app_dir}}/auth.json dest={{ora_app_dir}}/auth.json
sudo_user: "{{ ora_user }}" sudo_user: "{{ ora_user }}"
register: auth_state register: auth_state
tags:
- deploy
# Restart ORA Services # Restart ORA Services
- name: legacy_ora | restart edx-ora - name: legacy_ora | restart edx-ora
......
...@@ -7,14 +7,12 @@ ...@@ -7,14 +7,12 @@
- name: local_dev | set login shell for app accounts - name: local_dev | set login shell for app accounts
user: name={{ item.user }} shell="/bin/bash" user: name={{ item.user }} shell="/bin/bash"
with_items: "{{ localdev_accounts }}" with_items: "{{ localdev_accounts }}"
tags: deploy
# Ensure forum user has permissions to access .gem and .rbenv # Ensure forum user has permissions to access .gem and .rbenv
# This is a little twisty: the forum role sets the owner and group to www-data # This is a little twisty: the forum role sets the owner and group to www-data
# So we add the forum user to the www-data group and give group write permissions # So we add the forum user to the www-data group and give group write permissions
- name: local_dev | add forum user to www-data group - name: local_dev | add forum user to www-data group
user: name={{ forum_user }} groups={{ common_web_group }} append=yes user: name={{ forum_user }} groups={{ common_web_group }} append=yes
tags: deploy
- name: local_dev | set forum rbenv and gem permissions - name: local_dev | set forum rbenv and gem permissions
file: file:
...@@ -22,7 +20,6 @@ ...@@ -22,7 +20,6 @@
with_items: with_items:
- "{{ forum_app_dir }}/.gem" - "{{ forum_app_dir }}/.gem"
- "{{ forum_app_dir }}/.rbenv" - "{{ forum_app_dir }}/.rbenv"
tags: deploy
# Create scripts to configure environment # Create scripts to configure environment
- name: local_dev | create login scripts - name: local_dev | create login scripts
......
--- ---
- name: restart mongo - name: restart mongo
service: name=mongodb state=restarted service: name=mongodb state=restarted
tags: deploy
--- ---
- name: nginx | restart nginx - name: nginx | restart nginx
service: name=nginx state=restarted service: name=nginx state=restarted
tags: deploy
- name: nginx | reload nginx - name: nginx | reload nginx
service: name=nginx state=reloaded service: name=nginx state=reloaded
tags: deploy
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
copy: > copy: >
src={{ NGINX_SSL_KEY }} src={{ NGINX_SSL_KEY }}
dest=/etc/ssl/private/{{ item|basename }} dest=/etc/ssl/private/{{ item|basename }}
owner=root group=ssl-cert mode=0640 owner=root group=root mode=0640
when: NGINX_ENABLE_SSL and NGINX_SSL_KEY != 'ssl-cert-snakeoil.key' when: NGINX_ENABLE_SSL and NGINX_SSL_KEY != 'ssl-cert-snakeoil.key'
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
state=restarted state=restarted
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
tags: deploy
- name: notifier | restart notifier-celery-workers - name: notifier | restart notifier-celery-workers
supervisorctl_local: > supervisorctl_local: >
...@@ -14,4 +13,3 @@ ...@@ -14,4 +13,3 @@
state=restarted state=restarted
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
tags: deploy
--- ---
- name: notifier | checkout code - name: notifier | checkout code
git: git:
dest={{ NOTIFIER_CODE_DIR }} repo={{ NOTIFIER_SOURCE_REPO }} dest={{ NOTIFIER_CODE_DIR }} repo={{ NOTIFIER_SOURCE_REPO }}
version={{ NOTIFIER_VERSION }} version={{ NOTIFIER_VERSION }}
sudo: true sudo: true
sudo_user: "{{ NOTIFIER_USER }}" sudo_user: "{{ NOTIFIER_USER }}"
notify: notify:
- notifier | restart notifier-scheduler - notifier | restart notifier-scheduler
- notifier | restart notifier-celery-workers - notifier | restart notifier-celery-workers
tags:
- deploy
- name: notifier | source repo group perms - name: notifier | source repo group perms
file: file:
path={{ NOTIFIER_SOURCE_REPO }} mode=2775 state=directory path={{ NOTIFIER_SOURCE_REPO }} mode=2775 state=directory
tags:
- deploy
- name: notifier | install application requirements - name: notifier | install application requirements
pip: pip:
requirements="{{ NOTIFIER_REQUIREMENTS_FILE }}" requirements="{{ NOTIFIER_REQUIREMENTS_FILE }}"
virtualenv="{{ NOTIFIER_VENV_DIR }}" state=present virtualenv="{{ NOTIFIER_VENV_DIR }}" state=present
sudo: true sudo: true
sudo_user: "{{ NOTIFIER_USER }}" sudo_user: "{{ NOTIFIER_USER }}"
notify: notify:
- notifier | restart notifier-scheduler - notifier | restart notifier-scheduler
- notifier | restart notifier-celery-workers - notifier | restart notifier-celery-workers
tags:
- deploy
# Syncdb for whatever reason always creates the file owned by www-data:www-data, and then # Syncdb for whatever reason always creates the file owned by www-data:www-data, and then
# complains it can't write because it's running as notifier. So this is to touch the file into # complains it can't write because it's running as notifier. So this is to touch the file into
...@@ -53,5 +47,3 @@ ...@@ -53,5 +47,3 @@
notify: notify:
- notifier | restart notifier-scheduler - notifier | restart notifier-scheduler
- notifier | restart notifier-celery-workers - notifier | restart notifier-celery-workers
tags:
- deploy
...@@ -99,4 +99,4 @@ ...@@ -99,4 +99,4 @@
sudo_user: "{{ supervisor_user }}" sudo_user: "{{ supervisor_user }}"
notify: notifier | restart notifier-scheduler notify: notifier | restart notifier-scheduler
- include: deploy.yml - include: deploy.yml tags=deploy
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
when: not devstack when: not devstack
tags: deploy
- name: ora | restart ora_celery - name: ora | restart ora_celery
supervisorctl_local: > supervisorctl_local: >
...@@ -15,4 +14,3 @@ ...@@ -15,4 +14,3 @@
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
when: not devstack when: not devstack
tags: deploy
...@@ -7,22 +7,16 @@ ...@@ -7,22 +7,16 @@
- ora | restart ora_celery - ora | restart ora_celery
with_items: ['ora', 'ora_celery'] with_items: ['ora', 'ora_celery']
when: not devstack when: not devstack
tags:
- deploy
- include: ease.yml - include: ease.yml
- name: ora | create ora application config - name: ora | create ora application config
template: src=ora.env.json.j2 dest={{ora_app_dir}}/ora.env.json template: src=ora.env.json.j2 dest={{ora_app_dir}}/ora.env.json
sudo_user: "{{ ora_user }}" sudo_user: "{{ ora_user }}"
tags:
- deploy
- name: ora | create ora auth file - name: ora | create ora auth file
template: src=ora.auth.json.j2 dest={{ora_app_dir}}/ora.auth.json template: src=ora.auth.json.j2 dest={{ora_app_dir}}/ora.auth.json
sudo_user: "{{ ora_user }}" sudo_user: "{{ ora_user }}"
tags:
- deploy
- name: ora | setup the ora env - name: ora | setup the ora env
notify: notify:
...@@ -32,8 +26,6 @@ ...@@ -32,8 +26,6 @@
src=ora_env.j2 dest={{ ora_app_dir }}/ora_env src=ora_env.j2 dest={{ ora_app_dir }}/ora_env
owner={{ ora_user }} group={{ common_web_user }} owner={{ ora_user }} group={{ common_web_user }}
mode=0644 mode=0644
tags:
- deploy
# Do A Checkout # Do A Checkout
- name: ora | git checkout ora repo into {{ ora_app_dir }} - name: ora | git checkout ora repo into {{ ora_app_dir }}
...@@ -42,8 +34,6 @@ ...@@ -42,8 +34,6 @@
notify: notify:
- ora | restart ora - ora | restart ora
- ora | restart ora_celery - ora | restart ora_celery
tags:
- deploy
# TODO: Check git.py _run_if_changed() to see if the logic there to skip running certain # TODO: Check git.py _run_if_changed() to see if the logic there to skip running certain
# portions of the deploy needs to be incorporated here. # portions of the deploy needs to be incorporated here.
...@@ -56,8 +46,6 @@ ...@@ -56,8 +46,6 @@
notify: notify:
- ora | restart ora - ora | restart ora
- ora | restart ora_celery - ora | restart ora_celery
tags:
- deploy
# Install the python post requirements into {{ ora_venv_dir }} # Install the python post requirements into {{ ora_venv_dir }}
- name: ora | install python post-requirements - name: ora | install python post-requirements
...@@ -66,8 +54,6 @@ ...@@ -66,8 +54,6 @@
notify: notify:
- ora | restart ora - ora | restart ora
- ora | restart ora_celery - ora | restart ora_celery
tags:
- deploy
#Needed if using redis to prevent memory issues #Needed if using redis to prevent memory issues
- name: ora | change memory commit settings -- needed for redis - name: ora | change memory commit settings -- needed for redis
...@@ -75,8 +61,6 @@ ...@@ -75,8 +61,6 @@
notify: notify:
- ora | restart ora - ora | restart ora
- ora | restart ora_celery - ora | restart ora_celery
tags:
- deploy
- name: ora | syncdb and migrate - name: ora | syncdb and migrate
shell: SERVICE_VARIANT=ora {{ora_venv_dir}}/bin/django-admin.py syncdb --migrate --noinput --settings=edx_ora.aws --pythonpath={{ora_code_dir}} shell: SERVICE_VARIANT=ora {{ora_venv_dir}}/bin/django-admin.py syncdb --migrate --noinput --settings=edx_ora.aws --pythonpath={{ora_code_dir}}
...@@ -85,8 +69,6 @@ ...@@ -85,8 +69,6 @@
notify: notify:
- ora | restart ora - ora | restart ora
- ora | restart ora_celery - ora | restart ora_celery
tags:
- deploy
- name: ora | create users - name: ora | create users
shell: SERVICE_VARIANT=ora {{ora_venv_dir}}/bin/django-admin.py update_users --settings=edx_ora.aws --pythonpath={{ora_code_dir}} shell: SERVICE_VARIANT=ora {{ora_venv_dir}}/bin/django-admin.py update_users --settings=edx_ora.aws --pythonpath={{ora_code_dir}}
...@@ -94,8 +76,6 @@ ...@@ -94,8 +76,6 @@
notify: notify:
- ora | restart ora - ora | restart ora
- ora | restart ora_celery - ora | restart ora_celery
tags:
- deploy
# call supervisorctl update. this reloads # call supervisorctl update. this reloads
...@@ -108,7 +88,6 @@ ...@@ -108,7 +88,6 @@
register: supervisor_update register: supervisor_update
when: not devstack when: not devstack
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
tags: deploy
- name: ora | ensure ora is started - name: ora | ensure ora is started
supervisorctl_local: > supervisorctl_local: >
...@@ -117,7 +96,6 @@ ...@@ -117,7 +96,6 @@
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=started
when: not devstack when: not devstack
tags: deploy
- name: ora | ensure ora_celery is started - name: ora | ensure ora_celery is started
supervisorctl_local: > supervisorctl_local: >
...@@ -126,4 +104,3 @@ ...@@ -126,4 +104,3 @@
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=started
when: not devstack when: not devstack
tags: deploy
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
notify: notify:
- ora | restart ora - ora | restart ora
- ora | restart ora_celery - ora | restart ora_celery
tags:
- deploy
- name: ora | install ease system packages - name: ora | install ease system packages
apt: pkg={{item}} state=present apt: pkg={{item}} state=present
...@@ -14,8 +12,6 @@ ...@@ -14,8 +12,6 @@
notify: notify:
- ora | restart ora - ora | restart ora
- ora | restart ora_celery - ora | restart ora_celery
tags:
- deploy
# Install the python pre requirements into {{ ora_ease_venv_dir }} # Install the python pre requirements into {{ ora_ease_venv_dir }}
...@@ -25,8 +21,6 @@ ...@@ -25,8 +21,6 @@
notify: notify:
- ora | restart ora - ora | restart ora
- ora | restart ora_celery - ora | restart ora_celery
tags:
- deploy
# Install the python post requirements into {{ ora_ease_venv_dir }} # Install the python post requirements into {{ ora_ease_venv_dir }}
- name: ora | install ease python post-requirements - name: ora | install ease python post-requirements
...@@ -35,8 +29,6 @@ ...@@ -35,8 +29,6 @@
notify: notify:
- ora | restart ora - ora | restart ora
- ora | restart ora_celery - ora | restart ora_celery
tags:
- deploy
- name: ora | install ease python package - name: ora | install ease python package
shell: > shell: >
...@@ -45,8 +37,6 @@ ...@@ -45,8 +37,6 @@
notify: notify:
- ora | restart ora - ora | restart ora
- ora | restart ora_celery - ora | restart ora_celery
tags:
- deploy
- name: ora | download and install nltk - name: ora | download and install nltk
shell: | shell: |
...@@ -61,5 +51,3 @@ ...@@ -61,5 +51,3 @@
notify: notify:
- ora | restart ora - ora | restart ora
- ora | restart ora_celery - ora | restart ora_celery
tags:
- deploy
...@@ -48,12 +48,6 @@ ...@@ -48,12 +48,6 @@
- ora | restart ora_celery - ora | restart ora_celery
with_items: ora_ease_debian_pkgs with_items: ora_ease_debian_pkgs
- include: deploy.yml - include: deploy.yml tags=deploy
- name: ora | create a symlink for venv python
file: >
src="{{ ora_venv_bin }}/{{ item }}"
dest={{ COMMON_BIN_DIR }}/{{ item }}.ora state=link
with_items:
- python
- pip
...@@ -7,4 +7,3 @@ ...@@ -7,4 +7,3 @@
with_items: with_items:
- xqueue - xqueue
- xqueue_consumer - xqueue_consumer
tags: deploy
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
src={{ item }}.conf.j2 dest={{ supervisor_cfg_dir }}/{{ item }}.conf src={{ item }}.conf.j2 dest={{ supervisor_cfg_dir }}/{{ item }}.conf
owner={{ supervisor_user }} group={{ common_web_user }} mode=0644 owner={{ supervisor_user }} group={{ common_web_user }} mode=0644
with_items: ['xqueue', 'xqueue_consumer'] with_items: ['xqueue', 'xqueue_consumer']
tags:
- deploy
- name: xqueue | create xqueue application config - name: xqueue | create xqueue application config
...@@ -12,16 +10,12 @@ ...@@ -12,16 +10,12 @@
sudo_user: "{{ xqueue_user }}" sudo_user: "{{ xqueue_user }}"
notify: notify:
- xqueue | restart xqueue - xqueue | restart xqueue
tags:
- deploy
- name: xqueue | create xqueue auth file - name: xqueue | create xqueue auth file
template: src=xqueue.auth.json.j2 dest={{ xqueue_app_dir }}/xqueue.auth.json mode=0644 template: src=xqueue.auth.json.j2 dest={{ xqueue_app_dir }}/xqueue.auth.json mode=0644
sudo_user: "{{ xqueue_user }}" sudo_user: "{{ xqueue_user }}"
notify: notify:
- xqueue | restart xqueue - xqueue | restart xqueue
tags:
- deploy
# Do A Checkout # Do A Checkout
- name: xqueue | git checkout xqueue repo into xqueue_code_dir - name: xqueue | git checkout xqueue repo into xqueue_code_dir
...@@ -29,8 +23,6 @@ ...@@ -29,8 +23,6 @@
sudo_user: "{{ xqueue_user }}" sudo_user: "{{ xqueue_user }}"
notify: notify:
- xqueue | restart xqueue - xqueue | restart xqueue
tags:
- deploy
# Install the python pre requirements into {{ xqueue_venv_dir }} # Install the python pre requirements into {{ xqueue_venv_dir }}
...@@ -39,8 +31,6 @@ ...@@ -39,8 +31,6 @@
sudo_user: "{{ xqueue_user }}" sudo_user: "{{ xqueue_user }}"
notify: notify:
- xqueue | restart xqueue - xqueue | restart xqueue
tags:
- deploy
# Install the python post requirements into {{ xqueue_venv_dir }} # Install the python post requirements into {{ xqueue_venv_dir }}
- name : xqueue | install python post-requirements - name : xqueue | install python post-requirements
...@@ -48,8 +38,6 @@ ...@@ -48,8 +38,6 @@
sudo_user: "{{ xqueue_user }}" sudo_user: "{{ xqueue_user }}"
notify: notify:
- xqueue | restart xqueue - xqueue | restart xqueue
tags:
- deploy
- name: xqueue | syncdb and migrate - name: xqueue | syncdb and migrate
shell: > shell: >
...@@ -58,8 +46,6 @@ ...@@ -58,8 +46,6 @@
sudo_user: "{{ xqueue_user }}" sudo_user: "{{ xqueue_user }}"
notify: notify:
- xqueue | restart xqueue - xqueue | restart xqueue
tags:
- deploy
- name: xqueue | create users - name: xqueue | create users
shell: > shell: >
...@@ -67,9 +53,6 @@ ...@@ -67,9 +53,6 @@
sudo_user: "{{ xqueue_user }}" sudo_user: "{{ xqueue_user }}"
notify: notify:
- xqueue | restart xqueue - xqueue | restart xqueue
tags:
- deploy
# call supervisorctl update. this reloads # call supervisorctl update. this reloads
# the supervisorctl config and restarts # the supervisorctl config and restarts
...@@ -80,7 +63,6 @@ ...@@ -80,7 +63,6 @@
shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update" shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update"
register: supervisor_update register: supervisor_update
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
tags: deploy
- name: xqueue | ensure xqueue, consumer is running - name: xqueue | ensure xqueue, consumer is running
supervisorctl_local: > supervisorctl_local: >
...@@ -91,4 +73,3 @@ ...@@ -91,4 +73,3 @@
with_items: with_items:
- xqueue - xqueue
- xqueue_consumer - xqueue_consumer
tags: deploy
...@@ -44,16 +44,8 @@ ...@@ -44,16 +44,8 @@
- xqueue | restart xqueue - xqueue | restart xqueue
when: xqueue_create_db is defined and xqueue_create_db|lower == "yes" when: xqueue_create_db is defined and xqueue_create_db|lower == "yes"
- include: deploy.yml - include: deploy.yml tags=deploy
- name: xqueue | create a symlink for venv python
file: >
src="{{ xqueue_venv_bin }}/{{ item }}"
dest={{ COMMON_BIN_DIR }}/{{ item }}.xqueue
state=link
with_items:
- python
- pip
...@@ -20,5 +20,4 @@ ...@@ -20,5 +20,4 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=restarted state=restarted
tags: deploy
...@@ -2,52 +2,38 @@ ...@@ -2,52 +2,38 @@
template: > template: >
src=xserver.conf.j2 dest={{ supervisor_cfg_dir }}/xserver.conf src=xserver.conf.j2 dest={{ supervisor_cfg_dir }}/xserver.conf
owner={{ supervisor_user }} group={{ common_web_user }} mode=0644 owner={{ supervisor_user }} group={{ common_web_user }} mode=0644
tags:
- deploy
- name: xserver | checkout code - name: xserver | checkout code
git: dest={{xserver_code_dir}} repo={{xserver_source_repo}} version={{xserver_version}} git: dest={{xserver_code_dir}} repo={{xserver_source_repo}} version={{xserver_version}}
sudo_user: "{{ xserver_user }}" sudo_user: "{{ xserver_user }}"
notify: xserver | restart xserver notify: xserver | restart xserver
tags:
- deploy
- name: xserver | install requirements - name: xserver | install requirements
pip: requirements="{{xserver_requirements_file}}" virtualenv="{{ xserver_venv_dir }}" state=present pip: requirements="{{xserver_requirements_file}}" virtualenv="{{ xserver_venv_dir }}" state=present
sudo_user: "{{ xserver_user }}" sudo_user: "{{ xserver_user }}"
notify: xserver | restart xserver notify: xserver | restart xserver
tags:
- deploy
- name: xserver | install sandbox requirements - name: xserver | install sandbox requirements
pip: requirements="{{xserver_requirements_file}}" virtualenv="{{xserver_venv_sandbox_dir}}" state=present pip: requirements="{{xserver_requirements_file}}" virtualenv="{{xserver_venv_sandbox_dir}}" state=present
sudo_user: "{{ xserver_user }}" sudo_user: "{{ xserver_user }}"
notify: xserver | restart xserver notify: xserver | restart xserver
tags:
- deploy
- name: xserver | create xserver application config - name: xserver | create xserver application config
template: src=xserver.env.json.j2 dest={{ xserver_app_dir }}/env.json template: src=xserver.env.json.j2 dest={{ xserver_app_dir }}/env.json
sudo_user: "{{ xserver_user }}" sudo_user: "{{ xserver_user }}"
notify: xserver | restart xserver notify: xserver | restart xserver
tags:
- deploy
- name: xserver | install read-only ssh key for the content repo that is required for grading - name: xserver | install read-only ssh key for the content repo that is required for grading
copy: > copy: >
src={{ XSERVER_LOCAL_GIT_IDENTITY }} dest={{ xserver_git_identity }} src={{ XSERVER_LOCAL_GIT_IDENTITY }} dest={{ xserver_git_identity }}
owner={{ xserver_user }} group={{ xserver_user }} mode=0600 owner={{ xserver_user }} group={{ xserver_user }} mode=0600
notify: xserver | restart xserver notify: xserver | restart xserver
tags:
- deploy
- name: xserver | upload ssh script - name: xserver | upload ssh script
template: > template: >
src=git_ssh.sh.j2 dest=/tmp/git_ssh.sh src=git_ssh.sh.j2 dest=/tmp/git_ssh.sh
owner={{ xserver_user }} mode=750 owner={{ xserver_user }} mode=750
notify: xserver | restart xserver notify: xserver | restart xserver
tags:
- deploy
- name: xserver | checkout grader code - name: xserver | checkout grader code
git: dest={{ XSERVER_GRADER_DIR }} repo={{ XSERVER_GRADER_SOURCE }} version={{ xserver_grader_version }} git: dest={{ XSERVER_GRADER_DIR }} repo={{ XSERVER_GRADER_SOURCE }} version={{ xserver_grader_version }}
...@@ -55,14 +41,10 @@ ...@@ -55,14 +41,10 @@
GIT_SSH: /tmp/git_ssh.sh GIT_SSH: /tmp/git_ssh.sh
notify: xserver | restart xserver notify: xserver | restart xserver
sudo_user: "{{ xserver_user }}" sudo_user: "{{ xserver_user }}"
tags:
- deploy
- name: xserver | remove read-only ssh key for the content repo - name: xserver | remove read-only ssh key for the content repo
file: path={{ xserver_git_identity }} state=absent file: path={{ xserver_git_identity }} state=absent
notify: xserver | restart xserver notify: xserver | restart xserver
tags:
- deploy
# call supervisorctl update. this reloads # call supervisorctl update. this reloads
# the supervisorctl config and restarts # the supervisorctl config and restarts
...@@ -73,7 +55,6 @@ ...@@ -73,7 +55,6 @@
shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update" shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update"
register: supervisor_update register: supervisor_update
changed_when: supervisor_update.stdout != "" changed_when: supervisor_update.stdout != ""
tags: deploy
- name: xserver | ensure xserver is started - name: xserver | ensure xserver is started
supervisorctl_local: > supervisorctl_local: >
...@@ -81,5 +62,15 @@ ...@@ -81,5 +62,15 @@
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=started
tags: deploy
- name: xserver | create a symlink for venv python
file: >
src="{{ xserver_venv_bin }}/{{ item }}"
dest={{ COMMON_BIN_DIR }}/{{ item }}.xserver
state=link
with_items:
- python
- pip
- name: xserver | enforce app-armor rules
command: aa-enforce {{ xserver_venv_sandbox_dir }}
...@@ -62,17 +62,4 @@ ...@@ -62,17 +62,4 @@
- "{{ secure_dir }}/files/edx_apparmor_sandbox.j2" - "{{ secure_dir }}/files/edx_apparmor_sandbox.j2"
- "usr.bin.python-sandbox.j2" - "usr.bin.python-sandbox.j2"
- include: deploy.yml - include: deploy.yml tags=deploy
- name: xserver | enforce app-armor rules
command: aa-enforce {{ xserver_venv_sandbox_dir }}
- name: xserver | create a symlink for venv python
file: >
src="{{ xserver_venv_bin }}/{{ item }}"
dest={{ COMMON_BIN_DIR }}/{{ item }}.xserver
state=link
with_items:
- python
- pip
...@@ -72,12 +72,7 @@ if [[ -z $ami ]]; then ...@@ -72,12 +72,7 @@ if [[ -z $ami ]]; then
fi fi
if [[ -z $instance_type ]]; then if [[ -z $instance_type ]]; then
if [[ $server_type == "full_edx_installation" ]]; then instance_type="m1.medium"
instance_type="m1.medium"
elif [[ $server_type == "ubuntu_12.04" ]]; then
instance_type="m1.small"
fi
fi fi
deploy_host="${dns_name}.${dns_zone}" deploy_host="${dns_name}.${dns_zone}"
......
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