Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
ea9806d4
Commit
ea9806d4
authored
Jul 15, 2013
by
Feanil Patel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #150 from edx/feanil/ansible_grader_testing
Get end to end grader testing working.
parents
cc176620
fd7322c3
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
110 additions
and
8 deletions
+110
-8
playbooks/edx-east/feanil_deploy.yml
+12
-4
playbooks/roles/nginx/tasks/main.yml
+5
-0
playbooks/roles/nginx/templates/lms-xml.j2
+10
-0
playbooks/roles/rabbitmq/tasks/main.yml
+8
-1
playbooks/roles/xqueue/handlers/main.yml
+3
-0
playbooks/roles/xqueue/tasks/deploy.yml
+20
-0
playbooks/roles/xqueue/tasks/main.yml
+29
-3
playbooks/roles/xqueue/templates/xqueue_consumer.conf.j2
+17
-0
playbooks/roles/xqueue/vars/main.yml
+2
-0
playbooks/roles/xserver/tasks/main.yml
+3
-0
playbooks/roles/xserver/templates/99-sandbox.j2
+1
-0
No files found.
playbooks/edx-east/feanil_deploy.yml
View file @
ea9806d4
...
...
@@ -2,7 +2,7 @@
-
hosts
:
tag_aws_cloudformation_stack-name_feanilpractice:&tag_group_edxapp
sudo
:
True
vars_files
:
-
"
{{
secure_dir
}}/vars/edx
app
_continuous_integration_vars.yml"
-
"
{{
secure_dir
}}/vars/edx_continuous_integration_vars.yml"
-
"
{{
secure_dir
}}/vars/users.yml"
roles
:
-
common
...
...
@@ -12,19 +12,27 @@
-
hosts
:
tag_aws_cloudformation_stack-name_feanilpractice:&tag_group_xserver
sudo
:
True
vars_files
:
-
"
{{
secure_dir
}}/vars/edx
app
_continuous_integration_vars.yml"
-
"
{{
secure_dir
}}/vars/edx_continuous_integration_vars.yml"
-
"
{{
secure_dir
}}/vars/users.yml"
roles
:
-
common
-
nginx
-
xserver
-
hosts
:
tag_aws_cloudformation_stack-name_feanilpractice:&tag_group_rabbitmq
serial
:
1
sudo
:
True
vars_files
:
-
"
{{
secure_dir
}}/vars/edx
app
_continuous_integration_vars.yml"
-
"
{{
secure_dir
}}/vars/edx_continuous_integration_vars.yml"
-
"
{{
secure_dir
}}/vars/users.yml"
roles
:
-
common
-
rabbitmq
-
hosts
:
tag_aws_cloudformation_stack-name_feanilpractice:&tag_group_xqueue
sudo
:
True
vars_files
:
-
"
{{
secure_dir
}}/vars/edx_continuous_integration_vars.yml"
-
"
{{
secure_dir
}}/vars/users.yml"
roles
:
-
common
-
nginx
-
xqueue
playbooks/roles/nginx/tasks/main.yml
View file @
ea9806d4
...
...
@@ -62,3 +62,8 @@
-
nginx
-
update
# If tasks that notify restart nginx don't change the state of the remote system
# their corresponding notifications don't get run. If nginx has been stopped for
# any reason, this will ensure that it is started up again.
-
name
:
make sure nginx has started
service
:
name=nginx state=started
playbooks/roles/nginx/templates/lms-xml.j2
View file @
ea9806d4
...
...
@@ -20,6 +20,16 @@ server {
proxy_pass http://lms-xml-backend;
}
location @proxy_to_lms-xml_app {
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://lms-xml-backend;
}
location / {
try_files $uri @proxy_to_lms-xml_app;
}
...
...
playbooks/roles/rabbitmq/tasks/main.yml
View file @
ea9806d4
...
...
@@ -56,6 +56,13 @@
rabbitmq_user
:
user="guest" state=absent
-
name
:
add admin users
rabbitmq_user
:
user='{{item.name}}' password='{{item.password}}' tags="administrator" state=present
rabbitmq_user
:
>
user='{{item.name}}'
password='{{item.password}}'
read_priv='.*'
write_priv='.*'
configure_priv='.*'
tags="administrator"
state=present
with_items
:
rabbitmq_auth_config.admins
when
:
"
'admins'
in
rabbitmq_auth_config"
playbooks/roles/xqueue/handlers/main.yml
View file @
ea9806d4
...
...
@@ -15,3 +15,6 @@
tags
:
-
xqueue
-
deploy
-
name
:
restart xqueue consumer
service
:
name=xqueue_consumer state=restarted
playbooks/roles/xqueue/tasks/deploy.yml
View file @
ea9806d4
...
...
@@ -5,6 +5,12 @@
-
xqueue
-
deploy
-
name
:
stop xqueue consumer service
service
:
name=xqueue_consumer state=stopped
tags
:
-
xqueue
-
deploy
# Do A Checkout
-
name
:
git checkout xqueue repo into $app_base_dir
git
:
dest={{xqueue_code_dir}} repo={{xqueue_source_repo}} version={{xqueue_version}}
...
...
@@ -53,6 +59,14 @@
-
syncdb
-
deploy
-
name
:
create users
shell
:
sudo -u www-data /opt/edx/bin/django-admin.py update_users --settings=xqueue.aws_settings --pythonpath=/opt/wwc/xqueue
when
:
update_users is defined
tags
:
-
xqueue
-
syncdb
-
deploy
-
name
:
stop xqueue
service
:
name=xqueue state=stopped
tags
:
...
...
@@ -64,3 +78,9 @@
tags
:
-
xqueue
-
deploy
-
name
:
start xqueue consumer
service
:
name=xqueue_consumer state=started
tags
:
-
xqueue
-
deploy
playbooks/roles/xqueue/tasks/main.yml
View file @
ea9806d4
...
...
@@ -8,30 +8,56 @@
tags
:
-
xqueue
-
name
:
create xqueue db
mysql_db
:
>
name={{xqueue_auth_config.DATABASES.default.NAME}}
login_host={{xqueue_auth_config.DATABASES.default.HOST}}
login_user={{xqueue_auth_config.DATABASES.default.USER}}
login_password={{xqueue_auth_config.DATABASES.default.PASSWORD}}
state=present
encoding=utf8
# Check out xqueue repo to $app_base_dir
-
name
:
install git and its recommends
apt
:
pkg=git state=present install_recommends=yes
tags
:
-
xqueue
-
name
:
install a bunch of system packages on which LMS and CMS rely
apt
:
pkg={{item}} state=present
with_items
:
xqueue_debian_pkgs
-
name
:
install a bunch of system packages on which xqueue relies
apt
:
pkg={{','.join(xqueue_debian_pkgs)}} state=present
notify
:
-
restart xqueue
-
restart xqueue consumer
tags
:
-
xqueue
-
name
:
create xqueue application config
template
:
src=xqueue.env.json.j2 dest=$app_base_dir/env.json mode=0640 owner=www-data group=adm
notify
:
-
restart xqueue
-
restart xqueue consumer
tags
:
-
xqueue
-
name
:
create xqueue auth file
template
:
src=xqueue.auth.json.j2 dest=$app_base_dir/auth.json mode=0640 owner=www-data group=adm
notify
:
-
restart xqueue
-
restart xqueue consumer
tags
:
-
xqueue
-
name
:
creating xqueue upstart script
template
:
src=xqueue.conf.j2 dest=/etc/init/xqueue.conf mode=0640 owner=root group=adm
notify
:
-
restart xqueue
tags
:
-
xqueue
-
name
:
create xqueue consumer upstart script
template
:
src=xqueue_consumer.conf.j2 dest=/etc/init/xqueue_consumer.conf mode=0640 owner=root group=adm
notify
:
-
restart xqueue consumer
tags
:
-
xqueue
...
...
playbooks/roles/xqueue/templates/xqueue_consumer.conf.j2
0 → 100644
View file @
ea9806d4
# gunicorn
description "xqueue server"
author "devops <devops@edx.org>"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 3 30
env LANG=en_US.UTF-8
env WORKERS_PER_QUEUE={{xqueue_env_config.XQUEUE_WORKERS_PER_QUEUE}}
chdir {{xqueue_code_dir}}
setuid www-data
exec {{venv_dir}}/bin/django-admin.py run_consumer --pythonpath={{xqueue_code_dir}} --settings=xqueue.aws_settings $WORKERS_PER_QUEUE
playbooks/roles/xqueue/vars/main.yml
View file @
ea9806d4
...
...
@@ -116,3 +116,5 @@ xqueue_debian_pkgs:
-
yui-compressor
-
zip
-
zlib1g-dev
# Needed to be able to create the xqueue mysqldb.
-
python-mysqldb
playbooks/roles/xserver/tasks/main.yml
View file @
ea9806d4
...
...
@@ -12,6 +12,9 @@
-
name
:
create sandbox python directory
file
:
path={{ xserver_sandbox_venv_dir }} owner=ubuntu group=adm mode=2775 state=directory
-
name
:
create sandbox sudoers file
template
:
src=99-sandbox.j2 dest=/etc/sudoers.d/99-sandbox owner=root group=root mode=0440
-
name
:
create sandbox python
command
:
/usr/local/bin/virtualenv {{ xserver_sandbox_venv_dir }} --distribute creates={{ xserver_sandbox_venv_dir }}/bin/activate
...
...
playbooks/roles/xserver/templates/99-sandbox.j2
0 → 100644
View file @
ea9806d4
www-data ALL=(sandbox) NOPASSWD:{{xserver_sandbox_venv_dir}}/bin/python
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment