Commit Graph
100 Commits
Author SHA1 Message Date
Matthew Jones 450baf2e8d Fix a dictionary reference when getting the license type on import 2017-07-14 14:08:51 -04:00
Matthew Jones 1b02809f9e Fixing missing import for licenseforbids
This was improperly removed during the license refactor
2017-07-14 10:54:21 -04:00
Matthew Jones 891f26c850 Fix an issue where an unlicensed system would throw errors
In the case where the license was entirely not present but the tower
license module was present
2017-07-14 10:21:26 -04:00
Matthew Jones 9cf2343570 Remove fact cache log setup from openshift configmap
fact cache receiver doesn't appear to exist anymore
2017-07-13 16:30:24 -04:00
Matthew Jones 8e8324983b Merge branch 'license_module_switch' into devel
* license_module_switch:
  Hide eula if stub license is used
  Fix up some issues on feature validation for licenses
  Remove any references to internal licensing utilities
  Switch out existing obfuscated license with external module
2017-07-13 11:08:47 -04:00
Matthew Jones d5346ec6d0 Hide eula if stub license is used 2017-07-13 10:57:56 -04:00
Matthew Jones c1ce79d0a5 Fix up some issues on feature validation for licenses
Also purging and fixing up some unit test behavior
2017-07-13 10:27:43 -04:00
Matthew Jones 96a9d048b8 Remove any references to internal licensing utilities 2017-07-12 16:20:35 -04:00
Matthew Jones 8486944eaa Switch out existing obfuscated license with external module
This creates a new fallback license module called StubLicense that
will be used in the event that the tower_license module is not
installed.

All existing license mechanisms are routed through the get_licenser()
util method
2017-07-11 12:01:24 -04:00
Matthew Jones ee4449eed5 Use static secret key in generated dockerfile 2017-07-06 14:21:36 -04:00
Matthew Jones 5bcefb7a83 Adding installer files to flake8 ignore 2017-06-30 16:25:52 -04:00
Matthew Jones d443f5cf48 Merge branch 'containerization' into devel
* containerization:
  Updating make targets for fixes to bringing cluster up and svcs
  Adding Makefile targets for local builds/deployments
  Moving Openshift work to installer directory to reduce conflicts
  Support deploying Tower into OpenShift
  Implementing containerized tower packaging
2017-06-30 16:21:03 -04:00
Matthew Jones d82c69680b Updating make targets for fixes to bringing cluster up and svcs 2017-06-30 16:06:57 -04:00
Matthew Jones 0ee3ad8c14 Adding Makefile targets for local builds/deployments
Updating paths
2017-06-30 15:25:42 -04:00
Matthew Jones 4c32597873 Moving Openshift work to installer directory to reduce conflicts 2017-06-30 15:25:10 -04:00
Matthew Jones d1ec8f93c0 Support deploying Tower into OpenShift 2017-06-29 16:31:07 -04:00
Matthew Jones 0d047ef694 Implementing containerized tower packaging 2017-06-14 09:28:39 -04:00
Matthew Jones da5ef30b6a Swap out dumb-init for tini
This seems to be less intrusive and less noisy of a pid 1
2017-05-26 11:33:14 -04:00
Matthew Jones adf4be29b7 Fix taskmanager failing to launch workflow job
This was caused by taskmanager instance group refactoring. This
re-enables that functionality
2017-05-23 11:15:57 -04:00
Matthew Jones cf7fb8ddd7 Fix system jobs not starting due to task manager and cred changes
* Task Manager logic wasn't assigning default instance group on system
  jobs
* Task credential changes assumed the model would have a credential
* Fix up an innocuous error symlinking rdb.py if it already exists
2017-05-18 13:10:48 -04:00
Matthew Jones a539a820a7 Updating celery autoscale and prefetch behavior
* Increase total number of celery jobs to match what we are currently
  supporting in production with very large instances
* Make sure celery in the development environment also uses fair
  scheduling without prefetching
2017-05-17 14:33:22 -04:00
Matthew Jones 575a7dd165 Use proper print syntax for Makefile in-line python statements 2017-05-16 10:58:28 -04:00
Matthew Jones f96324aad8 Adding more informative fields to HA model views
Requested by the UI team to drive an Instances/InstanceGroup display
2017-05-15 15:47:48 -04:00
Matthew Jones fc6630fd25 Consider that the project could be none when launching dependencies 2017-05-15 12:33:36 -04:00
Matthew Jones b7622a6ed9 Remove test_partial 2017-05-12 16:46:55 -04:00
Matthew Jones 754f698b9b Renaming migration for instance groups 2017-05-12 14:25:54 -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
Matthew Jones e7ba2a1078 Updating changelog for Instance Groups 2017-05-12 13:24:14 -04:00
Matthew Jones 81611b44f6 Fix an incorrect reference on instance group jobs list 2017-05-12 12:12:29 -04:00
Matthew Jones 51bb85c3e2 Purge remaining references to rampart groups
* Acceptance Docs references
* Installer references
2017-05-11 22:25:57 -04:00
Matthew Jones c1a6fc050d Simplify can_access for instance groups on job templates 2017-05-11 22:17:42 -04:00
Matthew Jones f8fc9cff5c Adding Instance Group permissions and tests 2017-05-11 15:14:18 -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
Matthew Jones 2c2e0d20a7 Exit logic fixes for instance group tools 2017-05-11 13:56:30 -04:00
Matthew Jones 47f4e5358b View Fixes for instance groups
* Return "instance_groups" instead of "rampart_groups" on the ping
  endpoint
* Don't pre-filter IG jobs endpoints for status
2017-05-11 13:55:31 -04:00
Matthew Jones 704da9c7f2 Updating acceptance documentation and system docs 2017-05-10 16:15:49 -04:00
Matthew Jones 5508bad97c Updating unit tests for task manager refactoring
* Purging old task manager unit tests
* Migrating those tests to functional tests
* Updating fixtures and factories to support a change in the way the
  task manager is tested
* Fix an issue with the mk_credential fixture when used in functional
  tests. Previously it had trouble with multiplel invocations when
  persistence was used
2017-05-10 12:45:37 -04:00
Matthew Jones 705f8af440 Update views and serializers to support instance group (ramparts)
* includes top level views for instances and instance groups and
  extending those views to be able to view running jobs
* Associative endpoints on Organizations, Inventories, and Job
  Templates
* Related and summary field entries where appropriate
* Adding job model references to executing instance group
* Fix up default queue properties for clustering from the settings file
* Update production and default settings for instance queues in settings
2017-05-10 12:33:03 -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
Matthew Jones e1296f6d3a Updating the setup playbook to support instance group installation
* Support instance groups that begin with "rampart_" and automatically
  group those using celery and data models
* Update settings file to appropriately consider instance groups after
  install and to properly route messages
2017-05-10 11:18:08 -04:00
Matthew Jones 8db7e15ad0 Add nginx to server start and switch back to first tmux win 2017-05-10 10:57:42 -04:00
Matthew Jones bd3ea61c21 Merge branch 'release_3.1.3' into devel
* release_3.1.3:
  Install jlaska copr key for rabbitmq
2017-05-01 21:22:56 -04:00
Matthew Jones 8c7adddaf3 Merge branch 'release_3.1.3' into devel
* release_3.1.3:
  create .lock file without needing the proj dir to exist
  work around a change in ansible 2.3 to `Task.get_name()`
  mock message obect in callback receiver test
2017-05-01 14:35:11 -04:00
Matthew Jones e1e83598e9 Merge branch 'release_3.1.3' into devel
* release_3.1.3: (52 commits)
  ack fact scan messages
  making ldap user/group search fields into codemirror instances
  removing UI parsing for LDAP User and Group Search fields
  Allow exception view to accept all valid HTTP methods.
  Restore ability of parsing extra_vars string for provisioning callback.
  Fix up backup/restore role broken in f7a8e45809758322d9ee41c5305850dd70ed5faf
  Stop / start ansible-tower-service during restores
  value_to_python should encode lookup fields as ascii
  fix brace interpolation on standard out pane
  Adjust some hardcoded usages of 'awx' to use 'aw_user' and 'aw_group'.
  Pull Spanish updates from Zanata
  Temporarily grant awx user createdb role
  Stop giving ownership of backups to postgres
  don't display chunked lines'
  Add dropdown li truncation with ellipsis
  CTiT -> adhoc modules should allow the user to add new modules
  Remove task that was replacing the supervisor systemd tmp file
  Fix failing supervisorctl commands on RH-based distros
  Give ownership of the supervisor socket to awx
  Setting for external log emissions cert verification
  ...
2017-04-28 13:57:04 -04:00
Matthew Jones a39b1e8436 Fix ipython version in dev container to 5.2.1 2017-04-26 09:57:51 -04:00
Matthew Jones 645c2dbbc6 Switch uwsgi to only listen on local interface
Previously it would listen systemwide on 0.0.0.0:8050
2017-04-11 10:55:20 -04:00
Matthew Jones 189ea4d7f8 Fix insights related spelling mistake that could cause failure 2017-04-06 10:57:19 -04:00
Matthew Jones 1902bab8be Fix a with_items insights scm reference for newer ansible behavior
Newer ansible versions don't allow with_items to reference undefined
variables so we'll provide a default.

We'll also update some conditionals to deal with naming requirements
changes on insights api endpoints
2017-04-06 10:53:18 -04:00
Matthew Jones d06bc9df7a updating versions for 3.1.3 release 2017-03-31 12:11:37 -04:00
Matthew Jones 1c8bc62e38 Merge branch 'release_3.1.2' into devel
* release_3.1.2: (33 commits)
  updating changelog for 3.1.2
  Add back SRC_ONLY_PKGS
  Fix ubuntu 14 restart service list pt 2
  Make sure the insight playbook fetch doesn't quote user and pass
  Add requirements/vendor to gitignore
  Conditionally install from local python dependencies in spec file
  Remove requirements/vendor on make clean.
  Update brew-srpm target to generate local requirements files
  Get offline pip installs working
  Add clean-dist target
  Navigate back to the jobDetails state when the user clicks outside the host event modal.
  Don't use jinja quote filter on insights username or password
  fix legacy standard out
  Fixed permissions typo
  add test, restore old behavior in api test
  create _survey_element_validation and use it for updating extra_vars
  Do not set the default if the field was not passed in to kwargs_extra_vars
  Remove log aggregator port required mark.
  Modify according to review feedback.
  Host Event json should be read-only
  ...
2017-03-31 10:36:02 -04:00
Matthew Jones 4ff732bc5e Merge branch 'release_3.1.2' into stable
* release_3.1.2: (149 commits)
  updating changelog for 3.1.2
  Add back SRC_ONLY_PKGS
  Fix ubuntu 14 restart service list pt 2
  Make sure the insight playbook fetch doesn't quote user and pass
  Add requirements/vendor to gitignore
  Conditionally install from local python dependencies in spec file
  Remove requirements/vendor on make clean.
  Update brew-srpm target to generate local requirements files
  Get offline pip installs working
  Add clean-dist target
  Navigate back to the jobDetails state when the user clicks outside the host event modal.
  Don't use jinja quote filter on insights username or password
  fix legacy standard out
  Fixed permissions typo
  add test, restore old behavior in api test
  create _survey_element_validation and use it for updating extra_vars
  Do not set the default if the field was not passed in to kwargs_extra_vars
  Remove log aggregator port required mark.
  Modify according to review feedback.
  Host Event json should be read-only
  ...
2017-03-30 22:43:54 -04:00
Matthew Jones eeed969a56 Make sure the insight playbook fetch doesn't quote user and pass 2017-03-29 16:42:15 -04:00
Matthew Jones 536a3b1647 Don't use jinja quote filter on insights username or password
This fixes an issue where a user was trying to use an exclamation mark
in the password. Historically we've used the quote filter but more and
more we're seeing conflicts with special characters
2017-03-27 15:40:43 -04:00
Matthew Jones eb2e7c38b0 Bring up logstash as part of the development cluster 2017-03-21 10:42:32 -04:00
Matthew Jones 03593b957b Parse the mercurial revision correctly in setup playbook
Originally the value was coming out as:

xxxxxx default tip

When we want

xxxxxx

In order for the subsequent revision request to work correctly
2017-03-17 10:45:55 -04:00
Matthew Jones 47a894a339 Fix up cloudforms license unit test 2017-03-13 21:02:36 -04:00
Matthew Jones 5270b830c9 Fixing CloudForms branding 2017-03-13 16:27:30 -04:00
Matthew Jones 071f84d224 Skip requirements test, until it gets some love 2017-03-07 16:48:52 -05:00
Matthew Jones 576e3bfc1a Adding logstash to default compose file 2017-03-07 16:48:51 -05:00
Matthew Jones 50ccd1b003 Fix validation error grammar 2017-03-07 16:48:48 -05:00
Matthew Jones 123756468d Bump version for 3.1.2 release 2017-03-07 16:48:48 -05:00
Matthew Jones 95a2ed6336 Updates to insights playbook project syncing based on feedback
* Support "name" if given, else use a more reasonable file name for
  the playbook file
* Fix an issue where we wouldn't populate the playbooks correctly in
  the database
* Force downloading the playbooks every time since we can't tell when
  the file might change
2017-03-07 16:48:48 -05:00
Matthew Jones 2656e3f3fa Insights project api side integration
* Extend scm credential type to support username and password for
  redhat portal accounts
* Update project update playbook to work with remote insights server
2017-03-07 16:48:44 -05:00
Matthew Jones b6444d7b86 Merge branch 'release_3.1.1' into stable
* release_3.1.1:
  Filter on reason also when logging in via sso and picking authtoken
2017-03-07 15:58:28 -05:00
Matthew Jones 2c7dd8497b Filter on reason also when logging in via sso and picking authtoken 2017-03-07 13:54:52 -05:00
Matthew Jones 2b2c947ac5 Merge branch 'release_3.1.1' into stable
* release_3.1.1:
  Updating changelog for 3.1.1 release
  Fix an issue where notifications might not always be triggered
  give a default other than None
  Respect the user provided rabbitmq vhost value
  Changes to improve the AMI publish process
  Add unsupported primary pre-flight check
  Removed console
  Fixed bug where typing in scm credential when adding/editing project wouldn't work
  Encode default search param
  update asgi_amqp version
  remove uneeded post commit wrapper
  all job status change websockets events should happen after the job hits the database
  Revert "emit job status over socket after database commit"
  emit job status over socket after database commit
  requeue websocket messages that don't (yet) have an established user
  Force setting the password of the rabbitmq user
  rabbit_mq_password required
  host event stdout changes
  Bump version for 3.1.1 release
2017-03-07 10:29:47 -05:00
Matthew Jones 90a26de180 Fix an issue where notifications might not always be triggered
In the case where a notification template were assigned to "failed"
events but not "success" or "any" events.
2017-03-06 15:41:43 -05:00
Matthew Jones 1fefa4cfdd Merge branch 'stable' into devel
* stable: (275 commits)
  Install correct rpm-sign package in RPM builder
  Updating changelog for 3.1 release
  Switch job_type to check from sync when detecting delete_on_update
  use Unicode apostrophes - not single quotes - for French i18n strings
  pin appdirs==1.4.2
  only cancel deps if we can cancel the inv update
  fixing module_name check and adding support for the debug module
  cancel jobs dependent on inv update
  update tests
  CSS tweaks to workflow results panels
  like inventory updates, check if project update deps already processed
  Revert "Merge pull request #5553 from chrismeyersfsu/fix-waiting_blocked"
  Add awx/ui/client/languages to .gitignore
  Delete awx/ui/client/languages/*.json
  refactor based on review
  Add missing permission check.
  Make current_groups a set to easily avoid duplicates, update asgi-amqp requirement
  avoid duplicated related search fields
  Fix workflow audit items
  fixing module name, json blob, and stdout-for-yum-module on host event
  ...
2017-02-28 11:37:05 -05:00
Matthew Jones cdb757503e Bump version for 3.1.1 release 2017-02-27 21:17:51 -05:00
Matthew Jones fc66bb1e42 Merge branch 'release_3.1.0' into stable
* release_3.1.0: (2069 commits)
  Updating changelog for 3.1 release
  Switch job_type to check from sync when detecting delete_on_update
  use Unicode apostrophes - not single quotes - for French i18n strings
  pin appdirs==1.4.2
  only cancel deps if we can cancel the inv update
  fixing module_name check and adding support for the debug module
  cancel jobs dependent on inv update
  update tests
  CSS tweaks to workflow results panels
  like inventory updates, check if project update deps already processed
  Revert "Merge pull request #5553 from chrismeyersfsu/fix-waiting_blocked"
  Add awx/ui/client/languages to .gitignore
  Delete awx/ui/client/languages/*.json
  refactor based on review
  Add missing permission check.
  Make current_groups a set to easily avoid duplicates, update asgi-amqp requirement
  avoid duplicated related search fields
  Fix workflow audit items
  fixing module name, json blob, and stdout-for-yum-module on host event
  just like we fail running tasks fail waiting tasks
  ...
2017-02-27 16:27:16 -05:00
Matthew Jones 98daaece73 Switch job_type to check from sync when detecting delete_on_update 2017-02-27 16:22:05 -05:00
Matthew Jones fd7c2550ee Fix a potential security issue in revision storage path name
It's too stable and could lead to a race condition
2017-02-23 16:21:13 -05:00
Matthew Jones b43a354bca Merge branch 'improve_ujt_filter_aliases' into release_3.1.0
* improve_ujt_filter_aliases:
  Alias unified job template search fields for presentation
2017-02-22 16:59:56 -05:00
Matthew Jones b14336bdff Alias unified job template search fields for presentation
The polymorphic accessors have a name that is different than our
normal presentation name for these types. This aliases them for the
presentation layer and then handles processing them when they are
given as filters.
2017-02-22 15:33:47 -05:00
Matthew Jones 9e2e119022 Make polymorphic_ctype aliasing work in filters
Previousy this would fall through and get caught by the type checker
2017-02-21 21:32:33 -05:00
Matthew Jones 0a5b43acae Make unit test valid
Failed after recent changed that exposed the invalidity
2017-02-21 12:50:41 -05:00
Matthew Jones 46605eb591 Fix an issue filtering with non ints against foreign keys
I feel like this probably worked at one time but no longer does. It
makes me wonder if ForeignObjectRel was meant to be the catchall but
no longer is.
2017-02-21 12:33:15 -05:00
Matthew Jones 6f84849f1a Disable retry files on ansible runs 2017-02-17 09:55:52 -05:00
Matthew Jones 785a8d0789 Fix an issue where smtplib can't handle unicode strings
We probably do get this value as unicode originally but when we store
it, due to a recently fixed bug it will come out as *not* unicode.

So things were accidentally working because py2 smtplib uses hmac
which won't accept unicode.

This change adds a flag to encrypt_field that forces it to skip the
utf8 fixup from before for narrow use cases.
2017-02-15 14:07:30 -05:00
Matthew Jones 8553b8eda6 Ignore hipchat certificate verification 2017-02-14 14:21:51 -05:00
Matthew Jones 8c4d4a0543 Protect Tower from Ansible core making changes to the event uuids 2017-02-13 11:55:08 -05:00
Matthew Jones aeee6db868 Trigger rabbitmq cluster node removal from deprovisioning 2017-02-09 13:36:59 -05:00
Matthew Jones 986ef9e2eb Merge branch 'release_3.1.0' into devel
* release_3.1.0: (186 commits)
  check related credential for inventory source
  Fixed org jt's smart status
  Show the data that would have been a problem sending payload
  Implement optional message persistence on callback events
  changing the related tab on an edit of an organization to be for users, instead of users & teams
  fixing cancel function for workflow results
  Handle deleting root node while adding a child to that root node
  Skip sending task to process cache changes when migrating to database settings.
  only loop over project OPTIONS response if the response is valid
  Added the ability to pass in a maximum number of pages shown to pagination directive.  This is useful for narrow lists particularly in modals.
  fix a CTinT bug in static config parsing
  Recursively fetch workflow nodes when there is more than 1 page of nodes
  enforce a sane default OPT_NETWORK_TIMEOUT for LDAP connections
  Labels expects the iterator to be `template` not `job_template`
  Disable workflow editor save when currently adding a node
  Fixed up organizations/job templates list
  surface dry_run option for system jobs through the API
  fix bugs with system auditors and orphan JTs
  incorporating organization into the custom inv script option selection for a group
  catch and log LDAP auth plugin misconfigurations
  ...
2017-02-08 14:01:39 -05:00
Matthew Jones ebc1d95233 Don't perform last job run calculation for sync project updates 2017-02-06 16:22:38 -05:00
Matthew Jones 5eff937f5c Fix location of the uwsgi fifo for dev environment 2017-02-06 16:22:38 -05:00
Matthew Jones 8d643dc459 Fix an issue not properly parsing the url port of the tower host
When attempting to determine the proper url for URLField
2017-02-06 14:00:57 -05:00
Matthew Jones 1cbbb6a87c Make full queue writes silent unless we can't write to any of them
This will still keep general queue errors other than Queue.Full
2017-02-06 13:53:41 -05:00
Matthew Jones 1fc69038a6 Propogate stdout change to mgmt jobs 2017-02-03 15:46:16 -05:00
Matthew Jones 0139bccde3 Make sure stdout always lines up with what is expected out ansible
Also, strip superflous extra newlines at the end of job events, this
helps downloaded stdout line up.
2017-02-03 15:37:35 -05:00
Matthew Jones a9621d579d Make sure the workflow link is included in the notification 2017-02-03 12:57:59 -05:00
Matthew Jones b2bef69f7f Remove stray print 2017-02-03 12:06:17 -05:00
Matthew Jones ca87c4f83b Implement logout semantics by support DELETE on authtoken 2017-02-02 16:32:09 -05:00
Matthew Jones d469ef2385 Add in localization setup to the container image
This should fix up utf8 question marks
2017-02-02 15:51:50 -05:00
Matthew Jones 2621f48189 We specifically need to convert the ansible included file type
for include events
2017-02-01 15:30:22 -05:00
Matthew Jones a98db65d4a Documenting process isolation for acceptance 2017-02-01 13:44:05 -05:00
Matthew Jones e389084298 Add a periodic celery task to clean up local stdout files
This works in tandem with the on-demand stdout file generator and
decouples stdout locally from the persistent database representation
ob the job itself
2017-01-31 15:52:45 -05:00
Matthew Jones 4c61449f89 Generate stdout from database if not present on disk
Useful for download stdout when not available on all cluster nodes
2017-01-31 14:29:08 -05:00
Matthew Jones 4a015da982 Purge old mongo Makefile targets, update psql target for new docker 2017-01-31 14:28:48 -05:00
Matthew Jones 53256f4c2d Integrate proper cleanup for tmp paths for inventory updates 2017-01-31 11:31:44 -05:00
Matthew Jones 587a843acd Shorten the default control persist path
Customer needed a few more characters, this should give a bit more breathingroom
2017-01-30 13:49:20 -05:00