Dev Database Access

Hi All,

I have set up a development environment as on https://github.com/ansible/awx/blob/devel/CONTRIBUTING.md

I want to look at the database, but I cannot access it using the value in pg_username and pg_password. I am getting the error:

 psql: FATAL:  role "awx" does not exist

What credentials can I use to access the database?

Larry

You didn’t say how you started up the development environment… there are two ways:

  • make docker-compose
  • make docker-compose-test

It seems like you may have done the latter in which case you may have forgotten to do the second code block here: https://github.com/ansible/awx/blob/devel/CONTRIBUTING.md#start-from-the-container-shell

As you can see from here: https://github.com/ansible/awx/blob/devel/tools/docker-compose/bootstrap_development.sh

bootstrap development will create the database user awx-dev with a password of AWXsome1

If your entrypoint was docker-compose then it was already done for you as the bootstrap script is called from the startup script: https://github.com/ansible/awx/blob/devel/tools/docker-compose/start_development.sh.

Which you’ll notice references the docker compose metadata file here: https://github.com/ansible/awx/blob/devel/tools/docker-compose.yml

Which in turn uses the Dockerfile and related utilities from this directory: https://github.com/ansible/awx/tree/devel/tools/docker-compose

There is a pinned item at the top of this Google group that is my intro presentation to the AWX development environment that I gave at Fest a month or so ago where I walk through this all step-by-step, though if you follow along with the CONTRIBUTING.md you should get there also.