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
eb78a7e7
Commit
eb78a7e7
authored
Jan 06, 2016
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2669 from edx/clintonb/forums-fix
Forums Fixes
parents
beb11c51
0cbbab3c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
42 deletions
+32
-42
playbooks/roles/forum/defaults/main.yml
+3
-2
playbooks/roles/forum/meta/main.yml
+1
-3
playbooks/roles/forum/tasks/deploy.yml
+2
-5
playbooks/roles/forum/tasks/main.yml
+12
-8
playbooks/roles/forum/templates/forum-supervisor.sh.j2
+2
-2
playbooks/roles/local_dev/tasks/main.yml
+0
-17
playbooks/roles/rbenv/defaults/main.yml
+3
-3
playbooks/roles/rbenv/tasks/main.yml
+9
-2
No files found.
playbooks/roles/forum/defaults/main.yml
View file @
eb78a7e7
---
---
forum_app_dir
:
"
{{
COMMON_APP_DIR
}}/forum"
forum_app_dir
:
"
{{
COMMON_APP_DIR
}}/forum"
forum_code_dir
:
"
{{
forum_app_dir
}}/cs_comments_service"
forum_code_dir
:
"
{{
forum_app_dir
}}/cs_comments_service"
forum_binstubs_dir
:
"
{{
forum_code_dir
}}/bin"
forum_data_dir
:
"
{{
COMMON_DATA_DIR
}}/forum"
forum_data_dir
:
"
{{
COMMON_DATA_DIR
}}/forum"
forum_rbenv_dir
:
"
{{
forum_app_dir
}}"
forum_rbenv_dir
:
"
{{
forum_app_dir
}}"
forum_rbenv_root
:
"
{{
forum_app_dir
}}/.rbenv"
forum_rbenv_root
:
"
{{
forum_app_dir
}}/.rbenv"
...
@@ -9,7 +10,7 @@ forum_rbenv_bin: "{{ forum_rbenv_root }}/bin"
...
@@ -9,7 +10,7 @@ forum_rbenv_bin: "{{ forum_rbenv_root }}/bin"
forum_supervisor_wrapper
:
"
{{
forum_app_dir
}}/forum-supervisor.sh"
forum_supervisor_wrapper
:
"
{{
forum_app_dir
}}/forum-supervisor.sh"
forum_gem_root
:
"
{{
forum_rbenv_dir
}}/.gem"
forum_gem_root
:
"
{{
forum_rbenv_dir
}}/.gem"
forum_gem_bin
:
"
{{
forum_gem_root
}}/bin"
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_path
:
"
{{
forum_
binstubs_dir
}}
:{{
forum_rbenv_bin
}}:{{
forum_rbenv_shims
}}:{{
forum_gem_bin
}}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
FORUM_MONGO_USER
:
"
cs_comments_service"
FORUM_MONGO_USER
:
"
cs_comments_service"
FORUM_MONGO_PASSWORD
:
"
password"
FORUM_MONGO_PASSWORD
:
"
password"
...
@@ -59,7 +60,7 @@ forum_environment:
...
@@ -59,7 +60,7 @@ forum_environment:
LISTEN_PORT
:
"
{{
FORUM_LISTEN_PORT
}}"
LISTEN_PORT
:
"
{{
FORUM_LISTEN_PORT
}}"
forum_user
:
"
forum"
forum_user
:
"
forum"
forum_ruby_version
:
"
1.9.3-p
448
"
forum_ruby_version
:
"
1.9.3-p
551
"
forum_source_repo
:
"
https://github.com/edx/cs_comments_service.git"
forum_source_repo
:
"
https://github.com/edx/cs_comments_service.git"
forum_version
:
"
master"
forum_version
:
"
master"
...
...
playbooks/roles/forum/meta/main.yml
View file @
eb78a7e7
...
@@ -3,8 +3,6 @@ dependencies:
...
@@ -3,8 +3,6 @@ dependencies:
-
common
-
common
-
supervisor
-
supervisor
-
role
:
rbenv
-
role
:
rbenv
# TODO: setting the rbenv ownership to
rbenv_user
:
"
{{
forum_user
}}"
# the common_web_user is a workaround
rbenv_user
:
"
{{
common_web_user
}}"
rbenv_dir
:
"
{{
forum_app_dir
}}"
rbenv_dir
:
"
{{
forum_app_dir
}}"
rbenv_ruby_version
:
"
{{
forum_ruby_version
}}"
rbenv_ruby_version
:
"
{{
forum_ruby_version
}}"
playbooks/roles/forum/tasks/deploy.yml
View file @
eb78a7e7
...
@@ -49,12 +49,9 @@
...
@@ -49,12 +49,9 @@
-
install
-
install
-
install:code
-
install:code
# TODO: This is done as the common_web_user
# since the process owner needs write access
# to the rbenv
-
name
:
install comments service bundle
-
name
:
install comments service bundle
shell
:
bundle install --deployment chdir={{ forum_code_dir }}
shell
:
bundle install --deployment
--path {{ forum_gem_root }}
chdir={{ forum_code_dir }}
sudo_user
:
"
{{
common_web
_user
}}"
sudo_user
:
"
{{
forum
_user
}}"
environment
:
"
{{
forum_environment
}}"
environment
:
"
{{
forum_environment
}}"
notify
:
restart the forum service
notify
:
restart the forum service
tags
:
tags
:
...
...
playbooks/roles/forum/tasks/main.yml
View file @
eb78a7e7
...
@@ -23,18 +23,23 @@
...
@@ -23,18 +23,23 @@
-
name
:
create application user
-
name
:
create application user
user
:
>
user
:
>
name="{{ forum_user }}" home="{{ forum_app_dir }}"
name="{{ forum_user }}"
createhome=no
home="{{ forum_app_dir }}"
createhome=yes
shell=/bin/false
shell=/bin/false
generate_ssh_key=yes
notify
:
restart the forum service
notify
:
restart the forum service
tags
:
tags
:
-
install
-
install
-
install:base
-
install:base
-
name
:
create forum app dir
# Ensure the directory is accessible to the web service
-
name
:
set forum app dir permissions
file
:
>
file
:
>
path="{{ forum_app_dir }}" state=directory
path="{{ forum_app_dir }}"
owner="{{ forum_user }}" group="{{ common_web_group }}"
state=directory
owner="{{ forum_user }}"
group="{{ common_web_group }}"
notify
:
restart the forum service
notify
:
restart the forum service
tags
:
tags
:
-
install
-
install
...
@@ -60,4 +65,4 @@
...
@@ -60,4 +65,4 @@
-
install
-
install
-
install:base
-
install:base
-
include
:
deploy.yml tags=deploy
-
include
:
deploy.yml tags=deploy
\ No newline at end of file
playbooks/roles/forum/templates/forum-supervisor.sh.j2
View file @
eb78a7e7
...
@@ -6,7 +6,7 @@ cd {{ forum_code_dir }}
...
@@ -6,7 +6,7 @@ cd {{ forum_code_dir }}
{
%
if
devstack %
}
{
%
if
devstack %
}
{{
forum_rbenv_shims
}}
/ruby app.rb
{{
forum_rbenv_shims
}}
/ruby app.rb
{
%
elif
FORUM_USE_TCP %
}
{
%
elif
FORUM_USE_TCP %
}
{{
forum_
gem_bin
}}
/unicorn
-c
config/unicorn_tcp.rb
{{
forum_
binstubs_dir
}}
/unicorn
-c
config/unicorn_tcp.rb
{
%
else
%
}
{
%
else
%
}
{{
forum_
gem_bin
}}
/unicorn
-c
config/unicorn.rb
{{
forum_
binstubs_dir
}}
/unicorn
-c
config/unicorn.rb
{
% endif %
}
{
% endif %
}
playbooks/roles/local_dev/tasks/main.yml
View file @
eb78a7e7
...
@@ -21,23 +21,6 @@
...
@@ -21,23 +21,6 @@
group
:
"
{{
common_web_group
}}"
group
:
"
{{
common_web_group
}}"
when
:
edxapp_user is defined
when
:
edxapp_user is defined
# 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
# So we add the forum user to the www-data group and give group write permissions
-
name
:
add forum user to www-data group
user
:
name={{ forum_user }} groups={{ common_web_group }} append=yes
when
:
forum_user is defined
# Need this in order for the forum user to install and uninstall
# gems using 'bundle' or 'gem'. Can't make it 760 because that
# would break the bin directory under .gem
-
name
:
set forum rbenv and gem permissions
file
:
path={{ item }} state=directory recurse=yes mode="g+rw"
with_items
:
-
"
{{
forum_app_dir
}}/.gem"
when
:
forum_user is defined
# Create scripts to configure environment
# Create scripts to configure environment
-
name
:
create login scripts
-
name
:
create login scripts
template
:
template
:
...
...
playbooks/roles/rbenv/defaults/main.yml
View file @
eb78a7e7
---
---
rbenv_version
:
'
v
0.4
.0'
rbenv_version
:
'
v
1.0
.0'
rbenv_bundler_version
:
'
1.
3
.2'
rbenv_bundler_version
:
'
1.
11
.2'
rbenv_rake_version
:
'
10.
0.3
'
rbenv_rake_version
:
'
10.
4.2
'
rbenv_root
:
"
{{
rbenv_dir
}}/.rbenv"
rbenv_root
:
"
{{
rbenv_dir
}}/.rbenv"
rbenv_gem_root
:
"
{{
rbenv_dir
}}/.gem"
rbenv_gem_root
:
"
{{
rbenv_dir
}}/.gem"
rbenv_gem_bin
:
"
{{
rbenv_gem_root
}}/bin"
rbenv_gem_bin
:
"
{{
rbenv_gem_root
}}/bin"
...
...
playbooks/roles/rbenv/tasks/main.yml
View file @
eb78a7e7
...
@@ -177,6 +177,14 @@
...
@@ -177,6 +177,14 @@
tags
:
tags
:
-
install
-
install
-
install:base
-
install:base
-
name
:
update rubygems
shell
:
"
gem
install
rubygems-update
&&
update_rubygems"
sudo_user
:
"
{{
rbenv_user
}}"
environment
:
"
{{
rbenv_environment
}}"
tags
:
-
install
-
install:base
-
name
:
rehash
-
name
:
rehash
shell
:
"
rbenv
rehash"
shell
:
"
rbenv
rehash"
...
@@ -184,4 +192,4 @@
...
@@ -184,4 +192,4 @@
environment
:
"
{{
rbenv_environment
}}"
environment
:
"
{{
rbenv_environment
}}"
tags
:
tags
:
-
install
-
install
-
install:base
-
install:base
\ 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