如何确保 App Fabric 安装在 Windows Puppet Agent 上
How to ensure that App Fabric is installed on a Windows Puppet Agent
我正在尝试在 Windows Puppet Agent 上设置 App Fabric。我有以下配置:
- Linux傀儡师 (CentOS 6.5)
- Windows傀儡代理(Windows Server 2008 R2)
- 傀儡版本 3.8.2
我正在使用以下清单来确保安装了 App Fabric:
# This is the init.pp manifest file for the appfabric module
class appfabric {
# TODO: Get the setup path from Hiera
$setup_base_directory = 'D:/Setups/'
$setup_path = "${setup_base_directory}WindowsServerAppFabricSetup_x64.exe"
$hotfix_path = "${setup_base_directory}AppFabric1.1-KB2932678-x64-ENU.exe"
# Pull down the setup of AppFabric
file {$setup_path:
ensure => file,
source_permissions => ignore,
source => 'puppet:///modules/appfabric/WindowsServerAppFabricSetup_x64.exe',
}
->
# Pull down the setup of hotfix update 5
file {$hotfix_path:
ensure => file,
source_permissions => ignore,
source => 'puppet:///modules/appfabric/AppFabric1.1-KB2932678-x64-ENU.exe',
}
->
# Install AppFabric 1.1
package {'AppFabric 1.1 for Windows Server':
ensure => present,
source => $setup_path,
install_options => ['/i','/SkipUpdates'],
}
->
# Install Hotfix KB2932678
package {'AppFabric 1.1 HotFix install':
ensure => present,
source => $hotfix_path,
install_options => ['/q','/norestart'],
}
->
# Start the remote registry service
service {'Remote Registry Service':
ensure => running,
name => 'RemoteRegistry',
enable => true,
}
->
# Start the app fabric service
service {'App Fabric Service':
ensure => running,
name => 'AppFabricCachingService',
enable => true,
}
}
我面临以下问题:
我无法将 AppFabricCachingService
的登录用户更改为 NT Authority\System
(本地系统帐户)或任何其他特定用户。
当我在 Windows Puppet 代理上 运行 命令 puppet agent --test
时,puppet 每次都尝试安装 App Fabric .我正在尝试编写清单,以确保如果 App Fabric 已安装,则 puppet 不应尝试重新安装。
我是 Puppet 配置管理的新手,任何帮助都将非常有用。
提前致谢。
对于您的第二个问题,请确保包的名称(在您的情况下,您指定 "AppFabric 1.1 for Windows Server")与出现在 Windows Add\Remove 程序菜单中的名称匹配。否则 Puppet 每次都会重新安装。
您可能想查看 Package on Windows 文档页面。
根据该页面:
The easiest way to determine a package’s DisplayName is to:
Install the package on an example system.
Run puppet resource package to see a list of installed packages.
Locate the package you just installed, and copy the name that puppet resource reported for it.
如果您正在安装的软件没有出现在程序列表中,我的建议是不要使用 package
。相反,使用 exec
来安装它,并在 运行 安装程序中添加 creates
子句,仅当在特定位置找不到属于该软件的文件时,或者 unless
执行自由形式的检查(注册表、尝试执行软件并检查版本等)
我正在尝试在 Windows Puppet Agent 上设置 App Fabric。我有以下配置:
- Linux傀儡师 (CentOS 6.5)
- Windows傀儡代理(Windows Server 2008 R2)
- 傀儡版本 3.8.2
我正在使用以下清单来确保安装了 App Fabric:
# This is the init.pp manifest file for the appfabric module
class appfabric {
# TODO: Get the setup path from Hiera
$setup_base_directory = 'D:/Setups/'
$setup_path = "${setup_base_directory}WindowsServerAppFabricSetup_x64.exe"
$hotfix_path = "${setup_base_directory}AppFabric1.1-KB2932678-x64-ENU.exe"
# Pull down the setup of AppFabric
file {$setup_path:
ensure => file,
source_permissions => ignore,
source => 'puppet:///modules/appfabric/WindowsServerAppFabricSetup_x64.exe',
}
->
# Pull down the setup of hotfix update 5
file {$hotfix_path:
ensure => file,
source_permissions => ignore,
source => 'puppet:///modules/appfabric/AppFabric1.1-KB2932678-x64-ENU.exe',
}
->
# Install AppFabric 1.1
package {'AppFabric 1.1 for Windows Server':
ensure => present,
source => $setup_path,
install_options => ['/i','/SkipUpdates'],
}
->
# Install Hotfix KB2932678
package {'AppFabric 1.1 HotFix install':
ensure => present,
source => $hotfix_path,
install_options => ['/q','/norestart'],
}
->
# Start the remote registry service
service {'Remote Registry Service':
ensure => running,
name => 'RemoteRegistry',
enable => true,
}
->
# Start the app fabric service
service {'App Fabric Service':
ensure => running,
name => 'AppFabricCachingService',
enable => true,
}
}
我面临以下问题:
我无法将
AppFabricCachingService
的登录用户更改为NT Authority\System
(本地系统帐户)或任何其他特定用户。当我在 Windows Puppet 代理上 运行 命令
puppet agent --test
时,puppet 每次都尝试安装 App Fabric .我正在尝试编写清单,以确保如果 App Fabric 已安装,则 puppet 不应尝试重新安装。
我是 Puppet 配置管理的新手,任何帮助都将非常有用。
提前致谢。
对于您的第二个问题,请确保包的名称(在您的情况下,您指定 "AppFabric 1.1 for Windows Server")与出现在 Windows Add\Remove 程序菜单中的名称匹配。否则 Puppet 每次都会重新安装。
您可能想查看 Package on Windows 文档页面。
根据该页面:
The easiest way to determine a package’s DisplayName is to:
Install the package on an example system.
Run puppet resource package to see a list of installed packages.
Locate the package you just installed, and copy the name that puppet resource reported for it.
如果您正在安装的软件没有出现在程序列表中,我的建议是不要使用 package
。相反,使用 exec
来安装它,并在 运行 安装程序中添加 creates
子句,仅当在特定位置找不到属于该软件的文件时,或者 unless
执行自由形式的检查(注册表、尝试执行软件并检查版本等)