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
bc37a64c
Commit
bc37a64c
authored
Mar 30, 2016
by
Bilal
Committed by
Bilal
Apr 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
complete and operationalize harstorage role (OPS-1372)
parent
d8cd85c8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
75 additions
and
13 deletions
+75
-13
docker/build/harstorage/Dockerfile
+20
-0
docker/build/harstorage/ansible_overrides.yml
+3
-0
docker/plays/harstorage.yml
+8
-0
playbooks/edx-east/harstorage.yml
+1
-0
playbooks/roles/harstorage/defaults/main.yml
+3
-3
playbooks/roles/harstorage/tasks/main.yml
+40
-10
No files found.
docker/build/harstorage/Dockerfile
0 → 100644
View file @
bc37a64c
FROM
edxops/precise-common
MAINTAINER
edxops
USER
root
# Fix selinux issue with useradd on 12.04
RUN
curl http://salilab.org/~ben/libselinux1_2.1.0-5.1ubuntu1_amd64.deb
-o
/tmp/libselinux1_2.1.0-5.1ubuntu1_amd64.deb
RUN
dpkg
-i
/tmp/libselinux1_2.1.0-5.1ubuntu1_amd64.deb
RUN
apt-get update
ADD
. /edx/app/edx_ansible/edx_ansible
COPY
docker/build/xqwatcher/ansible_overrides.yml /
WORKDIR
/edx/app/edx_ansible/edx_ansible/docker/plays
RUN
/edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook harstorage.yml
\
-i
'127.0.0.1,'
-c
local
\
-t
"install:base,install:configuration,install:app-requirements,install:code"
\
-e@/ansible_overrides.yml
WORKDIR
/edx/app/harstorage/harstorage
CMD
["/edx/app/harstorage/venvs/harstorage/bin/paster", "serve", "--daemon", "/edx/app/harstorage/venvs/harstorage/edx/etc/harstorage/production.ini"]
docker/build/harstorage/ansible_overrides.yml
0 → 100644
View file @
bc37a64c
---
FLOCK_TLD
:
"
edx"
docker/plays/harstorage.yml
0 → 100644
View file @
bc37a64c
-
name
:
Deploy Harstorage
hosts
:
all
sudo
:
True
gather_facts
:
True
roles
:
-
docker
-
mongo
-
harstorage
playbooks/edx-east/harstorage.yml
View file @
bc37a64c
...
...
@@ -3,5 +3,6 @@
sudo
:
True
gather_facts
:
True
roles
:
-
aws
-
mongo
-
harstorage
playbooks/roles/harstorage/defaults/main.yml
View file @
bc37a64c
...
...
@@ -21,6 +21,7 @@ harstorage_home: '{{ COMMON_APP_DIR }}/{{ harstorage_role_name }}'
harstorage_code_dir
:
'
{{
harstorage_home
}}/{{
harstorage_role_name
}}'
harstorage_venv_dir
:
'
{{
harstorage_home
}}/venvs/{{
harstorage_role_name
}}'
harstorage_etc
:
'
edx/etc/harstorage'
harstorage_log
:
'
/edx/var/log/harstorage/harstorage.log'
# Source Code
HARSTORAGE_REPOS
:
...
...
@@ -39,13 +40,12 @@ harstorage_debian_pkgs:
-
lib32stdc++6
-
python-cairo
-
python-rsvg
-
python-setuptools
-
python-pastescript
harstorage_python_pkgs
:
-
{
name
:
"
pylons"
,
version
:
"
1.0"
}
-
{
name
:
"
webob"
,
version
:
"
0.9.8
"
}
-
{
name
:
"
webob"
,
version
:
"
1.2
"
}
-
{
name
:
"
pymongo"
,
version
:
"
2.8"
}
-
{
name
:
"
PasteScript"
,
version
:
"
1.7.5"
}
harstorage_redhat_pkgs
:
[]
harstorage_port
:
"
5000"
...
...
playbooks/roles/harstorage/tasks/main.yml
View file @
bc37a64c
...
...
@@ -25,18 +25,19 @@
apt
:
name
:
"
{{
item
}}"
state
:
present
tags
:
-
install
-
install:base
with_items
:
harstorage_debian_pkgs
-
name
:
download harstorage egg file
get_url
:
url
:
http://harstorage.googlecode.com/files/harstorage-1.0-py2.7.egg
dest
:
"
{{
harstorage_code_dir
}}/harstorage-1.0-py2.7.egg"
-
name
:
build virtualenv
command
:
"
virtualenv
{{
harstorage_venv_dir
}}"
args
:
creates
:
"
{{
harstorage_venv_dir
}}/bin/pip"
sudo_user
:
"
{{
harstorage_user
}}"
tags
:
-
install
-
install:base
-
name
:
install python packages
pip
:
...
...
@@ -44,6 +45,9 @@
virtualenv
:
"
{{
harstorage_venv_dir
}}"
state
:
present
version
:
"
{{
item.version
}}"
tags
:
-
install
-
install:app-requirements
with_items
:
harstorage_python_pkgs
-
name
:
create harstorage config directory
...
...
@@ -51,6 +55,9 @@
path
:
"
{{
harstorage_venv_dir
}}/{{
harstorage_etc
}}"
state
:
directory
mode
:
0755
tags
:
-
install
-
install:configuration
-
name
:
setup the harstorage production.ini file
template
:
...
...
@@ -59,14 +66,37 @@
owner
:
'
{{
harstorage_user
}}'
group
:
'
{{
harstorage_user
}}'
mode
:
0644
tags
:
-
install
-
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
easy_install
:
name
:
"
{{
harstorage_code_dir
}}/harstorage-1.0-py2.7.egg"
virtualenv
:
"
{{
harstorage_venv_dir
}}"
command
:
>
{{ harstorage_venv_dir }}/bin/python ./setup.py install
args
:
chdir
:
"
{{
harstorage_code_dir
}}"
tags
:
-
install
-
install:code
-
name
:
apply config
command
:
"
/usr/bin/paster
setup-app
{{
harstorage_venv_dir
}}/{{
harstorage_etc
}}/production.ini"
command
:
"
{{
harstorage_venv_dir
}}/bin/paster
setup-app
{{
harstorage_venv_dir
}}/{{
harstorage_etc
}}/production.ini"
args
:
chdir
:
"
{{
harstorage_code_dir
}}"
tags
:
-
install
-
install:configuration
-
name
:
run harstorage
command
:
"
/usr/bin/paster
serve
{{
harstorage_venv_dir
}}/{{
harstorage_etc
}}/production.ini"
command
:
"
{{
harstorage_venv_dir
}}/bin/paster
serve
--daemon
{{
harstorage_venv_dir
}}/{{
harstorage_etc
}}/production.ini
--log-file
{{
harstorage_log
}}"
args
:
creates
:
"
{{
harstorage_log
}}"
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