Commit 5328695a by stu

wip - custom sqlite installation

parent ec0ef0b6
......@@ -25,3 +25,4 @@
- browsers
- browsermob-proxy
- jenkins_worker
- sqlite
---
# Dependencies for building pysqlite
sqlite_apt_pkgs:
- libsqlite3-dev
- python-dev
sqlite_version: "2.8.3"
sqlite_autoconf_version: "3140100"
---
# Install a custom version of the Python Sqlite library
# This is an effort to fix sporadically occurring seg faults caused by the
# default python sqlite version (see: https://code.djangoproject.com/ticket/24080)
# Variables for install on a Jenkins worker
- include_vars: ../vars/jenkins_worker.yml
when: platform_worker is defined
# Variables for installing on a devstack
- include_vars: ../vars/devstack.yml
when: devstack_sqlite is defined
- name: Install dependency libraries for sqlite
apt:
name: "{{ item }}"
install_recommends: yes
state: present
with_items: sqlite_apt_pkgs
- name: Download sqlite source tarball
get_url:
url: "https://github.com/ghaering/pysqlite/archive/{{ sqlite_version }}.tar.gz"
dest: "/tmp/sqlite-{{ sqlite_version }}.tar.gz"
- name: Download sqlite configuration
get_url:
url: "https://www.sqlite.org/2016/sqlite-autoconf-{{ sqlite_autoconf_version }}.tar.gz"
dest: "/tmp/sqlite-autoconf-{{ sqlite_autoconf_version }}.tar.gz"
- name: Verify checksum of sqlite configuration
shell: "sha1sum /tmp/sqlite-autoconf-{{ sqlite_autoconf_version }}.tar.gz"
register: autoconf_download_checksum
- name: Unarchive sqlite source
unarchive:
copy: no
src: "/tmp/sqlite-{{ sqlite_version }}.tar.gz"
dest: /tmp
creates: "pysqlite-{{ sqlite_version }}"
owner: "{{ sqlite_user }}"
group: "{{ sqlite_user }}"
- name: Unarchive sqlite configuration
unarchive:
copy: no
src: /tmp/sqlite-autoconf-3140100.tar.gz
dest: /tmp
creates: "sqlite-autoconf-{{ sqlite_autoconf_version }}"
owner: "{{ sqlite_user }}"
group: "{{ sqlite_user }}"
- name: Copy sqlite configuration into sqlite source
command: "/bin/cp -av /tmp/sqlite-autoconf-{{ sqlite_autoconf_version }}/. /tmp/pysqlite-{{ sqlite_version }}/"
- name: run command
command: chdir=/tmp/pysqlite-{{ sqlite_version }} {{ sqlite_venv_dir }}/bin/python setup.py build_static install
become_user: "{{ sqlite_user }}"
- name: Verify that correct version of sqlite is installed
shell: "{{ sqlite_venv_dir }}/bin/pip freeze"
register: pip_sqlite_version
- assert:
that:
- "'{{ sqlite_version }}' in pip_sqlite_version.stdout"
---
# User variables specific to installing the sqlite python library on devstacks
sqlite_user: dummy
sqlite_venv_dir: /home/dummy/edx-venv/
---
# User variables specific to installing the sqlite python library on Jenkins
# workers
sqlite_user: jenkins
sqlite_venv_dir: /home/jenkins/edx-venv/
......@@ -23,6 +23,7 @@
- mongo
- { role: 'rabbitmq', rabbitmq_ip: '127.0.0.1' }
- edxapp
- { role: 'sqlite', devstack_sql: True }
- oraclejdk
- elasticsearch
- forum
......
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