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
e65b6661
Commit
e65b6661
authored
Jan 01, 2016
by
arbabnazar
Committed by
Edward Zarecor
Jan 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified the course_discovery instances inside all templates
parent
0b0ca78a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
37 deletions
+38
-37
playbooks/roles/discovery/meta/main.yml
+1
-1
playbooks/roles/discovery/templates/edx/app/discovery/devstack.sh.j2
+10
-9
playbooks/roles/discovery/templates/edx/app/discovery/discovery.sh.j2
+6
-6
playbooks/roles/discovery/templates/edx/app/discovery/discovery_env.j2
+1
-1
playbooks/roles/discovery/templates/edx/app/discovery/discovery_gunicorn.py.j2
+6
-6
playbooks/roles/discovery/templates/edx/app/nginx/sites-available/discovery.j2
+10
-10
playbooks/roles/discovery/templates/edx/app/supervisor/conf.d.available/discovery.conf.j2
+3
-3
playbooks/roles/edx_ansible/templates/update.j2
+1
-1
No files found.
playbooks/roles/discovery/meta/main.yml
View file @
e65b6661
...
...
@@ -8,7 +8,7 @@
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
##
# Role includes for role
course_
discovery
# Role includes for role discovery
#
# Example:
#
...
...
playbooks/roles/discovery/templates/edx/app/discovery/devstack.sh.j2
View file @
e65b6661
...
...
@@ -2,29 +2,30 @@
# {{ ansible_managed }}
source
{{
course_discovery_home
}}
/course_
discovery_env
source
{{
discovery_home
}}
/
discovery_env
COMMAND
=
$1
case
$COMMAND
in
start
)
{
%
set
course_discovery_venv_bin
=
course_discovery_home +
"/venvs/"
+ course_
discovery_service_name +
"/bin"
%
}
{
%
set
executable
=
course_
discovery_venv_bin +
'/gunicorn'
%
}
{
%
set
discovery_venv_bin
=
discovery_home +
"/venvs/"
+
discovery_service_name +
"/bin"
%
}
{
%
set
executable
=
discovery_venv_bin +
'/gunicorn'
%
}
cd
/edx/app/edx_ansible/edx_ansible/docker/plays
sudo
ansible-playbook course_discovery.yml
-c
local
-i
'127.0.0.1,'
\
sudo
ansible-playbook discovery.yml
-c
local
-i
'127.0.0.1,'
\
-t
'install:app-requirements,assets:gather,devstack,migrate'
\
--extra-vars
=
"migrate_db=yes"
\
--extra-vars
=
"@/ansible_overrides.yml"
{{
executable
}}
-c
{{
course_discovery_home
}}
/course_
discovery_gunicorn.py
\
{{
COURSE_
DISCOVERY_GUNICORN_EXTRA
}}
\
{{
executable
}}
-c
{{
discovery_home
}}
/
discovery_gunicorn.py
\
{{
DISCOVERY_GUNICORN_EXTRA
}}
\
--reload
\
course_
discovery.wsgi:application
discovery.wsgi:application
;;
open
)
cd
{{
course_
discovery_code_dir
}}
.
{{
course_
discovery_venv_bin
}}
/activate
cd
{{
discovery_code_dir
}}
.
{{
discovery_venv_bin
}}
/activate
/bin/bash
;;
esac
playbooks/roles/discovery/templates/edx/app/discovery/discovery.sh.j2
View file @
e65b6661
...
...
@@ -2,17 +2,17 @@
# {{ ansible_managed }}
{
%
set
course_discovery_venv_bin
=
course_discovery_home +
"/venvs/"
+ course_
discovery_service_name +
"/bin"
%
}
{
%
set
discovery_venv_bin
=
discovery_home +
"/venvs/"
+
discovery_service_name +
"/bin"
%
}
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
{
%
set
executable
=
course_discovery_venv_bin +
'/newrelic-admin run-program '
+ course_
discovery_venv_bin +
'/gunicorn'
%
}
{
%
set
executable
=
discovery_venv_bin +
'/newrelic-admin run-program '
+
discovery_venv_bin +
'/gunicorn'
%
}
{
%
else
%
}
{
%
set
executable
=
course_
discovery_venv_bin +
'/gunicorn'
%
}
{
%
set
executable
=
discovery_venv_bin +
'/gunicorn'
%
}
{
% endif %
}
{
%
if
COMMON_ENABLE_NEWRELIC_APP %
}
export
NEW_RELIC_APP_NAME
=
"{{
COURSE_
DISCOVERY_NEWRELIC_APPNAME }}"
export
NEW_RELIC_APP_NAME
=
"{{ DISCOVERY_NEWRELIC_APPNAME }}"
export
NEW_RELIC_LICENSE_KEY
=
"{{ NEWRELIC_LICENSE_KEY }}"
{
% endif -%
}
source
{{
course_discovery_home
}}
/course_
discovery_env
{{
executable
}}
-c
{{
course_discovery_home
}}
/course_discovery_gunicorn.py
{{
COURSE_DISCOVERY_GUNICORN_EXTRA
}}
course_
discovery.wsgi:application
source
{{
discovery_home
}}
/
discovery_env
{{
executable
}}
-c
{{
discovery_home
}}
/discovery_gunicorn.py
{{
DISCOVERY_GUNICORN_EXTRA
}}
discovery.wsgi:application
playbooks/roles/discovery/templates/edx/app/discovery/discovery_env.j2
View file @
e65b6661
# {{ ansible_managed }}
{% for name,value in
course_
discovery_environment.items() -%}
{% for name,value in discovery_environment.items() -%}
{%- if value -%}
export {{ name }}="{{ value }}"
{% endif %}
...
...
playbooks/roles/discovery/templates/edx/app/discovery/discovery_gunicorn.py.j2
View file @
e65b6661
...
...
@@ -3,10 +3,10 @@ gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html
{{ ansible_managed }}
"""
timeout = {{
course_
discovery_gunicorn_timeout }}
bind = "{{
course_discovery_gunicorn_host }}:{{ course_
discovery_gunicorn_port }}"
pythonpath = "{{
course_
discovery_code_dir }}"
workers = {{
COURSE_
DISCOVERY_GUNICORN_WORKERS }}
worker_class = "{{
COURSE_
DISCOVERY_GUNICORN_WORKER_CLASS }}"
timeout = {{ discovery_gunicorn_timeout }}
bind = "{{
discovery_gunicorn_host }}:{{
discovery_gunicorn_port }}"
pythonpath = "{{ discovery_code_dir }}"
workers = {{ DISCOVERY_GUNICORN_WORKERS }}
worker_class = "{{ DISCOVERY_GUNICORN_WORKER_CLASS }}"
{{
COURSE_
DISCOVERY_GUNICORN_EXTRA_CONF }}
{{ DISCOVERY_GUNICORN_EXTRA_CONF }}
playbooks/roles/discovery/templates/edx/app/nginx/sites-available/discovery.j2
View file @
e65b6661
...
...
@@ -3,25 +3,25 @@
#
{% if nginx_default_sites is defined and "
course_
discovery" in nginx_default_sites %}
{% if nginx_default_sites is defined and "discovery" in nginx_default_sites %}
{% set default_site = "default" %}
{% else %}
{% set default_site = "" %}
{% endif %}
upstream
course_
discovery_app_server {
{% for host in nginx_
course_
discovery_gunicorn_hosts %}
server {{ host }}:{{
course_
discovery_gunicorn_port }} fail_timeout=0;
upstream discovery_app_server {
{% for host in nginx_discovery_gunicorn_hosts %}
server {{ host }}:{{ discovery_gunicorn_port }} fail_timeout=0;
{% endfor %}
}
server {
server_name {{
COURSE_
DISCOVERY_HOSTNAME }};
server_name {{ DISCOVERY_HOSTNAME }};
{% if NGINX_ENABLE_SSL %}
listen {{
COURSE_
DISCOVERY_NGINX_PORT }} {{ default_site }};
listen {{
COURSE_
DISCOVERY_SSL_NGINX_PORT }} ssl;
listen {{ DISCOVERY_NGINX_PORT }} {{ default_site }};
listen {{ DISCOVERY_SSL_NGINX_PORT }} ssl;
ssl_certificate /etc/ssl/certs/{{ NGINX_SSL_CERTIFICATE|basename }};
ssl_certificate_key /etc/ssl/private/{{ NGINX_SSL_KEY|basename }};
...
...
@@ -29,11 +29,11 @@ server {
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
{% else %}
listen {{
COURSE_
DISCOVERY_NGINX_PORT }} {{ default_site }};
listen {{ DISCOVERY_NGINX_PORT }} {{ default_site }};
{% endif %}
location ~ ^/static/(?P<file>.*) {
root {{ COMMON_DATA_DIR }}/{{
course_
discovery_service_name }};
root {{ COMMON_DATA_DIR }}/{{ discovery_service_name }};
try_files /staticfiles/$file =404;
}
...
...
@@ -61,7 +61,7 @@ server {
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://
course_
discovery_app_server;
proxy_pass http://discovery_app_server;
}
# Forward to HTTPS if we're an HTTP request...
...
...
playbooks/roles/discovery/templates/edx/app/supervisor/conf.d.available/discovery.conf.j2
View file @
e65b6661
#
# {{ ansible_managed }}
#
[program:{{
course_
discovery_service_name }}]
[program:{{ discovery_service_name }}]
command={{
course_discovery_home }}/{{ course_
discovery_service_name }}.sh
command={{
discovery_home }}/{{
discovery_service_name }}.sh
user={{ common_web_user }}
directory={{
course_
discovery_code_dir }}
directory={{ discovery_code_dir }}
stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
killasgroup=true
...
...
playbooks/roles/edx_ansible/templates/update.j2
View file @
e65b6661
...
...
@@ -57,7 +57,7 @@ repos_to_cmd["edx-ora2"]="$edx_ansible_cmd ora2.yml -e 'ora2_version=$2'"
repos_to_cmd[
"insights"
]=
"
$edx_ansible_cmd
insights.yml -e 'INSIGHTS_VERSION=
$2
'"
repos_to_cmd[
"ecommerce"
]=
"
$edx_ansible_cmd
ecommerce.yml -e 'ECOMMERCE_VERSION=
$2
'"
repos_to_cmd[
"programs"
]=
"
$edx_ansible_cmd
programs.yml -e 'PROGRAMS_VERSION=
$2
'"
repos_to_cmd[
"
course_discovery"
]=
"
$edx_ansible_cmd
course_discovery.yml -e 'COURSE_
DISCOVERY_VERSION=
$2
'"
repos_to_cmd[
"
discovery"
]=
"
$edx_ansible_cmd
discovery.yml -e '
DISCOVERY_VERSION=
$2
'"
if
[[
-z
$1
||
-z
$2
]]
;
then
...
...
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