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
de71ca54
Commit
de71ca54
authored
Oct 23, 2013
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating forums for new directory structure
parent
c9f34533
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
39 deletions
+37
-39
playbooks/edx-east/edx_continuous_integration.yml
+1
-1
playbooks/roles/forum/defaults/main.yml
+15
-2
playbooks/roles/forum/tasks/deploy.yml
+2
-7
playbooks/roles/forum/tasks/main.yml
+15
-24
playbooks/roles/forum/templates/cs_comments_service.conf.j2
+3
-4
playbooks/roles/forum/templates/cs_comments_service.j2
+1
-1
No files found.
playbooks/edx-east/edx_continuous_integration.yml
View file @
de71ca54
...
...
@@ -7,7 +7,6 @@
migrate_db
:
"
yes"
openid_workaround
:
True
roles
:
-
ansible_debug
-
common
-
role
:
nginx
nginx_sites
:
...
...
@@ -19,6 +18,7 @@
-
xserver
#- discern
-
edxlocal
-
mongo
-
edxapp
-
{
role
:
'
rabbitmq'
,
rabbitmq_ip
:
'
127.0.0.1'
}
-
{
role
:
'
edxapp'
,
celery_worker
:
True
}
...
...
playbooks/roles/forum/defaults/main.yml
View file @
de71ca54
---
forum_app_dir
:
"
{{
app_dir
}}/forum"
forum_code_dir
:
"
{{
forum_app_dir
}}/cs_comments_service"
forum_data_dir
:
"
{{
data_dir
}}/forum"
forum_rbenv_dir
:
"
{{
forum_app_dir
}}"
forum_rbenv_root
:
"
{{
forum_app_dir
}}/.rbenv"
forum_rbenv_shims
:
"
{{
forum_rbenv_root
}}/shims"
forum_rbenv_bin
:
"
{{
forum_rbenv_root
}}/bin"
forum_gem_root
:
"
{{
forum_rbenv_dir
}}/.gem"
forum_gem_bin
:
"
{{
forum_gem_root
}}/bin"
forum_path
:
"
{{
forum_code_dir
}}/bin:{{
forum_rbenv_bin
}}:{{
forum_rbenv_shims
}}:{{
forum_gem_bin
}}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
forum_environment
:
RBENV_ROOT
:
$forum_rbenv_root
GEM_HOME
:
$forum_gem_root
PATH
:
$forum_path
forum_user
:
"
forum"
forum_home
:
"
/opt/wwc/forum"
forum_ruby_version
:
"
1.9.3-p448"
forum_code_dir
:
"
{{
forum_home
}}/cs_comments_service"
forum_source_repo
:
"
https://github.com/edx/cs_comments_service.git"
forum_version
:
"
HEAD"
forum_mongo_user
:
"
cs_comments_service"
...
...
playbooks/roles/forum/tasks/deploy.yml
View file @
de71ca54
...
...
@@ -7,20 +7,15 @@
-
name
:
forum | git checkout forum repo into {{ forum_code_dir }}
git
:
dest={{ forum_code_dir }} repo={{ forum_source_repo }} version={{ forum_version }}
sudo
:
yes
sudo_user
:
"
{{
forum_user
}}"
notify
:
-
forum | restart the forum service
tags
:
-
forum
-
deploy
-
name
:
forum | install comments service bundle
shell
:
executable=/bin/bash {{ forum_home }}/.rbenv/shims/bundle install chdir={{ forum_code_dir }}
sudo
:
yes
shell
:
bundle install chdir={{ forum_code_dir }}
sudo_user
:
"
{{
forum_user
}}"
environment
:
"
{{
forum_environment
}}"
tags
:
-
forum
-
deploy
-
name
:
forum | restart the forum service
...
...
playbooks/roles/forum/tasks/main.yml
View file @
de71ca54
...
...
@@ -21,33 +21,25 @@
# rbenv_ruby_version: "{{ forum_ruby_version }}"
# - forum
-
name
:
forum | setup the forum env
template
:
src=forum_env.j2 dest={{ forum_home }}/forum_env owner={{ forum_user }} group={{ forum_user }}
notify
:
-
forum | restart the forum service
tags
:
-
forum
-
update
-
name
:
forum | create application user
user
:
>
name="{{ forum_user }}"
home="{{ forum_app_dir }}"
createhome=no
shell=/bin/false
-
name
:
forum | create forum app dir
file
:
>
path="{{ forum_app_dir }}"
state=directory
owner="{{ forum_user }}"
group="{{ common_web_group }}"
-
name
:
forum | ensure .bashrc exists
shell
:
touch {{ forum_home }}/.bashrc
sudo
:
true
-
name
:
forum | setup the forum env
template
:
src=forum_env.j2 dest={{ forum_app_dir }}/forum_env
sudo_user
:
"
{{
forum_user
}}"
tags
:
-
forum
-
update
-
name
:
forum | add source of ruby_env to .bashrc
lineinfile
:
dest="{{ forum_home }}/.bashrc"
regexp='. {{ forum_home }}/forum_env'
line='. {{ forum_home }}/forum_env'
notify
:
-
forum | restart the forum service
tags
:
-
forum
-
update
-
name
:
forum | copy cs_comments_service SysVunit script
template
:
src=cs_comments_service.j2 dest=/etc/init.d/cs_comments_service owner=root group=root mode=750
...
...
@@ -58,7 +50,6 @@
-
install
when
:
ansible_distribution == 'Debian'
-
name
:
forum | copy cs_comments_service upstart script
template
:
src=cs_comments_service.conf.j2 dest=/etc/init/cs_comments_service.conf owner=root group=root mode=644
notify
:
...
...
playbooks/roles/forum/templates/cs_comments_service.conf.j2
View file @
de71ca54
...
...
@@ -10,7 +10,7 @@ env PID=/var/tmp/comments_service.pid
chdir {{ forum_code_dir }}
script
. {{forum_
home
}}/forum_env
{{forum_
home
}}/.rbenv/shims/ruby app.rb
. {{forum_
app_dir
}}/forum_env
{{forum_
app_dir
}}/.rbenv/shims/ruby app.rb
end script
\ No newline at end of file
end script
playbooks/roles/forum/templates/cs_comments_service.j2
View file @
de71ca54
...
...
@@ -15,7 +15,7 @@ USER={{ forum_user }}
NAME
=
"cs_comments_service"
RETVAL
=
0
APP_ROOT
={{
forum_code_dir
}}
DAEMON
={{
forum_
home
}}
/.rbenv/shims/ruby
DAEMON
={{
forum_
app_dir
}}
/.rbenv/shims/ruby
PID
=
/var/tmp/cs_comments_service.pid
OPTIONS
=
"app.rb"
...
...
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