Initial check-in for chef-installer.
git-tfs-id: [http://vstfmsn:8080/tfs/MSN01]$/PubServices/Deployment/InstallationSDK/Main/src/Modules/InstallationSDK.ChefClientInstaller;C1126136
This commit is contained in:
Коммит
566e44b8ed
|
@ -0,0 +1,46 @@
|
|||
# Installer chef client
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$VerbosePreference = "Continue"
|
||||
|
||||
pushd $PSScriptRoot
|
||||
try
|
||||
{
|
||||
$msi = (resolve-path "./resources/*msi").path
|
||||
}
|
||||
finally
|
||||
{
|
||||
popd
|
||||
}
|
||||
|
||||
function Install-ChefClient
|
||||
{
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Install Chef Client from Assemblies directory
|
||||
|
||||
.DESCRIPTION
|
||||
Run the offline installer for Chef Client
|
||||
|
||||
.NOTES
|
||||
Downloaded from: http://www.getchef.com/chef/install/
|
||||
|
||||
.EXAMPLE
|
||||
Install-ChefClient -verbose
|
||||
#>
|
||||
|
||||
Process
|
||||
{
|
||||
# TODO - change the location of the client root via chef-client configuration so that we don't install on the System Drive.
|
||||
md d:\chef -ErrorAction SilentlyContinue
|
||||
copy-item .\*.rb d:\chef
|
||||
copy-item .\*.pem d:\chef
|
||||
write-verbose $PSScriptRoot
|
||||
write-verbose "Installing chef client from $msi."
|
||||
start-process msiexec -ArgumentList "/qn /i $msi ADDLOCAL=`"ChefClientFeature,ChefServiceFeature`" /log $($msi).log" -Wait
|
||||
sc.exe failure "chef-client" reset= 86400 actions= restart/5000
|
||||
start-service chef-client
|
||||
}
|
||||
}
|
||||
|
||||
Export-ModuleMember Install-ChefClient
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"Name": "InstallationSDK.ChefClientInstaller",
|
||||
"OutputPath": "bin",
|
||||
"Module": {
|
||||
"Id": "461F01C0-4131-4D08-B26A-77BFA521923B",
|
||||
"Name": "InstallationSDK.ChefClientInstaller",
|
||||
"Version": "1.0.0",
|
||||
"Author": "ampdmi",
|
||||
"CompanyName": "Microsoft",
|
||||
"Description": "PowerShell Cmdlets for installing Chef-Client.",
|
||||
"Copyright": "(c) 2014 Microsoft. All rights reserved.",
|
||||
"PowerShellVersion": "3.0",
|
||||
"RequiredModules": []
|
||||
},
|
||||
"Files": {
|
||||
"RootModule": "InstallationSDK.ChefClientInstaller.psm1",
|
||||
"Content": [ "./resources/*.msi"]
|
||||
}
|
||||
}
|
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче