Created
April 20, 2016 19:43
-
-
Save brantlk/e9ce45d6b709774ae8ac445437325608 to your computer and use it in GitHub Desktop.
Ansible script for keystone development setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is based on https://review.openstack.org/#/c/264398/ | |
# virtualenv 15.0.0.1 is downloaded from source and used to create a venv | |
# to install tox and stuff into rather than installing globally. | |
- name: Setup keystone development system | |
hosts: keystone-dev | |
tasks: | |
- name: Extract virtualenv application | |
unarchive: | |
src: https://pypi.python.org/packages/source/v/virtualenv/virtualenv-15.0.1.tar.gz | |
copy: no | |
creates: virtualenv-15.0.1/virtualenv.py | |
dest: '~' | |
- name: Install bindep | |
pip: | |
name: bindep | |
virtualenv: ~/workspace | |
virtualenv_command: ~/virtualenv-15.0.1/virtualenv.py | |
- name: Get keystone | |
git: | |
repo: https://git.openstack.org/openstack/keystone | |
dest: workspace/keystone | |
update: no | |
# Packages needed for keystone dev. | |
# Should be able to use bindep instead of apt and make this common. | |
# See http://docs.openstack.org/developer/keystone/devref/development.environment.html | |
- name: Install python-dev | |
become: true | |
apt: name=python-dev | |
- name: Install python3-dev | |
become: true | |
apt: name=python3-dev | |
- name: Install libxml2-dev | |
become: true | |
apt: name=libxml2-dev | |
- name: Install libxslt1-dev | |
become: true | |
apt: name=libxslt1-dev | |
- name: Install libsasl2-dev | |
become: true | |
apt: name=libsasl2-dev | |
- name: Install libsqlite3-dev | |
become: true | |
apt: name=libsqlite3-dev | |
- name: Install libssl-dev | |
become: true | |
apt: name=libssl-dev | |
- name: Install libldap2-dev | |
become: true | |
apt: name=libldap2-dev | |
- name: Install libffi-dev | |
become: true | |
apt: name=libffi-dev | |
- name: Install libpq-dev | |
become: true | |
apt: name=libpq-dev | |
- name: Install gettext | |
become: true | |
apt: name=gettext | |
- name: Install python-gdbm | |
become: true | |
apt: name=python-gdbm | |
- name: Install tox | |
pip: | |
name: tox | |
virtualenv: ~/workspace | |
virtualenv_command: ~/virtualenv-15.0.1/virtualenv.py | |
- name: Run tests | |
command: ~/workspace/bin/tox | |
args: | |
chdir: workspace/keystone | |
creates: workspace/keystone/.testrepository |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment