-----------------\r
\r
``auxiliary`` contains Docker specific details like health check, port\r
-mapping, volume mapping, and policy reconfiguration script details.\r
-\r
-+-------------+----+----------+\r
-| Name | Ty\| Descript\|\r
-| | pe | ion |\r
-+=============+====+==========+\r
-| healthcheck | JS\| *Require\|\r
-| | ON | d*. |\r
-| | ob\| Health |\r
-| | je\| check |\r
-| | ct | definiti\|\r
-| | | on |\r
-| | | details |\r
-+-------------+----+----------+\r
-| ports | JS\| each |\r
-| | ON | array |\r
-| | ar\| item |\r
-| | ra\| maps a |\r
-| | y | containe\|\r
-| | | r |\r
-| | | port to |\r
-| | | the host |\r
-| | | port. |\r
-| | | See |\r
-| | | example |\r
-| | | below. |\r
-+-------------+----+----------+\r
-| volume | JS\| each |\r
-| | ON | array |\r
-| | ar\| item |\r
-| | ra\| contains |\r
-| | y | a host |\r
-| | | and |\r
-| | | containe\|\r
-| | | r |\r
-| | | object. |\r
-| | | See |\r
-| | | example |\r
-| | | below. |\r
-+-------------+----+----------+\r
-| policy | JS\| *Require\|\r
-| | ON | d*. |\r
-| | ar\| Policy |\r
-| | ra\| script |\r
-| | y | details |\r
-+-------------+----+----------+\r
+mapping, volume mapping and policy reconfiguration script details.\r
+(Policy reconfiguration is not yet supported).\r
+\r
++--------------------------------+---------+---------------------------+\r
+| Name | Type | Description |\r
++================================+=========+===========================+\r
+| healthcheck | JSON | *Required*. Health check |\r
+| | object | definition details |\r
++--------------------------------+---------+---------------------------+\r
+| ports | JSON | each array item maps a |\r
+| | array | container port to the |\r
+| | | host port. See example |\r
+| | | below. |\r
++--------------------------------+---------+---------------------------+\r
+| volume | JSON | each array item contains |\r
+| | array | a host and container |\r
+| | | object. See example |\r
+| | | below. |\r
++--------------------------------+---------+---------------------------+\r
+| *Planned for 1806* | | |\r
++--------------------------------+---------+---------------------------+\r
+| policy | JSON | *Required*. Policy |\r
+| | array | reconfiguration script |\r
+| | | details |\r
++--------------------------------+---------+---------------------------+\r
\r
Health Check Definition\r
~~~~~~~~~~~~~~~~~~~~~~~\r
\r
The platform uses Consul to perform periodic health check calls. Consul\r
-provides different types of `check definitions <https://www.consul.io/docs/agent/checks.html>`_. The\r
+provides different types of `check\r
+definitions <https://www.consul.io/docs/agent/checks.html>`__. The\r
platform currently supports http and docker health checks.\r
\r
When choosing a value for interval, consider that too frequent\r
\r
When choosing a value for timeout, consider that too small a number will\r
result in increasing timeout failures, and too large a number will\r
-result in a delay in the notification of resource problem. A suggestion\r
-is to start with 5s and workd from there.\r
+result in a delay in the notification of the resource problem. A\r
+suggestion is to start with 5s and work from there.\r
\r
http\r
^^^^\r
\r
-+-------------+----+----------+\r
-| Property | Ty\| Descript\|\r
-| Name | pe | ion |\r
-+=============+====+==========+\r
-| type | st\| *Require\|\r
-| | ri\| d*. |\r
-| | ng | ``http`` |\r
-+-------------+----+----------+\r
-| interval | st\| Interval |\r
-| | ri\| duration |\r
-| | ng | in |\r
-| | | seconds |\r
-| | | i.e. |\r
-| | | ``60s`` |\r
-+-------------+----+----------+\r
-| timeout | st\| Timeout |\r
-| | ri\| in |\r
-| | ng | seconds |\r
-| | | i.e. |\r
-| | | ``5s`` |\r
-+-------------+----+----------+\r
-| endpoint | st\| *Require\|\r
-| | ri\| d*. |\r
-| | ng | GET |\r
-| | | endpoint |\r
-| | | provided |\r
-| | | by the |\r
-| | | componen\|\r
-| | | t |\r
-| | | for |\r
-| | | Consul |\r
-| | | to call |\r
-| | | to check |\r
-| | | health |\r
-+-------------+----+----------+\r
++--------------------------------+---------+---------------------------+\r
+| Property Name | Type | Description |\r
++================================+=========+===========================+\r
+| type | string | *Required*. ``http`` |\r
++--------------------------------+---------+---------------------------+\r
+| interval | string | Interval duration in |\r
+| | | seconds i.e. ``60s`` |\r
++--------------------------------+---------+---------------------------+\r
+| timeout | string | Timeout in seconds i.e. |\r
+| | | ``5s`` |\r
++--------------------------------+---------+---------------------------+\r
+| endpoint | string | *Required*. GET endpoint |\r
+| | | provided by the component |\r
+| | | for Consul to call to |\r
+| | | check health |\r
++--------------------------------+---------+---------------------------+\r
\r
Example:\r
\r
docker script example\r
^^^^^^^^^^^^^^^^^^^^^\r
\r
-+-------------+----+------------+\r
-| Property | Ty\| Descript\ |\r
-| Name | pe | ion |\r
-+=============+====+============+\r
-| type | st\| *Require\ |\r
-| | ri\| d*. |\r
-| | ng | ``docker`` |\r
-+-------------+----+------------+\r
-| interval | st\| Interval |\r
-| | ri\| duration |\r
-| | ng | in |\r
-| | | seconds |\r
-| | | i.e. |\r
-| | | ``15s`` |\r
-+-------------+----+------------+\r
-| timeout | st\| Timeout |\r
-| | ri\| in |\r
-| | ng | seconds |\r
-| | | i.e. |\r
-| | | ``1s`` |\r
-+-------------+----+------------+\r
-| script | st\| *Require\ |\r
-| | ri\| d*. |\r
-| | ng | Full |\r
-| | | path of |\r
-| | | script |\r
-| | | that |\r
-| | | exists |\r
-| | | in the |\r
-| | | Docker |\r
-| | | containe\ |\r
-| | | r |\r
-| | | to be |\r
-| | | executed |\r
-+-------------+----+------------+\r
-\r
-Consul will use the `Docker exec API <https://docs.docker.com/engine/api/v1.29/#tag/Exec>`_ to\r
++--------------------------------+---------+---------------------------+\r
+| Property Name | Type | Description |\r
++================================+=========+===========================+\r
+| type | string | *Required*. ``docker`` |\r
++--------------------------------+---------+---------------------------+\r
+| interval | string | Interval duration in |\r
+| | | seconds i.e. ``15s`` |\r
++--------------------------------+---------+---------------------------+\r
+| timeout | string | Timeout in seconds i.e. |\r
+| | | ``1s`` |\r
++--------------------------------+---------+---------------------------+\r
+| script | string | *Required*. Full path of |\r
+| | | script that exists in the |\r
+| | | Docker container to be |\r
+| | | executed |\r
++--------------------------------+---------+---------------------------+\r
+\r
+Consul will use the `Docker exec\r
+API <https://docs.docker.com/engine/api/v1.29/#tag/Exec>`__ to\r
periodically call your script in your container. It will examine the\r
script result to identify whether your component is healthy. Your\r
component is considered healthy when the script returns ``0`` otherwise\r
Ports\r
~~~~~\r
\r
+This method of exposing/mapping a local port to a host port is NOT\r
+RECOMMENDED because of the possibility of port conflicts. If multiple\r
+instances of a docker container will be running, there definitely will\r
+be port conflicts. Use at your own risk. (The preferred way to expose a\r
+port is to do so in the Dockerfile as described\r
+:any:`here <dcae-cli-docker-ports>`).\r
+\r
.. code:: json\r
\r
"auxilary": {\r
\r
The ``container`` object contains:\r
\r
-+----------------------+----------------------+----------------------+\r
-| Property Name | Type | Description |\r
-+======================+======================+======================+\r
-| bind | string | path to the |\r
-| | | container volume |\r
-+----------------------+----------------------+----------------------+\r
-| mode | string | “ro” - indicates |\r
-| | | read-only volume |\r
-| | | “” - indicates that |\r
-| | | the container can |\r
-| | | write into the bind |\r
-| | | mount |\r
-+----------------------+----------------------+----------------------+\r
++-----------------------+-----------------------+-----------------------+\r
+| Property Name | Type | Description |\r
++=======================+=======================+=======================+\r
+| bind | string | path to the container |\r
+| | | volume |\r
++-----------------------+-----------------------+-----------------------+\r
+| mode | string | “ro” - indicates |\r
+| | | read-only volume |\r
++-----------------------+-----------------------+-----------------------+\r
+| | “” - indicates that |\r
+| | the contain can write |\r
+| | into the bind mount |\r
++-----------------------+-----------------------+-----------------------+\r
\r
The ``host`` object contains:\r
\r
In the example above, the container volume “/tmp/docker.sock” maps to\r
host volume “/var/run/docker.sock”.\r
\r
-Policy\r
-~~~~~~\r
+\r
+Policy (not yet supported)\r
+~~~~~~~~~~~~~~~~~~~~~~~~~~\r
\r
Policy changes made in the Policy UI will be provided to the Docker\r
component by triggering a script that is defined here.\r
\r
-+-------------+----+------------+\r
-| Property | Ty\| Descript\ |\r
-| Name | pe | ion |\r
-+=============+====+============+\r
-| reconfigure | st\| *Require\ |\r
-| _type | ri\| d*. |\r
-| | ng | Current |\r
-| | | value |\r
-| | | supporte |\r
-| | | d |\r
-| | | is |\r
-| | | ``policy`` |\r
-+-------------+----+------------+\r
-| script_path | st\| *Require\ |\r
-| | ri\| d*. |\r
-| | ng | Current |\r
-| | | value |\r
-| | | for |\r
-| | | ‘policy’ |\r
-| | | reconfig\ |\r
-| | | ure_type |\r
-| | | must be |\r
-| | | “/opt/ap\ |\r
-| | | p/reconf\ |\r
-| | | igure.sh |\r
-| | | ” |\r
-+-------------+----+------------+\r
++--------------------------------+---------+---------------------------+\r
+| Property Name | Type | Description |\r
++================================+=========+===========================+\r
+| reconfigure_type | string | *Required*. Current value |\r
+| | | supported is ``policy`` |\r
++--------------------------------+---------+---------------------------+\r
+| script_path | string | *Required*. Current value |\r
+| | | for ‘policy’ |\r
+| | | reconfigure_type must be |\r
+| | | “/opt/app/reconfigure.sh” |\r
++--------------------------------+---------+---------------------------+\r
\r
Example:\r
\r
The docker script interface is as follows: \`/opt/app/reconfigure.sh\r
$reconfigure_type {“updated policies”: , “application config”: }\r
\r
-+-----+----+---------------------------+\r
-| Na\ | Ty\| Descript\ |\r
-| me | pe | ion |\r
-+=====+====+===========================+\r
-| re\ | st\| “policy” |\r
-| co\ | ri\| |\r
-| nf\ | ng | |\r
-| ig\ | | |\r
-| ur\ | | |\r
-| e_t\| | |\r
-| y\ | | |\r
-| pe\ | | |\r
-+-----+----+---------------------------+\r
-| up\ | js\| TBD |\r
-| da\ | on | |\r
-| te\ | | |\r
-| d_p\| | |\r
-| o\ | | |\r
-| li\ | | |\r
-| ci\ | | |\r
-| es | | |\r
-+-----+----+---------------------------+\r
-| up\ | js\| complete |\r
-| da\ | on | generate\ |\r
-| te\ | | d |\r
-| d_a\| | app_conf\ |\r
-| p\ | | ig, |\r
-| pl\ | | not |\r
-| _c\ | | fully-re\ |\r
-| on\ | | solved, |\r
-| fi\ | | but |\r
-| g | | ``policy-enabled`` |\r
-| | | paramete\ |\r
-| | | rs |\r
-| | | have |\r
-| | | been |\r
-| | | updated. |\r
-| | | In order |\r
-| | | to get |\r
-| | | the |\r
-| | | complete |\r
-| | | updated |\r
-| | | app_conf\ |\r
-| | | ig, |\r
-| | | the |\r
-| | | componen\ |\r
-| | | t |\r
-| | | would |\r
-| | | have to |\r
-| | | call |\r
-| | | ``config-binding-service``|\r
-| | | . |\r
-+-----+----+---------------------------+\r
++--------------+--------------+----------------------------------------+\r
+| Name | Type | Description |\r
++==============+==============+========================================+\r
+| reconfigure_ | string | “policy” |\r
+| type | | |\r
++--------------+--------------+----------------------------------------+\r
+| updated_poli | json | TBD |\r
+| cies | | |\r
++--------------+--------------+----------------------------------------+\r
+| updated_appl | json | complete generated app_config, not |\r
+| _config | | fully-resolved, but ``policy-enabled`` |\r
+| | | parameters have been updated. In order |\r
+| | | to get the complete updated |\r
+| | | app_config, the component would have |\r
+| | | to call ``config-binding-service``. |\r
++--------------+--------------+----------------------------------------+\r
\r
Docker Component Spec - Complete Example\r
----------------------------------------\r
{\r
"self": {\r
"version": "1.0.0",\r
- "name": "asimov.component.kpi_anomaly",\r
+ "name": "yourapp.component.kpi_anomaly",\r
"description": "Classifies VNF KPI data as anomalous",\r
"component_type": "docker"\r
},\r
"type": "http"\r
}],\r
"publishes": [{\r
- "format": "asimov.format.integerClassification",\r
+ "format": "yourapp.format.integerClassification",\r
"version": "1.0.0",\r
"config_key": "prediction",\r
"type": "http"\r
"version": "1.0.0"\r
},\r
"response": {\r
- "format": "asimov.format.integerClassification",\r
+ "format": "yourapp.format.integerClassification",\r
"version": "1.0.0"\r
}\r
}]\r
}\r
},\r
"artifacts": [{\r
- "uri": "fake.nexus.com/dcae/kpi_anomaly:1.0.0",\r
+ "uri": "fake.nexus.att.com/dcae/kpi_anomaly:1.0.0",\r
"type": "docker image"\r
}]\r
}\r