AC-474. Updates to contributing doc, along with related Makefile, testing and settings changes.

This commit is contained in:
Chris Church
2013-09-24 21:40:53 -04:00
parent 4b09ba4c83
commit 9fc46e6292
19 changed files with 109 additions and 136 deletions

View File

@@ -72,7 +72,7 @@ STATIC_URL = '/static/'
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = os.path.join(BASE_DIR, 'public', 'media') # FIXME: Is this where we want it?
MEDIA_ROOT = os.path.join(BASE_DIR, 'public', 'media')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
@@ -103,10 +103,8 @@ TEMPLATE_CONTEXT_PROCESSORS += (
)
MIDDLEWARE_CLASSES += (
# masking 500 errors do not use for now?
# 'awx.middleware.exceptions.ExceptionMiddleware',
'django.middleware.transaction.TransactionMiddleware',
# middleware loaded after this point will be subject to transactions
# Middleware loaded after this point will be subject to transactions.
)
TEMPLATE_DIRS = (
@@ -241,6 +239,14 @@ DEVSERVER_MODULES = (
#'devserver.modules.profile.LineProfilerModule',
)
# Use Django-Jenkins if installed. Only run tests for awx.main app.
try:
import django_jenkins
INSTALLED_APPS += ('django_jenkins',)
PROJECT_APPS = ('awx.main',)
except ImportError:
pass
# Set default ports for live server tests.
os.environ.setdefault('DJANGO_LIVE_TEST_SERVER_ADDRESS', 'localhost:9013-9199')
@@ -268,18 +274,20 @@ CELERYBEAT_MAX_LOOP_INTERVAL = 60
ANSIBLE_HOST_KEY_CHECKING = False
# RHEL has too old of an SSH so ansible will select paramiko and this is VERY
# .slow
# slow.
ANSIBLE_PARAMIKO_RECORD_HOST_KEYS = False
# Additional environment variables to be passed to the subprocess started by
# the celery task.
AWX_TASK_ENV = {}
# Internal API URL for use by inventory scripts and callback plugin.
if 'devserver' in INSTALLED_APPS:
INTERNAL_API_URL = 'http://127.0.0.1:%s' % DEVSERVER_DEFAULT_PORT
else:
INTERNAL_API_URL = 'http://127.0.0.1:8000'
# Logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,

View File

@@ -2,12 +2,11 @@
# All Rights Reserved.
# Development settings for AWX project.
from defaults import *
# If a local_settings.py file is present in awx/settings/, use it to override
# default settings for development. If not present, we can still run using
# the defaults.
# only the defaults.
try:
local_settings_file = os.path.join(os.path.dirname(__file__),
'local_settings.py')

View File

@@ -4,6 +4,10 @@
# Local Django settings for AWX project. Rename to "local_settings.py" and
# edit as needed for your development environment.
# All variables defined in awx/settings/development.py will already be loaded
# into the global namespace before this file is loaded, to allow for reading
# and updating the default settings as needed.
###############################################################################
# MISC PROJECT SETTINGS
###############################################################################
@@ -18,15 +22,17 @@ MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'awx',
'USER': 'awx',
'PASSWORD': 'AWXsome!',
'NAME': 'awx-dev',
'USER': 'awx-dev',
'PASSWORD': 'AWXsome1',
'HOST': '',
'PORT': '',
}
}
# Use SQLite for unit tests instead of PostgreSQL.
# Use SQLite for unit tests instead of PostgreSQL. If the lines below are
# commented out, Django will create the awx-dev_test database in PostgreSQL to
# run unit tests.
if len(sys.argv) >= 2 and sys.argv[1] == 'test':
DATABASES = {
'default': {
@@ -237,7 +243,9 @@ AUTH_LDAP_ORGANIZATION_MAP = {
###############################################################################
# Define these variables to enable more complete testing of project support for
# SCM updates.
# SCM updates. The test repositories listed do not have to contain any valid
# playbooks.
try:
path = os.path.expanduser(os.path.expandvars('~/.ssh/id_rsa'))
TEST_SSH_KEY_DATA = file(path, 'rb').read()

View File

@@ -2,7 +2,6 @@
# All Rights Reserved.
# Production settings for AWX project.
from defaults import *
DEBUG = False