Hey all,
I’m having some trouble deploying a standalone Chef server with an external database server (I’m using AWS RDS for the DB server).
OS: Ubuntu 14.04
Server version: chef-server-core 12.8.0
/etc/opscode/chef-server.rb:
api_fqdn 'default-ubuntu-1404.test.internal'
ip_version 'ipv4'
topology 'standalone'
bookshelf['access_key_id'] = 'SOMEACCESSKEY'
bookshelf['secret_access_key'] = 'SOMESECRETKEY'
opscode_erchef['s3_bucket'] = 'mybucket'
bookshelf['external_url'] = 'https://s3-eu-west-1.amazonaws.com'
bookshelf['vip'] = 's3-eu-west-1.amazonaws.com'
bookshelf['enable'] = false
postgresql['external'] = true
postgresql['db_superuser'] = 'chefrdsuser'
postgresql['db_superuser_password'] = 'chefrdspassword'
postgresql['external'] = true
postgresql['vip'] = 'my-rds-endpoint.eu-west-1.rds.amazonaws.com'
postgresql['port'] = 5432
Error:
Recipe: private-chef::bootstrap
* execute[/opt/opscode/bin/chef-server-ctl start postgresql] action run
- execute /opt/opscode/bin/chef-server-ctl start postgresql
* execute[/opt/opscode/bin/chef-server-ctl start oc_bifrost] action run
- execute /opt/opscode/bin/chef-server-ctl start oc_bifrost
* ruby_block[bootstrap-chef-server-data] action run
================================================================================
Error executing action `run` on resource 'ruby_block[bootstrap-chef-server-data]'
================================================================================
Errno::ECONNREFUSED
-------------------
Connection refused - connect(2) for "127.0.0.1" port 9463
Cookbook Trace:
---------------
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:187:in `bifrost_request'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:154:in `create_object_in_authz'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:146:in `create_actor_in_authz'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:36:in `bootstrap'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/bootstrap.rb:46:in `block (2 levels) in from_file'
Resource Declaration:
---------------------
# In /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/bootstrap.rb
44: ruby_block "bootstrap-chef-server-data" do
45: block do
46: ChefServerDataBootstrap.new(node).bootstrap
47: end
48: not_if { OmnibusHelper.has_been_bootstrapped? }
49: notifies :restart, 'service[opscode-erchef]'
50: end
51:
Compiled Resource:
------------------
# Declared in /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/bootstrap.rb:44:in `from_file'
ruby_block("bootstrap-chef-server-data") do
action [:run]
retries 0
retry_delay 2
default_guard_interpreter :default
block_name "bootstrap-chef-server-data"
declared_type :ruby_block
cookbook_name "private-chef"
recipe_name "bootstrap"
block #<Proc:0x00000002b20a00@/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/bootstrap.rb:45>
not_if { #code block }
end
Platform:
---------
x86_64-linux
The configuration works if I don’t use an external postgres database (i.e. if I set postgresql['external'] = false
and remove the other postgresql
attributes).
The (basic) process to get to this point is:
Launch fresh RDS and EC2 instances -> Update /etc/hosts with hostname -> install chef server from https://packages.chef.io -> update /etc/opscode/chef-server.rb
-> chef-server-ctl reconfigure
After the reconfigure fails, the bifrost service restarts (because of a pending service restart) and listens on 127.0.0.1:9463 (I can curl it and get back a response), but because the setup fails before /etc/opscode/pivotal.pem
is created, the next chef-server-ctl reconfigure
fails too. I’ve tried removing /etc/opscode/private-chef-secrets.json
and creating a new RDS instance, but there are further errors there.
Am I doing something wrong with my config, or is there anything else I can look into?
Regards
Kieran