Commit Graph
100 Commits
Author SHA1 Message Date
AlanCoding 2439aa409d Adjust inventory update env test to allow duplicate references
change gce injectors to not duplicate the credentials file
2019-07-17 12:30:13 -07:00
AlanCoding 612205d56d Ignore Azure templating errors 2019-07-12 08:11:27 -04:00
AlanCoding 287159296a remove unused migration methods 2019-07-11 16:09:38 -04:00
AlanCoding 196b6572b2 remove code used defunct jobs list POST 2019-06-14 13:13:37 -04:00
AlanCoding 76ebcf914b upgrade pip and setuptools 2019-06-13 09:45:18 -04:00
AlanCoding f8c69aadcb Correctly manage current apps for the action_node addition 2019-06-12 10:13:45 -04:00
AlanCoding 05aab5da4c cache smart inventory memberships to avoid slow query 2019-06-11 11:06:35 -04:00
AlanCoding fedd1cf22f Replace JobOrigin with ActivityStream.action_node 2019-05-31 07:10:07 -04:00
AlanCoding dbc65baa43 apply optimizations via standard method
This addresses the top-level resources in the v2
root view, focusing in order of priority,
reflecting use by the UI.

In several cases get_queryset logic from the view
is moved into the access class.

Most other cases involve adding a straightforward
select_related or prefetch_related entry.

All additional confirmed to be effective with the
django debug toolbar.
2019-05-24 13:09:55 -04:00
AlanCoding b11995e638 Remove duplicated type methods and old Django logic 2019-05-23 08:24:24 -04:00
AlanCoding 40f9d0b512 More precise handling of schedule computed fields no-ops
Do not set a next_run value for disabled schedules
Bail if no fields are changed
Do not update related template if its fields did not change

Change call pattern to schedule.update_computed_fields()
in doing so, fix bug where template does not pick up schedule
  due to schedules next_run not being saved

Handle the case (also a bug) where template was not updated
  when schedule was deleted
2019-05-23 08:13:37 -04:00
AlanCoding d3f047d731 Move dynamic log level logic to filter 2019-05-22 14:00:39 -04:00
AlanCoding 06be3a29b9 fix Django debug toolbar after its upgrade 2019-05-20 12:17:57 -04:00
AlanCoding f4c18843a3 Resolve default ordering warnings from tests 2019-05-20 10:58:36 -04:00
AlanCoding bda838f723 Add note for docutils, unpin runner dependency 2019-05-20 10:24:43 -04:00
AlanCoding 2bec5ddb41 General upgrade of dependencies
Update licenses for new versions after dependency upgrades

pin pycurl to version that does not break on install

implement new workflow for py2/3 requirements management

require twisted tls extras, resolve service-identity version

Upgrade celery to resolve importlib DeprecationWarning

use flags to resolve the unsafe and cache problems
2019-05-20 10:24:39 -04:00
AlanCoding 74643520c7 GCE contract update, do not use token_uri in job runs 2019-05-20 09:27:45 -04:00
AlanCoding 1223148116 Avoid unnecessary user get expiring session memberships 2019-05-17 14:05:17 -04:00
AlanCoding 677a8b34ba Fix bug in dev supervisor reparenting processes 2019-05-10 07:46:53 -04:00
AlanCoding 2585c5030b move outlier gce cache logic to standard place 2019-05-09 08:24:57 -04:00
AlanCoding 7e6a73f892 fix bug with null credential 2019-05-08 21:18:34 -04:00
AlanCoding 1874e8bb4c Reduce passing around of passwords dictionary 2019-05-08 21:18:34 -04:00
AlanCoding 231abf865b put variable data permission in its own class 2019-05-08 13:43:13 -04:00
AlanCoding d2e67aea19 Fix server error for in-flight migration 2019-05-03 10:20:31 -04:00
AlanCoding 7d692d08f9 include playbook as a default search field 2019-05-01 16:15:00 -04:00
AlanCoding 5f1aeb0f4e remove ask_vars from job_start endpoint 2019-05-01 13:39:25 -04:00
AlanCoding 530a7ba51d populate event children list via parent_uuid 2019-05-01 11:55:53 -04:00
AlanCoding 4191b21052 make test_tasks.py durable to changing Ansible versions 2019-04-30 14:00:51 -04:00
AlanCoding 81f0662161 remove job ask_ fields that reference JT 2019-04-30 13:35:58 -04:00
AlanCoding d204f12184 remove unneeded update_model call 2019-04-30 10:15:08 -04:00
AlanCoding 42dd3c5cf5 Remove unused output_replacements logic 2019-04-30 10:11:03 -04:00
AlanCoding 5720601a2e allow relaunching other user jobs with public vars 2019-04-30 08:07:45 -04:00
AlanCoding c36dbb3448 Simplify gce inventory plugin injector
This consumes the change made in Ansible core
https://github.com/ansible/ansible/pull/54407
which is in Ansible 2.8, allowing the plugin
injection logic to share the script logic and
to be simplified
2019-04-23 09:33:17 -04:00
AlanCoding adfce6edf1 Unify openstack inventory injection logic
Remove logic specific to job runs to create a "clouds" file
  for openstack credential type

Move that logic into the collection of managed_by_tower
  injector methods, so it will be used by all job types

Modify inventory openstack injector logic to use this
  data as a base for its logic building the clouds file
2019-04-23 07:59:47 -04:00
AlanCoding 140394fe1f Change credential pattern for openstack inventory plugin
See upstream docs https://github.com/ansible/ansible/pull/54532
Previously it was thought that the entry in the inventory config
file was necessary, but the upstream docs change allows us to
use the same pattern that we used to for the script.
2019-04-22 14:32:00 -04:00
AlanCoding 8c2b3e9b84 Fix Django 2.0 deprecation warnings 2019-04-22 14:17:14 -04:00
AlanCoding 1ddb675fa2 Use querset special case to let org members see teams 2019-04-17 07:05:25 -04:00
AlanCoding 941009bf6d Apply critical dependency upgrades
fix PyYAML warnings in unit tests
update paramiko source file for license
2019-04-16 16:00:09 -04:00
AlanCoding 9c71204435 show activity stream entry for system auditor association 2019-04-16 15:59:04 -04:00
AlanCoding e40c6da552 Apply same pip and setuptools to AWX and Ansible venv 2019-04-15 13:54:25 -04:00
AlanCoding 5dbc269de1 Revert "Merge pull request #3697 from AlanCoding/conservative_upgrades"
This reverts commit 890de400e2, reversing
changes made to e8de7bc845.
2019-04-15 10:39:56 -04:00
AlanCoding 569cd3b34e update paramiko source file 2019-04-12 15:52:35 -04:00
AlanCoding 2c67bec3cb fix PyYAML warnings in unit tests 2019-04-12 15:48:08 -04:00
AlanCoding 235011f5e9 Apply critical dependency upgrades 2019-04-12 15:26:48 -04:00
AlanCoding 4eab362318 fix RBAC bugs with notification attachment
Allow notification_admin_role users to attach
  NTs from that organization
Require either read_role or auditor_role to the
  object which the NT is being attached to
2019-04-10 10:29:54 -04:00
AlanCoding 988438f119 Remove stdout wrapper classes that moved to runner 2019-04-09 16:28:30 -04:00
AlanCoding 809fcac738 fix 403 bug using write PAT and view.always_allow_superuser=True 2019-04-09 09:54:52 -04:00
AlanCoding c4b41a174b add instance_id for gce imported hosts 2019-04-09 08:20:26 -04:00
AlanCoding 47a3ee7d76 backport fix to run cloudforms script in py3 2019-04-08 13:40:44 -04:00
AlanCoding cca9de9a3e set default slice ct for special cases 2019-04-05 16:12:40 -04:00
AlanCoding 880341ac05 avoid slicing if the inventory only has 1 host 2019-04-05 15:28:29 -04:00
AlanCoding 750c8d8a6d Set ansible-inventory verbosity for Ansible 2.8 2019-04-01 13:39:20 -04:00
AlanCoding ea355f6f8f change default to allow empty groups from custom sources 2019-04-01 10:53:06 -04:00
AlanCoding 6f150f0362 Set inv src custom virtualenv directly on model 2019-03-29 14:37:28 -04:00
AlanCoding 180396b5df Use option to add back in gce_image hostvar
construct groups from this gce image hostvar
2019-03-28 14:14:44 -04:00
AlanCoding e84642b4a1 Set Ansible name transform setting for built-in sources
This is the current default but will change in the future
for these sources, we do not want behavior change
2019-03-28 10:37:36 -04:00
AlanCoding 73f16b2bee Enable azure_rm inventory plugin 2019-03-27 09:27:10 -04:00
AlanCoding e097f5a021 implement playbook-dir option in ansible-inventory calls 2019-03-26 14:09:08 -04:00
AlanCoding d39b3b3165 Remove compatibility_mode field, simplify jinja2 syntax
fix minor bug where credential not shown in API
2019-03-26 10:29:39 -04:00
AlanCoding 19ad7d3983 Inventory plugins data tweaks and finalization
Disable use of azure_rm inventory plugin
Disable use of ec2 inventory plugin
due to compatibility issues that are unresolved

Fix conflicts with ansible runner integration

Add additional content enabled by Ansible core changes
2019-03-26 10:29:39 -04:00
AlanCoding cd7e358b73 Inventory plugins transition dev finishing work
Bump keystone auth to resolve problem with openstack script

Clarify code path, routing to template vs. managed injector
  behavior is also now reflected in test data files

Refactor test data layout for inventory injector logic

Add developer docs for inventory plugins transition

Memoize only get_ansible_version with no parameters

Make inventory plugin injector enablement a separate
  concept from the initial_version
  switch tests to look for plugin_name as well

Add plugin injectors for tower and foreman.

Add jinja2 native types compat feature

move tower source license compare logic to management command

introduce inventory source compat mode

pin jinja2 for native Ansible types

Add parent group keys, and additional translations

manual dash sanitization for un-region-like ec2 groups

nest zones under regions using Ansible core feature just merged
  implement conditionally only with BOTH group_by options

Make compat mode default be true
  in API models, UI add and edit controllers

Add several additional hostvars to translation
Add Azure tags null case translation

Make Azure group_by key off source_vars
  to be consistent with the script

support top-level ec2 boto_profile setting
2019-03-26 10:29:39 -04:00
AlanCoding bc5881ad21 Primary development of inventory plugins, partial compat layer
Initialize some inventory plugin test data files
Implement openstack inventory plugin

This may be removed later:
- port non-JSON line strip method from core

Dupliate effort with AWX mainline devel
- Produce ansible_version related to venv

Refactor some of injector management, moving more
  of this overhead into tasks.py, when it comes to
  managing injector kwargs

Upgrade and move openstack inventory script
  sync up parameters

Add extremely detailed logic to inventory file creation
for ec2, Azure, and gce so that they are closer to a
genuine superset of what the contrib script used to give.
2019-03-26 10:29:39 -04:00
AlanCoding 622fbc116b move script injection logic to inventory file 2019-03-26 10:29:38 -04:00
AlanCoding b9d489c788 Use randomized file names for injector credential files 2019-03-26 10:29:38 -04:00
AlanCoding 5cbcfbe0c6 Port inventory source injector tests to functional tests
This new batch of tests assures that the injector logic
for inventory source in their old script version remains
untouched with the refactoring underway.

Plugins are also tested by the same means of comparing
to reference files, these will be used to assure that
all parameters that used to be respected are still
respected in the plugin system.
2019-03-26 10:29:38 -04:00
AlanCoding 43eff55fd4 fix bugs related to python3 2019-03-26 10:29:37 -04:00
AlanCoding 6c130fa6c3 Build-in inventory plugin code structure with gce working
supporting and related changes
 - Fix inconsistency between can_update / can_start
 - Avoid creating inventory file twice unnecessarily
 - Non-functional consolidation in Azure injection logic
 - Inject GCE creds as indented JSON for readability
 - Create new injector class structure, add gce
 - Reduce management command overrides of runtime environment
2019-03-26 10:29:35 -04:00
AlanCoding f749a5d44d Surface empty groups as children of all group 2019-03-26 07:18:52 -04:00
AlanCoding 1ae4ed4922 migrate python-logstash license 2019-03-20 15:29:06 -04:00
AlanCoding 8a72a4d39d Prune the python2 specific logic from log formatter 2019-03-20 15:29:06 -04:00
AlanCoding 127495b53d remove things from base class that were never used 2019-03-20 15:29:05 -04:00
AlanCoding 017d367749 Remove dependency and insert class 2019-03-20 15:29:05 -04:00
AlanCoding 7cf2bc2410 Run computed fields once for bulk delete requests 2019-03-13 15:37:01 -04:00
AlanCoding 711937b104 fix some patches that were never unapplied 2019-02-20 14:40:25 -05:00
AlanCoding 07def62373 clear the test cache at end of every test 2019-02-20 14:02:36 -05:00
AlanCoding fbf6315a8c remove star imports in tasks and non-base models 2019-02-12 19:50:30 -05:00
AlanCoding 1bf2a455c6 Do not remove edges from other inventory sources 2019-02-11 13:08:19 -05:00
AlanCoding 7676ccdbac use custom venv in inventory prooting 2019-02-01 13:29:45 -05:00
AlanCoding 13ed656506 Copy WFJT created_by to jobs it spawns 2019-01-23 09:33:14 -05:00
AlanCoding 5dd8c3ace2 Allow SCM overwrite vars in the UI 2019-01-21 13:27:57 -05:00
AlanCoding 99288a5e18 Use custom virtual environment in inventory updates 2019-01-21 06:45:55 -05:00
AlanCoding 28822d891c remove unneeded steps in inventory import
Delete some cases that directly loads scripts due
to ansible-inventory group_vars problem (now fixed)

Delete intermediate method that was a go-between the
command and the loader class

Change return type of loader from MemInventory to
a simple python dict

remove backport script and star imports
2019-01-17 08:44:55 -05:00
AlanCoding cccc038600 Updates to logging, specifically for unit tests 2019-01-15 11:34:54 -05:00
AlanCoding 77d2364022 Make docker environment interoperable with supervisorctl commands 2019-01-10 13:41:15 -05:00
AlanCoding d1b42fd583 Optimize dashboard using Django annotation for sum 2019-01-10 12:22:39 -05:00
AlanCoding 65e110cdbf catch python error when unable to find user 2018-12-13 11:47:54 -05:00
AlanCoding a3a5c6bf9f fix bug where some SJs could not be relaunched 2018-12-12 11:56:57 -05:00
AlanCoding 40b5ce4b2e link v1 pages to v2 credential type page 2018-12-06 15:41:26 -05:00
AlanCoding d2cd337c1f fix links to some resources that lack v1 pages 2018-12-06 08:29:23 -05:00
AlanCoding f09b8efa87 tests and optimizations for UJT list with non-joblet recent_jobs 2018-12-04 16:16:05 -05:00
AlanCoding 4b31367945 Do not update project details after sync jobs 2018-12-04 13:00:23 -05:00
AlanCoding b763c51f8a add type to recent_jobs 2018-11-30 15:16:09 -05:00
AlanCoding d6e89689ae do not pass artifacts to non-job nodes 2018-11-28 15:19:47 -05:00
AlanCoding 1adeb833fb clean up unwanted data in activity stream of nodes 2018-11-28 10:41:32 -05:00
AlanCoding 4c14727762 bump migration number 2018-11-27 16:12:41 -05:00
AlanCoding 012511e4f0 prohibit relaunching sliced jobs with changed count 2018-11-26 10:54:19 -05:00
AlanCoding 0b32733dc8 set fixed container names 2018-11-26 08:26:57 -05:00
AlanCoding b790b50a1a Fail job run if project is failed
provide message in traceback and explanation fields

add log messages for dependency spawns
2018-11-20 07:55:37 -05:00
AlanCoding 9cd8aa1667 further update of workflow docs for inventory feature 2018-11-19 17:35:39 -05:00
AlanCoding bca9bcf6dd fix prompts contradiction: should be non-functional change 2018-11-19 12:52:54 -05:00