【发布时间】:2015-10-29 04:57:04
【问题描述】:
我正在学习“学习安装和管理您自己的 Chef 服务器/ 在 learn.chef.io 上管理 Chef 服务器上的节点”教程,但遇到了 Google 显然不知道的问题。
我正在尝试在本地运行所有内容,因此请进行以下设置:
- Chef Workstation - 我的 Fedora 20 笔记本电脑
- Chef Server - 一个运行 CentOS 7 的虚拟机
- Chef Node - 另一个运行 CentOS 7 最小的 VM
我已经设置了工作站和服务器、用户和组织,提取了 Starter Kit,一切似乎都运行良好。
当我尝试引导我的 Chef 节点时,它会失败,如下所示:
$ knife bootstrap centos-slave1.example.com --ssh-user <me> --sudo --identity-file ~/.ssh/id_dsa --node-name centos-slave1 --run-list 'recipe[hello_chef_server]'
Doing old-style registration with the validation key at /home/<me>/chef-repo/.chef/merin-validator.pem...
Delete your validation key in order to use your user credentials instead
Connecting to centos-slave1.example.com
ERROR: RegexpError: end pattern with unmatched parenthesis: /^(for$/i
如果我删除该验证密钥,它仍然会失败并出现相同的错误:
Creating new client for centos-slave1
Creating new node for centos-slave1
Connecting to centos-slave1.merin
ERROR: RegexpError: end pattern with unmatched parenthesis: /^(for$/i
我没有对教程步骤之外的任何内容进行任何特殊修改。所有端口都在监听,防火墙在所有组件之间打开,ssh 密钥正常工作 - 基本上各方面的连接似乎都很好。
我还尝试使用我的密码启动引导命令,甚至尝试一次删除一个标志(一直到只是“刀引导”) - 总是导致相同的错误。
任何想法,甚至只是朝着正确的方向推进都会很棒。很高兴为自己解决问题,但我已经坚持了一段时间(甚至多次开始)。
提前致谢, 马特
编辑: 添加knife.rb(替换了一些敏感信息)
$ cat .chef/knife.rb
# See https://docs.getchef.com/config_rb_knife.html for more information on knife configuration options
current_dir = File.dirname(__FILE__)
log_level :info
log_location STDOUT
node_name "<me>"
client_key "#{current_dir}/<me>.pem"
validation_client_name "merin-validator"
validation_key "#{current_dir}/merin-validator.pem"
chef_server_url "https://chef-master.example.com/organizations/merin"
cookbook_path ["#{current_dir}/../cookbooks"]
【问题讨论】:
-
你的
knife.rb看起来怎么样? -
我已经将我的knife.rb 配置添加到主帖
-
您的
~/.ssh/config中是否有 ruby 的 SSH 客户端可能无法理解的内容? -
宾果游戏!谢谢斯蒂芬金 :)
标签: chef-infra bootstrapping knife