厨师引导谷歌云上的一个节点

时间:2015-06-09 14:19:51

标签: chef

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

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并将密钥下载到clinet但仍然没有用

1 个答案:

答案 0 :(得分:1)

我遇到了类似的错误,对我有用的是告诉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的文件。