【问题标题】:Unable to install cookbook in chef无法在厨师中安装食谱
【发布时间】:2013-02-18 14:25:25
【问题描述】:

我刚刚开始了我的 Chef 之旅,我运行了几个 ubuntu ec2 实例,我已经安装了 chef-client 并配置了节点。我正在尝试运行我正在关注的入门食谱wiki

knife cookbook site install getting-started

但是当我运行这个命令时,我在运行在 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

我只是一个初学者,我无法弄清楚如何将一个简单的说明书部署到我的所有实例。

请帮帮我

【问题讨论】:

    标签: linux ubuntu chef-infra ubuntu-12.10


    【解决方案1】:

    你必须

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

    您必须查看 https://docs.chef.io/errors.html

    【讨论】:

      【解决方案2】:

      我必须提交到 git /var/chef/cookbooks 目录,首先添加一个 readme.txt 文件,所以 git 存储库中确实有一些东西。

      之后,运行 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
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-01-29
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多