Skip to content

Instantly share code, notes, and snippets.

@pburkholder
Created January 29, 2015 21:07
Show Gist options
  • Select an option

  • Save pburkholder/f3f567068422a3c7571a to your computer and use it in GitHub Desktop.

Select an option

Save pburkholder/f3f567068422a3c7571a to your computer and use it in GitHub Desktop.
Supermarket notes

Manual install

GCE project cheffian-supermarket

chefserver

Install and configure api_fqdn:

apt-get update
curl https://packagecloud.io/install/repositories/chef/stable/script.deb |  bash
apt-get update
apt-get install chef-server-core
echo "api_fqdn \"$(hostname -f)\"" >> /etc/opscode/chef-server.rb
chef-server-ctl reconfigure

Add orgs/user:

chef-server-ctl user-create pdb Peter Burkholder pburkholder@getchef.com TestPassword -f pdb.pem
chef-server-ctl org-create pdb_chef12_org pdb_chef12_org -f pdb_chef12_org.pem -a pdb
echo "oc_id['administrators'] = ['pdb']" >> /etc/opscode/chef-server.rb
chef-server-ctl reconfigure

Configure oc-id

Supermarket

Install:

apt-get update
curl https://packagecloud.io/install/repositories/chef/stable/script.deb | apt-get update
apt-get install supermarket
supermarket-ctl reconfigure

Configure /etc/supermarket/supermarket.rb:

default['supermarket']['chef_oauth2_app_id'] = '1fcce03a...67b822d1196'
default['supermarket']['chef_oauth2_secret'] = '9836e5f7d65....b10178ac0d'
default['supermarket']['chef_oauth2_url'] = 'https://chefserver-0.c.cheffian-supermarket.internal'
default['supermarket']['chef_oauth2_verify_ssl'] = false

Reconfigure:

supermarket-ctl reconfigure

Next:

https://supermarket-0.c.cheffian-supermarket.internal/sign-in

You'll be redirected to the oc-id service on chef-server. Sign-in with the credentials you used above, then accept the request to 'Authorize Supermarket to use your Chef account'

Scratch area

Application: supermarket Application Id:

1fc.... 196

Secret:

9836e5f.... a0b10178ac0d

Callback URLs:

https://supermarket/auth/chef_oauth2/callback Authorize http://supermarket/auth/chef_oauth2/callback Authorize http://supermarket-0.c.cheffian-supermarket.internal/auth/chef_oauth2/callback Authorize https://supermarket-0.c.cheffian-supermarket.internal/auth/chef_oauth2/callback Authorize

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment