Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy web and task component in independent deployment #1218

Merged
merged 25 commits into from Mar 30, 2023

Conversation

TheRealHaoLiu
Copy link
Member

@TheRealHaoLiu TheRealHaoLiu commented Feb 6, 2023

SUMMARY

Requires ansible/awx#13423 to function

ISSUE TYPE
  • New or Enhanced Feature
ADDITIONAL INFORMATION

Copy link
Member

@djyasin djyasin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not find any references to tower_pod in revised code

Copy link
Member

@thedoubl3j thedoubl3j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for now I think this looks good, I am not seeing anything immediately on my first pass that would be a cause for concern. I will continue going through current code base to make sure we are renaming everything to the new names etc.

@TheRealHaoLiu TheRealHaoLiu changed the title [WIP] Feature web task split Add ability to control web and task component independently Mar 28, 2023
@TheRealHaoLiu TheRealHaoLiu marked this pull request as ready for review March 28, 2023 01:24
@thedoubl3j
Copy link
Member

thedoubl3j commented Mar 28, 2023

the CI/molecule failure is caused by this

"status": {
              "conditions": [
                  {
                      "lastTransitionTime": "2023-03-28T15:03:37Z",
                      "reason": "",
                      "status": "False",
                      "type": "Successful"
                  },
                  {
                      "lastTransitionTime": "2023-03-28T15:13:12Z",
                      "reason": "Failed",
                      "status": "False",
                      "type": "Failure"
                  },
                  {
                      "lastTransitionTime": "2023-03-28T15:13:12Z",
                      "reason": "Running",
                      "status": "True",

which we were able to reproduce locally.

This is caused by us not being able to override the default image and image_version for the molecule deployment. By default, those are set to devel which will fail molecule testing because the new launch script for the rsyslog sidecar is not found in the devel image, but rather the feature image for this new split feature.

#1308 has been opened to fix this. we were able to fix this locally by just swapping the hardcoded image and image_version.

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@@ -340,6 +238,8 @@ spec:
- /var/lib/pre-stop/scripts/termination-master
{% endif %}
env:
- name: AWX_COMPONENT
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is added so that awx get_task_qeuename() function can identify when in web container and will try to select a task instance's queue

@TheRealHaoLiu TheRealHaoLiu changed the title Add ability to control web and task component independently Deploy web and task component in independent deployment Mar 30, 2023
relrod and others added 11 commits March 29, 2023 22:00
Signed-off-by: Rick Elrod <rick@elrod.me>
Signed-off-by: Rick Elrod <rick@elrod.me>
This is a breaking change since 'replicas' is no longer used.

Signed-off-by: Rick Elrod <rick@elrod.me>
#1189)

* first pass, still WIP, need tolerations etc

* add tolerations that don't work bc idk

* bug hunting

* local push, still a WIP

* affinity still needs testfor to_nice_yaml, tolerations logic is working

* fixed task deployment and affinity for both
add web_replicas and task_replicas

Co-Authored-By: Jake Jackson  <24478650+thedoubl3j@users.noreply.github.com>
Signed-off-by: jessicamack <jmack@redhat.com>
update logic for determining if install.yml task should be run
to respect the auto_upgrade field in awx resource

conditions and expected behavior
```
  auto_upgrade   awx   awx-web   awx-task   run install.yml
 -------------- ----- --------- ---------- -----------------
  T              -     -         -          T
  F              T     -         -          F
  F              -     T         T          F
  F              -     T         F          T
  F              -     F         T          T
  F              -     F         F          T
```
thedoubl3j and others added 13 commits March 29, 2023 22:00
for awx to be able to identify which component it is running in code
Added the following volume mounts to the web container:
- receptor-work-signing
- receptor-ca
- work-public-key.pem
Also added these corresponding volumes to the web deployments:
- receptor-ca
- receptor-work-signing
- rename scale_down vars to the new deployments since the old one no longer exists
- rename postgres.yml scale down vars as it references the old ones as well
related to ansible/awx#13777

make sure that the launch script name reflect the component that its launching
SUPERVISOR_WEB_CONFIG_PATH is used in the old deployment for task container to reach into the web container and restart services

this is no longer possible/needed after splitting the deployment

renaming SUPERVISOR_WEB_CONFIG_PATH to SUPERVISOR_CONFIG_PATH
and setting it to the supervisor file for the container

this can still be useful to help run `supervisorctl -c $SUPERVISOR_CONFIG_PATH`
@thedoubl3j thedoubl3j merged commit 2f59796 into devel Mar 30, 2023
5 of 6 checks passed
@TheRealHaoLiu TheRealHaoLiu deleted the feature_web-task-split branch May 18, 2023 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants