Ask Your Question

how to assign fqdn for chef server?

asked 2013-09-30 04:23:42 -0600

nora gravatar image

updated 2013-09-30 05:20:38 -0600

I use heat template to create chef server. How to assign fqdn for this chef server? How to map chef server's fqdn to chef server's ip in the chef client? does dns is a must? what is the good way?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-08-26 08:58:04 -0600

DNS name is optional If all your chef clients and chef server are in a private network in a single OpenStack (which means they can talk to chef server over IP address only and it can ignore SSL host verification b/c of trust), you can use IP address in chef server url without a DNS name. E.g., you can provisioning chef server with IP address (make sure port 4000 is open in security group), and all your chef client can use URL (it can ignore SSL verify on chef clients since they're both in private network).

However, if your chef clients access chef server over public network like internet, you need a DNS name to:

  1. locate where chef server is
  2. chef clients must verify the chef server hostname via SSL
  3. chef server provisioning must use the correct name (FQDN) to generate a cert (or use your own cert following this guide: (custom ssl certificates with chef 11 server)).

According to step 3, you can use cloud init to inject an FQDN in /etc/opscode/chef-server.rb:

    type: OS::Heat::CloudConfig
        manage_etc_hosts: true
        user: ubuntu
        - path: /etc/opscode/chef-server.rb
              template: |
                server_name = "$chef-server-fqdn"
                api_fqdn server_name
                bookshelf['vip'] = server_name
                nginx['url'] = "https://#{server_name}"
                nginx['server_name'] = server_name

    type: OS::Heat::MultipartMime
      - config: { get_resource: chef-server-config }

    type: OS::Nova::Server
      name: chef-server
      image: { get_param: image_name }
      flavor: { get_param: flavor }
      key_name: your-keypair-name
      - network: { get_param: network_name }
      user_data_format: SOFTWARE_CONFIG
      user_data: { get_resource: server-init }
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2013-09-30 04:23:42 -0600

Seen: 1,009 times

Last updated: Aug 26 '16