2.3 KiB
layout | title | category | tags | summary |
---|---|---|---|---|
post | Installing Supermarket Without a Wrapper Cookbook | chef_infra | [chef supermarket installation] | Need a quick guide to setup a private Supermarket, but don't want to hassle with making a wrapper cookbook? Read this. |
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:
https://docs.chef.io/install_supermarket.html
This guide is for those of you want to setup a private Supermarket but don't want the benefits of using a cookbook.
Guide
Install the Package
-
Install the Supermarket package:
curl -L https://omnitruck.chef.io/install.sh | sudo bash -s -- -P chef-server
``
-
Reconfigure:
sudo supermarket-ctl reconfigure
``
Configure Authentication via Chef Server
-
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' }
``
-
Run the following on your Chef server:
sudo chef-server-ctl reconfigure
``
-
Save the contents of
/etc/opscode/oc-id-applications/supermarket.json
: -
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 }
``
-
Reconfigure:
sudo supermarket-ctl reconfigure
``
-
Test the login by going to your Supermarket FQDN and logging in as a Chef user.
-
Authorize Supermarket to use that account.
Configuring SSL
-
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'
``
-
Run the following:
sudo supermarket-ctl reconfigure
``