How to access Chef Database


#1

Hi,
I’d like to directly access Chef Database, where all the information about nodes are stored. I didn’t find a documentation regarding this aspect of the platform. Could someone provide more details?

Best regards


#2

You should use the REST API: https://docs.chef.io/api_chef_server.html .


#3

Thanks,
but which kind of technology is behind that? I mean if there is a DB such as MySQL, PostgreSQL, etc.

Regards


#4

The underlying database is an implementation detail, you never talk to it directly. All data access is done via our REST API.


#5

It’s a postgres database, with a search index in Solr or Elasticsearch backing the search feature. You can access it via the chef-server-ctl psql command: https://docs.chef.io/ctl_chef_server.html#psql

If you want to set up a test instance to poke at and see how it works, that’s fine, of course, but as others have said, building integrations via the db or editing stuff in the database is explicitly not supported and the schema may change at any time.


#6

Thanks a lot. My need is just to know if I can access it in for read-only operations.


#7

Somebody knows the default password to access the db with the readonly user opscode_chef_ro?