azure - 无法使用 packer chef-client provisioner 从 chef-client 连接到 chef-server
问题描述
我一直在尝试在 azure vm windows 2016 数据中心映像中使用打包程序安装厨师客户端,但是在创建映像后,我在厨师工作站中检查了厨师客户端配置机器的映像未连接到厨师服务器。
是否需要手动执行刀命令?但是knife命令需要vm的私有IP,那么带有厨师客户端配置的图像如何自动连接到厨师服务器?
这是我尝试过的模板代码:
{
"type": "chef-client",
"install_command": "powershell.exe -Command (New-Object System.Net.WebClient).DownloadFile('http://chef.io/chef/install.msi', 'C:\\Windows\\Temp\\chef.msi');Start-Process 'msiexec' -ArgumentList '/qb /i C:\\Windows\\Temp\\chef.msi' -NoNewWindow -Wait",
"Server_Url": "https://api.chef.io/organizations/xyz",
"Guest_Os_Type": "Windows",
"Chef_Environment": "",
"Ssl_Verify_Mode": "Verify_None",
"chef_license": "accept",
"Validation_Client_Name": "xyz94",
"Validation_Key_Path": "C:/packer/packer-repo/packer-master/DE/setup_files/xyz94.pem",
"Skip_Clean_Client": "True",
"Skip_Clean_Node": "False"
}
解决方案
推荐阅读
- c - 根据文件中的行创建数组
- uwp - 使用连续听写
- reactjs - 如何使用命令提示符检查当前版本的 React
- sql - sql中的nameUUIDFromBytes
- lambda - 返回 lambda 函数与在 python 装饰器中返回方法的区别
- swift - 当我滚动时,TableView DidSelectRowAt 将更改其他单元格的背景颜色
- sql-server - 在字符串中捕获字符串
- php - 在 Laravel 中返回数据库查询时更改字段值
- python - 如何根据特定列在 Pandas Dataframe 中上移行
- javascript - 支付成功后JS Api重定向到404