chef-infra - Chef 在谷歌云上引导一个节点

标签 chef-infra

试图在谷歌云引擎上引导一个节点,但我所有的尝试都以失败告终 代码

knife bootstrap ipaddress -x raid -i ~/.ssh/google_compute_engine --sudo 

结果: **

trying wget...
130.211.139.224 Comparing checksum with sha256sum...
130.211.139.224 Installing Chef 12
130.211.139.224 installing with rpm...
130.211.139.224 warning: /tmp/install.sh.10183/chef-12.3.0-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
130.211.139.224 Preparing...                          ################################# [100%]
130.211.139.224 Updating / installing...
130.211.139.224    1:chef-12.3.0-1.el6                ################################# [100%]
130.211.139.224 Thank you for installing Chef!
130.211.139.224 Starting first Chef Client run...
130.211.139.224 Starting Chef Client, version 12.3.0
130.211.139.224 Creating a new client identity for raid-couchbase1.c.melodic-lantern-854.internal using the validator key.
130.211.139.224 
130.211.139.224 ================================================================================
130.211.139.224 Chef encountered an error attempting to create the client "raid-couchbase1.c.melodic-lantern-854.internal"
130.211.139.224 ================================================================================
130.211.139.224 
130.211.139.224 Authentication Error:
130.211.139.224 ---------------------
130.211.139.224 Failed to authenticate to the chef server (http 401).
130.211.139.224 
130.211.139.224 Server Response:
130.211.139.224 ----------------
130.211.139.224 Invalid signature for user or client 'anan'
130.211.139.224 
130.211.139.224 Relevant Config Settings:
130.211.139.224 -------------------------
130.211.139.224 chef_server_url         "https://chef-server-e0jk.c.melodic-lantern-854.internal/organizations/anan"
130.211.139.224 validation_client_name  "anan"
130.211.139.224 validation_key          "/etc/chef/validation.pem"
130.211.139.224 
130.211.139.224 If these settings are correct, your validation_key may be invalid.
130.211.139.224 
130.211.139.224 [2015-06-09T13:54:49+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out

**

我重装了无数次chefserver并下载了 key 到clinet但是还是没有用

最佳答案

我遇到了类似的错误,对我有用的是告诉 gcloud 配置 ~/.ssh/config 所以我不需要指定身份文件在 knife 命令中。像这样:

C:\Users\...\Google\Cloud SDK>gcloud compute config-ssh
You should now be able to use ssh/scp with your instances.
For example, try running:

  $ ssh instance-2.us-west1-c.myproject-145353

然后,我可以使用以下命令引导我的节点:

knife bootstrap --ssh-user MyRemoteUser --sudo instance-2.us-west1-c.myproject-145353 --node-name node15-ubuntu --run-list 'recipe[learn_chef_apache2]'

请注意,我没有指定连接的 IP 或标识文件,因为使用了来自 ~/.ssh/config 的那些文件。

关于chef-infra - Chef 在谷歌云上引导一个节点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30734772/

相关文章:

chef-infra - Berkshelf 不会在 git 中下载 Cookbook 的依赖项

amazon-web-services - 使用 Chef 以编程方式查找 AWS 公共(public) DNS

shell - Vagrant 配置 shell 与 puppet 与 Chef

ruby - 如何查看上传失败的具体 Recipe ?

node.js - Chef 客户端在 node-gyp 重建时卡在 npm 安装上

git - 使用单个 git 存储库而不是子模块来管理不同的代码库

ruby - Chef Minitest 检查文件的内容

ruby - 如果存在,则使用 Chef 更改文件中的文本,如果不存在则添加

ruby - 使用 Rspec 断言 Ruby(Chef Recipe)中方法的返回值

ruby - 在 Chef 资源之间传递变量