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
d6e50911
Commit
d6e50911
authored
May 16, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review comments - remove remote user, add git ssh, move some vars in templates
parent
c60d77ac
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
15 deletions
+21
-15
playbooks/roles/discern/files/git_ssh.sh
+2
-0
playbooks/roles/discern/tasks/main.yml
+13
-9
playbooks/roles/discern/templates/celery.conf.j2
+1
-1
playbooks/roles/discern/templates/discern.conf.j2
+2
-2
playbooks/roles/discern/vars/main.yml
+3
-3
No files found.
playbooks/roles/discern/files/git_ssh.sh
0 → 100644
View file @
d6e50911
#!/bin/sh
exec
/usr/bin/ssh
-o
StrictHostKeyChecking
=
no
"
$@
"
playbooks/roles/discern/tasks/main.yml
View file @
d6e50911
...
...
@@ -14,29 +14,29 @@
#Upload config files for django (auth and env)
-
name
:
create discern application config env.json file
template
:
src=env.json.j2 dest={{app_base_dir}}/env.json owner=
{{remote_user}}
group=edx mode=0640
template
:
src=env.json.j2 dest={{app_base_dir}}/env.json owner=
root
group=edx mode=0640
-
name
:
create discern auth file auth.json
template
:
src=auth.json.j2 dest={{app_base_dir}}/auth.json owner=
{{remote_user}}
group=edx mode=0640
template
:
src=auth.json.j2 dest={{app_base_dir}}/auth.json owner=
root
group=edx mode=0640
#Needed if using redis to prevent memory issues
-
name
:
change memory commit settings -- needed for redis
command
:
sysctl vm.overcommit_memory=1
#
Needed to pull repos from github, due to hanging on host add prompt otherwise
-
name
:
add github to the known hosts file
shell
:
ssh-keyscan -H github.com > ~/.ssh/known_hosts
#
Upload custom git ssh script
-
name
:
upload ssh script
copy
:
src=git_ssh.sh dest=/tmp/git_ssh.sh force=yes owner=root group=adm mode=750
-
name
:
set permissions on app_base_dir sgid for edx
file
:
path={{app_base_dir}} owner=
{{remote_user}}
group=edx mode=2775 state=directory
file
:
path={{venv_dir}} owner=
{{remote_user}}
group=edx mode=2775 state=directory
file
:
path={{app_base_dir}} owner=
root
group=edx mode=2775 state=directory
file
:
path={{venv_dir}} owner=
root
group=edx mode=2775 state=directory
-
name
:
Install git so that we can clone repos
apt
:
pkg=git install_recommends=yes state=present
#Create directories for repos
-
name
:
create discern and ease directories and set permissions
file
:
path={{item}} owner=
{{remote_user}}
group=edx mode=2775 state=directory
file
:
path={{item}} owner=
root
group=edx mode=2775 state=directory
with_items
:
-
${discern_dir}
-
${ease_dir}
...
...
@@ -44,9 +44,13 @@
#Grab both repos or update
-
name
:
git checkout discern repo into discern_dir
git
:
dest={{discern_dir}} repo={{discern_source_repo}} version={{discern_branch}}
environment
:
GIT_SSH
:
/tmp/git_ssh.sh
-
name
:
git checkout ease repo into ease_dir
git
:
dest={{ease_dir}} repo={{ease_source_repo}} version={{ease_branch}}
environment
:
GIT_SSH
:
/tmp/git_ssh.sh
#Install system packages
-
name
:
install discern and ease apt packages
...
...
@@ -76,7 +80,7 @@
shell
:
command="{{venv_dir}}/bin/python -m nltk.downloader -d {{nltk_data_dir}} all"
-
name
:
set permissions on nltk data directory
file
:
path={{nltk_data_dir}} owner=
{{remote_user}}
group=edx mode=2775 state=directory
file
:
path={{nltk_data_dir}} owner=
root
group=edx mode=2775 state=directory
#Run this instead of using the ansible module because the ansible module only support syncdb of these three, and does not
#support virtualenvs as of this comment
...
...
playbooks/roles/discern/templates/celery.conf.j2
View file @
d6e50911
...
...
@@ -14,4 +14,4 @@ env DJANGO_SETTINGS_MODULE={{discern_settings}}
chdir {{discern_dir}}
setuid {{remote_user}}
exec {{venv_dir}}/bin/python {{discern_dir}}/manage.py celeryd --loglevel=info --settings={{discern_settings}} --pythonpath={{discern_dir}} -B --autoscale=
4
,1
exec {{venv_dir}}/bin/python {{discern_dir}}/manage.py celeryd --loglevel=info --settings={{discern_settings}} --pythonpath={{discern_dir}} -B --autoscale=
{{ ansible_processor_cores * 2 }}
,1
playbooks/roles/discern/templates/discern.conf.j2
View file @
d6e50911
...
...
@@ -10,8 +10,8 @@ respawn
respawn limit 3 30
env PID=/var/run/gunicorn/discern.pid
env WORKERS=
4
env PORT=
7999
env WORKERS=
{{ ansible_processor_cores * 2 }}
env PORT=
{{ gunicorn_port }}
env LANG=en_US.UTF-8
env DJANGO_SETTINGS_MODULE={{discern_settings}}
...
...
playbooks/roles/discern/vars/main.yml
View file @
d6e50911
...
...
@@ -4,7 +4,7 @@ ease_dir: $app_base_dir/ease
discern_dir
:
$app_base_dir/discern
discern_settings
:
discern.aws
nltk_data_dir
:
/usr/share/nltk_data
remote_user
:
ubuntu
ease_branch
:
master
discern_branch
:
dev
nginx_listen_port
:
80
\ No newline at end of file
nginx_listen_port
:
80
gunicorn_port
:
7999
\ No newline at end of file
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