diff options
Diffstat (limited to 'platformdoc/docs/components/component-specification')
8 files changed, 270 insertions, 131 deletions
diff --git a/platformdoc/docs/components/component-specification/cdap-specification.md b/platformdoc/docs/components/component-specification/cdap-specification.md index d4d01406..ce17d811 100644 --- a/platformdoc/docs/components/component-specification/cdap-specification.md +++ b/platformdoc/docs/components/component-specification/cdap-specification.md @@ -11,11 +11,11 @@ The CDAP component specification contains the following groups of information. M ## Current Limitations and TODOs -* The integration of DMD is likely to significantly change the [Interfaces](#interfaces) section in this specification, see [DMaaP abstraction](/components/component-type-cdap.md#dmaap-abstraction). +* The integration of DMD is likely to significantly change the [Interfaces](common-specification.md#interfaces) section in this specification.. ## Parameters -There is a `parameters` section in your component specification. This section contains three optional keys: [app_config](#appconfig), [app_preferences](#apppreferences), and [propram_preferences](#program_preferences): +There is a `parameters` section in your component specification. This section contains three optional keys: [app_config](#appconfig), [app_preferences](#apppreferences), and [program_preferences](#programpreferences): ``` "parameters" : { "app_config" : [ ...], @@ -89,7 +89,7 @@ Each `program_pref` JSON is passed into the CDAP API as the preference for `prog NOTE: for CDAP, this section is very likely to change when DMD is available. -The _future_ vision, as per [DMaaP intentionally abstracted](/components/component-type-cdap.md#dmaap-abstraction) is that you would publish your data as a series of files on HDFS, and DMD will pick them up and send them to the appropriate DMaaP feeds or directly when needed. +The _future_ vision is that you would publish your data as a series of files on HDFS, and DMD will pick them up and send them to the appropriate DMaaP feeds or directly when needed. ## Auxiliary Details diff --git a/platformdoc/docs/components/component-specification/common-specification.md b/platformdoc/docs/components/component-specification/common-specification.md index 06f7f76c..14c1297c 100644 --- a/platformdoc/docs/components/component-specification/common-specification.md +++ b/platformdoc/docs/components/component-specification/common-specification.md @@ -2,6 +2,16 @@ This page describes the component specification (JSON) sections that are common to both Docker and CDAP components. Differences for each are pointed out below. Elements that are very different, and described in the CDAP or Docker specific pages. +## Meta Schema Definition + +The component specification is represented (and validated) against this +[Component Spec json schema](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/component-json-schemas/browse/component-spec-schema.json) and described below: + +The "Meta Schema" implementation defines how component specification JSON schemas can be written to define user input. It is itself a JSON schema (thus it is a "meta schema"). It requires the name of the component entry, component type (either 'cdap' or 'docker') and a description under "self" object. The meta schema version must be specified as the value of the "version" key. Then the input schema itself is described. + +The table below shows the four types of schema descriptions supported +There are four types of schema descriptions objects - jsonschema for inline standard JSON Schema definitions of JSON inputs, delimitedschema for delimited data input using a JSON description defined by AT&T, unstructured for unstructured text, and reference that allows a pointer to another artifact for a schema. The reference allows for XML schema, but can be used as a pointer to JSON, Delimited Format, and Unstructured schemas as well. + ## Component Metadata Metadata refers to the properties found under the `self` JSON. This group of properties is used to uniquely identify this component specification and identify the component that this specification is used to capture. @@ -32,6 +42,9 @@ Interfaces are the JSON objects found under the `streams` key and the `services` * The `streams` JSON is for specifying data produced for consumption by other components, and the streams expected to subscribe to that is produced by other components. These are "fire and forget" type interfaces where the publisher of a stream does not expect or parse a response from the subscriber. * The term `stream` here is abstract and neither refers to "CDAP streams" or "DMaaP feeds". While a stream is very likely a DMaaP feed, it could be a direct stream of data being routed via HTTP too. It abstractly refers to a sequence of data leaving a publisher. * Streams have anonymous publish/subscribe semantics, which decouples the production of information from its consumption. +Like the component specification, the data format specification is represented/validated against this +[Data Format json schema](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/component-json-schemas/browse/data-format-schema.json) + * In general, components are not aware of who they are communicating with. * Instead, components that are interested in data, subscribe to the relevant stream; components that generate data publish to the relevant stream. * There can be multiple publishers and subscribers to a stream. Streams are intended for unidirectional, streaming communication. @@ -93,7 +106,7 @@ Message router subscribers are http clients rather than http services and perfor ##### Data router -Data router subscribers are http or https services that handle `PUT` requests from data router. Developers must provide the `route` or url path/endpoint that is expected to handle data router requests. This will be used to construct the delivery url needed to register the subscriber to the provisioned feed. Developers must also provide a `config_key` because there is dynamic configuration information associated with the feed that the application will need e.g. username and password. See the page on [DMaaP connection objects](../dcae-cli/dmaap-connection-objects) for more details on the configuration information. +Data router subscribers are http or https services that handle `PUT` requests from data router. Developers must provide the `route` or url path/endpoint that is expected to handle data router requests. This will be used to construct the delivery url needed to register the subscriber to the provisioned feed. Developers must also provide a `config_key` because there is dynamic configuration information associated with the feed that the application will need e.g. username and password. See the page on [DMaaP connection objects](/components/component-specification/dmaap-connection-objects/#data-router) for more details on the configuration information. Example (not tied to the larger example): @@ -140,7 +153,7 @@ type | string | *Required*. Type of stream: `http`, `message router`, `data rout ##### Message router -Message router publishers are http clients of DMaap message_router. Developers must provide a `config_key` because there is dynamic configuration information associated with the feed that the application will need to receive e.g. topic url, username, password. See the page on [DMaaP connection objects](../dcae-cli/dmaap-connection-objects/#message_router) for more details on the configuration information. +Message router publishers are http clients of DMaap message_router. Developers must provide a `config_key` because there is dynamic configuration information associated with the feed that the application needs to receive e.g. topic url, username, password. See the page on [DMaaP connection objects](/components/component-specification/dmaap-connection-objects/#message-router) for more details on the configuration information. Example (not tied to the larger example): @@ -158,7 +171,7 @@ Example (not tied to the larger example): ##### Data router -Data router publishers are http clients that make `PUT` requests to data router. Developers must also provide a `config_key` because there is dynamic configuration information associated with the feed that the application will need to receive e.g. publish url, username, password. See the page on [DMaaP connection objects](../dcae-cli/dmaap-connection-objects) for more details on the configuration information. +Data router publishers are http clients that make `PUT` requests to data router. Developers must also provide a `config_key` because there is dynamic configuration information associated with the feed that the application will need to receive e.g. publish url, username, password. See the page on [DMaaP connection objects](/components/component-specification/dmaap-connection-objects/#data-router) for more details on the configuration information. Example (not tied to the larger example): @@ -313,9 +326,9 @@ type | string | The required data type for the parameter | required | boolean | An optional key that declares a parameter as required (true) or not (false) | true constraints | array | The optional list of sequenced constraint clauses for the parameter. See below | entry_schema | string | The optional key that is used to declare the name of the Datatype definition for entries of set types such as the TOSCA 'list' or 'map'. Only 1 level is supported at this time | -designer_editable | boolean | An optional key that declares a parameter to be editable by designer (true) or not (false) | true -sourced_at_deployment | boolean | An optional key that declares a parameter's value to be assigned at deployment time (true) | false -policy_editable | boolean | An optional key that declares a parameter to be editable by policy (true) or not (false) | true +designer_editable | boolean | An optional key that declares a parameter to be editable by designer (true) or not (false) | +sourced_at_deployment | boolean | An optional key that declares a parameter's value to be assigned at deployment time (true) | +policy_editable | boolean | An optional key that declares a parameter to be editable by policy (true) or not (false) | policy_schema | array | The optional list of schema definitions used for policy. See below | Example: @@ -365,21 +378,8 @@ entry_schema | string | The optional key that is used to declare the name of the ## Generated Application Configuration -The above example for component `asimov.component.kpi_anomaly` will get transformed into the following application configuration JSON that is fully resolved and provided at runtime by calling the `config binding service`: - -```json -{ - "streams_publishes": { - "prediction": ["10.100.1.100:32567"] - }, - "streams_subscribes": {}, - "threshold": 0.75, - "services_calls": { - "vnf-db": ["10.100.1.101:32890"] - } -} -``` - +The Platform generates configuration for the component (based on the component spec) at deployment time. The generated application configuration will be made up of the Parameters, Streams, and Services sections, after any provisioning for streams and services. The component developer can see what this configuration will look like by reviewing the [component dev command](/components/dcae_cli/commands/#run-the-dev-command). + ## Artifacts `artifacts` contains a list of artifacts associated with this component. For Docker, this is the full path (including the registry) to the Docker image. For CDAP, this is the full path to the CDAP jar. @@ -395,3 +395,8 @@ Property Name | Type | Description uri | string | *Required*. Uri to the artifact, full path type | string | *Required*. `docker image` or `jar` +# Working with Component Specs + +Components can be added to the onboarding catalog (which first validates the component spec) by using the [dcae_cli Tool](http://dcae-platform.research.att.com/components/dcae-cli/quickstart/). Here you can also list the components, show the contents of a component, publish the component, validate the generated configuration for the component, deploy (run) and undeploy the component. For a list of these capabilities, see [Component Commands](/components/dcae-cli/commands/#component). + + diff --git a/platformdoc/docs/components/component-specification/configuration-grid.md b/platformdoc/docs/components/component-specification/configuration-grid.md index e9054593..e1154218 100644 --- a/platformdoc/docs/components/component-specification/configuration-grid.md +++ b/platformdoc/docs/components/component-specification/configuration-grid.md @@ -1,13 +1,19 @@ # Configuration Quick Reference -The following types of configuration are supported by the DCAE Platform. - -|Input Sources|Default Values|Designer Input |Clamp Input|Policy Input|Runtime Input| -|---------|---------|----------|---------|----------|---| -|Notes||This applies only to components that are self-service (supported by SDC) |This applies only to components that are part of a closed-loop interface || | -|Who provides?|Component Developer|Service Designer|CLAMP|Operations|Runtime Platform| -| When/Where it is provided |During onboarding – in the component specification | At design time – in the SDC UI | At installation – in the CLAMP UI | Anytime – in the POLICY GUI | When the component is deployed | -|Component Specification Details|For CDAP:<br> ‘value’ Name and KV pairs in AppConfig or AppPreferences For Docker:<br> ‘value’ is provided for variable in ‘parameter’ section|‘designer-editable’ must be set to ‘true’ for variable in ‘parameter’ section. || ‘policy-editable’ must be set to ‘true’ and ‘policy_schema’ must be provided for variable in ‘parameter’ section |'sourced_at_<br>deployment' must be set to 'true' for variable in 'parameter' section | -| How it is used | This is passed to the component in the generated configuration if not overridden.|This overrides any values previously set, but can be overridden by CLAMP or POLICY.|This overrides any values previously set, but can be overridden by POLICY.|This overrides any values previously set, but can be overridden at any point thereafter.|This overrides any values previously set, but can be overridden at any point thereafter by Policy. | -| Additional Info for Component Developer|For CDAP:<br> ‘value’ is provided for variable in the ‘AppConfig’ or ‘AppPreferences’ sections<br><br> For Docker:<br> ‘value’ is provided for variable in ‘parameter’ section|||For Docker: In the auxiliary section:<br> {"policy": {"trigger_type": "policy","script_path": “/opt/app/reconfigure.sh”} }<br> Script interface must be "opt/app/reconfigure.sh” $trigger_type $updated_policies $updated_appl_config" <br> where $updated_policies is a json provided by the Policy Handler and <br> $update_appl_config is the post-merged appl config which may contain unresolved configuration that didn’t come from policy.<br> Suggestion is for script to call CONFIG BINDING SERVICE to resolve any configuration. | +#### Default Values + +The component developer can provide default values for any `parameter` in the component specification. These defaults will be passed to the component in its generated configuration. + +#### Overridden/Entered Values + +Depending on the other properties set for the parameter, the default value can be overridden at 'design-time', 'deploy-time' or once the microservice is running ('run-time'). +(*In the future, when Policy is supported, configuration will also be able to be provided/changed in the Policy UI at any time).* + +||Design-Time Input |CLAMP Input|Policy Input (future) |Deploy-Time Input|Run-Time Input (DTI)| +|-----|-----|-----|-----|----------|----------| +|Description|Applies to SDC self-service components|Applies to components deployed by CLAMP |(not yet supported)|Applies to manually deployed services| Applies to components supporting DTI reconfiguration| +|Input provided by|Service Designer|CLAMP|Operations|DevOps|Runtime Platform(DTI)| +|How it is provided |In the SDC UI |In the CLAMP UI |In the POLICY GUI |In the DCAE Dashboard (or Jenkins job)|In the DTI Event +|Component Specification Details|‘designer-editable’ set to ‘true’| None. Developer provides CLAMP an email with parameters to be supported|‘policy_editable’ must be set to ‘true’ and ‘policy_schema’ must be provided|'sourced_at_<br>deployment' must be set to 'true'|parameter 'dcae_target_type' defined with default value set to supported vnfType-vnfFuncId, with properties 'designer_editable' and 'sourced_at_deployment' set appropriately| +|Additional Info for Component Developer|||For Docker only: In the auxiliary section:<br> {"policy": {"trigger_type": "policy","script_path": “/opt/app/reconfigure.sh”} }<br> Script interface would then be "/opt/app/reconfigure.sh” $trigger_type $updated_policy" <br> where $updated_policy is json provided by the Policy Handler.||For Docker only: In the auxiliary section:<br> {"dti": “/opt/app/reconfigure.sh”} <br> Script interface would then be "/opt/app/reconfigure.sh” $trigger_type $updated_dti" <br> where $updated_dti is json provided by the DTI Plugin.| diff --git a/platformdoc/docs/components/component-specification/dmaap-connection-objects.md b/platformdoc/docs/components/component-specification/dmaap-connection-objects.md new file mode 100644 index 00000000..b1b650fd --- /dev/null +++ b/platformdoc/docs/components/component-specification/dmaap-connection-objects.md @@ -0,0 +1,169 @@ +# DMaaP connection objects + +DMaaP Connection Objects are JSON objects that: + +1. At Runtime - this is generated by the DCAE Platform and passed to the component in its application_configuration to be used to connect to the DMaaP feed or topic. Components will receive the entire object with all properties populated (default will be `null) unless specified otherwise. +2. During dcae_cli testing - this is provided through the command-line argument `--dmaap-file` to test the component with manually provisioned feeds and topics. Developers are not required to provide the entire object. The required properties are labeled below with "*Required as input*". + +## Message Router + +Publishers and subscribers have the same generated `Dmaap Connection Object` structure. Here's an example for any given config-key: +(This is what will be in application_configuration) + +```json +{ + "type": "message_router", + "aaf_username": "some-user", + "aaf_password": "some-password", + "dmaap_info": { + "client_role": "com.dcae.member", + "client_id": "1500462518108", + "location": "mtc00", + "topic_url": "https://we-are-message-router.us:3905/events/some-topic" + } +} +``` + +At the top-level: + +Property Name | Type | Description +------------- | ---- | ----------- +type | string | *Required as input*. Must be `message_router` for message router topics +aaf_username | string | AAF username message router clients use to authenticate with secure topics +aaf_password | string | AAF password message router clients use to authenticate with secure topics +dmaap_info | JSON object | *Required as input*. Contains the topic connection details + +The `dmaap_info` object contains: + +Property Name | Type | Description +------------- | ---- | ----------- +client_role | string | AAF client role that's requesting publish or subscribe access to the topic +client_id | string | Client id for given AAF client +location | string | DCAE location for the publisher or subscriber, used to set up routing +topic_url | string | *Required as input*. URL for accessing the topic to publish or receive events + +The --dmaap-file argument (to the component `run` or `dev` command), must minimally contain: + +```json +{ + "type": "message_router", + "dmaap_info": { + "topic_url": "https://we-are-message-router.us:3905/events/some-topic" + } +} +``` + +## Data Router + +### Publisher + +Here's an example of what the generated `Dmaap Connection Object` for Data Router Publisher looks like: +(This is what will be in application_configuration) + +```json +{ + "type": "data_router", + "dmaap_info": { + "location": "mtc00", + "publish_url": "https://we-are-data-router.us/feed/xyz", + "log_url": "https://we-are-data-router.us/feed/xyz/logs", + "username": "some-user", + "password": "some-password", + "publisher_id": "123456" + } +} +``` + +At the top-level: + +Property Name | Type | Description +------------- | ---- | ----------- +type | string | *Required as input*. Must be `data_router` for data router feeds +dmaap_info | JSON object | *Required as input*. Contains the feed connection details + +The `dmaap_info` object contains: + +Property Name | Type | Description +------------- | ---- | ----------- +location | string | DCAE location for the publisher, used to set up routing +publish_url | string | *Required as input*. URL to which the publisher makes Data Router publish requests +log_url | string | URL from which log data for the feed can be obtained +username | string | Username the publisher uses to authenticate to Data Router +password | string | Password the publisher uses to authenticate to Data Router +publisher_id | string | Publisher id in Data Router + +The --dmaap-file argument (to the component `run` or `dev` command), must minimally contain: + +```json +{ + "type": "data_router", + "dmaap_info": { + "publish_url": "https://we-are-data-router.us/feed/xyz" + } +} +``` + +### Subscriber + +Here's an example of what the generated `Dmaap Connection Object` for a Data Router Subscriber looks like: +(This is what will be passed in application_configuration) + +```json +{ + "type": "data_router", + "dmaap_info": { + "location": "mtc00", + "delivery_url": "https://my-subscriber-app.dcae:8080/target-path", + "username": "some-user", + "password": "some-password", + "subscriber_id": "789012" + } +} +``` + +At the top-level: + +Property Name | Type | Description +------------- | ---- | ----------- +type | string | *Required as input*. Must be `data_router` for data router feeds +dmaap_info | JSON object | *Required as input*. Contains the feed connection details + +The `dmaap_info` object contains: + +Property Name | Type | Description +------------- | ---- | ----------- +location | string | DCAE location for the subscriber, used to set up routing +delivery_url | string | URL to which the Data Router should deliver files +username | string | Username Data Router uses to authenticate to the subscriber when delivering files +password | string | Password Data Router uses to authenticate to the subscriber when delivering files +subscriber_id | string | Subscriber id in Data Router + +The --dmaap-file argument (to the component `run` or `dev` command), must minimally contain: + +```json +{ + "type": "data_router", + "dmaap_info": { + } +} +``` + +It is the recommended security practice that `username` and `password` are specified. +You cannot provide the `delivery_url` in your dmaap-file, because it's not constructed until deployment time. Therefore, after the test deployment, go back to the Data Router Feed and provide the delivery_url (in order to start receiving the feeds). + +### Data Router Example + +(After the Data Router feed has been manually provisioned) + +``` +$ dcae_cli component run --dmaap-file $dmaap_file $component-name +DCAE.Run | WARNING | Your component is a data router subscriber. Here are the delivery urls: + + some-sub-dr: http://135.205.226.128:32838/identity +``` + +(Update the Data Router Feed to provide the delivery_url). + + + + diff --git a/platformdoc/docs/components/component-specification/docker-specification.md b/platformdoc/docs/components/component-specification/docker-specification.md index 79d3a88b..60905046 100644 --- a/platformdoc/docs/components/component-specification/docker-specification.md +++ b/platformdoc/docs/components/component-specification/docker-specification.md @@ -10,14 +10,16 @@ The Docker component specification contains the following groups of information. ## Auxiliary Details -`auxiliary` contains Docker specific details like health check, port mapping, volume mapping, and policy reconfiguration script details. +`auxiliary` contains Docker specific details like health check, port mapping, volume mapping, dti and policy reconfiguration script details. (Policy reconfiguration is not yet supported). Name | Type | Description ------------- | ---- | ----------- healthcheck | JSON object | *Required*. Health check definition details ports | JSON array | each array item maps a container port to the host port. See example below. -volume | JSON array | each array item contains a host and container object. See example below. | | -policy | JSON array | *Required*. Policy script details +volume | JSON array | each array item contains a host and container object. See example below. +reconfigs | string | DTI reconfiguration script details +*Planned for 1806* | | +policy | JSON array | *Required*. Policy reconfiguration script details ### Health Check Definition @@ -25,7 +27,7 @@ The platform uses Consul to perform periodic health check calls. Consul provide When choosing a value for interval, consider that too frequent healthchecks will put unnecessary load on Consul and DCAE. If there is a problematic resource, then more frequent healthchecks are warranted (eg 15s or 60s), but as stablility increases, so can these values, (eg 300s). -When choosing a value for timeout, consider that too small a number will result in increasing timeout failures, and too large a number will result in a delay in the notification of resource problem. A suggestion is to start with 5s and workd from there. +When choosing a value for timeout, consider that too small a number will result in increasing timeout failures, and too large a number will result in a delay in the notification of the resource problem. A suggestion is to start with 5s and work from there. #### http @@ -75,6 +77,8 @@ Example: ### Ports +This method of exposing/mapping a local port to a host port is NOT RECOMMENDED because of the possibility of port conflicts. If multiple instances of a docker container will be running, there definitely will be port conflicts. Use at your own risk. (The preferred way to expose a port is to do so in the Dockerfile as described [here](/components/component-type-docker/#ports)). + ```json "auxilary": { "ports": ["8080:8000"] @@ -140,7 +144,35 @@ Here's an example of the minimal JSON that must be provided as an input: In the example above, the container volume "/tmp/docker.sock" maps to host volume "/var/run/docker.sock". -### Policy +### DTI Reconfiguration + +DTI changes will be provided to the Docker component by triggering a script that is defined here. + +Property Name | Type | Description +------------- | ---- | ----------- +dti | string | *Required*. Suggested value is "/opt/app/reconfigure.sh" + +Example: + +```json +"auxilary": { + "dti": "/opt/app/reconfigure.sh" +} +``` + +The docker script interface is as follows: <br><br> `/opt/app/reconfigure.sh $reconfigure_type {<updated_dti object>} + +Name | Type | Description +---- | ---- | ----------- +reconfigure_type | string | "dti" +updated_dti | json | dti_event object + +The dti_event object can be seen [here](https://codecloud.web.att.com/projects/ST_DCAE/repos/com.att.dcae.orch.dti-handler/browse/dti_inputs.yaml). + +An example of a DTI reconfiguration script can be found [here](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/docker-cloudify/browse/examples/reconfigure.py?at=refs%2Fheads%2Frelease%2F1802). + + +### Policy (not yet supported) Policy changes made in the Policy UI will be provided to the Docker component by triggering a script that is defined here. @@ -233,7 +265,7 @@ updated_appl_config | json | complete generated app_config, not fully-resolved, } }, "artifacts": [{ - "uri": "fake.nexus.com/dcae/kpi_anomaly:1.0.0", + "uri": "fake.nexus.att.com/dcae/kpi_anomaly:1.0.0", "type": "docker image" }] } diff --git a/platformdoc/docs/components/component-specification/examples-grid.md b/platformdoc/docs/components/component-specification/examples-grid.md new file mode 100644 index 00000000..9597e537 --- /dev/null +++ b/platformdoc/docs/components/component-specification/examples-grid.md @@ -0,0 +1,18 @@ +# Component Spec Examples + +The following table shows CDAP and Docker component spec examples for some of the commonly used platform features. Please note that these examples were chosen for the specific features that they contain, and should not necessarily be used for examples of other features, as they may have been captured before they were complete or modified to best utilize those features. + +| Feature | CDAP Example | Docker Example | +|---------|--------------|----------------| +| Dmaap MR subscriber | [String Matching](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/dcae_cli_examples/browse/sm/sm_spec.json) | TBD | +| Dmaap MR publisher | [String Matching](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/dcae_cli_examples/browse/sm/sm_spec.json) | [Syslog spec](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/dcae_cli_examples/browse/syslog/syslog.json) | +| Dmaap DR subscriber/DMD | TBD | [Sessionization](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/dcae_cli_examples/browse/sessionization/sessionization-componentspec.json) | +| Dmaap DR publisher/DMD | TBD | [Sessionization](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/dcae_cli_examples/browse/sessionization/sessionization-componentspec.json) | +| Policy (simple) | [tca_policy2](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/dcae_cli_examples/browse/tca_with_policy2/tca_with_policy2.json) | TBD | +| Policy (complex) | [tca_policy](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/dcae_cli_examples/browse/tca_with_policy/tca_with_policy.json) | TBD | +| Healthcheck | N/A (the platform does this) | [FOI spec](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/dcae_cli_examples/browse/foi/foisftpcollector_componentspec.json) +| Service Calls | [String Matching](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/dcae_cli_examples/browse/sm/sm_spec.json) | TBD | +| Service Provides | [cuda](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/dcae_cli_examples/browse/cuda/spec.json) | [VES](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/dcae_cli_examples/browse/ves/vescollector-componentspec.json) | +| DTI Reconfig | TBD | [FOI-sftp](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/dcae_cli_examples/browse/foi-sftp/component_spec.json) | + + diff --git a/platformdoc/docs/components/component-specification/generated-configuration.md b/platformdoc/docs/components/component-specification/generated-configuration.md deleted file mode 100644 index 258358de..00000000 --- a/platformdoc/docs/components/component-specification/generated-configuration.md +++ /dev/null @@ -1,91 +0,0 @@ -# Generated configuration - -The DCAE platform relies on the component specification to generate the component's application configuration JSON at deployment time. The component developer should expect to use this configuration JSON in their application to provision themselves. - -Pro-tip: As you build your component specification, you can use the [dcae-cli `dev` command](../dcae-cli/walkthrough/#dev) to view what the resulting application configuration will look like. - -## Streams and services - -For both Docker and CDAP, when your component is deployed, any `streams` and `services/calls` you specified will be injected into your configuration under the following well known structure. -Your component is required to parse this information if you have any connectivity to DMaaP or are calling another DCAE component. - -More details about the DMaaP connection objects are found [here](../dcae-cli/dmaap-connection-objects/). - -This is best served with an example. - -The following component spec snippet (from String Matching): -``` -"streams":{ - "subscribes": [{ - "format": "VES_specification", - "version": "4.27.2", - "type": "message_router", - "config_key" : "mr_input" - }], - "publishes": [{ - "format": "VES_specification", - "version": "4.27.2", - "config_key": "mr_output", - "type": "message_router" - }] - }, - "services":{ - "calls": [{ - "config_key" : "aai_broker_handle", - "verb": "GET", - "request": { - "format": "get_with_query_params", - "version": "1.0.0" - }, - "response": { - "format": "aai_broker_response", - "version": "3.0.0" - } - }], - "provides": [] - }, -``` - -Will turn into the following top level keys in your configuration (for CDAP, this will be under AppConfig) - -``` - "streams_publishes":{ - "mr_output":{ // notice the config key above - "aaf_password":"XXX", - "type":"message_router", - "dmaap_info":{ - "client_role": null, - "client_id": null, - "location": null, - "topic_url":"XXX" - }, - "aaf_username":"XXX" - } - }, - "streams_subscribes":{ - "mr_input":{ // notice the config key above - "aaf_password":"XXX", - "type":"message_router", - "dmaap_info":{ - "client_role": null, - "client_id": null, - "location": null, - "topic_url":"XXX" - }, - "aaf_username":"XXX" - } - }, - "services_calls":{ - "aai_broker_handle":[ // notice the config key above - "SOME_IP:32768" // based on deployment time, just an example - ] - } -``` -These keys will always be populated regardless of whether they are empty. So the minimal you will get, in the case of a component that provides an HTTP service and does not call any services and has no streams, is: -``` - "streams_publishes":{}, - "streams_subscribes":{}, - "services_calls":{} -``` - -Thus your component should expect these well-known top level keys. diff --git a/platformdoc/docs/components/component-specification/start-here.md b/platformdoc/docs/components/component-specification/start-here.md deleted file mode 100644 index e69de29b..00000000 --- a/platformdoc/docs/components/component-specification/start-here.md +++ /dev/null |