试图使用Chef引导Windows服务器
我是一名Mac女孩,致力于通过Opscode管理的厨师与我的Rackspace Windows服务器连接刀窗。 (我知道,这听起来很奇特,但这些Windows服务器是客户的需求)。
我尝试了Chef,但我一直试图用knife-windows命令在Rackspace上引导Windows 2008 Server。
我在OSX上工作,使用rvm,ruby 2.1.0和本地gemset与厨师+刀窗。
我试图按照以下步骤操作:https://github.com/opscode/knife-windows
我配置了winrm服务。 我已经建立了一个规则,允许在端口5985的防火墙中建立入站连接,并验证了我可以连接到telnet。
除了学习厨师的屏幕演示外,我还试图遵循指南:http://developer.rackspace.com/blog/step-by-step-walkthrough-to-using-chef-to-bootstrap-windows-nodes -on最Rackspace公司,cloud.html
我这样配置winrm:
winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
net stop winrm
sc config winrm start=auto
net start winrm
我正在使用这样的刀子:knife bootstrap windows winrm 168。**** -x管理员-P'****'
我找回了这个奇怪的日志,没有成功的报告,没有出现在厨师管理控制台中的实例....我看到它试图多次插入字符'#39'?
WARNING: Could not load IOV methods. Check your GSSAPI C library for an update
WARNING: Could not load AEAD methods. Check your GSSAPI C library for an update
Bootstrapping Chef on 162.13.15.241
162.13.15.241 "Rendering "C:UsersADMINI~1AppDataLocalTempbootstrap-47130-1392751156.bat" chunk 1"
162.13.15.241 "Rendering "C:UsersADMINI~1AppDataLocalTempbootstrap-47130-1392751156.bat" chunk 2"
162.13.15.241 '#39' is not recognized as an internal or external command,
162.13.15.241 operable program or batch file.
162.13.15.241 "Rendering "C:UsersADMINI~1AppDataLocalTempbootstrap-47130-1392751156.bat" chunk 3"
162.13.15.241 '#39' is not recognized as an internal or external command,
162.13.15.241 operable program or batch file.
162.13.15.241 "Rendering "C:UsersADMINI~1AppDataLocalTempbootstrap-47130-1392751156.bat" chunk 4"
162.13.15.241 '#39' is not recognized as an internal or external command,
162.13.15.241 operable program or batch file.
162.13.15.241 '#39' is not recognized as an internal or external command,
....
162.13.15.241 echo.
162.13.15.241 echo.$webClient = new-object System.Net.WebClient;
162.13.15.241 echo.
162.13.15.241 echo.$webClient.DownloadFile($remoteUrl, $localPath);
162.13.15.241 ) 1>C:chefwget.ps1
162.13.15.241 C:UsersAdministrator>)
我试图按照来自Mac OS X工作站的刀引导窗口winrm的建议失败,并将刀窗降级到版本0.5.10,但结果相同。
我的宝石如下:
akami (1.2.1)
bigdecimal (1.2.3)
builder (3.2.2)
bundler (1.5.3)
bundler-unload (1.0.2)
chef (11.10.0)
chef-zero (1.7.3)
coderay (1.1.0)
diff-lcs (1.2.5)
em-winrm (0.5.4)
erubis (2.7.0)
eventmachine (1.0.0.beta.3)
excon (0.31.0)
executable-hooks (1.3.1)
ffi (1.9.3)
fog (1.20.0)
formatador (0.2.4)
gem-wrappers (1.2.4)
gssapi (1.0.3)
gyoku (1.1.1)
hashie (2.0.5)
highline (1.6.20)
httpclient (2.3.4.1)
httpi (0.9.7)
io-console (0.4.2)
ipaddress (0.8.0)
json (1.8.1)
knife-rackspace (0.9.0)
knife-windows (0.5.10)
little-plugger (1.1.3)
logging (1.8.2)
method_source (0.8.2)
mime-types (1.25.1)
mini_portile (0.5.2)
minitest (4.7.5)
mixlib-authentication (1.3.0)
mixlib-cli (1.4.0)
mixlib-config (2.1.0)
mixlib-log (1.6.0)
mixlib-shellout (1.3.0)
moneta (0.6.0)
multi_json (1.8.4)
net-scp (1.1.2)
net-ssh (2.8.0)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.2.0)
nokogiri (1.6.1)
nori (1.1.5)
ohai (6.20.0)
pry (0.9.12.6)
psych (2.0.2)
puma (1.6.3)
rack (1.5.2)
rake (10.1.0)
rdoc (4.1.0)
rest-client (1.6.7)
rubygems-bundler (1.4.2)
rubyntlm (0.1.1)
rvm (1.11.3.9)
savon (0.9.5)
slop (3.4.7)
systemu (2.5.2)
test-unit (2.1.0.0)
uuidtools (2.1.4)
wasabi (1.0.0)
winrm (1.1.3)
yajl-ruby (1.2.0)
有什么建议? 这是一个OS X的东西? Windows Server的东西? 厨师的事情?
随着希望的最后碎片,阿加塔
清除并安装它:
gem uninstall knife-windows
gem install knife-windows -v 0.5.10
检查你的宝石:
gem list | grep knife-windows
它应该显示knife-windows (0.5.10)
。
配置窗口远程管理
1. winrm quickconfig -q
2. winrm set winrm/config/winrs @{MaxMemoryPerShellMB="300"}
3. winrm set winrm/config @{MaxTimeoutms="1800000"}
4. winrm set winrm/config/service @{AllowUnencrypted="true"}
5. winrm set winrm/config/service/auth @{Basic="true"}
然后引导:
knife bootstrap windows winrm ec2-xx-xxx-xx.compute-1.amazonaws.com -r 'recipe[cookbook]' -x Administrator -P xxxxxxxx
就我而言,RVM是罪魁祸首。 我设法通过以下步骤解决此问题:
1)从Opscode下载并安装Chef omnibus安装程序
curl -L https://www.opscode.com/chef/install.sh | sudo bash
2)直接在厨师图书馆安装刀窗:
导航到/opt/chef/embedded/bin/gem
使用系统红宝石禁用rvm:
rvm use system
3)安装knife windows插件:
/opt/chef/embedded/bin/gem install knife-windows
现在我可以使用该命令引导我的Windows Server节点
knife bootstrap windows winrm <IP Address> -p 5985 -x Administrator -P '<password>'
链接地址: http://www.djcxy.com/p/77597.html
上一篇: Stuck trying to bootstrap Windows server using Chef
下一篇: UIActivityViewController with NSURL to audio file only shows airdrop