28725 Commits

Author SHA1 Message Date
Yago Marques
8ab7745e3a WIP Inclusion of the EE option in the payloads within the Organization and Projects. (#9145)
* add ee option on factories for organizations

* add new lines

* remove inventory from the options

* remove line

* remove line from projects

* fix the tuple

* fix lint problems
2021-03-03 18:52:55 -05:00
Shane McDonald
fd0c4ec869 Pin to latest version of PyYAML
Fixes https://github.com/yaml/pyyaml/issues/478
2021-03-03 18:52:55 -05:00
Alan Rominger
a435843f23 Exception handling to always release work units 2021-03-03 18:52:55 -05:00
Ryan Petrello
f850f8d3e0 introduce a new global flag for denoating K8S-based deployments
- In K8S-based installs, only container groups are intended to be used
  for playbook execution (JTs, adhoc, inventory updates), so in this
  scenario, other job types have a task impact of zero.
- In K8S-based installs, traditional instances have *zero* capacity
  (because they're only members of the control plane where services
  - http/s, local control plane execution - run)
- This commit also includes some changes that allow for the task manager
  to launch tasks with task_impact=0 on instances that have capacity=0
  (previously, an instance with zero capacity would never be selected
  as the "execution node"

This means that when IS_K8S=True, any Job Template associated with an
Instance Group will never actually go from pending -> running (because
there's no capacity - all playbooks must run through Container Groups).
For an improved ux, our intention is to introduce logic into the
operator install process such that the *default* group that's created at
install time is a *Container Group* that's configured to point at the
K8S cluster where awx itself is deployed.
2021-03-03 18:52:55 -05:00
Alan Rominger
c29d476919 Fix obvious code error with foreman inventory 2021-03-03 18:52:55 -05:00
Alan Rominger
b05b6b2e03 Fix minor syntax error failing AdHocCommands 2021-03-03 18:52:55 -05:00
Alan Rominger
3f76499c56 Use the fully qualified inventory plugin name only for foreman 2021-03-03 18:52:55 -05:00
Shane McDonald
e63383bde6 Add PATH to blocked inventory source vars
This used to be skiped because PATH was already present in the env we
constructed for runner.
2021-03-03 18:52:55 -05:00
Shane McDonald
c6be92cdf6 Create awx group in container 2021-03-03 18:52:55 -05:00
Shane McDonald
341e1e34e3 Dont zip/unzip private data dir for local jobs 2021-03-03 18:52:55 -05:00
Shane McDonald
70755a395b Make receptorctl easier to use in dev env 2021-03-03 18:52:55 -05:00
Shane McDonald
fe9b24cde2 flake8 2021-03-03 18:52:55 -05:00
Shane McDonald
70f7a082bb Minimally functional container group v2 w/ receptor 2021-03-03 18:52:55 -05:00
Shane McDonald
9df29e8fc4 Use official awx-ee by default 2021-03-03 18:52:55 -05:00
Shane McDonald
d37cb64aaf Delete some old container group v1 code 2021-03-03 18:52:55 -05:00
Shane McDonald
1d9f01a201 Deleted unused build_params_process_isolation method 2021-03-03 18:52:55 -05:00
Shane McDonald
373bb443aa UnifiedJob#is_containerized -> UnifiedJob#is_container_group_task 2021-03-03 18:52:55 -05:00
Shane McDonald
286b1d4e25 InstanceGroup#is_containerized -> InstanceGroup#is_container_group 2021-03-03 18:52:55 -05:00
Shane McDonald
7b7465f168 Update receptor config to allow for runtime options 2021-03-03 18:52:55 -05:00
Shane McDonald
e453afa064 FOLLOW UP ON THIS: Fix fact_cache directory location
The part where we pass in the runner params to the processor phase is
legit. Need to investigate why the fact_cache directory is no longer nested
under job.id.
2021-03-03 18:52:55 -05:00
Shane McDonald
cf96275f1b Pull awx -> receptor job code into its own class 2021-03-03 18:52:54 -05:00
Shane McDonald
be8168b555 Surface errors when launching jobs through Receptor
This will raise errors such as:

exec: "ansible-runner": executable file not found in $PATH
2021-03-03 18:52:54 -05:00
Shane McDonald
fd92ba0c0b Actually cancel things 2021-03-03 18:52:54 -05:00
Shane McDonald
0184a7c267 Create receptor mesh in cluster development environment 2021-03-03 18:52:54 -05:00
Shane McDonald
81f6d36a3a Set SDB_NOTIFY_HOST for all processes 2021-03-03 18:52:54 -05:00
Shane McDonald
f1df4c54f8 Begin integrating receptor 2021-03-03 18:52:54 -05:00
Shane McDonald
521d3d5edb Initial EE integration 2021-03-03 18:52:54 -05:00
Shane McDonald
acee22435b Update ExecutionEnvironments.jsx with breadcrumb replacement 2021-03-03 18:52:54 -05:00
Shane McDonald
0c497fa682 Get podman-in-docker working under cgroups v2 2021-03-03 18:52:54 -05:00
Alan Rominger
90b9c7861c Allow jobs to run in the base ansible-runner image (#8949) 2021-03-03 18:52:54 -05:00
Alan Rominger
eb5bf599e3 Fix raw archive project updates
Several squashed commits

Fix git bug introduced by setting remote tmp in project path
change shebang back to py3 again
Revert shebang change
2021-03-03 18:52:54 -05:00
Alan Rominger
10e68c6fb3 Fix unit test fallout 2021-03-03 18:52:54 -05:00
Alan Rominger
49bdadcdbf Fix yet another host vs container path bug 2021-03-03 18:52:54 -05:00
Alan Rominger
015fc29c1c Fix another svn issue due to pre-existing folder 2021-03-03 18:52:54 -05:00
Alan Rominger
0dfb183cb6 Fix another credential path-in-container bug 2021-03-03 18:52:54 -05:00
Alan Rominger
ba14634318 Fix collection pep8 failure 2021-03-03 18:52:54 -05:00
Alan Rominger
b953478225 Change the default EE location 2021-03-03 18:52:54 -05:00
Jeff Bradberry
9964ba7c9a Improve the behavior of EE resolution for ad hoc commands
- call resolve_execution_environment during AdHocCommand.save()
- wrap the fallback call of the resolver in tasks.py in disable_activity_stream()
2021-03-03 18:52:54 -05:00
Shane McDonald
12b8349e88 Show EE images that are managed by tower in UI 2021-03-03 18:52:54 -05:00
Jeff Bradberry
c74d60f3f3 Make sure that the new credential type is in the choices list 2021-03-03 18:52:54 -05:00
Jeff Bradberry
44ad6bfdce Insert a default EE into the development environment 2021-03-03 18:52:54 -05:00
Jeff Bradberry
fde7a1e3e5 Ensure that the updated job instance is used
when attaching an EE.
2021-03-03 18:52:54 -05:00
Jeff Bradberry
4a0fc3e1af Ensure that a fallback EE is available to be found
for the failing tests.
2021-03-03 18:52:54 -05:00
Jeff Bradberry
5f1da2b923 Adjust ExecutionEnvironmentAccess to account for the new EE admin role 2021-03-03 18:52:54 -05:00
Jeff Bradberry
e7bf81883b Populate the EE name field in awxkit 2021-03-03 18:52:54 -05:00
Jeff Bradberry
4993a9e6ec Move the resolve_execution_environment method to the mixin class
so that it can be used with AdHocCommands as well.
2021-03-03 18:52:54 -05:00
Jeff Bradberry
8562c378c0 Make use of the EE resolver code when launching jobs 2021-03-03 18:52:54 -05:00
Jeff Bradberry
6d935f740c Fill in the new execution environment collection module
as well as changes to other ones that need to be able to attach EEs.
2021-03-03 18:52:54 -05:00
Jeff Bradberry
c1133b3f6d Add in more model changes around execution environments
- a new unique name field to EE
- a new configure-Tower-in-Tower setting DEFAULT_EXECUTION_ENVIRONMENT
- an Org-level execution_environment_admin_role
- a default_environment field on Project
- a new Container Registry credential type
- order EEs by reverse of the created timestamp
- a method to resolve which EE to use on jobs
2021-03-03 18:52:54 -05:00
Alan Rominger
c0faa39b53 Remove files moved to the ansible/awx-ee repo
These have been moved to:

https://github.com/ansible/awx-ee

that will be the home for the processes needed to
build this execution environment.
2021-03-03 18:52:54 -05:00