Question

I have just began my journey of chef and I have couple of ubuntu ec2 instances running I have installed the chef-client and also configured the node. I am trying to run a getting started cookbook I was following this wiki

knife cookbook site install getting-started

But when ever I run this command I am getting this error in my laptop which runs on ubuntu 12.10

Installing getting-started to /var/chef/cookbooks
ERROR: The default branch 'master' does not exist
If this is a new git repo, make sure you have at least one commit before installing cookbooks

I am just a beginner, I am not able to figure out how do I deploy a simple cookbook to all my instances.

Kindly help me out

Was it helpful?

Solution

You must

> git add --all
> git commit -a -m "updates"
> git stash save

You must view https://docs.chef.io/errors.html

OTHER TIPS

I had to commit to git the /var/chef/cookbooks directory, adding first a readme.txt file so there was actually something in the git repo.

After that, ran the install for weblogic

    sudo su -
    cd /var/chef/cookbook
    git init
    echo "New repo!" > readme.txt
    git add readme.txt
    git commit -a -m "initializing repo for chef"
    cd /home/your-username/chef-repo
    knife cookbook site install weblogic
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top