Commit 82efba13 by Bilal Committed by Bilal

complete and operationalize harstorage role (OPS-1372)

parent 2ba54d9b
- name: Deploy Harstorage
hosts: all
sudo: True
gather_facts: True
roles:
- mongo
- harstorage
......@@ -18,12 +18,11 @@ harstorage_role_name: harstorage
harstorage_user: '{{ harstorage_role_name }}'
harstorage_home: '{{ COMMON_APP_DIR }}/{{ harstorage_role_name }}'
harstorage_home: '{{ COMMON_CFG_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'
# Source Code
harstorage_code_dir:
HARSTORAGE_REPOS:
- PROTOCOL: https
DOMAIN: github.com
......@@ -36,6 +35,17 @@ HARSTORAGE_REPOS:
# OS packages
#
harstorage_debian_pkgs: []
harstorage_debian_pkgs:
- lib32stdc++6
- python
- python-cairo
- python-rsvg
- python-setuptools
- python-pastescript
harstorage_python_pkgs:
- { name: "pylons", version: "1.0"}
- { name: "webob", version: "0.9.8"}
- { name: "pymongo", version: "2.8"}
harstorage_redhat_pkgs: []
......@@ -21,13 +21,50 @@
#
#
- name: install debian dependecies
apt:
name: "{{ item }}"
state: present
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 }}"
- name: install python packages
pip:
name: "{{ item.name }}"
state: present
version: "{{ item.version }}"
with_items: harstorage_python_pkgs
- name: create harstorage directory
file:
path: "/{{ harstorage_etc }}"
state: directory
mode: 0755
- name: setup the harstorage production.ini file
template:
src: './{{ harstorage_etc }}/production.ini.j2'
dest: '{{ harstorage_etc }}/production.ini'
dest: '/{{ harstorage_etc }}/production.ini'
owner: '{{ harstorage_user }}'
group: '{{ harstorage_user }}'
mode: 0644
- name: install harstorage
easy_install:
name: "{{ harstorage_code_dir }}/harstorage-1.0-py2.7.egg"
- name: apply config
command: "/usr/bin/paster setup-app /{{ harstorage_etc }}/production.ini"
- name: run harstorage
command: "/usr/bin/paster serve /{{ harstorage_etc }}/production.ini"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment