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
edx
configuration
Commits
722ac320
Commit
722ac320
authored
Aug 04, 2017
by
Brian Beggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Produce a devstack forums env file
parent
80f04e34
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
11 deletions
+41
-11
docker/build/forum/ansible_overrides.yml
+2
-0
playbooks/roles/forum/defaults/main.yml
+11
-1
playbooks/roles/forum/tasks/deploy.yml
+4
-4
playbooks/roles/forum/tasks/main.yml
+22
-4
playbooks/roles/forum/templates/forum_env.j2
+2
-2
No files found.
docker/build/forum/ansible_overrides.yml
View file @
722ac320
...
...
@@ -9,3 +9,5 @@ FORUM_ELASTICSEARCH_HOST: "es.{{ FLOCK_TLD }}"
FORUM_USE_TCP
:
"
true"
FORUM_RACK_ENV
:
"
staging"
FORUM_SINATRA_ENV
:
"
staging"
devstack
:
"
true"
playbooks/roles/forum/defaults/main.yml
View file @
722ac320
...
...
@@ -48,7 +48,7 @@ FORUM_RESTART_DELAY: 60
# Set to rebuild the forum ElasticSearch index from the database.
FORUM_REBUILD_INDEX
:
false
forum_
environment
:
forum_
base_env
:
&forum_base_env
RBENV_ROOT
:
"
{{
forum_rbenv_root
}}"
GEM_HOME
:
"
{{
forum_gem_root
}}"
GEM_PATH
:
"
{{
forum_gem_root
}}"
...
...
@@ -68,6 +68,16 @@ forum_environment:
LISTEN_HOST
:
"
{{
FORUM_LISTEN_HOST
}}"
LISTEN_PORT
:
"
{{
FORUM_LISTEN_PORT
}}"
forum_env
:
<<
:
*forum_base_env
devstack_forum_env
:
<<
:
*forum_base_env
RACK_ENV
:
"
development"
SINATRA_ENV
:
"
development"
SEARCH_SERVER
:
"
http://edx.devstack.elasticsearch:9200/"
MONGOHQ_URL
:
"
mongodb://cs_comments_service:password@edx.devstack.mongo:27017/cs_comments_service"
forum_user
:
"
forum"
forum_ruby_version
:
"
2.4.1"
forum_source_repo
:
"
https://github.com/edx/cs_comments_service.git"
...
...
playbooks/roles/forum/tasks/deploy.yml
View file @
722ac320
...
...
@@ -52,9 +52,9 @@
-
install:code
-
name
:
install comments service bundle
shell
:
"
bundle
install
--deployment
--path
{{
forum_gem_root
}}
chdir={{
forum_code_dir
}}"
shell
:
"
.
/edx/app/forum/ruby_env
&&
bundle
install
--deployment
--path
{{
forum_gem_root
}}
chdir={{
forum_code_dir
}}"
become_user
:
"
{{
forum_user
}}"
environment
:
"
{{
forum_
environment
}}"
environment
:
"
{{
forum_
base_env
}}"
notify
:
restart the forum service
tags
:
-
install
...
...
@@ -65,7 +65,7 @@
args
:
chdir
:
"
{{
forum_code_dir
}}"
become_user
:
"
{{
forum_user
}}"
environment
:
"
{{
forum_
environment
}}"
environment
:
"
{{
forum_
base_env
}}"
when
:
migrate_db is defined and migrate_db|lower == "yes"
tags
:
-
migrate
...
...
@@ -76,7 +76,7 @@
args
:
chdir
:
"
{{
forum_code_dir
}}"
become_user
:
"
{{
forum_user
}}"
environment
:
"
{{
forum_
environment
}}"
environment
:
"
{{
forum_
base_env
}}"
when
:
migrate_db is defined and migrate_db|lower == "yes" and FORUM_REBUILD_INDEX|bool
tags
:
-
migrate
...
...
playbooks/roles/forum/tasks/main.yml
View file @
722ac320
...
...
@@ -44,11 +44,26 @@
-
install
-
install:base
-
name
:
setup the forum env
-
name
:
setup the forum env
for stage/prod
template
:
src
:
forum_env.j2
dest
:
"
{{
forum_app_dir
}}/forum_env"
owner
:
"
{{
forum_user
}}"
owner
:
"
{{
forum_user
}}"
group
:
"
{{
common_web_user
}}"
mode
:
0644
notify
:
-
restart the forum service
tags
:
-
install
-
install:base
with_items
:
-
"
{{
forum_env
}}"
-
name
:
setup the forum env for devstack
template
:
src
:
forum_env.j2
dest
:
"
{{
forum_app_dir
}}/devstack_forum_env"
owner
:
"
{{
forum_user
}}"
group
:
"
{{
common_web_user
}}"
mode
:
0644
notify
:
...
...
@@ -56,6 +71,9 @@
tags
:
-
install
-
install:base
when
:
devstack is defined and devstack
with_items
:
-
"
{{
devstack_forum_env
}}"
-
name
:
create {{ forum_data_dir }}
file
:
...
...
@@ -67,7 +85,7 @@
tags
:
-
install
-
install:base
-
include
:
deploy.yml
tags
:
tags
:
-
deploy
playbooks/roles/forum/templates/forum_env.j2
View file @
722ac320
# {{ ansible_managed }}
{% for name,value in
forum_environment
.items() -%}
{% for name,value in
item
.items() -%}
{%- if value -%}
export {{ name }}="{{ value }}"
{% endif %}
{% endif %}
{%- endfor %}
eval "$(rbenv init -)"
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