Update to production settings to fail if no config found, updates to build script, added Makefile targets for build.

This commit is contained in:
Chris Church 2013-05-21 17:39:34 -04:00
parent 53212da149
commit 5133b9a30e
3 changed files with 26 additions and 15 deletions

View File

@ -15,6 +15,12 @@ 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`
refresh: clean
# update/refresh development environment after pulling new code
python setup.py develop
python manage.py syncdb
python manage.py migrate
adduser:
python manage.py createsuperuser
@ -39,7 +45,7 @@ dbchange:
# run this each time we make changes to the model
python manage.py schemamigration main changes --auto
migrate:
migrate: syncdb
# run this to apply changes to the model
python manage.py migrate
@ -50,4 +56,9 @@ dbshell:
test:
python manage.py test main
dev_build:
python setup.py dev_build
release_build:
pythons setup.py release_build

View File

@ -24,16 +24,14 @@ try:
local_settings_file = os.path.join(os.path.dirname(__file__),
'local_settings.py')
execfile(local_settings_file)
# Hack so that the autoreload will detect changes to local_settings.py.
class dummymodule(str):
__file__ = property(lambda self: self)
sys.modules['local_settings'] = dummymodule(local_settings_file)
except IOError:
# Otherwise, rely on the global settings file specified in the environment,
# defaulting to /etc/ansibleworks/settings.py.
settings_file = os.environ.get('ANSIBLEWORKS_SETTINGS_FILE',
'/etc/ansibleworks/settings.py')
try:
settings_file = os.environ.get('ANSIBLEWORKS_SETTINGS_FILE',
'/etc/ansibleworks/settings.py')
execfile(settings_file)
except IOError:
pass
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured('No AnsibleWorks configuration found in %s'\
% settings_file)

View File

@ -1,21 +1,23 @@
#!/usr/bin/env python
#from distutils.core import setup
import datetime
from setuptools import setup, find_packages
from lib import __version__
build_timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M')
setup(
name='ansible-commander',
name='ansibleworks',
version=__version__,
author='AnsibleWorks, Inc.',
author_email='support@ansibleworks.com',
description='Ansible REST API and background job execution.',
description='AnsibleWorks API, UI and Task Engine',
long_description=file('README.md', 'rb').read(),
license='Proprietary',
keywords='ansible',
url='http://github.com/ansible/ansible-commander',
packages=['lib'], # FIXME: Rename to acom?
packages=['lib'], # FIXME: Rename to ansibleworks
include_package_data=True,
zip_safe=False,
install_requires=[
@ -64,12 +66,12 @@ setup(
],
entry_points = {
'console_scripts': [
'acom-manage = lib:manage',
'ansibleworks-manage = lib:manage',
],
},
options={
'egg_info': {
'tag_build': '-dev',
'tag_build': '-dev%s' % build_timestamp,
},
'aliases': {
'dev_build': 'clean --all egg_info sdist',