Search code examples
sslchef-infraunicorn

How to disable SSL for chef-manage?


TL:DR;

How does one disable SSL for the chef-manage addon of a chef-server?


Purpose

I'm working on a Vagrant setup which builds (among others) a chef server and chef node. The purpose is for an educational workshop (an introductory venture into using Chef server for enterprise applications). For this purpose, SSL on chef-server / chef-manage is an unnecessary complication and I'm looking to keep the curriculum lean and free of pitfalls.

chef-server

I've successfully disabled ssl on my chef-server via nginx['enable_non_ssl'] = true within the /etc/opscode/chef-server.rb file. Attempting curl http://chef.server.url/ returns the expected html content (rather than a redirect).

chef-manage

After adding chef-manage to chef-server (via chef-server-ctl install chef-manage && chef-server-ctl reconfigure && chef-manage-ctl reconfigure), attempting curl http://chef.server.url/ returns a 302 redirect. This stackoverflow answer to a different but related question seems to say that:

  • the chef-server webui is run via nginx
  • the chef-manage webui is run via unicorn
  • unicorn contains config.force_ssl=true unless ENV['NO_SSL'] (Found in /opt/chef-manage/embedded/service/chef-manage/config/environments/production.rb).
  • Performing export NO_SSL=true on the chef server and reconfiguring will disable ssl for chef-manage.

I've attempted this but a curl http://chef.server.url/ still returns a 302 redirect.

How can I disable ssl for the chef-manage webui?

Any tips, hints, or suggestions will be greatly appreciated!


Solution

  • For an intro workshop I wouldn't use Manage at all. It's just one more thing to learn for basically no benefit, and it's not quite deprecated but definitely in a similar orbit (Automate is where any major new development is going).