-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[osx] Add Mac OS X build instructions #11
Conversation
c1fabd8
to
f83280d
Compare
d4a8cf6
to
b3b7a81
Compare
28f34e5
to
ccaa2a2
Compare
697a36d
to
d2976fd
Compare
f895510
to
efa2d4c
Compare
- Omnibus 3.2.2 compatible - Remove blocking packages - Put all conf in /opt/datadog-agent since extra_package_file is not working - Use postinstall script for configuration and some cleanup - Remove all traces of dd-agent user in conf - Remove useless sudo - Adapt build to new directory packaging/osx, instead of the old one packaging/datadog-agent/osx - Build for non-root use of datadog-agent, update of postinstall script to set all correct rights
Build a GUI app with py2app More precisely (everything is under win32 for now): - gui.py - images - status.html - ship supervisor and gohai in the app (ship supervisor commands & cleanup Take previous config is an app is already installed)
- fix all install issues due to spaces in path - log to file pre/postinstall scripts - set rights to current user - launch the app at the end of the install - doesn't install if same version and already installed Update to {pre|post}install scripts so that: - agent and App are closed before install if running - agent and App are started after install - exit if user used to install is root (we don't want to run the agent as root) - add an internal `/run` directory, b/c `/var/run/dd-agent` is deleted every now and then [osx] link conf.d to ~/.datadog-agent/conf.d
And update README & installer high-res pictures And add a `datadog-agent` command in the PATH: If someone wants to play with the agent using the command line. Also fix a bug where the status was not working in the App started after install.
And link all conf files to ~/.datadog-agent Also (for simplification reasons): the app is totally destroyed (except configuration, ofc) during the preinstall script, to avoid any error and be in the same state for upgrade install for postinstall. Why do this ? Avoid Mac-behavior dependencies for the upgrade, it doesn't always behave as it should.
186a1c7
to
f99751b
Compare
See DataDog/dd-agent#1361 for more details about the agent. Consequences for dd-agent-omnibus: - software definition of `datadog-agent`: * ship `datadog-agent` command line tool in install_dir/bin * delete GUI-only packages after app creation * do not delete anymore install_dir/{agent,embedded} * create and fill install_dir/etc conf directory - preinst script: * use new conf dir `/opt/datadog-agent/etc` * delete agent pyc files - postinst script: * some more logs for easier debug (logs are only visible in /var/log/datadog/preinstall.log) * use new conf dir
f99751b
to
caae886
Compare
|
||
echo '# Save old conf' | ||
mkdir -vp /tmp/{conf,checks}.d | ||
rm -vf /tmp/{conf,checks}.d/* /tmp/datadog.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't this line be a problem if someone had the (bad) idea to split some components of his checks into different files stored in a subfolder ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's for Mac, which is (will be) more a test platform than anything else. It's really an edge case; moreover it's a precaution which was needed when the agent was contained in the app, I'm not even sure it's useful anymore.
So I'd say let's do it FB-way, break it then fix it. If someone reports this issue, we'll update it.
Merged in #35. |
Modify instructions for Mac build ; shouldn't affect the other builds.
Related to :