Chef Cookbook to Install Cloudamize Agent

Install Linux Agent From Remote Server:

remote_file "#{Chef::Config[:file_cache_path]}/installCloudamizeAgentV2.sh" do
source 'https://agentmanager1.cloudamize.com/cxf/downloadFile/installCloudamizeAgentV2.sh'
owner 'root'
group 'root'
mode '0755'
action :create
endexecute 'install Cloudamize Agent' do
environment 'CLOUDAMIZE_CUSTOMER_KEY' => node['cloudamize_key']['token'] # Add cloudamize_key under default_attributes in customer chef
user 'root'
command "#{Chef::Config[:file_cache_path]}/installCloudamizeAgentV2.sh"
creates '/usr/local/cloudamize'
end

 

Install Linux Agent Locally:

cookbook_file "local_file.sh" do
  owner "root"
  group "root"
  mode "0755"
  path "/tmp/install_agent_v2.sh"
end

execute "install Cloudamize Agent" do
  environment { "CLOUDAMIZE_CUSTOMER_KEY" => node[:cloudamize][:customer_key] }
  command "/tmp/install_agent_v2.sh"
  creates "/usr/local/cloudamize"
end



Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.