Installing Supermarket Without a Wrapper Cookbook

Installing Supermarket

The current way of setting up a private Supermarket uses the wrapper cookbook pattern. This method has its benefits. It’s repeatable, automated, makes customization easy, etc. If you would like to use this method visit:

This guide is for those of you want to setup a private Supermarket but don’t want the benefits of using a cookbook.


Install the Package

  1. Install the Supermarket package:

      # Ubuntu/Debian: sudo dpkg -i /path/to/supermarket-package.deb
      # RHEL/CentOS: sudo rpm -Uvh /path/to/supermarket-package.rpm
  2. Reconfigure:

      sudo supermarket-ctl reconfigure

Configure Authentication via Chef Server

  1. On your Chef server add the following to /etc/opscode/chef-server.rb:

      oc_id['applications'] ||= {}
      oc_id['applications']['supermarket'] = {
          'redirect_uri' => 'https://YOUR_SUPERMARKET_FQDN/auth/chef_oauth2/callback'
  2. Run the following on your Chef server:

      sudo chef-server-ctl reconfigure
  3. Save the contents of /etc/opscode/oc-id-applications/supermarket.json:

  4. On the Supermarket server, create /etc/supermarket/supermarket.json using:

          "chef_server_url": "https://YOUR_CHEF_SERVER_FQDN",
          "chef_oauth2_app_id": "UID FROM SUPERMARKET JSON (STEP 3)",
          "chef_oauth2_secret": "SECRET FROM SUPERMARKET JSON (STEP 3)",
          "chef_oauth2_verify_ssl": false
  5. Reconfigure:

      sudo supermarket-ctl reconfigure
  6. Test the login by going to your Supermarket FQDN and logging in as a Chef user.

  7. Authorize Supermarket to use that account.

Configuring SSL

  1. Place the following in /etc/supermarket/supermarket.rb:

     default['supermarket']['nginx']['force_ssl'] = true
     default['supermarket']['ssl']['certificate'] = '/var/opt/supermarket/ssl/ca/your-host.crt'
     default['supermarket']['ssl']['certificate_key'] = '/var/opt/supermarket/ssl/ca/your-host.key'
  2. Run the following:

     sudo supermarket-ctl reconfigure