mirror of
https://github.com/ansible/awx.git
synced 2026-04-05 01:59:25 -02:30
Update to production settings to fail if no config found, updates to build script, added Makefile targets for build.
This commit is contained in:
15
Makefile
15
Makefile
@@ -15,6 +15,12 @@ setup:
|
|||||||
# use ansible to ansible ansible commander locally
|
# 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`
|
||||||
|
|
||||||
|
refresh: clean
|
||||||
|
# update/refresh development environment after pulling new code
|
||||||
|
python setup.py develop
|
||||||
|
python manage.py syncdb
|
||||||
|
python manage.py migrate
|
||||||
|
|
||||||
adduser:
|
adduser:
|
||||||
python manage.py createsuperuser
|
python manage.py createsuperuser
|
||||||
|
|
||||||
@@ -39,7 +45,7 @@ dbchange:
|
|||||||
# run this each time we make changes to the model
|
# run this each time we make changes to the model
|
||||||
python manage.py schemamigration main changes --auto
|
python manage.py schemamigration main changes --auto
|
||||||
|
|
||||||
migrate:
|
migrate: syncdb
|
||||||
# run this to apply changes to the model
|
# run this to apply changes to the model
|
||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
|
|
||||||
@@ -50,4 +56,9 @@ dbshell:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
python manage.py test main
|
python manage.py test main
|
||||||
|
|
||||||
|
dev_build:
|
||||||
|
python setup.py dev_build
|
||||||
|
|
||||||
|
release_build:
|
||||||
|
pythons setup.py release_build
|
||||||
|
|||||||
@@ -24,16 +24,14 @@ try:
|
|||||||
local_settings_file = os.path.join(os.path.dirname(__file__),
|
local_settings_file = os.path.join(os.path.dirname(__file__),
|
||||||
'local_settings.py')
|
'local_settings.py')
|
||||||
execfile(local_settings_file)
|
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:
|
except IOError:
|
||||||
# Otherwise, rely on the global settings file specified in the environment,
|
# Otherwise, rely on the global settings file specified in the environment,
|
||||||
# defaulting to /etc/ansibleworks/settings.py.
|
# defaulting to /etc/ansibleworks/settings.py.
|
||||||
|
settings_file = os.environ.get('ANSIBLEWORKS_SETTINGS_FILE',
|
||||||
|
'/etc/ansibleworks/settings.py')
|
||||||
try:
|
try:
|
||||||
settings_file = os.environ.get('ANSIBLEWORKS_SETTINGS_FILE',
|
|
||||||
'/etc/ansibleworks/settings.py')
|
|
||||||
execfile(settings_file)
|
execfile(settings_file)
|
||||||
except IOError:
|
except IOError:
|
||||||
pass
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
|
raise ImproperlyConfigured('No AnsibleWorks configuration found in %s'\
|
||||||
|
% settings_file)
|
||||||
|
|||||||
14
setup.py
14
setup.py
@@ -1,21 +1,23 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
#from distutils.core import setup
|
import datetime
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
from lib import __version__
|
from lib import __version__
|
||||||
|
|
||||||
|
build_timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M')
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='ansible-commander',
|
name='ansibleworks',
|
||||||
version=__version__,
|
version=__version__,
|
||||||
author='AnsibleWorks, Inc.',
|
author='AnsibleWorks, Inc.',
|
||||||
author_email='support@ansibleworks.com',
|
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(),
|
long_description=file('README.md', 'rb').read(),
|
||||||
license='Proprietary',
|
license='Proprietary',
|
||||||
keywords='ansible',
|
keywords='ansible',
|
||||||
url='http://github.com/ansible/ansible-commander',
|
url='http://github.com/ansible/ansible-commander',
|
||||||
packages=['lib'], # FIXME: Rename to acom?
|
packages=['lib'], # FIXME: Rename to ansibleworks
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
install_requires=[
|
install_requires=[
|
||||||
@@ -64,12 +66,12 @@ setup(
|
|||||||
],
|
],
|
||||||
entry_points = {
|
entry_points = {
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'acom-manage = lib:manage',
|
'ansibleworks-manage = lib:manage',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
options={
|
options={
|
||||||
'egg_info': {
|
'egg_info': {
|
||||||
'tag_build': '-dev',
|
'tag_build': '-dev%s' % build_timestamp,
|
||||||
},
|
},
|
||||||
'aliases': {
|
'aliases': {
|
||||||
'dev_build': 'clean --all egg_info sdist',
|
'dev_build': 'clean --all egg_info sdist',
|
||||||
|
|||||||
Reference in New Issue
Block a user