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

Ohai Target Mode aka Remote Ohai #1503

Merged
merged 3 commits into from Oct 14, 2020
Merged

Ohai Target Mode aka Remote Ohai #1503

merged 3 commits into from Oct 14, 2020

Conversation

lamont-granquist
Copy link
Contributor

@lamont-granquist lamont-granquist commented Aug 27, 2020

This implements remote ohai, inspired originally by http://github.com/burtlo/ohbye

  1. When targeting remote unix-like or windows systems it preserves the semantics of ohai run locally (apart from a few known bugs)
  2. It implements a "train" plugin with data in node['train'] about the remote connection
  3. For non-unix/windows systems it disables most default plugins other than os, ohai_time + chef_version, and introduces a :target type which is the default that is used for those kinds of targets
  4. It supports URLs in the --target option on the command line and also uses chef-client's code for parsing credentials files
  5. With the chef-client PR this integrates seamlessly with chef-client
  6. Existing plugins have been converted to use the train helpers to enable remote collection (mostly)

Adds train data to ohai when running remotely:

  "train": {
    "family_hierarchy": [
      "debian",
      "linux",
      "unix",
      "os"
    ],
    "family": "debian",
    "platform": {
      "arch": "x86_64",
      "release": "18.04"
    },
    "backend": "unknown",
    "scheme": "ssh",
    "uri": "ssh://root@crash.scriptkiddie.org:747"
  },

@lamont-granquist lamont-granquist requested review from a team as code owners August 27, 2020 22:30
@tas50 tas50 added the Expeditor: Bump Version Minor Used by github.minor_bump_labels to bump the Minor version number. label Aug 28, 2020
Gemfile Outdated Show resolved Hide resolved
lib/ohai/application.rb Outdated Show resolved Hide resolved
lib/ohai/mixin/os.rb Outdated Show resolved Hide resolved
lib/ohai/mixin/os.rb Outdated Show resolved Hide resolved
lib/ohai/mixin/os.rb Outdated Show resolved Hide resolved
@tas50 tas50 removed the Expeditor: Bump Version Minor Used by github.minor_bump_labels to bump the Minor version number. label Sep 9, 2020
lib/ohai/application.rb Outdated Show resolved Hide resolved
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
@tas50 tas50 changed the title Ohai Target Mode (WIP) Ohai Target Mode Oct 2, 2020
@tas50 tas50 changed the title Ohai Target Mode Ohai Target Mode aka Remote Ohai Oct 2, 2020
lib/ohai/mixin/os.rb Outdated Show resolved Hide resolved
@phiggins
Copy link
Contributor

phiggins commented Oct 2, 2020

I'm impressed at the number of different ways in this repo to open a file and read each line.

lamont-granquist and others added 2 commits October 2, 2020 12:41
Signed-off-by: Lamont Granquist <lamont@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Signed-off-by: Lamont Granquist <lamont@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
@tas50 tas50 merged commit 94bc3a7 into master Oct 14, 2020
@tas50 tas50 deleted the lcg/ohai-target-mode branch December 16, 2020 01:05
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.

None yet

4 participants