mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Makefile updates, updated requirement packages, added requirements files for both local and PyPI installations.
This commit is contained in:
81
Makefile
81
Makefile
@@ -2,81 +2,94 @@ PYTHON=python
|
|||||||
SITELIB=$(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
|
SITELIB=$(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
|
||||||
RELEASE=ansibleworks-1.2b2
|
RELEASE=ansibleworks-1.2b2
|
||||||
|
|
||||||
|
.PHONY: clean rebase push setup requirements requirements_pypi develop refresh \
|
||||||
|
adduser syncdb migrate dbchange dbshell runserver celeryd test \
|
||||||
|
test_coverage coverage_html dev_build release_build release_ball \
|
||||||
|
release_clean sdist rpm
|
||||||
|
|
||||||
|
# Remove temporary build files, compiled Python files.
|
||||||
clean:
|
clean:
|
||||||
rm -rf build rpm-build *.egg-info
|
rm -rf build rpm-build *.egg-info
|
||||||
find . -type f -regex ".*\.py[co]$$" -delete
|
find . -type f -regex ".*\.py[co]$$" -delete
|
||||||
|
|
||||||
|
# Fetch from origin, rebase local commits on top of origin commits.
|
||||||
rebase:
|
rebase:
|
||||||
git pull --rebase origin master
|
git pull --rebase origin master
|
||||||
|
|
||||||
|
# Push changes to origin.
|
||||||
push:
|
push:
|
||||||
git push
|
git push origin master
|
||||||
|
|
||||||
zero:
|
|
||||||
# go back to original database state, be careful!
|
|
||||||
python manage.py migrate main zero
|
|
||||||
|
|
||||||
|
# Use Ansible to setup AnsibleWorks development environment.
|
||||||
setup:
|
setup:
|
||||||
# use ansible to ansible ansible commander locally
|
|
||||||
ansible-playbook app_setup/setup.yml --verbose -i "127.0.0.1," -c local -e working_dir=`pwd`
|
ansible-playbook app_setup/setup.yml --verbose -i "127.0.0.1," -c local -e working_dir=`pwd`
|
||||||
|
|
||||||
|
# Install third-party requirements needed for development environment (using
|
||||||
|
# locally downloaded packages).
|
||||||
|
requirements:
|
||||||
|
(cd requirements && pip install --no-index -r dev_local.txt)
|
||||||
|
|
||||||
|
# Install third-party requirements needed for development environment
|
||||||
|
# (downloading from PyPI if necessary).
|
||||||
|
requirements_pypi:
|
||||||
|
pip install -r requirements/dev.txt
|
||||||
|
|
||||||
|
# "Install" ansibleworks package in development mode. Creates link to working
|
||||||
|
# copy in site-packages and installs ansibleworks-manage command.
|
||||||
develop:
|
develop:
|
||||||
# "Install" ansibleworks package in development mode. Creates link to
|
|
||||||
# working copy in site-packages,
|
|
||||||
python setup.py develop
|
python setup.py develop
|
||||||
|
|
||||||
refresh: clean develop syncdb migrate
|
# Refresh development environment after pulling new code.
|
||||||
# update/refresh development environment after pulling new code
|
refresh: clean requirements develop migrate
|
||||||
|
|
||||||
|
# Create Django superuser.
|
||||||
adduser:
|
adduser:
|
||||||
python manage.py createsuperuser
|
python manage.py createsuperuser
|
||||||
|
|
||||||
|
# Create initial database tables (excluding migrations).
|
||||||
syncdb:
|
syncdb:
|
||||||
# only run from initial setup
|
|
||||||
python manage.py syncdb --noinput
|
python manage.py syncdb --noinput
|
||||||
|
|
||||||
runserver:
|
# Create database tables and apply any new migrations.
|
||||||
# run for testing the server
|
# The first command fixes migrations following cleanup for the 1.2b1 release.
|
||||||
python manage.py runserver
|
|
||||||
|
|
||||||
celeryd:
|
|
||||||
# run to start the background celery worker
|
|
||||||
python manage.py celeryd -l DEBUG -B --autoreload
|
|
||||||
|
|
||||||
# already done and should not have to happen again:
|
|
||||||
#
|
|
||||||
#south_init:
|
|
||||||
# python manage.py schemamigration main --initial
|
|
||||||
|
|
||||||
dbchange:
|
|
||||||
# run this each time we make changes to the model
|
|
||||||
python manage.py schemamigration main changes --auto
|
|
||||||
|
|
||||||
migrate: syncdb
|
migrate: syncdb
|
||||||
# This command fixes migrations following the cleanup for the 1.2b1 release.
|
|
||||||
-(python manage.py migrate main 2>&1 | grep 0017_changes) && (python manage.py migrate main --delete-ghost-migrations --fake 0001_v12b1_initial || python manage.py migrate main --fake)
|
-(python manage.py migrate main 2>&1 | grep 0017_changes) && (python manage.py migrate main --delete-ghost-migrations --fake 0001_v12b1_initial || python manage.py migrate main --fake)
|
||||||
# run this to apply changes to the model
|
|
||||||
python manage.py migrate --noinput
|
python manage.py migrate --noinput
|
||||||
|
|
||||||
|
# Run after making changes to the models to create a new migration.
|
||||||
|
dbchange:
|
||||||
|
python manage.py schemamigration main v12b2_changes --auto
|
||||||
|
|
||||||
|
# access database shell
|
||||||
|
# asks for password # PYTHON_PATH=./acom python acom/manage.py dbshell
|
||||||
dbshell:
|
dbshell:
|
||||||
# access database shell
|
|
||||||
# asks for password # PYTHON_PATH=./acom python acom/manage.py dbshell
|
|
||||||
sudo -u postgres psql -d acom
|
sudo -u postgres psql -d acom
|
||||||
|
|
||||||
|
# Run the built-in development webserver (by default on http://localhost:8013).
|
||||||
|
runserver:
|
||||||
|
python manage.py runserver
|
||||||
|
|
||||||
|
# Run to start the background celery worker for development.
|
||||||
|
celeryd:
|
||||||
|
python manage.py celeryd -l DEBUG -B --autoreload
|
||||||
|
|
||||||
|
# Run all unit tests.
|
||||||
test:
|
test:
|
||||||
python manage.py test main
|
python manage.py test main
|
||||||
|
|
||||||
|
# Run all unit tests with coverage enabled.
|
||||||
test_coverage:
|
test_coverage:
|
||||||
# Run tests with coverage enabled.
|
|
||||||
coverage run manage.py test main
|
coverage run manage.py test main
|
||||||
|
|
||||||
|
# Output test coverage as HTML (into htmlcov directory).
|
||||||
coverage_html:
|
coverage_html:
|
||||||
# Output test coverage as HTML (into htmlcov directory).
|
|
||||||
coverage html
|
coverage html
|
||||||
|
|
||||||
|
# Build a pip-installable package into dist/ with a timestamped version number.
|
||||||
dev_build:
|
dev_build:
|
||||||
python setup.py dev_build
|
python setup.py dev_build
|
||||||
|
|
||||||
|
# Build a pip-installable package into dist/ with the release version number.
|
||||||
release_build:
|
release_build:
|
||||||
python setup.py release_build
|
python setup.py release_build
|
||||||
|
|
||||||
|
|||||||
BIN
requirements/coverage-3.6.tar.gz
Normal file
BIN
requirements/coverage-3.6.tar.gz
Normal file
Binary file not shown.
@@ -1,10 +1,12 @@
|
|||||||
# PIP requirements for AnsibleWorks development/build environment.
|
# PIP requirements for AnsibleWorks development/build environment (downloaded
|
||||||
# Install using "pip -r dev.txt"
|
# from PyPI). Install using "pip -r dev.txt".
|
||||||
|
|
||||||
|
-U distribute
|
||||||
|
|
||||||
|
# Packages used for development and production:
|
||||||
Django>=1.5
|
Django>=1.5
|
||||||
django-celery
|
django-celery
|
||||||
django-extensions
|
django-extensions
|
||||||
django-filter
|
|
||||||
django-jsonfield
|
django-jsonfield
|
||||||
django-taggit
|
django-taggit
|
||||||
djangorestframework>=2.3.0,<2.4.0
|
djangorestframework>=2.3.0,<2.4.0
|
||||||
@@ -14,6 +16,7 @@ python-dateutil
|
|||||||
requests
|
requests
|
||||||
South>=0.8,<2.0
|
South>=0.8,<2.0
|
||||||
|
|
||||||
|
# Development-only packages:
|
||||||
django-debug-toolbar
|
django-debug-toolbar
|
||||||
django-devserver
|
django-devserver
|
||||||
ipython
|
ipython
|
||||||
@@ -21,8 +24,6 @@ ipython
|
|||||||
# You may also need to install the following extra packages using the OS
|
# You may also need to install the following extra packages using the OS
|
||||||
# package manager, or pip if you're running inside a virtualenv.
|
# package manager, or pip if you're running inside a virtualenv.
|
||||||
# - ansible (via yum, pip or source checkout)
|
# - ansible (via yum, pip or source checkout)
|
||||||
# - distribute (Use the latest version via "pip install -U distribute"; the
|
|
||||||
# default python-setuptools package is old.)
|
|
||||||
# - psycopg2 (via "yum install python-psycopg2")
|
# - psycopg2 (via "yum install python-psycopg2")
|
||||||
# - coverage (if you want to check test coverage, via "pip install coverage";
|
# - coverage (if you want to check test coverage, via "pip install coverage";
|
||||||
# the default python-coverage package is old.)
|
# the default python-coverage package is old.)
|
||||||
|
|||||||
46
requirements/dev_local.txt
Normal file
46
requirements/dev_local.txt
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# PIP requirements for AnsibleWorks development/build environment (using only
|
||||||
|
# local packages). Install using "pip --no-index -r dev_local.txt".
|
||||||
|
|
||||||
|
distribute-0.6.45.tar.gz
|
||||||
|
|
||||||
|
Django-1.5.1.tar.gz
|
||||||
|
|
||||||
|
# Needed by python-dateutil, django-extensions:
|
||||||
|
six-1.3.0.tar.gz
|
||||||
|
|
||||||
|
# Needed by kombu:
|
||||||
|
amqp-1.0.11.tar.gz
|
||||||
|
anyjson-0.3.3.tar.gz
|
||||||
|
|
||||||
|
# Needed by celery:
|
||||||
|
billiard-2.7.3.28.tar.gz
|
||||||
|
kombu-2.5.10.tar.gz
|
||||||
|
python-dateutil-2.1.tar.gz
|
||||||
|
|
||||||
|
# Needed by django-celery:
|
||||||
|
celery-3.0.19.tar.gz
|
||||||
|
pytz-2013b.tar.gz
|
||||||
|
|
||||||
|
# Remaining dev/prod packages:
|
||||||
|
django-celery-3.0.17.tar.gz
|
||||||
|
django-extensions-1.1.1.tar.gz
|
||||||
|
django-jsonfield-0.9.10.tar.gz
|
||||||
|
django-taggit-0.10a1.tar.gz
|
||||||
|
djangorestframework-2.3.5.tar.gz
|
||||||
|
Markdown-2.3.1.tar.gz
|
||||||
|
pexpect-2.4.tar.gz
|
||||||
|
requests-1.2.3.tar.gz
|
||||||
|
South-0.8.1.tar.gz
|
||||||
|
|
||||||
|
# Remaining dev-only packages:
|
||||||
|
django-debug-toolbar-0.9.4.tar.gz
|
||||||
|
django-devserver-0.6.2.tar.gz
|
||||||
|
ipython-0.13.2.zip
|
||||||
|
|
||||||
|
# You may also need to install the following extra packages using the OS
|
||||||
|
# package manager, or pip if you're running inside a virtualenv.
|
||||||
|
# - ansible (via yum, pip or source checkout)
|
||||||
|
# - psycopg2 (via "yum install python-psycopg2")
|
||||||
|
# - coverage-3.6.tar.gz (if you want to check test coverage; the default
|
||||||
|
# python-coverage package is old.)
|
||||||
|
# - readline-6.2.4.1.tar.gz (for using the ipython interactive shell)
|
||||||
BIN
requirements/distribute-0.6.45.tar.gz
Normal file
BIN
requirements/distribute-0.6.45.tar.gz
Normal file
Binary file not shown.
BIN
requirements/django-jsonfield-0.9.10.tar.gz
Normal file
BIN
requirements/django-jsonfield-0.9.10.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
19
requirements/prod.txt
Normal file
19
requirements/prod.txt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# PIP requirements for AnsibleWorks production environment (downloaded from
|
||||||
|
# PyPI). Install using "pip -r prod.txt".
|
||||||
|
|
||||||
|
Django>=1.5
|
||||||
|
django-celery
|
||||||
|
django-extensions
|
||||||
|
django-jsonfield
|
||||||
|
django-taggit
|
||||||
|
djangorestframework>=2.3.0,<2.4.0
|
||||||
|
Markdown
|
||||||
|
pexpect
|
||||||
|
python-dateutil
|
||||||
|
requests
|
||||||
|
South>=0.8,<2.0
|
||||||
|
|
||||||
|
# You may also need to install the following extra packages using the OS
|
||||||
|
# package manager, or pip if you're running inside a virtualenv.
|
||||||
|
# - ansible (via yum, pip or source checkout)
|
||||||
|
# - psycopg2 (via "yum install python-psycopg2")
|
||||||
36
requirements/prod_local.txt
Normal file
36
requirements/prod_local.txt
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# PIP requirements for AnsibleWorks production environment (using only local
|
||||||
|
# packages). Install using "pip --no-index -r prod_local.txt".
|
||||||
|
|
||||||
|
Django-1.5.1.tar.gz
|
||||||
|
|
||||||
|
# Needed by python-dateutil, django-extensions:
|
||||||
|
six-1.3.0.tar.gz
|
||||||
|
|
||||||
|
# Needed by kombu:
|
||||||
|
amqp-1.0.11.tar.gz
|
||||||
|
anyjson-0.3.3.tar.gz
|
||||||
|
|
||||||
|
# Needed by celery:
|
||||||
|
billiard-2.7.3.28.tar.gz
|
||||||
|
kombu-2.5.10.tar.gz
|
||||||
|
python-dateutil-2.1.tar.gz
|
||||||
|
|
||||||
|
# Needed by django-celery:
|
||||||
|
celery-3.0.19.tar.gz
|
||||||
|
pytz-2013b.tar.gz
|
||||||
|
|
||||||
|
# Remaining packages:
|
||||||
|
django-celery-3.0.17.tar.gz
|
||||||
|
django-extensions-1.1.1.tar.gz
|
||||||
|
django-jsonfield-0.9.10.tar.gz
|
||||||
|
django-taggit-0.10a1.tar.gz
|
||||||
|
djangorestframework-2.3.5.tar.gz
|
||||||
|
Markdown-2.3.1.tar.gz
|
||||||
|
pexpect-2.4.tar.gz
|
||||||
|
requests-1.2.3.tar.gz
|
||||||
|
South-0.8.1.tar.gz
|
||||||
|
|
||||||
|
# You may also need to install the following extra packages using the OS
|
||||||
|
# package manager, or pip if you're running inside a virtualenv.
|
||||||
|
# - ansible (via yum, pip or source checkout)
|
||||||
|
# - psycopg2 (via "yum install python-psycopg2")
|
||||||
BIN
requirements/readline-6.2.4.1.tar.gz
Normal file
BIN
requirements/readline-6.2.4.1.tar.gz
Normal file
Binary file not shown.
Reference in New Issue
Block a user