Change Hostname of Chef Server

Eric Alwais -

To change the hostname on Automate/Chef Server/Compliance on AWS Marketplace installs, refer to the links found at https://docs.chef.io/aws_marketplace.html

To change the hostname on Azure Marketplace installs of our software, refer to the appropriate section here by product https://docs.chef.io/azure_portal.html

If you have a standalone Chef Server then you should just need to change the hostname and then run chef-server-ctl reconfigure or private-chef-ctl reconfigure depending on the version of Chef Server. When you change the hostname you want to make sure that the hostname and hostname -f commands both show the Fully Qualified Domain Name. This will help ensure that things go smoothly when you run the reconfigure command.

There shouldn't be any changes to existing clients.

If you are just using the self signed SSL certificates that we generate for nginx then when you run the reconfigure commands the SSL certificate will be regenerated.

Of course you will need to change the chef_server_url setting in the client.rb file on each node. There are probably a few ways to accomplish this. If you are using the chef-client cookbook to manage your nodes' client.rb file then you could try just setting the node['chef_client']['server_url'] attribute to the new hostname and test to see if the next chef-client run on a node properly changes the client.rb file AND restarts the chef-client service. If you are not using the chef-client cookbook then you can also just come up with a knife ssh one liner that can make the change on the nodes' client.rb.

Do your nodes run chef-client with ssl_verify_mode enabled? If so, and if you are using the self signed SSL certificates on the Chef Server then you need to make sure you get the new self signed SSL certificates into the node's /etc/chef/trusted_certs directory. You will also need to do similar work for your workstations.

If you want this new config to flow through into Manage and the knife.rb that it can generate in the starter kit, please also do the following

chef-manage-ctl reconfigure

Have more questions? Submit a request

Comments

Powered by Zendesk