GithubHelp home page GithubHelp logo

Comments (5)

bwann avatar bwann commented on April 25, 2024

Granted, it's not explicitly shown in the docs but there's not much to running g-d. After putting in the config file, run it with -v and/or look for messages in /var/log/messages. If it has problems checking out your repo, if there's a cookbook dependency problem (e.g. metadata requires a cookbook but it's not in the repo), or it can't connect to your chef server, it's pretty verbose about any errors. Then throw it in cron/systemd timer to run frequently forever.

[root@basic07 ~]# /opt/chef/embedded/bin/grocery-delivery
WARN: Attempting to acquire lock
WARN: Lock acquired
WARN: Updating repo
WARN: Determing changes... from 2108 to 2109
WARN: Added cookbooks: ["wn_homenet"]
WARN: Deleted cookbooks: []
WARN: Added roles: []
WARN: Deleted roles: []
WARN: Added databags: []
WARN: Deleted databags: []
WARN: Success at 2109
[root@basic07 ~]#

[root@basic07 ~]# /opt/chef/embedded/bin/grocery-delivery -v
WARN: Attempting to acquire lock
WARN: Lock acquired
WARN: Updating repo
INFO: Running "svn cleanup /var/chef/grocery_delivery_work/chef"
INFO: Running "svn revert -R /var/chef/grocery_delivery_work/chef"
INFO: Running "svn update /var/chef/grocery_delivery_work/chef"
INFO: Running "svn info /var/chef/grocery_delivery_work/chef"
WARN: Repo has not changed, nothing to do...
WARN: Success at 2109

Whichever user is running g-d, will also need a knife config to upload stuff to the chef user. If you're doing this as root, then root will need a ~/.chef/knife.rb config. You can go one step further and create a write-only validation key just for grocery-delivery uploads:

[root@basic07 .chef]# cat /root/.chef/knife.rb
# Knife configuration for Grocery Delivery to upload to a Chef Server.
#
# This file is managed by Chef.  Do not make any changes to this file or
# they will be overwritten.

log_level :info
log_location STDOUT
node_name 'wn_gd_uploader'
client_key '/root/.chef/wn_gd_uploader-priv.pem'
validation_client_name 'wannnet-validator'
validation_key '/etc/chef-server/wannnet-validation.pem'
cookbook_path '/var/chef/grocery_delivery_work/chef/cookbooks/'
# Beware of using something other than localhost, or you could unintentionally
# hork a different server than expected someday.
chef_server_url 'https://localhost:443'
ssl_verify_mode :verify_none

from grocery-delivery.

vladionescu avatar vladionescu commented on April 25, 2024

Thanks!

That part is easy to pick up, the trouble I ran into is figuring out how to land /opt/chef/embedded/bin/grocery-delivery on disk. I tried /opt/opscode/embedded/bin/gem install grocery_delivery from https://clburlison.com/chef-grocery-delivery-setup/ but due to my chef-workstation setup gd won't run. I didn't know about the chefdk dependency.

from grocery-delivery.

vladionescu avatar vladionescu commented on April 25, 2024

For anyone following along, install is broken right now due to an upstream bug and a workaround exists: Originally posted by @jaymzh in #48 (comment)

Install instructions to come soon.

from grocery-delivery.

jaymzh avatar jaymzh commented on April 25, 2024

@vladionescu are you still interested in contributing install instructions?

from grocery-delivery.

vladionescu avatar vladionescu commented on April 25, 2024

from grocery-delivery.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.