# Packs ## Terminology **Pack** - A container of one or more components. **Instrumentation Pack** - A Pack that contains one or more Instrumentation components **Instrumentation** - A component that is installable, which collects and/or sends data to New Relic. For v1 this is equivalent to an agent, it is TBD whether this includes something like a cloud integration setup or if that becomes its own component. **Dashboard** - A pack component that contains a template used to create a dashboard when the `Pack` is installed **Alert** - A pack component that contains configuration used to create an alert when the `Pack` is installed **Documentation** - A pack component that references a piece of Documentation, either via url or `id` (as currently exposed in GraphQL) **Integration** - TBD ## Diagram Derived from [notes](https://docs.google.com/document/d/1fu-Pdt1TerWxD-ti1Lxydndj4gqxSm3kbAjnc_j62yo/edit) with DevEn/DevEx ```graphviz digraph hierarchy { // increases the separation between nodes nodesep=1.0 // All nodes will this shape and colour node [color=red,fontname=Courier,shape=box] // All the lines look like this edge [color="#00838F", style=dashed] NewRelicComIntegrations->{Pack} AddMoreDataTiles->{Pack} QuickStarts->{Pack} Pack->{Instrumentation Dashboard Alert PackDocumentation} Instrumentation->{Documentation Recipe GuidedInstall OtherFields} Dashboard Alert // Put them on the same level {rank=same;Dashboard Alert Instrumentation} } ``` ## Instrumentation ### GraphQL Type A possible representation of the data contained in/under the `Instrumentation` component. It needs to encompass several concerns: - Satisfy the requirements of the Install Plan UI - Satisfy the ability to direct the installation experience based on solutions available (GuidedInstall, Setup Nerdlets, Docs) - Have a clear mapping or migration path for the other teams migrating newrelic.com/integrations and **Add More Data** ```graphql type Instrumentation { name: String """ ex. newrelic-infra-agent """ type: String """ """ installDestination: InstallDestination """ Corresponding recipe to be run by the one-command newrelic-cli installer """ recipe: Recipe """ """ configuration: ??? } ### How do we best model our tiered offering install experience in association with an Instrumentation object? ### union InstallDestination = Documentation | Destination type Destination { } type Documentation { id: String # Reference to in-product docs API url: String } ``` ### Examples As defined in the current Packs ```json { "name": "nginx", "type": "newrelic-infra-ohi" } ``` Related data defined in nr1-install-newrelic ```json= "nginx-open-source-integration": { "displayName": "Nginx", "description": "Our NGINX integration collects and sends inventory and metrics from your NGINX server to our platform, where you can see data on connections and client requests so that you can find the source of any problems.", "logoSrc": "provider-nginx.svg" }, ``` ## Migrating `Add Your Data` [Current data object](https://source.datanerd.us/open-source/tucson/blob/master/nerdlets/instrument-everything/shared/datasource/content.json) as found in Add Your Data ```json { "name": "NGINX", "tags": ["infrastructure", "open source", "open-source"], "destination": { "type": "url", "target": "${DOCS}/docs/integrations/host-integrations/host-integrations-list/nginx-monitoring-integration" }, "destinationFeatureFlag": { "id": "NR1/nr1_install_newrelic__nr1_install_newrelic", "destination": { "type": "card", "target": "nr1-install-newrelic.nr1-install-newrelic", "params": { "path": "ohi", "recipeName": "nginx-open-source-integration", "accountId": null, "activeComponent": "VTSOCommand", "activeEnvironment": "nginx-open-source-integration" } } }, "logo": "provider-nginx" }, ``` ## Migrating `newrelic.com/integrations` [Raw Data](https://live-d9newrelic.pantheonsite.io/content-api/v1/integrations) Nginx Example ```json { "type": "node--integration", "id": "e6be6a41-9a9c-4a0e-9858-a361cc956324", "links": { "self": { "href": "https:\/\/live-d9newrelic.pantheonsite.io\/content-api\/v1\/integrations\/e6be6a41-9a9c-4a0e-9858-a361cc956324?resourceVersion=id%3A638" } }, "attributes": { "title": "NGINX", "moderation_state": null, "pate_is_template": null, "publish_on": null, "unpublish_on": null, "publish_state": null, "unpublish_state": null, "toc_js_active": null, "field_integration__app_link": null, "field_integration__coming_soon": false, "field_integration__description": "Web server which can also be used as a reverse proxy, load balancer, mail proxy, and HTTP cache.", "field_integration__docs_link": "https:\/\/docs.newrelic.com\/docs\/integrations\/host-integrations\/host-integrations-list\/nginx-monitoring-integration", "field_integration__position": null, "field_integration__tags": [ "infrastructure" ] }, "relationships": { "nr_metatag_image": { "data": null, "links": { "related": { "href": "https:\/\/live-d9newrelic.pantheonsite.io\/content-api\/v1\/integrations\/e6be6a41-9a9c-4a0e-9858-a361cc956324\/nr_metatag_image?resourceVersion=id%3A638" }, "self": { "href": "https:\/\/live-d9newrelic.pantheonsite.io\/content-api\/v1\/integrations\/e6be6a41-9a9c-4a0e-9858-a361cc956324\/relationships\/nr_metatag_image?resourceVersion=id%3A638" } } }, "field_integration__logo": { "data": { "type": "media--svg_image", "id": "c0ebbe65-a748-472b-83e4-fa1e86ddd356", "meta": { "image_url": "https:\/\/live-d9newrelic.pantheonsite.io\/sites\/default\/files\/2020-10\/nginx.svg" } }, "links": { "related": { "href": "https:\/\/live-d9newrelic.pantheonsite.io\/content-api\/v1\/integrations\/e6be6a41-9a9c-4a0e-9858-a361cc956324\/field_integration__logo?resourceVersion=id%3A638" }, "self": { "href": "https:\/\/live-d9newrelic.pantheonsite.io\/content-api\/v1\/integrations\/e6be6a41-9a9c-4a0e-9858-a361cc956324\/relationships\/field_integration__logo?resourceVersion=id%3A638" } } } } } ``` ## References