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
80d7fc1e
Commit
80d7fc1e
authored
Jan 23, 2017
by
Ned Batchelder
Committed by
George Song
Jan 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preview is the same port as LMS, no need for separate infrastructure
parent
8b12e8eb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1 additions
and
131 deletions
+1
-131
playbooks/edx-east/edx_jenkins_tests.yml
+0
-1
playbooks/roles/ansible_debug/tasks/main.yml
+0
-13
playbooks/roles/edxapp/defaults/main.yml
+1
-2
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms-preview.j2
+0
-113
playbooks/sample_vars/server_vars.yml
+0
-1
util/jenkins/ansible-provision.sh
+0
-1
No files found.
playbooks/edx-east/edx_jenkins_tests.yml
View file @
80d7fc1e
...
...
@@ -18,7 +18,6 @@
nginx_sites
:
-
lms
-
cms
-
lms-preview
-
xqueue
-
xserver
nginx_default_sites
:
...
...
playbooks/roles/ansible_debug/tasks/main.yml
View file @
80d7fc1e
...
...
@@ -21,19 +21,6 @@
-
dumpall
-
debug
-
name
:
Dump lms-preview auth|env file
template
:
src
:
"
../../edxapp/templates/lms-preview.{{
item
}}.json.j2"
dest
:
"
/tmp/lms-preview.{{
item
}}.json"
mode
:
0600
with_items
:
-
env
-
auth
when
:
"
'lms-preview'
in
service_variants_enabled"
tags
:
-
dumpall
-
debug
-
name
:
Dump cms auth|env file
template
:
src
:
"
../../edxapp/templates/cms.{{
item
}}.json.j2"
...
...
playbooks/roles/edxapp/defaults/main.yml
View file @
80d7fc1e
...
...
@@ -24,7 +24,7 @@ EDXAPP_DJFS:
url_root
:
'
/static/django-pyfs'
EDXAPP_LMS_BASE
:
"
{{
EDXAPP_LMS_SITE_NAME
}}:{{
EDXAPP_LMS_NGINX_PORT
}}"
EDXAPP_PREVIEW_LMS_BASE
:
"
preview.{{
EDXAPP_LMS_SITE_NAME
}}:{{
EDXAPP_LMS_
PREVIEW_
NGINX_PORT
}}"
EDXAPP_PREVIEW_LMS_BASE
:
"
preview.{{
EDXAPP_LMS_SITE_NAME
}}:{{
EDXAPP_LMS_NGINX_PORT
}}"
EDXAPP_CMS_BASE
:
"
{{
EDXAPP_CMS_SITE_NAME
}}:{{
EDXAPP_CMS_NGINX_PORT
}}"
EDXAPP_LMS_GUNICORN_EXTRA
:
"
"
...
...
@@ -267,7 +267,6 @@ EDXAPP_RABBIT_HOSTNAME: 'localhost'
EDXAPP_LMS_NGINX_PORT
:
18000
EDXAPP_LMS_SSL_NGINX_PORT
:
48000
EDXAPP_LMS_PREVIEW_NGINX_PORT
:
18020
EDXAPP_CMS_NGINX_PORT
:
18010
EDXAPP_CMS_SSL_NGINX_PORT
:
48010
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms-preview.j2
deleted
100644 → 0
View file @
8b12e8eb
upstream lms-preview-backend {
{% for host in nginx_lms_preview_gunicorn_hosts %}
server {{ host }}:{{ edxapp_lms_preview_gunicorn_port }} fail_timeout=0;
{% endfor %}
}
server {
# LMS-preview configuration file for nginx, templated by ansible
listen {{ EDXAPP_LMS_PREVIEW_NGINX_PORT }};
server_name preview.*;
# CS184 requires uploads of up to 4MB for submitting screenshots.
# CMS requires larger value for course assest, values provided
# via hiera.
client_max_body_size 4M;
# request the browser to use SSL for all connections
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
rewrite ^(.*)/favicon.ico$ /static/images/favicon.ico last;
{% include "python_lib.zip.j2" %}
{% include "common-settings.j2" %}
location @proxy_to_lms-preview_app {
{% if NGINX_SET_X_FORWARDED_HEADERS %}
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $remote_addr;
{% else %}
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;
{% endif %}
# newrelic-specific header records the time when nginx handles a request.
proxy_set_header X-Queue-Start "t=${msec}";
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://lms-preview-backend;
}
location / {
{% if EDXAPP_LMS_PREVIEW_ENABLE_BASIC_AUTH|bool %}
{% include "basic-auth.j2" %}
{% endif %}
try_files $uri @proxy_to_lms-preview_app;
}
# No basic auth security on the github_service_hook url, so that github can use it for cms
location /github_service_hook {
try_files $uri @proxy_to_lms-preview_app;
}
# No basic auth security on the heartbeat url, so that ELB can use it
location /heartbeat {
try_files $uri @proxy_to_lms-preview_app;
}
{% include "robots.j2" %}
# Check security on this
location ~ ^/static/(?P<file>.*) {
root {{ edxapp_data_dir}};
try_files /staticfiles/$file /course_static/$file =404;
# return a 403 for static files that shouldn't be
# in the staticfiles directory
location ~ ^/static/(?:.*)(?:\.xml|\.json|README.TXT) {
return 403;
}
# Set django-pipelined files to maximum cache time
location ~ "/static/(?P<collected>.*\.[0-9a-f]{12}\..*)" {
expires max;
# Without this try_files, files that have been run through
# django-pipeline return 404s
try_files /staticfiles/$collected /course_static/$collected =404;
}
# Expire other static files immediately (there should be very few / none of these)
expires epoch;
}
# Nginx does not support nested condition or or conditions so
# there is an unfortunate mix of conditonals here.
{% if NGINX_REDIRECT_TO_HTTPS %}
{% if NGINX_HTTPS_REDIRECT_STRATEGY == "scheme" %}
# Redirect http to https over single instance
if ($scheme != "https")
{
set $do_redirect_to_https "true";
}
{% elif NGINX_HTTPS_REDIRECT_STRATEGY == "forward_for_proto" %}
# Forward to HTTPS if we're an HTTP request... and the server is behind ELB
if ($http_x_forwarded_proto = "http")
{
set $do_redirect_to_https "true";
}
{% endif %}
# Execute the actual redirect
if ($do_redirect_to_https = "true")
{
return 301 https://$host$request_uri;
}
{% endif %}
}
playbooks/sample_vars/server_vars.yml
View file @
80d7fc1e
...
...
@@ -69,7 +69,6 @@
#EDXAPP_LMS_SSL_NGINX_PORT: 443
#EDXAPP_CMS_SSL_NGINX_PORT: 443
#EDXAPP_LMS_NGINX_PORT: 80
#EDXAPP_LMS_PREVIEW_NGINX_PORT: 80
#EDXAPP_CMS_NGINX_PORT: 80
#EDXAPP_WORKERS:
# lms: 2
...
...
util/jenkins/ansible-provision.sh
View file @
80d7fc1e
...
...
@@ -187,7 +187,6 @@ EDXAPP_COMPREHENSIVE_THEME_DIRS: $edxapp_comprehensive_theme_dirs
EDXAPP_STATIC_URL_BASE:
$static_url_base
EDXAPP_LMS_NGINX_PORT: 80
EDXAPP_LMS_PREVIEW_NGINX_PORT: 80
EDXAPP_CMS_NGINX_PORT: 80
ECOMMERCE_NGINX_PORT: 80
...
...
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