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
7a625110
Commit
7a625110
authored
May 13, 2016
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3017 from edx/clintonb/docker-devstack-fix
Starting supervisor+nginx when running Docker
parents
820c41c0
a24ec741
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
23 deletions
+26
-23
docker/build/credentials/ansible_overrides.yml
+1
-0
docker/build/discovery/ansible_overrides.yml
+1
-0
playbooks/roles/ansible-role-django-ida/templates/templates/edx/app/ROLE_NAME/devstack.sh.j2
+8
-7
playbooks/roles/credentials/templates/edx/app/credentials/devstack.sh.j2
+7
-6
playbooks/roles/discovery/templates/edx/app/discovery/devstack.sh.j2
+8
-9
playbooks/roles/supervisor/tasks/main.yml
+1
-1
No files found.
docker/build/credentials/ansible_overrides.yml
View file @
7a625110
...
...
@@ -2,6 +2,7 @@
credentials_gunicorn_host
:
0.0.0.0
CREDENTIALS_MYSQL
:
'
db'
CREDENTIALS_DJANGO_SETTINGS_MODULE
:
'
credentials.settings.devstack'
CREDENTIALS_GUNICORN_EXTRA
:
'
--reload'
CREDENTIALS_MYSQL_MATCHER
:
'
%'
CREDENTIALS_MYSQL_HOST
:
'
db'
CREDENTIALS_MYSQL_PASSWORD
:
'
password'
...
...
docker/build/discovery/ansible_overrides.yml
View file @
7a625110
...
...
@@ -3,5 +3,6 @@ discovery_gunicorn_host: 0.0.0.0
DISCOVERY_MYSQL
:
'
db'
DISCOVERY_DJANGO_SETTINGS_MODULE
:
'
course_discovery.settings.devstack'
DISCOVERY_ELASTICSEARCH_HOST
:
'
es'
DISCOVERY_GUNICORN_EXTRA
:
'
--reload'
COMMON_MYSQL_MIGRATE_USER
:
'
{{
DISCOVERY_MYSQL_USER
}}'
COMMON_MYSQL_MIGRATE_PASS
:
'
{{
DISCOVERY_MYSQL_PASSWORD
}}'
playbooks/roles/ansible-role-django-ida/templates/templates/edx/app/ROLE_NAME/devstack.sh.j2
View file @
7a625110
...
...
@@ -10,17 +10,18 @@ case $COMMAND in
{{
'{%'
}}
set
{{
role_name
}}
_venv_bin
=
{{
role_name
}}
_home +
"/venvs/"
+
{{
role_name
}}
_service_name +
"/bin"
%
}
{{
'{%'
}}
set
executable
=
{{
role_name
}}
_venv_bin +
'/gunicorn'
%
}
{{
'{{'
}}
supervisor_venv_bin
}}
/supervisord
--configuration
{{
'{%'
}}
supervisor_cfg
}}
cd
/edx/app/edx_ansible/edx_ansible/docker/plays
sudo
/edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook
{{
role_name
}}
.yml
-c
local
-i
'127.0.0.1,'
\
-t
'install:app-requirements,assets:gather,devstack,migrate'
\
/edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook
{{
role_name
}}
.yml
-c
local
-i
'127.0.0.1,'
\
-t
'install:app-requirements,assets:gather,devstack,migrate
,manage:start
'
\
--extra-vars
=
"migrate_db=yes"
\
--extra-vars
=
"@/ansible_overrides.yml"
{{
'{{'
}}
executable
}}
-c
{{
'{{'
}}
{{
role_name
}}
_home
}}
/
{{
role_name
}}
_gunicorn.py
\
{{
'{{'
}}
{{
role_name|upper
}}
_GUNICORN_EXTRA
}}
\
--reload
\
{{
role_name
}}
.wsgi:application
# Docker requires an active foreground task. Tail the logs to appease Docker and
# provide useful output for development.
cd
{{
'{{'
}}
supervisor_log_dir
}}
tail
-f
{{
'{{'
}}
{{
role_name
}}
_service_name
}}
-stderr
.log
-f
{{
'{{'
}}
{{
role_name
}}
_service_name
}}
-stdout
.log
;;
open
)
cd
{{
'{{'
}}
{{
role_name
}}
_code_dir
}}
/
...
...
playbooks/roles/credentials/templates/edx/app/credentials/devstack.sh.j2
View file @
7a625110
...
...
@@ -8,18 +8,19 @@ COMMAND=$1
case
$COMMAND
in
start
)
{
%
set
credentials_venv_bin
=
credentials_home +
"/venvs/"
+ credentials_service_name +
"/bin"
%
}
{
%
set
executable
=
credentials_venv_bin +
'/gunicorn'
%
}
{{
supervisor_venv_bin
}}
/supervisord
--configuration
{{
supervisor_cfg
}}
cd
/edx/app/edx_ansible/edx_ansible/docker/plays
sudo
/edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook credentials.yml
-c
local
-i
'127.0.0.1,'
\
/edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook credentials.yml
-c
local
-i
'127.0.0.1,'
\
-t
'install:app-requirements,assets:gather,devstack,migrate,manage:start'
\
--extra-vars
=
"migrate_db=yes"
\
--extra-vars
=
"@/ansible_overrides.yml"
{{
executable
}}
-c
{{
credentials_home
}}
/credentials_gunicorn.py
\
{{
CREDENTIALS_GUNICORN_EXTRA
}}
\
--reload
\
credentials.wsgi:application
# Docker requires an active foreground task. Tail the logs to appease Docker and
# provide useful output for development.
cd
{{
supervisor_log_dir
}}
tail
-f
{{
credentials_service_name
}}
-stderr
.log
-f
{{
credentials_service_name
}}
-stdout
.log
;;
open
)
...
...
playbooks/roles/discovery/templates/edx/app/discovery/devstack.sh.j2
View file @
7a625110
...
...
@@ -8,20 +8,19 @@ COMMAND=$1
case
$COMMAND
in
start
)
{
%
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
{{
supervisor_venv_bin
}}
/supervisord
--configuration
{{
supervisor_cfg
}}
sudo
ansible-playbook discovery.yml
-c
local
-i
'127.0.0.1,'
\
-t
'install:app-requirements,assets:gather,devstack,migrate'
\
cd
/edx/app/edx_ansible/edx_ansible/docker/plays
ansible-playbook discovery.yml
-c
local
-i
'127.0.0.1,'
\
-t
'install:app-requirements,assets:gather,devstack,migrate,manage:start'
\
--extra-vars
=
"migrate_db=yes"
\
--extra-vars
=
"@/ansible_overrides.yml"
{{
executable
}}
-c
{{
discovery_home
}}
/discovery_gunicorn.py
\
{{
DISCOVERY_GUNICORN_EXTRA
}}
\
--reload
\
course_discovery.wsgi:application
# Docker requires an active foreground task. Tail the logs to appease Docker and
# provide useful output for development.
cd
{{
supervisor_log_dir
}}
tail
-f
{{
discovery_service_name
}}
-stderr
.log
-f
{{
discovery_service_name
}}
-stdout
.log
;;
open
)
cd
{{
discovery_code_dir
}}
...
...
playbooks/roles/supervisor/tasks/main.yml
View file @
7a625110
...
...
@@ -215,7 +215,7 @@
register
:
start_supervisor
tags
:
-
manage
-
manage
r
:start
-
manage:start
# calling update on supervisor too soon after it
# starts will result in an errror.
...
...
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