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] Use omnibus-built OS X installer #1361

Merged
merged 11 commits into from
Jul 14, 2015
Merged

[osx] Use omnibus-built OS X installer #1361

merged 11 commits into from
Jul 14, 2015

Conversation

degemer
Copy link
Member

@degemer degemer commented Feb 9, 2015

  • install script (curl -L http://my.install.script | sudo bash)
  • modify path in launchd
  • create a custom script (from the previous agent one) to run the agent on Mac

Related:

@degemer degemer changed the title [osx] Prepare omnibus-built OS X installer [osx] Use omnibus-built OS X installer Feb 9, 2015
@degemer degemer force-pushed the quentin/macos-build branch 6 times, most recently from f42ee97 to 18b4ebd Compare February 10, 2015 21:58
@LeoCavaille
Copy link
Member

That's great, thanks, going to review it properly.
Any chance you could add to this PR moving osx in packaging/, it would be great if we can flatten this directory by source without having the extra datadog-agent subdir, like:

packaging/
    debian/
    centos/
    osx/

@LeoCavaille LeoCavaille added this to the 5.3.0 milestone Feb 10, 2015
@degemer
Copy link
Member Author

degemer commented Feb 11, 2015

Sure, I moved the osx directory.
But in order to get rid of the datadog-agent directory, we will have to update a lot of other things.

@degemer degemer force-pushed the quentin/macos-build branch 4 times, most recently from 532f42f to bb645ca Compare February 13, 2015 23:43
@degemer degemer force-pushed the quentin/macos-build branch 12 times, most recently from 0b90494 to 8b2ea22 Compare February 27, 2015 22:18
degemer added a commit to DataDog/dd-agent-omnibus that referenced this pull request Jun 22, 2015
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
elafarge pushed a commit to DataDog/dd-agent-omnibus that referenced this pull request Jun 25, 2015
This is a catchup with Quentin's changes on the OSX build (here's the
commit he made: caae886#diff-204bd43b88bfd17fc7c160430a27547aR35)

And here's the original commit message :

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
elafarge pushed a commit to DataDog/omnibus-software that referenced this pull request Jun 25, 2015
This is a catchup on Quentin's work (yeah, for this one a cherrypick
would probably have been faster :) ). Here's the commit he made :
281fbf2#diff-9849a8f11967c29eaae01d79a6d361fdR18

See DataDog/dd-agent#1361 for `dd-agent`
* remove unecessary complex install of supervisor for Mac
* add record-files to modules needed by the GUI (to uninstall them properly)
elafarge pushed a commit to DataDog/dd-agent-omnibus that referenced this pull request Jun 25, 2015
This is a catchup with Quentin's changes on the OSX build (here's the
commit he made: caae886#diff-204bd43b88bfd17fc7c160430a27547aR35)

And here's the original commit message :

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
elafarge pushed a commit to DataDog/dd-agent-omnibus that referenced this pull request Jul 8, 2015
This is a catchup with Quentin's changes on the OSX build (here's the
commit he made: caae886#diff-204bd43b88bfd17fc7c160430a27547aR35)

And here's the original commit message :

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
elafarge pushed a commit to DataDog/dd-agent-omnibus that referenced this pull request Jul 8, 2015
This is a catchup with Quentin's changes on the OSX build (here's the
commit he made: caae886#diff-204bd43b88bfd17fc7c160430a27547aR35)

And here's the original commit message :

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
@degemer degemer force-pushed the quentin/macos-build branch 2 times, most recently from 8d3e5f7 to 40e1ca2 Compare July 10, 2015 21:24
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleVersion</key>
<string>5.2.0</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it Datadog agent version number ? If so, does that mean that we need to update this file with every release ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, it's updated there during the build https://github.com/DataDog/dd-agent/pull/1361/files#diff-2eeaed663bd0d25b7e608891384b7298R130
(I should probably remove this default though, it was only for tests)

@yannmh
Copy link
Member

yannmh commented Jul 14, 2015

Successfully tested on OSX and Windows 👌.

Great work, thanks @degemer. Let's :shipit:

Fix install false-positive error due to the lack of a real restart
function for datadog-agent for Mac
Set dmg download url to 5.1.1-alpha.dmg
[skip ci]
Instead of packaging/osx/datadog-agent, since it has now a full-stack installer
Fix restart in datadog-agent script and some cleaning
The old agent script launched the supervisord in foreground, and thus couldn't
properly restart supervisord.
[skip ci]
With root:admin and 664
/etc -> /opt/datadog-agent/etc
/tmp -> /opt/datadog-agent/tmp
/var/log/datadog
Update setup.py to add py2app specific instructions
- Redirect config paths to the app
- Idem for path to executables
- Improve setup.py py2app build
- update images path (into the app)
- fix a bug where the window asking for API key keep appearing after
giving the key
[skip ci]
Because cacti needs `rrdtool`, which is a real pain to install
Restart program at load. (ie boot)
* initialize properly jmxfetch logging
* add jmxfetch to the list of exec for py2app
* put JMX_FETCH_JAR_NAME in utils/jmxfetch.py to avoid importing the
whole JMXFetch in `setup.py` (which was failing py2app because of the
logging part)
It allows users to automatically enable/disable the agent at login.
[skip ci]
* Move config to `/opt/datadog-agent/etc` + additional checks.d directory
  `/opt/datadog-agent/etc/checks.d`
* Update `datadog-agent` script with new location of the agent
* use global supervisor without `user=dd-agent`
* update run directory location for Mac (same as Linux now)
* `flare` for OS X
@degemer degemer merged commit 3e6c0b1 into master Jul 14, 2015
@degemer degemer deleted the quentin/macos-build branch July 14, 2015 18:17
elafarge pushed a commit to DataDog/omnibus-software that referenced this pull request Jul 16, 2015
This is a catchup on Quentin's work (yeah, for this one a cherrypick
would probably have been faster :) ). Here's the commit he made :
281fbf2#diff-9849a8f11967c29eaae01d79a6d361fdR18

See DataDog/dd-agent#1361 for `dd-agent`
* remove unecessary complex install of supervisor for Mac
* add record-files to modules needed by the GUI (to uninstall them properly)
elafarge pushed a commit to DataDog/dd-agent-omnibus that referenced this pull request Jul 27, 2015
This is a catchup with Quentin's changes on the OSX build (here's the
commit he made: caae886#diff-204bd43b88bfd17fc7c160430a27547aR35)

And here's the original commit message :

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
@coveralls
Copy link

coveralls commented Dec 8, 2016

Coverage Status

Changes Unknown when pulling 3e6c0b1 on quentin/macos-build into ** on master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 3e6c0b1 on quentin/macos-build into ** on master**.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants