awx (19.5) fresh install by awx-operator (0.15.0) does not connect to external DB

Hello,

I have a problem with AWX installation by awx-operator on kubernetes with external database (postgres).

Awx is deployed, but they are no database connection.

Secret for database is OK, i verified that with psql command, and i connect from awx-task container on database, so flux and credentials are OK.

But when awx is deploy, no connection appears in tcpdump from postgres VM on postgres port.

AWX still restart and displaying Migration step x/30 …

No more log …

Can you help me ?

  • awx-operator : 0.15.0
  • awx : 19.5.0
  • postgres : 12.9
  • kubernetes : 1.20.6
    Regards,

Ok, i found my problem

It’s syntax problem on AUTH_LDAP_SERVER_URI

File “/etc/tower/settings.py”, line 75
AUTH_LDAP_SERVER_URI = ldap://…
^
SyntaxError: invalid syntax

This blocks the deployment, without error message

Regards,

What is good syntaxe for protect extra_settings in awx yaml file ?
Because I protect variable by ’ or ", and i always have a syntaxe error …

Regards,

Hello Guy,

I’m not totally sure you meant by protected, you if you want to mount a YAML file then the best way is to create a configmap and then mount it.

Look for the extra_volume configuration on the documentation so you can see an example of how to mount it.

Hello,

OK I will try that :slight_smile:
My first try was to use extra_sttings in spec section from yaml file directly.
This is describe here : https://github.com/ansible/awx-operator#extra-settings

Regards,

Hello all,

I have found a good syntax for extra_settings in spec section from yaml file directy :

For the record, although using YAML block quoting works:

spec: extra_settings:

  • setting: AUTH_LDAP_BIND_DN
    value: >-
    “cn=admin,dc=example,dc=com”

Thanks at @HarishaAmeen who explain that on https://github.com/ansible/awx-operator/issues/509
That should be in the README …

Regards,

Thank you; this helped in the test instance.
I am deploying a new instance for devel, I am a newbie when it comes to Kubernetes, if possible can you please guide me what changes I need to make in awx-demo.yaml file to connect to external DB?
a sample ymal file would be great.
Well, document is also really ugly; they have given a very basic; bare minimal documentation which doesn’t say whether we have to make changes in awx-operator or awx.demo.yaml or when to to do changes… for eg below changes for external DB.