AWX Database migrations via separate user?

Hi AWX community,

I’m attempting an AWX POC, but I’m having some trouble with initial database setup. In our environment we have a separation between the DBA user (owner of the database, can run migrations) and the APP user (what I would want AWX to run as daily, doesn’t own the DB, fails to run migrations). I cannot even run AWX as DBA to allow the migrations due to severe connection restrictions. I’m looking for pointers on how to execute migrations remotely via a separate user. is this possible?

Best regards,
Piotr

Look at https://docs.djangoproject.com/en/1.11/topics/db/multi-db/.

You may be able to define a new key in your DATABASES setting with a different user/pass to use for migrations, then run “awx-manage migrate --noinput --fake-initial --database=your-new-databases-key” to run migrations as a different user.

Given the number of places we assume a single set of database credentials in the image build and installer, it could take some work to make this process work seamlessly.