简体   繁体   中英

How to configure external postgresql database in chef automate server

I want to know how can we configure chef automate server to use external postgresql database. I have one chef server which is configured with external elasticsearch and postgresql database, now i want to use that same postgresql database in chef automate server. Can somebody tell me how can i achieve that?

Here is my delivery.rb file configuration

 delivery_fqdn "192.168.0.101"
 delivery['chef_username'] = "delivery"
 delivery['chef_private_key'] = "/etc/delivery/delivery.pem"
 delivery['chef_server'] = "https://192.168.0.102/organizations/automate_org"
 insights['enable'] = true
 elasticsearch['urls'] = ['http://192.168.0.103:9200']
 elasticsearch['external'] = true
 data_collector['token'] = 'helloworld123'
 postgresql['version'] = '9.6'
 postgresql['external'] = true
 postgresql['vip'] = '192.168.0.103'
 postgresql['port'] = '5432'
 postgresql['username'] = 'admin'
 postgresql['superuser_username'] = 'admin'
 postgresql['superuser_password'] = 'admin123'

Here is my chef-server.rb

postgresql['external'] = true
postgresql['vip'] = '192.168.0.103'
postgresql['port'] = 5432
postgresql['db_superuser'] = 'admin'
postgresql['db_superuser_password'] = 'admin123'
opscode_erchef['search_provider'] = 'elasticsearch'
opscode_solr4['external'] = true
opscode_solr4['external_url'] = 'http://192.168.0.103:9200'
opscode_solr4['elasticsearch_shard_count'] = 3
opscode_solr4['elasticsearch_replica_count'] = 2
opscode_erchef['search_queue_mode'] = 'batch'
rabbitmq['enable'] = false
rabbitmq['management_enabled'] = false
rabbitmq['queue_length_monitor_enabled'] = false
opscode_expander['enable'] = false
dark_launch['actions'] = false
data_collector['root_url'] = 'https://192.168.0.101/data-collector/v0'
profiles['root_url'] = 'https://192.168.0.101'

Chef Automate server still uses Chef Server, see Automate setup here . delivery.rb is for Automate settings that are non-defaults. The Chef Server settings likely still need set in chef-server.rb , see here , then run chef-server-ctl reconfigure since Automate still stores cookbooks and data in Chef Server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM