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

[IPO-202] Add initial Data Collector application and /_status check #858

Merged
merged 3 commits into from
Jun 21, 2016

Conversation

ryancragun
Copy link
Contributor

The Data Collector application is intended to export Chef Server actions
to an external Data Collector server via HTTP requests. This PR adds:

  • The initial Data Collector application which consists of a supervisor
    and an HTTP connection pool.
  • Status checks callbacks for oc_chef_wm that are used application has
    been enabled.

@@ -89,6 +89,21 @@ module PrivateChef
backup Mash.new
backup["strategy"] = "tar"

#
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment might be more useful in the attributes file, that is where most of the other similar comments are.

@marcparadise
Copy link
Member

Looks like this is on the right track. I'd like to understand better the background of data collector, and how it'll differ from the capture we are currently doing for analytics.

It would also be helpful to separate out the changes that are formatting/indent/naming-related into their own PR.

@ryancragun ryancragun changed the title Add initial Data Collector application and /_status check [IPO-202] Add initial Data Collector application and /_status check Jun 15, 2016
]}
]},

<% if node['private_chef']['data_collector']['root_url'] && node['private_chef']['data_collector']['token'] %>
Copy link
Contributor

Choose a reason for hiding this comment

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

Per the RFC, the token is optional. Chef's commercial product that relies on Data Collector requires the token, but others' implementations may not.

{health_ping_modules, [
oc_chef_authz,
chef_sql,
<% if node['private_chef']['data_collector']['root_url'] && node['private_chef']['data_collector']['token'] %>
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar issue with && token here that adamleff mentioned below.

@ryancragun
Copy link
Contributor Author

ryancragun commented Jun 20, 2016

http://wilson.ci.chef.co/job/chef-server-12-trigger-ad_hoc/189/downstreambuildview/

One test on one platform failed but it looks like a simple timeout.

@@ -217,30 +217,19 @@
]}
]},

{chef_objects, [
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this being deleted?

@stevendanna
Copy link
Contributor

A couple of comments, but overall this looks fine. I assume we'll add tests for update/1 once that is called from the application and more than a small stub method.

update(Body) when is_list(Body) ->
update(iolist_to_binary(Body));
update(Body) ->
%% TODO: Transform to data collector JSON
Copy link
Member

Choose a reason for hiding this comment

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

Can we track this with a card instead of a source TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, IPO-203 is for that implementation.

@marcparadise
Copy link
Member

👍 once the deleted config is restored

…erchef

The data collector application is a forwarder of Chef Server actions to
a remote server. This commit adds the configuration options for the
required HTTP connection pool and remote server endpoint and
authentication token.

 Author:    Ryan Cragun <[email protected]>

Signed-off-by: Ryan Cragun <[email protected]>
Add the data_collector oc_erchef application. When configured, the
application will start an HTTP connection pool that will be used for
POSTing data to the data collector endpoint.

Add oc_chef_wm health callbacks. When configured the data_collector will hook
into the /_status endpoint and report the remote server health.

Signed-off-by: Ryan Cragun <[email protected]>
@ryancragun ryancragun merged commit 5a62c59 into master Jun 21, 2016
@ryancragun ryancragun deleted the jk/data_collector branch June 21, 2016 23:09
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.

6 participants