Commit Graph

56 Commits

Author SHA1 Message Date
AlanCoding
7e3a5fd2c2 move reload functionality to its own file 2017-02-15 13:42:49 -05:00
AlanCoding
186b672e4f move service definition into settings 2017-02-15 12:07:30 -05:00
Matthew Jones
8796af7e28 Make session and csrf cookies secure by default 2017-01-11 10:39:46 -05:00
Chris Church
092c2be0e7 Make any settings read-only that have been modified in custom Python config files. 2016-12-14 16:57:32 -05:00
Chris Meyers
5d205f1e1b remove deprecated mongo fact code and deps
* We have the requirements that users with Tower < 3.0.x must upgrade to
3.0.x before > 3.0.x. Thus, we are save to delete all mongo migration
code and deps.
2016-11-09 16:25:27 -05:00
Chris Meyers
5c71f1d6f7 allow all hosts during development 2016-11-02 10:45:42 -05:00
Matthew Jones
babe29ebfa Implement cluster health checks
* Add a local node queue to execute targeted jobs
* Add a setting for active cluster node id (per-node)
* Base the heartbeat time on the `modified` time on the Instance table
* Add periodic task that calls save() on the instance to update the
  heartbeat time if services are up
* Purge/update any ha/instance management commands
* Fix up CELERY_ROUTES settings data structure
2016-10-06 16:05:39 -04:00
Chris Church
6ebe45b1bd Configure Tower in Tower:
* Add separate Django app for configuration: awx.conf.
* Migrate from existing main.TowerSettings model to conf.Setting.
* Add settings wrapper to allow get/set/del via django.conf.settings.
* Update existing references to tower_settings to use django.conf.settings.
* Add a settings registry to allow for each Django app to register configurable settings.
* Support setting validation and conversion using Django REST Framework fields.
* Add /api/v1/settings/ to display a list of setting categories.
* Add /api/v1/settings/<slug>/ to display all settings in a category as a single object.
* Allow PUT/PATCH to update setting singleton, DELETE to reset to defaults.
* Add "all" category to display all settings across categories.
* Add "changed" category to display only settings configured in the database.
* Support per-user settings via "user" category (/api/v1/settings/user/).
* Support defaults for user settings via "user-defaults" category (/api/v1/settings/user-defaults/).
* Update serializer metadata to support category, category_slug and placeholder on OPTIONS responses.
* Update serializer metadata to handle child fields of a list/dict.
* Hide raw data form in browsable API for OPTIONS and DELETE.
* Combine existing licensing code into single "TaskEnhancer" class.
* Move license helper functions from awx.api.license into awx.conf.license.
* Update /api/v1/config/ to read/verify/update license using TaskEnhancer and settings wrapper.
* Add support for caching settings accessed via settings wrapper.
* Invalidate cached settings when Setting model changes or is deleted.
* Preload all database settings into cache on first access via settings wrapper.
* Add support for read-only settings than can update their value depending on other settings.
* Use setting_changed signal whenever a setting changes.
* Register configurable authentication, jobs, system and ui settings.
* Register configurable LDAP, RADIUS and social auth settings.
* Add custom fields and validators for URL, LDAP, RADIUS and social auth settings.
* Rewrite existing validator for Credential ssh_private_key to support validating private keys, certs or combinations of both.
* Get all unit/functional tests working with above changes.
* Add "migrate_to_database_settings" command to determine settings to be migrated into the database and comment them out when set in Python settings files.
* Add support for migrating license key from file to database.
* Remove database-configuable settings from local_settings.py example files.
* Update setup role to no longer install files for database-configurable settings.

f 94ff6ee More settings work.
f af4c4e0 Even more db settings stuff.
f 96ea9c0 More settings, attempt at singleton serializer for settings.
f 937c760 More work on singleton/category views in API, add code to comment out settings in Python files, work on command to migrate settings to database.
f 425b0d3 Minor fixes for sprint demo.
f ea402a4 Add support for read-only settings, cleanup license engine, get license support working with DB settings.
f ec289e4 Rename migration, minor fixmes, update setup role.
f 603640b Rewrite key/cert validator, finish adding social auth fields, hook up signals for setting_changed, use None to imply a setting is not set.
f 67d1b5a Get functional/unit tests passing.
f 2919b62 Flake8 fixes.
f e62f421 Add redbaron to requirements, get file to database migration working (except for license).
f c564508 Add support for migrating license file.
f 982f767 Add support for regex in social map fields.
2016-09-26 22:14:47 -04:00
Matthew Jones
d8ea0920c5 Update configuration and playbook for rabbitmq
* Purge remaining zeromq settings
* Make sure we have CALLBACK_QUEUE defined where needed
* Update setup playbook to not be tied to old ha primary/secondary concept
2016-09-16 11:35:46 -04:00
Matthew Jones
f5d2c5c18a Merge branch 'ramparts_and_ha' into devel
* ramparts_and_ha: (21 commits)
  Rename database migrations for devel integration
  Integrate callback receiver refactoring
  Fix an issue running jobs in the cluster
  Implement a more dynamic celery queue system
  Purge old munin monitors and tools
  Refactor Tower HA Instance logic and models
  Docker compose improvements
  Initial Docker Compose workflow for Tower cluster
  Add memcached role for setup playbook
  Removing qpid from deb packaging
  Refactor rabbitmq role
  Integrate memcached into setup playbook
  Remove mongodb shutdown task
  Remove dependency on erlang_sd_notify
  Add initial rabbitmq role
  Initial rabbitmq setup playbook integration
  Update development environment for rabbit
  Replace qpid with rabbitmq
  Remove redis role from setup playbook
  Update qpid packaging, remove migrations
  ...
2016-09-15 10:19:57 -04:00
Matthew Jones
ab395b0009 Integrate callback receiver refactoring
* Drop ZMQ as the communication mechanism between job_event_callback and
  callback_receiver
* Setup queue and exchange for callback broker communication
* Refactor event plugin and callback receiver to efficiently handle
  message submission and processing
* Integrate django caching for parent processing
2016-09-14 11:42:13 -04:00
Matthew Jones
799f321760 Fix an issue running jobs in the cluster
The old VENV_PATH settings were still in place
2016-09-12 10:43:40 -04:00
Leigh Johnson
6d643ca339 Add uncached template loaders to development settings 2016-09-07 15:47:50 -04:00
Alan Rominger
2fada7a6ad fix flake8 2016-09-01 15:34:06 -04:00
Chris Meyers
ac2f0bdf57 handle mime svg in devel 2016-09-01 12:53:26 -04:00
Matthew Jones
116e40dbe7 Fix some venv issues related to the new dev env 2016-08-30 14:21:11 -04:00
Chris Meyers
ae73be12f1 remove statsd 2016-05-10 11:56:04 -04:00
Matthew Jones
6f79ec8830 Revert "Merge pull request #1534 from chrismeyersfsu/fix-config_performance"
This reverts commit 7cc144fa59f157a5e1789a913e0d9a31720141ec, reversing
changes made to 86af9950e754b06f40cb293a36ab365f589273db.
2016-04-14 11:40:07 -04:00
Chris Meyers
043f97fe35 fixes config endpoint performance issue 2016-04-13 17:28:38 -04:00
Matthew Jones
46bbc83d0d Changes for Tower virtualenv support
* Break requirements down into ansible and tower reqs
* Generate separate Ansible and Tower virtual environments
* Install appropriate requirements files into each one
* Modify development tools to use these venvs instead of our old
  site-packages
* Modify settings to indicate venv enablement and location of venvs
* Modify tasks to use the proper virtual environment for its purpose
2016-03-21 12:11:19 -04:00
Chris Meyers
7ffe46fc74 add postgres Fact model, update views, tests
* awx.main.models Fact added
* view host fact and timeline updated to use new Postgres Fact model instead of Mongo
* Removed license set start Mongo logic
* added View tests
* added Model tests
* Removed mongo fact unit tests
* point at modified jsonbfield that supports sqlite storage driver
* postgresify fact cache receiver
* test OPTIONS endpoint
* Note: single fact view not implemented yet.
2016-02-24 14:38:54 -05:00
Chris Church
60224cdbe4 Update Django to 1.8 and DRF to 3.3, add new Django migrations, update serializers/pagination/metadata, update browsable API styling. 2016-02-02 17:48:04 -05:00
Joshua "jag" Ginsberg
f25b76aee9 Integrate statsd metrics into ansible playbook execution.
* Add dependencies for pystatsd and django-statsd-mozilla
* Default turned off except for development environment
* Modify docker-compose to install statsd/graphite host
2016-01-26 16:54:24 -05:00
Chris Church
84e89ab6f8 Fix auth-related errors breaking unit tests. 2015-10-02 16:16:30 -04:00
Chris Church
2ba5e06e2c Add support for single-sign on using python-social-auth (with Google/Github OAuth2 and SAML support). Add support for RADIUS as another authentication backend. 2015-10-02 14:57:27 -04:00
Matthew Jones
3d7f25218a Add api side support for pendo
Also adds setup playbook support for pendo.  This change anticipates
that the default for new installations will be 'detailed'
2015-09-25 15:52:42 -04:00
Matthew Jones
5df23b95f6 Revert "Improve stdout behavior by implementing a downloadable stdout." 2015-07-24 14:54:13 -04:00
Matthew Jones
d9f5dee773 Change default stdout temp directory
* Use /var/lib/awx on production configurations
* Use /tmp for development configurations
2015-07-22 16:31:43 -04:00
John Mitchell
32d1c0e4db fixed copyright date 2015-06-11 16:10:23 -04:00
Luke Sneeringer
b0b5e3a726 Do not accept enterprise licenses in some cases.
This commit makes it so that enterprise licenses are rejected in HA
environments if there is no active MongoDB server.

Additionally, it suppresses trying to connect to MongoDB in cases where
it is not present or meaningful.
2015-06-04 14:42:14 -05:00
Matthew Jones
b3da3b34a3 Changing some legal headers for python source files 2015-05-29 12:10:39 -04:00
James Laska
7064c9bed4 Additional flake8 cleanup
The flake8 command was identifying several warnings and errors. This change
addresses the flake8 warnings and updates the setup.cfg with additional
exclusions. If accepted, jenkins will be updated to use the flake8 command,
rather than using the django_jenkins plugin. This will expedite jenkins
testing.
2015-05-20 20:33:22 -04:00
Luke Sneeringer
7d65b439fa Support PBKDF2 passwords in dev. 2015-05-14 11:29:00 -05:00
Chris Meyers
7d7206c7b0 use md5 pass hasher when dev or testing 2015-05-09 08:13:14 -04:00
James Laska
c197f90e45 Comment out jshint+csslint from django_jenkins 2015-04-10 09:54:41 -04:00
Chris Meyers
2a039bb31f moved new fact implementation to fact app 2015-04-07 09:50:35 -04:00
Chris Meyers
c03cef022d Implemented fact scan storage logic.
* added mongo connection logic
* added mongo dbtransform logic to allow keys with . and $
* altered tower fact scanner CacheModule to emit a message for each fact module facts (including ansible facts). Previously, seperate facts module facts were getting concatenated to each subsequent emi
* tower fact scanner CacheModule timeout set as to not hang for forever
* broke apart commands.py test
* added unit test for run_fact_cache_receiver, facts, and dbtransform
2015-04-07 09:50:35 -04:00
James Laska
40fdbc01e3 Pyflakes and pep8 are replaced by flake8 2015-02-18 13:00:49 -05:00
Chris Meyers
981eeb3c88 towards tower-qa running against dev ansible-tower 2015-02-03 11:58:56 -05:00
James Laska
ea0b39859b Enable django_jenkins flake8 reporting
Also exclude awx/ui from pep8 runs.
2015-01-29 13:56:04 -05:00
Chris Church
253a6cffd4 Add default SYSTEM_UUID for development. 2014-10-23 13:36:14 -04:00
Luke Sneeringer
66dc2df8c3 Make development settings honor conf.d 2014-10-20 08:04:16 -05:00
James Laska
888352270b More updates to support latest django_jenkins 2014-10-02 13:26:32 -04:00
James Laska
a174c7b168 The latest version of django_jenkins no longer requires django_tests 2014-10-02 12:15:16 -04:00
Luke Sneeringer
3b45252039 Theoretical move from /etc/awx/ to /etc/tower/. 2014-08-22 10:12:12 -04:00
Luke Sneeringer
dd5fcbbfbd Vagrant Local Development
This commit adds playbooks and files necessary to do local development
from within Vagrant.

These playbooks start with a fresh Ubuntu 12.04 machine and:
  - Install Ansible
  - Install the Tower nightly
  - Install all components to exactly mirror production, except Apache
  - Install uwsgi and nginx for local development (since Apache lacks a
working auto-reload)

This isn't entirely perfect -- in particular, developing on task code
is probably challenging until I figure out how to get celery not to
read from the install, but it is a very easy way to get 90% of the way
there very, very quickly.
2014-06-12 16:51:48 -05:00
James Laska
11b39febfb Include PYLINT_RCFILE 2014-06-05 15:29:36 -04:00
James Laska
e8dc57ff36 Move django_jenkins into development.py 2014-06-05 15:00:21 -04:00
Chris Church
8e61d17cb4 Updated zeromq callback to receive callback port via environment variable. Changed production, development and unit tests to all use different ports/queues for the callback. 2014-02-26 14:11:59 -05:00
Chris Church
e94e1978be Disable capturing SQL queries in memory when running celeryd in development. 2014-02-04 23:04:58 -05:00