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
1a75f791
Commit
1a75f791
authored
Nov 17, 2016
by
Max Rothman
Committed by
GitHub
Nov 17, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3444 from edx/max/edxapp-nodeenv
OPS-1850: use nodeenv for edxapp
parents
0a0af320
7ca232dc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
33 deletions
+47
-33
playbooks/roles/common_vars/defaults/main.yml
+1
-1
playbooks/roles/edxapp/defaults/main.yml
+3
-1
playbooks/roles/edxapp/tasks/deploy.yml
+43
-31
No files found.
playbooks/roles/common_vars/defaults/main.yml
View file @
1a75f791
...
...
@@ -47,7 +47,7 @@ COMMON_ENVIRONMENT: 'default_env'
COMMON_DEPLOYMENT
:
'
default_deployment'
COMMON_PIP_VERBOSITY
:
'
'
COMMON_PYPI_MIRROR_URL
:
'
https://pypi.python.org/simple'
COMMON_NPM_MIRROR_URL
:
'
http://registry.npmjs.org'
COMMON_NPM_MIRROR_URL
:
'
http
s
://registry.npmjs.org'
COMMON_UBUNTU_APT_KEYSERVER
:
"
http://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search="
COMMON_EDX_PPA
:
"
deb
http://ppa.edx.org
{{
ansible_distribution_release
}}
main"
...
...
playbooks/roles/edxapp/defaults/main.yml
View file @
1a75f791
...
...
@@ -636,7 +636,9 @@ edxapp_log_dir: "{{ COMMON_LOG_DIR }}/edxapp"
edxapp_venvs_dir
:
"
{{
edxapp_app_dir
}}/venvs"
edxapp_venv_dir
:
"
{{
edxapp_venvs_dir
}}/edxapp"
edxapp_venv_bin
:
"
{{
edxapp_venv_dir
}}/bin"
edxapp_node_bin
:
"
{{
edxapp_code_dir
}}/node_modules/.bin"
edxapp_nodeenv_dir
:
"
{{
edxapp_app_dir
}}/nodeenvs/edxapp"
edxapp_node_bin
:
"
{{
edxapp_nodeenv_dir
}}/bin"
edxapp_node_version
:
"
0.10.37"
edxapp_user
:
edxapp
edxapp_deploy_path
:
"
{{
edxapp_venv_bin
}}:{{
edxapp_code_dir
}}/bin:{{
edxapp_node_bin
}}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
edxapp_staticfile_dir
:
"
{{
edxapp_data_dir
}}/staticfiles"
...
...
playbooks/roles/edxapp/tasks/deploy.yml
View file @
1a75f791
...
...
@@ -109,37 +109,6 @@
-
install:code
-
install:app-requirements
# Set the npm registry
# This needs to be done as root since npm is weird about
# chown - https://github.com/npm/npm/issues/3565
-
name
:
Set the npm registry
shell
:
npm config set registry '{{ COMMON_NPM_MIRROR_URL }}'
creates="{{ edxapp_app_dir }}/.npmrc"
environment
:
"
{{
edxapp_environment
}}"
tags
:
-
install
-
install:app-requirements
# Set the npm registry permissions
-
name
:
Set the npm registry permissions
file
:
path
:
"
{{
edxapp_app_dir
}}/.npmrc"
owner
:
"
{{
edxapp_user
}}"
group
:
"
{{
edxapp_user
}}"
tags
:
-
install
-
install:app-requirements
# Node play that need to be run after platform updates.
-
name
:
Install edx-platform npm dependencies
shell
:
npm install chdir={{ edxapp_code_dir }}
become_user
:
"
{{
edxapp_user
}}"
environment
:
"
{{
edxapp_environment
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
Create the virtualenv to install the Python requirements
command
:
>
virtualenv {{ edxapp_venv_dir }}
...
...
@@ -241,6 +210,49 @@
-
install
-
install:app-requirements
-
name
:
create nodeenv
shell
:
>
{{ edxapp_venv_dir }}/bin/nodeenv {{ edxapp_nodeenv_dir }} --node={{ edxapp_node_version }} --prebuilt
args
:
creates
:
"
{{
edxapp_nodeenv_dir
}}"
tags
:
-
install
-
install:app-requirements
# Set the npm registry
# This needs to be done as root since npm is weird about
# chown - https://github.com/npm/npm/issues/3565
-
name
:
Set the npm registry
shell
:
>
npm config set registry '{{ COMMON_NPM_MIRROR_URL }}'
args
:
creates
:
"
{{
edxapp_app_dir
}}/.npmrc"
environment
:
"
{{
edxapp_environment
}}"
tags
:
-
install
-
install:app-requirements
# Set the npm registry permissions
-
name
:
Set the npm registry permissions
file
:
path
:
"
{{
edxapp_app_dir
}}/.npmrc"
owner
:
"
{{
edxapp_user
}}"
group
:
"
{{
edxapp_user
}}"
tags
:
-
install
-
install:app-requirements
-
name
:
install node dependencies
npm
:
executable
:
"
{{
edxapp_node_bin
}}/npm"
path
:
"
{{
edxapp_code_dir
}}"
production
:
yes
environment
:
"
{{
edxapp_environment
}}"
become_user
:
"
{{
edxapp_user
}}"
tags
:
-
install
-
install:app-requirements
# The next few tasks set up the python code sandbox
# need to disable this profile, otherwise the pip inside the sandbox venv has no permissions
...
...
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