kurokobo / awx-on-k3s

An example implementation of AWX on single node K3s using AWX Operator, with easy-to-use simplified configuration with ownership of data and passwords.
MIT License
560 stars 158 forks source link

AWX Operator and how it works. #322

Closed fanuelsen closed 6 months ago

fanuelsen commented 6 months ago

Environment

k3s version v1.28.5+k3s1 (5b2d1271)

Description

I'm currently using awx operator 1.1.4 and awx 23.6.0. This failed when the operator attempted to upgrade to the latest version with the database major version update. Is it intended for the operator to be this old? I thought it would also upgrade itself. Perhaps I've misunderstood. I see there should be some correlation between operator version and awx version, is that correct? I had to scale down the operator instance to 0 so it wouldn't try to update again. Is it possible to prevent it from running automatic updates? And what's the best way for me to upgrade to the latest operator version today?

I know there are many questions at once, but I would be very grateful if someone could point me in the right direction.

kurokobo commented 6 months ago

@fanuelsen

Is it intended for the operator to be this old? I thought it would also upgrade itself. Perhaps I've misunderstood.

Unfortunately, there is no recommended or supported upgrade path and of course I didn't test all of combinations of versions that upgrade to and upgraded from, so it is difficult to know if upgrading by skipping multiple versions works as expected unless we try it. Upgrades fail for a great variety of reasons and must be resolved one at a time.

However, as a general tems, the fewer the differences in versions, the greater the probability of success. Therefore, it is better to upgrade gradually than to upgrade to the latest version all at once.

I see there should be some correlation between operator version and awx version, is that correct?

Yes, see this table: https://github.com/kurokobo/awx-on-k3s/blob/main/tips/version-mapping.md It means that your setup (Operator 1.1.4 and AWX 23.6.0) is not officially tested combination.

I had to scale down the operator instance to 0 so it wouldn't try to update again. Is it possible to prevent it from running automatic updates? And what's the best way for me to upgrade to the latest operator version today?

There is auto_upgrade parameter: https://ansible.readthedocs.io/projects/awx-operator/en/latest/user-guide/advanced-configuration/auto-upgrade.html

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 4 days.

fanuelsen commented 6 months ago

Thanks for taking time to answer my questions @kurokobo! Sorry for the late reply. I actually found the auto_upgrade parameter in the docs, but i'm not sure where to put it, any hints?

Thanks again.

kurokobo commented 6 months ago

@fanuelsen The most fields that described in the documentation are applicable for base/awx.yaml. For example:

---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
  name: awx
spec:
  ...
  admin_user: admin
  admin_password_secret: awx-admin-password
  ...
  web_resource_requirements: {}
  task_resource_requirements: {}
  ee_resource_requirements: {}
  init_container_resource_requirements: {}
  postgres_init_container_resource_requirements: {}
  postgres_resource_requirements: {}
  redis_resource_requirements: {}
  rsyslog_resource_requirements: {}

  # Note that indentation must be aligned with other fields above
  auto_upgrade: false     ✅
fanuelsen commented 6 months ago

I understand, thanks again :)

kurokobo commented 6 months ago

Glad that I can help you 😃 I'm closing this issue. Please feel free to open new one if you have futher questions. Thanks!