Commit Graph

238 Commits

Author SHA1 Message Date
Chris Meyers
2d05ffc90e Merge pull request #6382 from chrismeyersfsu/fix-4514
support vmware via source_vars
2017-06-08 13:27:28 -04:00
Aaron Tan
bf3712122c Make up missing model help texts for job timeout. 2017-06-06 11:28:56 -04:00
Chris Meyers
0d56f42c83 better insights_credential reverse relationship
* From an insights cred, access all related inventories via
cred.insights_inventories rather than cred.insights_credential
* This fixes auto-attaching insights_credential to credential summary
fields. Fixes by NOT attaching them. That is the desired behavior.
2017-06-05 13:48:41 -04:00
Chris Meyers
8b97db06b0 abuse group_by and instance_filters 2017-05-30 18:29:02 -04:00
Wayne Witzel III
01471e02bb Merge pull request #6358 from wwitzel3/issue-6099
Add smart_inventories endpoint to Host
2017-05-26 14:24:01 -04:00
Wayne Witzel III
e28cd97ffb Add smart_inventories endpoint to Host 2017-05-26 10:16:12 -04:00
Chris Meyers
b25b397e14 remove insights logic from backwards compat logic
* spelling fixes
2017-05-26 09:58:20 -04:00
Chris Meyers
87eea59845 add per-inventory insights credential 2017-05-26 07:25:36 -04:00
Chris Meyers
136bdc06e9 remove insights_system_id uniqueness constraint 2017-05-18 12:51:25 -04:00
Wayne Witzel III
d652ed16d0 Dynamic -> Smart Inventory 2017-05-17 16:25:40 -04:00
Chris Meyers
27c32de4a2 Merge pull request #6242 from chrismeyersfsu/implement-6203
associate insights machine id w/ host on fact scan
2017-05-16 10:27:45 -04:00
AlanCoding
fbf24492d8 Instance group preference order consistent with docs 2017-05-15 15:45:10 -04:00
Matthew Jones
1a4a6273a4 Merge branch 'rampart_groups_setup_playbook' into devel
* rampart_groups_setup_playbook:
  Updating changelog for Instance Groups
  Fix an incorrect reference on instance group jobs list
  Purge remaining references to rampart groups
  Simplify can_access for instance groups on job templates
  Adding Instance Group permissions and tests
  Increase test coverage for task scheduler inventory updates
  Exit logic fixes for instance group tools
  View Fixes for instance groups
  new view to allow associations but no creations
  Updating acceptance documentation and system docs
  Updating unit tests for task manager refactoring
  Update views and serializers to support instance group (ramparts)
  Implementing models for instance groups, updating task manager
  Updating the setup playbook to support instance group installation
  Add nginx to server start and switch back to first tmux win
  Fix an issue where the local queue wouldn't use the rabbitmq name
2017-05-12 13:40:30 -04:00
Chris Meyers
3cdc332497 rename insight tracking field; handle duplicate
* rename from insights_machine_id to insights_system_id
* gracefully handle duplicate insights machine id's
2017-05-12 10:47:49 -04:00
Alan Rominger
7a1c6c6794 Merge pull request #6241 from AlanCoding/scm_inv_feedback
SCM inventory acceptance and bug updates
2017-05-11 16:30:26 -04:00
Matthew Jones
8bc1490368 Increase test coverage for task scheduler inventory updates
Also fixes some bugs found in that process
2017-05-11 14:36:13 -04:00
AlanCoding
97ca6bc897 SCM inventory acceptance and bug updates
* fixed a problem where the SCM last revision was not getting reset
* change the 400 editing error to just reset the last revision
* handle `source_vars` in the same way as custom scripts
* block unallowed `source_vars` in the validator
* hide POST in OPTIONS for inventory source sublist if not allowed
2017-05-11 12:04:48 -04:00
Chris Meyers
b9b0b29d97 associate insights machine id w/ host on fact scan
* Add inisghts fact scan module
* Update fact scan playbook to call new insight fact scan module
* JT run w/ store_facts=True will save scanned facts. We "skim" the
machine_id fact from Insights fact scans and associate it with the host
that the fact scan came from.
2017-05-11 11:20:52 -04:00
Alan Rominger
2b15d04096 Merge pull request #6218 from AlanCoding/scm_inv_cancel
SCM inventory cancel propagation
2017-05-10 15:52:31 -04:00
Matthew Jones
4ced911c00 Implementing models for instance groups, updating task manager
* New InstanceGroup model and associative relationship with Instances
* Associative instances between Organizations, Inventory, and Job
  Templates and InstanceGroups
* Migrations for adding fields and tables for Instance Groups
* Adding activity stream reference for instance groups
* Task Manager Refactoring:
** Simplifying task manager relationships and move away from the
   interstitial hash tables
** Simplify dependency determination logic
** Reduce task manager runtime complexity by removing the partial
   references and moving the logic into the task manager directly or
   relying on Job model logic for determinism
2017-05-10 12:32:54 -04:00
AlanCoding
04d6fb1f95 SCM inventory cancel propagation
For manually initiated inventory updates, also cancel the source
project of "sync" type, like jobs do

For automatic inventory updates spawned from source project update,
of launch type "scm", handle contigency cases
2017-05-10 10:28:49 -04:00
Aaron Tan
cfb633e8a6 Dependency Updates
* Dynamic Inventory Source
Template against ansible 2.3 dynamic inventory sources.
The major change is removal of `rax.py`. Most upstream scripts except
`foreman.py` has quite trivial coding style changes, or minor functional
extensions  that does not affect Tower inventory update runs.
`foreman.py`, on the other hand, went through quite a major refactoring,
but functionalities stay the same.

Major python dependency updates include apache-libcloud (1.3.0 -->
2.0.0), boto (2.45.0 --> 2.46.1) and shade (1.19.0 --> 1.20.0). Minor
python dependency updates include indirect updates via `pip-compile`,
which are determined by base dependencies.

Some minor `task.py` extensions:
 - `.ini` file for ec2 has one more field `stack_filter=False`, which
   reveals changes in `ec2.py`.
 - `.ini` file for cloudforms will catch these four options from
   `source_vars_dict` of inventory update: `'version', 'purge_actions',
   'clean_group_keys', 'nest_tags'`. These four options have always been
   available in `cloudforms.py` but `cloudforms.ini.example` has not
   mentioned them until the latest version. For consistency with upstream
   docs, we should make these fields available for tower user to customize.
 - YAML file of openstack will catch ansible options `use_hostnames`,
   `expand_hostvars` and `fail_on_errors` from `source_vars_dict` of
   inventory update as a response to issue #6075.

* Remove Rackspace support
Supports of Rackspace as both a dynamic inventory source and a cloud
credential are fully removed. Data migrations have been added to support
arbitrary credential types feature and delete rackspace inventory
sources.

Note also requirement `jsonschema` has been moved from
`requirements.txt` to `requirements.in` as a primary dependency to
reflect it's usage in `/main/fields.py`.

Connected issue: #6080.

* `pexpect` major update
`pexpect` stands at the very core of our task system and underwent a
major update from 3.1 to 4.2.1. Although verified during devel, please
still be mindful of any suspicious issues on celery side even after this
PR gets merged.

* Miscellaneous
 - requests now explicitly declared in `requirements.in` at version 2.11.1
   in response to upstream issue
 - celery: 3.1.17 -> 3.1.25
 - django-extensions: 1.7.4 -> 1.7.8
 - django-polymorphic: 0.7.2 -> 1.2
 - django-split-settings: 0.2.2 -> 0.2.5
 - django-taggit: 0.21.3 -> 0.22.1
 - irc: 15.0.4 -> 15.1.1
 - pygerduty: 0.35.1 -> 0.35.2
 - pyOpenSSL: 16.2.0 -> 17.0.0
 - python-saml: 2.2.0 -> 2.2.1
 - redbaron: 0.6.2 -> 0.6.3
 - slackclient: 1.0.2 -> 1.0.5
 - tacacs_plus: 0.1 -> 0.2
 - xmltodict: 0.10.2 -> 0.11.0
 - pip: 8.1.2 -> 9.0.1
 - setuptools: 23.0.0 -> 35.0.2
 - (requirements_ansible.in only)kombu: 3.0.35 -> 3.0.37
2017-05-08 12:03:02 -04:00
AlanCoding
d826c45ac6 SCM Inventory field name changes
on InventorySource model
* scm_project -> source_project
on InventorySourceSerializer
* scm_inventories -> scm_inventory_sources

on InventoryUpdate model
* scm_project_update -> source_project_update
2017-05-04 09:15:29 -04:00
AlanCoding
8d2598beee allow management of 2 types of SCM inventory sources 2017-05-03 12:18:08 -04:00
Alan Rominger
84b8dcece0 Merge pull request #6120 from AlanCoding/ansible-inventory
Inventory updates through `ansible-inventory`
2017-05-02 16:19:58 -04:00
AlanCoding
2f62182940 refactor inventory Loaders for ansible-inventory
* remove support for loading from executable and static files
* instead use ansible-inventory with fallback to backport
* provide private file dir in task manager for cred injection
* durable management of tmp dirs for user scripts

* new 'scm' source choice for scm-type
* update SCM inventory docs to new reality
2017-05-01 14:37:43 -04:00
AlanCoding
8e6020436c modularization of inventory_import command
This separates file parsing logic that was mixed
in with other important code inside of the
inventory import command.

The logic around MemObject data structures was
moved to utils, and the file parsing was moved
to a legacy module. As of this commit, that
module can operate within the Tower environment
but it will be removed.

Also refactor the loggers to fix old bug and
work inside of the different contexts - the
Loader classes, mem objects, and hopefully
the inventory modules eventually.
2017-05-01 14:37:42 -04:00
Wayne Witzel III
8a599d9754 Add Inventory.kind field 2017-05-01 12:55:42 -04:00
Wayne Witzel III
17e9b3057e Clean-up intiail commit for Host filter / DynamicInventory 2017-05-01 12:55:42 -04:00
Wayne Witzel III
b651983045 also add inventory_source_id to websocket data 2017-04-28 12:22:49 -04:00
Wayne Witzel III
1248be9b7c Add inventory_id to websocket data 2017-04-28 11:50:07 -04:00
Ryan Petrello
a36a53fe40 implement CredentialType env, file, and extra_vars injectors
see: #5877
2017-04-24 15:03:33 -04:00
AlanCoding
6d92c56da5 SCM Inventory model, view, and task system changes
Inventory source file-type combined with a linked project
will allow the inventory source to be updated when the
project is updated. The inventory update runs in the
post-run hook of the project update.
2017-04-17 15:01:19 -04:00
Chris Meyers
55268a8ff0 remove facts_latest in favor of ansible_facts
* Closer align our facts data structure with ansible facts data
structure for purposes of ... wait for it ... 2-way fact caching
2017-04-17 14:27:33 -04:00
AlanCoding
7223177684 Group serializer special v1 functionality
Returns a related `inventory_source` and related link for groups
if accessed from /api/v1/, but not for API v2.
Also inserts corresponding fields to inventory source serializer.
Keep migrated manual sources and auto-create in API v1.
2017-04-17 10:30:07 -04:00
Wayne Witzel III
91f3e665cb group -> deprecated_group, added migrations, added/removed tests 2017-04-11 14:09:04 -04:00
Wayne Witzel III
7458788562 More updates for InventorySource changes 2017-04-11 14:04:25 -04:00
Wayne Witzel III
c784c96449 Initial removal of InventorySource.group 2017-04-11 14:04:25 -04:00
Ryan Petrello
95ea370e5e add API versioning for /api/v2/ 2017-03-30 15:11:12 -04:00
Chris Meyers
6a0916371b add job cancel dependency information
* Inventory updates that are canceled and are dependencies of jobs
result in the dependent job being canceled. This code adds a better
description to job_explanation so that a job marked as canceled can be
traced back to the inventory update that triggered this case.
2017-03-13 12:52:33 -04:00
Chris Meyers
c1bace87ab only cancel deps if we can cancel the inv update 2017-02-27 11:37:29 -05:00
Chris Meyers
f3e514246e cancel jobs dependent on inv update 2017-02-27 11:28:29 -05:00
Ryan Petrello
d24fb32358 blacklist certain sensitive fields and relations as search arguments
see: #5465
see: #5478
2017-02-21 16:18:02 -05:00
Shane McDonald
e0cd4bc7ae Get Japanese API l10 working
Worked with matburt on this. There were some inconsistencies between our code and the po files.
2017-01-13 14:49:40 -05:00
Matthew Jones
ebb0f06b17 Updating host field help text 2016-12-06 12:12:08 -05:00
Aaron Tan
a22d815c88 Add ability to disable global job timeout. 2016-12-01 12:08:53 -05:00
Matthew Jones
5df4096660 Make websocket events more informative
* Make sure we always populate workflow information when relevant to
  job status changes.
* Include detail about workflow job node
2016-11-22 09:33:25 -05:00
Chris Meyers
1a96b66f00 update inventory field, name, not unique 2016-11-21 14:42:11 -05:00
Matthew Jones
88a8810815 Merge pull request #3729 from sundeep-co-in/STAGE
enable django i18n
2016-11-04 15:52:33 -04:00
AlanCoding
de66318381 move timeout settings into 3 different settings vars 2016-11-02 14:59:51 -04:00