Hi All,
I am trying to write dynatrace cookbook for my environment. this cookbook
will basically install /configure client on remote machines. this will do
the server monitoring and then I will add code to install agent part for
application monitoring.
I am trying to do the installation through these command
execute “Install the Dynatrace Client package” do
command “powershell.exe -NoLogo -NonInteractive -NoProfile -ExecutionPolicy
RemoteSigned -InputFormat None -File InstallMSI.ps1 -InstallPath
”#{installer_install_dir}" -Installer “#{installer_path}”"
cwd #{node[:dynatrace][:temp_dir]}
end
this is not installing client with default values, I am thinking to pass
attributes through configuration.ini. I don’t know whether this will work ??
Can someone show some lights on it ??
Thanks,
Sachin
Hi!
It’s possible you may be doubling up work here. Dynatrace has a cookbook in the Chef Partner Cookbook Program. Maybe you can ask them for windows support/extend their cookbook to have windows support?
Another option is to leverage the windows_package resource to do the MSI install. Note its options
property where you can pass in custom args to MSIEXEC
. Short of that consider using the powershell_script
resource over execute
.
Thanks Matt, I followed windows_package resource to install dynatrace
client.
windows_package ‘Dynatrace Client’ do
source node[:dynatrace][:file_url]
options “INSTALLDIR=”#{node[:dynatrace][:install_dir]}""
end
I am able to install the dynatrace client. now I have to make few change in
configuration.
Shall I create a template for that or I can pass (ServerName/Port) at the
time of installation with options field.
Thanks,
Sachin
I’m not entirely sure. This sounds like a question specific to the dynatrace installer which I know nothing about. If the installer accepts those properties as custom install arguments, you should be able to pass them to the options attribute at install time. If it uses a file to read them, then a template is likely the way to go.