Mac Agent install Best Practice
I've built a package for the agent that works on 10.7. It does not however work using 10.6 & 10.5. I created it using Iceberg.
My goal is to not have the user enter the server name. What is best practice for this? I've read multiple forums but the documentation is incorrect, or is for 5.1.
Answers (4)
In my case I used http://www.macupdate.com/app/mac/14516/iceberg
From Kace Support:
Best Method - Repackage the agent - The method reduces the dependency on external script execution choosing to bundle the config script inside the package resulting in a monolithic deployment component.
1. Using as package creation tool that allows for postflight actions create an installer package that encases the original KACE installer.
2. Add a Postflight script
#!/bin/bash
#
# Stop agent
/Library/Application\ Support/Dell/KACE/bin/AMPctl stop
#
# Add K1000 FQDN name to amp.conf file
echo host=host.example.example > /Library/Application\ Support/Dell/KACE/data/amp.conf
#
# Start Agent
/Library/Application\ Support/Dell/KACE/bin/AMPctl start
3. Build the package and deploy via any standard tool
Each of these methods will result in a machine taking longer to initially as the agent initially starts with no config, is then shut down, configured and then started. Careful viewing of the logs will show an agent lacking configuration will assume the K1000's hostname is "kbox". After the amp.conf is configured and the agent started it will begin communicating with the FQDN you supply.
Comments:
-
is there any way of getting more detailed instructions on how to do this/what software to use to do this??? - DanielwBC 10 years ago
What version of MAC Agent do you have?
Comments:
-
5.3.53177. I'm making progress. It just seems like there should be an easier way. Rather that doing Post Flight scripts. It seems like I'm hacking up the agent. - dugullett 12 years ago
-
To have server name pre-populated in the mac installer, following are some ways which are supported
i. When using shell scripts to install the Agent. KACE_SERVER env variable is supported
1. hdiutil attach ./ampagent-5.3.12345-all.dmg
2. sudo sh -c 'KACE_SERVER=k1000name installer -pkg
/Volumes/Dell_KACE/AMPAgent.pkg -target /'
3. hdiutil detach '/Volumes/Dell KACE'
Alternately, if you can touch amp.conf in /Library/Application\ Support/Dell/KACE/data with content as host=kboxservername , then the installer will pick the servername from amp.conf - AbhayR 12 years ago
---------------------------------------------
edit: This solution is, in fact, not ideal as it does not affect the installer package, but only affects the machine it is run on.
In actuality, repackaging the installer (as outlined by dugullett) is the best way to accomplish this as part of the install process.
---------------------------------------------
Repackaging AbhayR's comment as an answer
The best way to accomplish this is the following(Replacing k1000name with your server address):
- Download the installer dmg to your local machine
- Open a terminal window (in an account with Admin priveledges)
- navigate(cd) to the folder containing your downloaded dmg.
- Type: hdiutil attach ./ampagent-5.3.53177-all.dmg Hit enter
- Type: sudo sh -c 'KACE_SERVER=k1000name installer -pkg
/Volumes/Dell_KACE/AMPAgent.pkg -target /' Hit Enter (and enter your password) - Type: hdiutil detach '/Volumes/Dell_KACE' hit Enter
This changes the actual install package within the dmg so that no alteration need to be made to the install process and the installer doesn't need to be repackaged. This also allows the agent to be deployed with Apple Remote Desktop.
I've tried using that, and this one.
hdiutil attach ./ampagent-5.3.53177-all.dmg
export KACE_SERVER=k1000name
sudo installer -pkg '/Volumes/Dell_KACE/AMPAgent.pkg' -target /
hdiutil detach '/Volumes/Dell_KACE'
Both of these work for that first time. I'm assuming after the detach I then just copy the .dmg to my network location, and run it?
Comments:
-
"hdiutil detach" is the last step to unmount the volume, Agent gets installed with the "installer" command.
HTH
Abhay - AbhayR 12 years ago-
Ok. I can't really tell my users to do this process though.
With our PCs I'm currently using iexpress.exe. I've compiled an exe that the users can double click and the agent installs. I need the same setup for the Mac.
These Macs do not all share the same network storage, and we do not utilize Apple Remote Desktop. - dugullett 12 years ago