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
6dfa74b9
Commit
6dfa74b9
authored
Jan 15, 2014
by
e0d
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #643 from edx/e0d/forum-updates
E0d/forum updates
parents
8f5cdba4
cb391060
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
21 deletions
+66
-21
playbooks/edx-east/edx_provision.yml
+2
-0
playbooks/roles/edxapp/defaults/main.yml
+1
-1
playbooks/roles/forum/defaults/main.yml
+22
-20
playbooks/roles/forum/tasks/test.yml
+8
-0
playbooks/roles/nginx/templates/forum.j2
+33
-0
No files found.
playbooks/edx-east/edx_provision.yml
View file @
6dfa74b9
...
...
@@ -32,6 +32,7 @@
-
roles/ora/defaults/main.yml
-
roles/xqueue/defaults/main.yml
-
roles/xserver/defaults/main.yml
-
roles/forum/defaults/main.yml
roles
:
# rerun common to set the hostname, nginx to set basic auth
-
common
...
...
@@ -42,6 +43,7 @@
-
ora
-
xqueue
-
xserver
-
forum
nginx_default_sites
:
-
lms
# gh_users hash must be passed
...
...
playbooks/roles/edxapp/defaults/main.yml
View file @
6dfa74b9
...
...
@@ -40,7 +40,7 @@ EDXAPP_EMAIL_BACKEND: 'django.core.mail.backends.smtp.EmailBackend'
EDXAPP_LOG_LEVEL
:
'
INFO'
EDXAPP_MEMCACHE
:
[
'
localhost:11211'
]
EDXAPP_COMMENTS_SERVICE_URL
:
'
http://localhost:
4567
'
EDXAPP_COMMENTS_SERVICE_URL
:
'
http://localhost:
18080
'
EDXAPP_COMMENTS_SERVICE_KEY
:
'
password'
EDXAPP_EDXAPP_SECRET_KEY
:
'
'
...
...
playbooks/roles/forum/defaults/main.yml
View file @
6dfa74b9
...
...
@@ -13,35 +13,38 @@ forum_path: "{{ forum_code_dir }}/bin:{{ forum_rbenv_bin }}:{{ forum_rbenv_shims
FORUM_MONGO_USER
:
"
cs_comments_service"
FORUM_MONGO_PASSWORD
:
"
password"
FORUM_MONGO_HOST
:
"
localhost"
FORUM_MONGO_HOSTS
:
-
"
localhost"
FORUM_MONGO_PORT
:
"
27017"
FORUM_MONGO_DATABASE
:
"
cs_comments_service"
FORUM_MONGO_URL
:
"
mongodb://{{
FORUM_MONGO_USER
}}:{{
FORUM_MONGO_PASSWORD
}}@{%-
for
host
in
FORUM_MONGO_HOSTS
-%}
{{host}}:{{
FORUM_MONGO_PORT
}}{%-
if
not
loop.last
-%},{%-
endif
-%}
{%-
endfor
-%}/{{
FORUM_MONGO_DATABASE
}}"
FORUM_SINATRA_ENV
:
"
development"
FORUM_RACK_ENV
:
"
development"
FORUM_NGINX_PORT
:
"
18080"
FORUM_API_KEY
:
"
password"
FORUM_ELASTICSEARCH_HOST
:
"
localhost"
FORUM_ELASTICSEARCH_PORT
:
"
9200"
FORUM_ELASTICSEARCH_URL
:
"
http://{{
FORUM_ELASTICSEARCH_HOST
}}:{{
FORUM_ELASTICSEARCH_PORT
}}"
forum_environment
:
RBENV_ROOT
:
"
{{
forum_rbenv_root
}}"
GEM_HOME
:
"
{{
forum_gem_root
}}"
GEM_PATH
:
"
{{
forum_gem_root
}}"
PATH
:
"
{{
forum_path
}}"
MONGOHQ_USER
:
"
{{
FORUM_MONGO_USER
}}"
MONGOHQ_PASS
:
"
{{
FORUM_MONGO_PASSWORD
}}"
RACK_ENV
:
"
{{
forum_rack_env
}}"
RACK_ENV
:
"
{{
FORUM_RACK_ENV
}}"
SINATRA_ENV
:
"
{{
FORUM_SINATRA_ENV
}}"
API_KEY
:
"
{{
forum_api_key
}}"
SEARCH_SERVER
:
"
{{
forum_elasticsearch_url
}}"
MONGOHQ_URL
:
"
{{
forum_mongo_url
}}"
API_KEY
:
"
{{
FORUM_API_KEY
}}"
SEARCH_SERVER
:
"
{{
FORUM_ELASTICSEARCH_URL
}}"
MONGOHQ_URL
:
"
{{
FORUM_MONGO_URL
}}"
HOME
:
"
{{
forum_app_dir
}}"
forum_user
:
"
forum"
forum_ruby_version
:
"
1.9.3-p448"
forum_source_repo
:
"
https://github.com/edx/cs_comments_service.git"
forum_version
:
"
HEAD"
forum_mongo_database
:
"
cs_comments_service"
forum_mongo_url
:
"
mongodb://{{
FORUM_MONGO_USER
}}:{{
FORUM_MONGO_PASSWORD
}}@{{
FORUM_MONGO_HOST
}}:{{
FORUM_MONGO_PORT
}}/{{
forum_mongo_database
}}"
forum_rack_env
:
"
development"
forum_api_key
:
"
password"
forum_elasticsearch_host
:
"
localhost"
forum_elasticsearch_port
:
"
9200"
forum_elasticsearch_url
:
"
http://{{
forum_elasticsearch_host
}}:{{
forum_elasticsearch_port
}}"
forum_unicorn_port
:
"
4567"
#
# test config
...
...
@@ -49,11 +52,9 @@ forum_elasticsearch_url: "http://{{ forum_elasticsearch_host }}:{{ forum_elastic
#
# The following services should be listening on the associated
# ports when the role has been successfully created.
# ports when the role has been successfully created. Note that
# connectivity to Mongo is also tested, but separately.
#
forum_services
:
-
{
service
:
"
sinatra"
,
host
:
"
localhost"
,
port
:
"
4567"
}
-
{
service
:
"
mongo"
,
host
:
"
{{
FORUM_MONGO_HOST
}}"
,
port
:
"
27017"
}
-
{
service
:
"
mongo"
,
host
:
"
{{
FORUM_MONGO_HOST
}}"
,
port
:
"
28017"
}
-
{
service
:
"
elasticsearch"
,
host
:
"
{{
forum_elasticsearch_host
}}"
,
port
:
"
9200"
}
-
{
service
:
"
elasticsearch"
,
host
:
"
{{
forum_elasticsearch_host
}}"
,
port
:
"
9300"
}
-
{
service
:
"
sinatra"
,
host
:
"
localhost"
,
port
:
"
{{
forum_unicorn_port
}}"
}
-
{
service
:
"
elasticsearch"
,
host
:
"
{{
FORUM_ELASTICSEARCH_HOST
}}"
,
port
:
"
{{
FORUM_ELASTICSEARCH_PORT
}}"
}
\ No newline at end of file
playbooks/roles/forum/tasks/test.yml
View file @
6dfa74b9
...
...
@@ -7,3 +7,11 @@
tags
:
-
forum
-
test
-
name
:
forum | test that mongo replica set members are listing
wait_for
:
port={{ FORUM_MONGO_PORT }} host={{ item }} timeout=30
with_items
:
"
{{
FORUM_MONGO_HOSTS
}}"
when
:
not devstack
tags
:
-
forum
-
test
playbooks/roles/nginx/templates/forum.j2
0 → 100644
View file @
6dfa74b9
{%- if "forum" in nginx_default_sites -%}
{%- set default_site = "default" -%}
{%- else -%}
{%- set default_site = "" -%}
{%- endif -%}
upstream forum_app_server {
server localhost:{{ forum_unicorn_port }} fail_timeout=0;
}
server {
server_name forum.*;
listen {{ FORUM_NGINX_PORT }} {{default_site}};
client_max_body_size 1M;
keepalive_timeout 5;
location / {
try_files $uri @proxy_to_app;
}
location @proxy_to_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://forum_app_server;
}
}
\ 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