Skip to content
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

Closed
wants to merge 6 commits into from
Closed

Conversation

degemer
Copy link
Member

@degemer degemer commented Feb 9, 2015

Modify instructions for Mac build ; shouldn't affect the other builds.

Related to :

@degemer degemer changed the title [osx] Add Mac OS X build [osx] Add Mac OS X build instructions Feb 9, 2015
@degemer degemer force-pushed the quentin/macos-build branch 2 times, most recently from c1fabd8 to f83280d Compare February 13, 2015 15:25
@degemer degemer force-pushed the quentin/macos-build branch 21 times, most recently from d4a8cf6 to b3b7a81 Compare March 2, 2015 21:17
@degemer degemer force-pushed the quentin/macos-build branch 2 times, most recently from 28f34e5 to ccaa2a2 Compare March 4, 2015 23:48
@degemer degemer force-pushed the quentin/macos-build branch 2 times, most recently from 697a36d to d2976fd Compare March 20, 2015 19:14
@degemer degemer force-pushed the quentin/macos-build branch 9 times, most recently from f895510 to efa2d4c Compare June 19, 2015 15:51
- 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.
@degemer degemer force-pushed the quentin/macos-build branch 10 times, most recently from 186a1c7 to f99751b Compare June 22, 2015 18:09
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

echo '# Save old conf'
mkdir -vp /tmp/{conf,checks}.d
rm -vf /tmp/{conf,checks}.d/* /tmp/datadog.conf
Copy link
Contributor

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 ?

Copy link
Member Author

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.

@degemer
Copy link
Member Author

degemer commented Oct 28, 2015

Merged in #35.

@degemer degemer closed this Oct 28, 2015
@degemer degemer deleted the quentin/macos-build branch February 22, 2017 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants