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
3c0e2bed
Commit
3c0e2bed
authored
Jul 20, 2016
by
Bill DeRusha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add node dependencies to discovery role
parent
ef9d734e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
11 deletions
+54
-11
playbooks/roles/discovery/defaults/main.yml
+9
-2
playbooks/roles/discovery/tasks/main.yml
+45
-9
No files found.
playbooks/roles/discovery/defaults/main.yml
View file @
3c0e2bed
...
...
@@ -65,7 +65,7 @@ DISCOVERY_JWT_AUDIENCE: '{{ EDXAPP_JWT_AUDIENCE | default("SET-ME-PLEASE") }}'
DISCOVERY_JWT_ISSUER
:
'
{{
DISCOVERY_OAUTH_URL_ROOT
}}'
DISCOVERY_JWT_SECRET_KEY
:
'
{{
EDXAPP_JWT_SECRET_KEY
|
default("lms-secret")
}}'
DISCOVERY_JWT_AUTH
:
DISCOVERY_JWT_AUTH
:
JWT_ISSUERS
:
-
AUDIENCE
:
'
{{
DISCOVERY_JWT_AUDIENCE
}}'
ISSUER
:
'
{{
DISCOVERY_JWT_ISSUER
}}'
...
...
@@ -156,7 +156,8 @@ discovery_environment:
DJANGO_SETTINGS_MODULE
:
"
{{
DISCOVERY_DJANGO_SETTINGS_MODULE
}}"
# rename should synch with app
COURSE_DISCOVERY_CFG
:
"
{{
COMMON_CFG_DIR
}}/{{
discovery_service_name
}}.yml"
PATH
:
"
{{
discovery_venv_dir
}}/bin:{{
ansible_env.PATH
}}"
PATH
:
"
{{
discovery_nodeenv_bin
}}:{{
discovery_venv_dir
}}/bin:{{
ansible_env.PATH
}}"
discovery_migration_environment
:
DJANGO_SETTINGS_MODULE
:
"
{{
DISCOVERY_DJANGO_SETTINGS_MODULE
}}"
...
...
@@ -171,6 +172,12 @@ discovery_user: "{{ discovery_service_name }}"
discovery_home
:
"
{{
COMMON_APP_DIR
}}/{{
discovery_service_name
}}"
discovery_code_dir
:
"
{{
discovery_home
}}/{{
discovery_service_name
}}"
discovery_nodeenv_dir
:
"
{{
discovery_home
}}/nodeenvs/{{
discovery_service_name
}}"
discovery_nodeenv_bin
:
"
{{
discovery_nodeenv_dir
}}/bin"
discovery_node_modules_dir
:
"
{{
discovery_code_dir
}}/node_modules"
discovery_node_bin
:
"
{{
discovery_node_modules_dir
}}/.bin"
discovery_node_version
:
"
4.4.7"
discovery_gunicorn_host
:
"
127.0.0.1"
discovery_gunicorn_port
:
8381
discovery_gunicorn_timeout
:
300
...
...
playbooks/roles/discovery/tasks/main.yml
View file @
3c0e2bed
...
...
@@ -10,13 +10,13 @@
#
#
# Tasks for role discovery
#
#
# Overview:
#
#
#
# Dependencies:
#
#
#
# Example play:
#
#
...
...
@@ -38,7 +38,7 @@
-
install:system-requirements
-
name
:
install python3.5
apt
:
apt
:
name
:
"
{{
item
}}"
with_items
:
-
python3.5
...
...
@@ -76,6 +76,42 @@
-
devstack
-
devstack:install
-
name
:
create nodeenv
shell
:
>
creates={{ discovery_nodeenv_dir }}
{{ discovery_venv_dir }}/bin/nodeenv {{ discovery_nodeenv_dir }} --node={{ discovery_node_version }} --prebuilt
become_user
:
"
{{
discovery_user
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
install node dependencies
npm
:
executable={{ discovery_nodeenv_bin }}/npm path={{ discovery_code_dir }} production=yes
become_user
:
"
{{
discovery_user
}}"
environment
:
"
{{
discovery_environment
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
install bower dependencies
shell
:
>
chdir={{ discovery_code_dir }}
. {{ discovery_nodeenv_bin }}/activate && {{ discovery_node_bin }}/bower install --production --config.interactive=false
become_user
:
"
{{
discovery_user
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
install js requirements
command
:
make requirement.js
args
:
chdir
:
"
{{
discovery_code_dir
}}"
become_user
:
"
{{
discovery_user
}}"
environment
:
"
{{
discovery_environment
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
migrate database
command
:
make migrate
args
:
...
...
@@ -172,7 +208,7 @@
tags
:
-
install
-
install:app-requirements
-
name
:
run collectstatic
command
:
make static
args
:
...
...
@@ -184,7 +220,7 @@
-
assets:gather
-
name
:
restart the application
supervisorctl
:
supervisorctl
:
state
:
restarted
supervisorctl_path
:
"
{{
supervisor_ctl
}}"
config
:
"
{{
supervisor_cfg
}}"
...
...
@@ -199,7 +235,7 @@
template
:
src
:
"
edx/app/nginx/sites-available/discovery.j2"
dest
:
"
{{
nginx_sites_available_dir
}}/discovery"
owner
:
root
owner
:
root
group
:
"
{{
common_web_user
}}"
mode
:
0640
notify
:
reload nginx
...
...
@@ -211,8 +247,8 @@
file
:
src
:
"
{{
nginx_sites_available_dir
}}/discovery"
dest
:
"
{{
nginx_sites_enabled_dir
}}/discovery"
state
:
link
owner
:
root
state
:
link
owner
:
root
group
:
root
notify
:
reload nginx
tags
:
...
...
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