简体   繁体   English

使用Puppet在Windows Server 2008上安装tomcat 7(master是ubuntu)

[英]Install tomcat 7 on windows server 2008 using puppet ( master is ubuntu )

Has anyone installed tomcat and jdk7 packages on windows server 2008 using puppet. 是否有人使用puppet在Windows Server 2008上安装了tomcat和jdk7软件包。

puppet master is (Ubuntu) puppet agent is (windows server 2008) 木偶大师是(Ubuntu)木偶代理是(Windows Server 2008)

node 'puppetwindows' {
package {'jdk7 v7.0.79.1':
           ensure => present,
           source => 'puppet:///modules/jdk//jdk-7u79-windows-x64.exe',
           path => “C:\jdk-7u79-windows-x64.exe”
           install_options => ['/VERYSILENT'],

below is the output; 下面是输出;

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could
 not parse for environment production: invalid byte sequence in US-ASCII at /etc
/puppet/manifests/site.pp:1 on node puppetwindows.pramati.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Your file is using UTF-8 with BOM. 您的文件使用带有BOM的UTF-8。 Convert it to UTF-8 w/out BOM. 将其转换为不带BOM的UTF-8。

You should also use puppet parser validate path\\to\\manifest.pp so you can get an idea of whether the file contains good Puppet code and as a byproduct whether Puppet can read the file (are the encodings usable?). 您还应该使用puppet parser validate path\\to\\manifest.pp以便您了解文件是否包含良好的Puppet代码,以及作为副产品,Puppet是否可以读取文件(编码是否可用?)。

I just restarted the puppet master and it worked fine. 我刚刚重启了木偶大师,一切正常。

installed chocolatey(package manager for windows same as apt-get on Ubuntu) on both Ubuntu(puppet master) windows(puppet agent) 在两个Ubuntu(puppet master)Windows(puppet agent)上都安装Chocolatey(与Ubuntu上的apt-get相同的Windows软件包管理器)

and with the below code I was able to install tomcat successfully. 并使用下面的代码,我能够成功安装tomcat。

node 'puppetwindows.XXXX.com' {
        package { 'tomcat':
                provider => 'chocolatey',
                ensure => 'latest',
                }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM