Supermarket - Where are cookbooks stored and can you change?


#1

Question is: Where are the cookbooks stored in a private supermarket? Can you change the location to a different mount point?


#2

The default location is /var/opt/supermarket/data. It is configurable via the data_directory key in /etc/supermarket/supermarket.json—which is often customized via a wrapper cookbook using the supermarket-omnibus-cookbook and setting node['supermarket_omnibus']['config']['data_directory']. Note that if you change this directory after a private Supermarket has had cookbooks uploaded, it is on you to relocate the existing cookbooks and preserve the original file permissions in the new location.


#3

Thanks for the information. When you say wrapper you are talking about when I setup the private supermarket with the knife command from my workstation and creating the cookbook. I am not sure on the syntax for that. Are you saying use.

node.set[‘supermarket_omnibus’][‘config’][‘data_directory’] = ‘/data/supermarket/data’

I was however able to go into /etc/supermarket/
vi supermarket.rb and change the setting and rerun supermarket-ctl reconfigure and it seems to work.

Is there a reason to use a wrapper vs what I did? Still trying to figure all this out.


#4

So you can install and manage it directly if you want to, but if you’re using Chef, why not have Chef manage your Supermarket configuration as well? :slight_smile:

Nathan Clemons
DevOps Engineer
Moxie Cloud Services (MCS)

O +1.425.467.5075
M +1.360.861.6291
E nclemons@gomoxie.com
W www.gomoxie.comhttp://www.gomoxie.com/


#5

Thanks for the response. That is very true…