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
031004ee
Commit
031004ee
authored
Apr 01, 2016
by
Bilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added supervisor handling
parent
bc37a64c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
27 deletions
+55
-27
playbooks/roles/harstorage/defaults/main.yml
+6
-9
playbooks/roles/harstorage/tasks/main.yml
+31
-17
playbooks/roles/harstorage/templates/edx/app/harstorage/harstorage.sh.j2
+5
-0
playbooks/roles/harstorage/templates/edx/app/supervisor/conf.d.available/harstorage.conf.j2
+12
-0
playbooks/roles/harstorage/templates/edx/etc/harstorage/production.ini.j2
+1
-1
No files found.
playbooks/roles/harstorage/defaults/main.yml
View file @
031004ee
...
@@ -20,16 +20,15 @@ harstorage_user: '{{ harstorage_role_name }}'
...
@@ -20,16 +20,15 @@ harstorage_user: '{{ harstorage_role_name }}'
harstorage_home
:
'
{{
COMMON_APP_DIR
}}/{{
harstorage_role_name
}}'
harstorage_home
:
'
{{
COMMON_APP_DIR
}}/{{
harstorage_role_name
}}'
harstorage_code_dir
:
'
{{
harstorage_home
}}/{{
harstorage_role_name
}}'
harstorage_code_dir
:
'
{{
harstorage_home
}}/{{
harstorage_role_name
}}'
harstorage_venv_dir
:
'
{{
harstorage_home
}}/venvs/{{
harstorage_role_name
}}'
harstorage_venv_dir
:
'
{{
harstorage_home
}}/venvs/{{
harstorage_role_name
}}'
harstorage_etc
:
'
edx/etc/harstorage'
harstorage_etc
:
'
/edx/etc/harstorage'
harstorage_log
:
'
/edx/var/log/harstorage/harstorage.log'
# Source Code
# Source Code
HARSTORAGE_REPOS
:
HARSTORAGE_REPOS
:
-
PROTOCOL
:
https
-
PROTOCOL
:
https
DOMAIN
:
github.com
DOMAIN
:
github.com
PATH
:
pavel-paulau
PATH
:
edx
REPO
:
harstorage
REPO
:
harstorage
VERSION
:
master
VERSION
:
e0d/update-requirements
DESTINATION
:
'
{{
harstorage_code_dir
}}'
DESTINATION
:
'
{{
harstorage_code_dir
}}'
#
#
...
@@ -38,13 +37,11 @@ HARSTORAGE_REPOS:
...
@@ -38,13 +37,11 @@ HARSTORAGE_REPOS:
harstorage_debian_pkgs
:
harstorage_debian_pkgs
:
-
lib32stdc++6
-
lib32stdc++6
-
python-cairo
-
python-rsvg
harstorage_python_pkgs
:
harstorage_python_pkgs
:
-
{
name
:
"
pylons"
,
version
:
"
1.0"
}
-
{
name
:
"
pylons"
,
version
:
"
1.0
.2
"
}
-
{
name
:
"
webob"
,
version
:
"
1.
2
"
}
-
{
name
:
"
webob"
,
version
:
"
1.
5.1
"
}
-
{
name
:
"
pymongo"
,
version
:
"
2.8
"
}
-
{
name
:
"
pymongo"
,
version
:
"
3.2.1
"
}
-
{
name
:
"
PasteScript"
,
version
:
"
1.7.5"
}
-
{
name
:
"
PasteScript"
,
version
:
"
1.7.5"
}
harstorage_redhat_pkgs
:
[]
harstorage_redhat_pkgs
:
[]
...
...
playbooks/roles/harstorage/tasks/main.yml
View file @
031004ee
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
-
name
:
create harstorage config directory
-
name
:
create harstorage config directory
file
:
file
:
path
:
"
{{
harstorage_
venv_dir
}}/{{
harstorage_
etc
}}"
path
:
"
{{
harstorage_etc
}}"
state
:
directory
state
:
directory
mode
:
0755
mode
:
0755
tags
:
tags
:
...
@@ -61,8 +61,8 @@
...
@@ -61,8 +61,8 @@
-
name
:
setup the harstorage production.ini file
-
name
:
setup the harstorage production.ini file
template
:
template
:
src
:
'
.
/
{{
harstorage_etc
}}/production.ini.j2'
src
:
'
.{{
harstorage_etc
}}/production.ini.j2'
dest
:
'
{{
harstorage_
venv_dir
}}/{{
harstorage_
etc
}}/production.ini'
dest
:
'
{{
harstorage_etc
}}/production.ini'
owner
:
'
{{
harstorage_user
}}'
owner
:
'
{{
harstorage_user
}}'
group
:
'
{{
harstorage_user
}}'
group
:
'
{{
harstorage_user
}}'
mode
:
0644
mode
:
0644
...
@@ -70,15 +70,6 @@
...
@@ -70,15 +70,6 @@
-
install
-
install
-
install:configuration
-
install:configuration
-
name
:
clone harstorage
git
:
>
repo=https://github.com/edx/harstorage.git
dest={{ harstorage_code_dir }}
sudo_user
:
"
{{
harstorage_user
}}"
tags
:
-
install
-
install:code
-
name
:
install harstorage
-
name
:
install harstorage
command
:
>
command
:
>
{{ harstorage_venv_dir }}/bin/python ./setup.py install
{{ harstorage_venv_dir }}/bin/python ./setup.py install
...
@@ -89,14 +80,37 @@
...
@@ -89,14 +80,37 @@
-
install:code
-
install:code
-
name
:
apply config
-
name
:
apply config
command
:
"
{{
harstorage_venv_dir
}}/bin/paster
setup-app
{{
harstorage_
venv_dir
}}/{{
harstorage_
etc
}}/production.ini"
command
:
"
{{
harstorage_venv_dir
}}/bin/paster
setup-app
{{
harstorage_etc
}}/production.ini"
args
:
args
:
chdir
:
"
{{
harstorage_code_dir
}}"
chdir
:
"
{{
harstorage_code_dir
}}"
tags
:
tags
:
-
install
-
install
-
install:configuration
-
install:configuration
-
name
:
run harstorage
-
name
:
write supervisor wrapper script
command
:
"
{{
harstorage_venv_dir
}}/bin/paster
serve
--daemon
{{
harstorage_venv_dir
}}/{{
harstorage_etc
}}/production.ini
--log-file
{{
harstorage_log
}}"
template
:
args
:
src
:
edx/app/harstorage/harstorage.sh.j2
creates
:
"
{{
harstorage_log
}}"
dest
:
"
{{
harstorage_home
}}/{{
harstorage_role_name
}}.sh"
mode
:
0650
owner
:
"
{{
supervisor_user
}}"
group
:
"
{{
common_web_user
}}"
-
name
:
write supervisord config
template
:
src
:
edx/app/supervisor/conf.d.available/harstorage.conf.j2
dest
:
"
{{
supervisor_available_dir
}}/{{
harstorage_role_name
}}.conf"
owner
:
"
{{
supervisor_user
}}"
group
:
"
{{
common_web_user
}}"
mode
:
0644
-
name
:
enable supervisor script
file
:
src
:
"
{{
supervisor_available_dir
}}/{{
harstorage_role_name
}}.conf"
dest
:
"
{{
supervisor_cfg_dir
}}/{{
harstorage_role_name
}}.conf"
state
:
link
force
:
yes
when
:
not disable_edx_services
-
name
:
update supervisor configuration
shell
:
"
{{
supervisor_ctl
}}
-c
{{
supervisor_cfg
}}
update"
when
:
not disable_edx_services
playbooks/roles/harstorage/templates/edx/app/harstorage/harstorage.sh.j2
0 → 100644
View file @
031004ee
#!/usr/bin/env bash
# {{ ansible_managed }}
{{
harstorage_venv_dir
}}
/bin/paster serve
{{
harstorage_etc
}}
/production.ini
playbooks/roles/harstorage/templates/edx/app/supervisor/conf.d.available/harstorage.conf.j2
0 → 100644
View file @
031004ee
#
# {{ ansible_managed }}
#
[program:{{ harstorage_role_name }}]
command={{ harstorage_home }}/{{ harstorage_role_name }}.sh
user={{ common_web_user }}
directory={{ harstorage_code_dir }}
stdout_logfile={{ supervisor_log_dir }}/%(program_name)s-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)s-stderr.log
killasgroup=true
stopasgroup=true
playbooks/roles/harstorage/templates/edx/etc/harstorage/production.ini.j2
View file @
031004ee
...
@@ -15,7 +15,7 @@ port = {{ harstorage_port }}
...
@@ -15,7 +15,7 @@ port = {{ harstorage_port }}
use = egg:harstorage
use = egg:harstorage
full_stack = true
full_stack = true
static_files = true
static_files = true
temp_store =
%(here)s/data
temp_store =
{{ COMMON_DATA_DIR }}/{{ harstorage_user }}
bin_store = %(here)s
bin_store = %(here)s
ps_enabled = true
ps_enabled = true
static_version = {{ harstorage_version }}
static_version = {{ harstorage_version }}
...
...
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