Onboarding documentation update for CLI
[dcaegen2.git] / docs / sections / components / dcae-cli / walkthrough.rst
index d33c35f..559ba3a 100755 (executable)
 Walk-through\r
 ============\r
 \r
-The goal of this quickstart is to provide an overview of the\r
-functionalities of the ``dcae-cli`` and walk you through the\r
-capabilities:\r
+This section demonstrates the flow and usage of the dcae_cli tool to\r
+onboard a typical component to the DCAE platform. The commands are\r
+explained in more detail in :doc:`dcae_cli Commands <commands>`.\r
+\r
+-  `Add (and validate) a data format <#add-a-data-format>`__\r
+-  `Add (and validate) the component <#add-the-component>`__\r
+-  `View the platform generated\r
+   configuration <#view-the-platform-generated-configuration>`__\r
+-  `If needed, Create the dmaap file for Dmaap Testing <#create-the-input-file-for-dmaap-testing>`__\r
+-  `If needed, Create the input file for *Sourced at Deployment* Testing <#create-the-input-file-for-sourced-at-deployment-testing>`__\r
+-  `Run the component <#run-the-component>`__\r
+-  :any:`Undeploy the component <dcae_cli_undeploy_the_component>`\r
+-  :any:`Publish the component and data_format <dcae_cli_publish_the_component_and_data_format>` to let others\r
+   know its ready for reuse\r
+-  `List the Catalog Contents <#list-the-catalog-contents>`__ to see\r
+   your published resources\r
 \r
--  `Adding data formats <#adding-data-formats>`__\r
--  `Adding component <#adding-component>`__\r
--  `Setting profile <#setting-profile>`__\r
--  `Development and testing <#development-and-testing>`__\r
--  `Publishing component <#publishing-component>`__\r
--  `Shared catalog <#shared-catalog>`__\r
 \r
-.. This walk-through uses example projects: COMMENTED OUT FOR NOW TBD\r
-.. \r
-.. -  `laika <ONAP%20URL%20TBD>`__\r
-.. -  `CDAP examples <ONAP%20URL%20TBD>`__\r
-\r
-.. _adding-data-formats:\r
-\r
-Adding data formats\r
--------------------\r
+--------------\r
 \r
-``data_format`` is the sub-command that is used to execute operations\r
-that manage `data formats <../data-formats.md>`__.\r
+Add a Data Format\r
+-----------------\r
 \r
 ::\r
 \r
-    $ dcae_cli data_format --help\r
-    Usage: dcae_cli data_format [OPTIONS] COMMAND [ARGS]...\r
-\r
-    Options:\r
-      --help  Show this message and exit.\r
-\r
-    Commands:\r
-      add      Tracks a data format file SPECIFICATION...\r
-      generate Generates a data format file from JSON input examples\r
-      list     Lists all your data formats\r
-      publish  Publishes data format to make publicly...\r
-      show     Provides more information about FORMAT\r
+    $ dcae_cli data_format add $HOME/yourapp/data-formats/health.json\r
 \r
-Your data format must be in the catalog in order to use in the component\r
-specification. Check the catalog using the ``data_format list``\r
-sub-command:\r
+Verify that the data_format was added\r
 \r
 ::\r
 \r
-    $ dcae_cli data_format list\r
+    $ dcae_cli data_format list | grep yourapp                                                                                              \r
+    | sandbox.platform.yourapp.health | 0.1.0   | Data format used for the /health endpoint                   | staged    | 2017-11-07 21:48:47.736518 |\r
 \r
-    Data formats for mh677g\r
-    +------+---------+-------------+--------+----------+\r
-    | Name | Version | Description | Status | Modified |\r
-    +------+---------+-------------+--------+----------+\r
-    |      |         |             |        |          |\r
-    +------+---------+-------------+--------+----------+\r
+(Note: Each of the data formats for your component need to be added,\r
+unless already existing in the onboarding catalog )\r
 \r
-The fields ``name``, ``version``, ``description`` are referenced from\r
-the data format JSON from the ``self`` JSON.\r
-\r
-There are no data formats so you must add the data formats that your\r
-component specification references. Use the ``data_format add``\r
-sub-command:\r
+--------------\r
 \r
-Here’s an example command:\r
+Add the Component\r
+-----------------\r
 \r
 ::\r
 \r
-    dcae_cli data_format add health.json\r
+    $ dcae_cli component add $HOME/yourapp/component-spec.json\r
 \r
-Verify that it was added:\r
+Verify that the component was added\r
 \r
 ::\r
 \r
-    $ dcae_cli data_format list\r
-\r
-    Data formats for mh677g\r
-    +-------------------------------+---------+-------------------------------------------+--------+----------------------------+\r
-    | Name                          | Version | Description                               | Status | Modified                   |\r
-    +-------------------------------+---------+-------------------------------------------+--------+----------------------------+\r
-    | sandbox.platform.laika.health | 0.1.0   | Data format used for the /health endpoint | staged | 2017-05-23 04:02:38.952799 |\r
-    +-------------------------------+---------+-------------------------------------------+--------+----------------------------+\r
+    $ dcae_cli component list \r
+    Active profile: solutioning\r
 \r
-Go ahead and add other referenced data formats.\r
+    +-------------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+\r
+    | Name                          | Version | Type   | Description                                                   | Status | Modified                   | #Deployed |\r
+    +-------------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+\r
+    | sandbox.platform.yourapp      | 0.7.0   | docker | Web service used as a stand-alone test DCAE service compone.. | staged | 2017-11-08 20:27:34.168854 | 0         |\r
+    +-------------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+\r
 \r
-If you have JSON input you can generate a data format like this:\r
+--------------\r
 \r
-::\r
+.. _dcae-cli-view-the-platform:\r
 \r
-    $ dcae_cli data_format --keywords generate myname:1.0.0  myjsoninputfile\r
+View the platform generated configuration\r
+-----------------------------------------\r
 \r
-where ``myname`` is the name of your data format, ``1.0.0`` is an\r
-example version, and ``myjsoninputfile`` is an example JSON input file\r
-(a directory of input JSON files can also be provided). The\r
-``--keywords`` option adds additional data attributes that can be\r
-completed to provide a more detailed data characterization. In any event\r
-the output should be reviewed for accuracy. The data format is written\r
-to stdout.\r
+The ``component dev`` command is useful during onboarding. Running this\r
+command is part of a multi-step process that sets up a temporary test\r
+environment, generates your application configuration, makes it\r
+available in that environment, and allows you to view that configuration\r
+to help with debugging.\r
 \r
-.. _adding-component:\r
+Here is a step-by-step example based on a component specification called\r
+``component-spec.json``.\r
 \r
-Adding component\r
-----------------\r
+Step 1 - Run the component dev command\r
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
 \r
-``component`` is the sub-command that is used to work with operations\r
-for components:\r
+(This creates a file called env_$ENV (in the current directory)- where\r
+$ENV is the name of the active profile. Note: SERVICE_NAME and HOSTNAME\r
+always resolve to the same value).\r
 \r
 ::\r
 \r
-    $ dcae_cli component --help\r
-    Usage: dcae_cli component [OPTIONS] COMMAND [ARGS]...\r
-\r
-    Options:\r
-      --help  Show this message and exit.\r
-\r
-    Commands:\r
-      add\r
-      dev       Set up component in development for...\r
-      list      Lists components in the public catalog.\r
-      publish   Pushes COMPONENT to the public catalog\r
-      run       Runs the latest version of COMPONENT.\r
-      show      Provides more information about COMPONENT\r
-      undeploy  Undeploys the latest version of COMPONENT.\r
-\r
-Your component must be accessible from the catalog in order for it to be\r
-used. Check the catalog using the ``component list`` sub-command:\r
-\r
-::\r
+    $ dcae_cli component dev component-spec.json\r
+    Ready for component development\r
 \r
-    $ dcae_cli component list\r
-    Active profile: solutioning\r
+    Setup these environment variables. Run "source env_solutioning":\r
 \r
-    +------+---------+------+-------------+--------+----------+-----------+\r
-    | Name | Version | Type | Description | Status | Modified | #Deployed |\r
-    +------+---------+------+-------------+--------+----------+-----------+\r
-    |      |         |      |             |        |          |           |\r
-    +------+---------+------+-------------+--------+----------+-----------+\r
+    export DOCKER_HOST=yourdockerhost.com:2376\r
+    export SERVICE_CHECK_INTERVAL=15s\r
+    export CONFIG_BINDING_SERVICE=config_binding_service\r
+    export HOSTNAME=user12.b599cf0e-75e8-484b-b8e2-557576d77036.0-7-0.sandbox-platform-yourapp\r
+    export CONSUL_HOST=yourconsulhost.com\r
+    export CDAP_BROKER=cdap_broker\r
+    export SERVICE_NAME=user12.b599cf0e-75e8-484b-b8e2-557576d77036.0-7-0.sandbox-platform-yourapp\r
+    export SERVICE_CHECK_TIMEOUT=1s\r
+    export SERVICE_CHECK_HTTP=/health\r
 \r
-    Use the "--deployed" option to see more details on deployments\r
+    Press any key to stop and to clean up\r
 \r
-The fields ``name``, ``version``, ``type``, ``description`` are\r
-referenced from the component specification’s ``self`` JSON.\r
+Step 2 - Setup the environment\r
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
 \r
-There are no components so you must add your component. Use the\r
-``component add`` sub-command. The command is the same for docker and\r
-cdap components:\r
+In another window, setup the temporary testing environment, by executing\r
+the environment file created above.\r
 \r
 ::\r
 \r
-    $ dcae_cli component add --help\r
-    Usage: dcae_cli component add [OPTIONS] SPECIFICATION\r
-\r
-    Options:\r
-      --update  Updates a locally added component if it has not been already\r
-                pushed\r
-      --help    Show this message and exit.\r
+    $ source env_solutioning\r
 \r
-*Note* use the ``--update`` flag to replace existing staged instances.\r
+(The application configuration is now available under the SERVICE_NAME\r
+shown above -\r
+``user12.b599cf0e-75e8-484b-b8e2-557576d77036.0-7-0.sandbox-platform-yourapp``).\r
 \r
-The ``component dev`` sub-command can be useful in validating and\r
-experimenting when crafting your component specification. See details\r
-about ``dev`` under `Development and\r
-testing <#development-and-testing>`__.\r
+Step 3 - Query CONSUL\r
+~~~~~~~~~~~~~~~~~~~~~\r
 \r
-Once we add the components laika and helloworld, let’s verify that they\r
-got added ok:\r
+Query CONSUL to get the IP/PORT of CONFIG BINDING SERVICE\r
 \r
 ::\r
 \r
-    $ dcae_cli component list\r
-    Active profile: solutioning\r
+    $ curl http://$CONSUL_HOST:8500/v1/catalog/service/$CONFIG_BINDING_SERVICE\r
+    [\r
+      {\r
+        "ID": "bfbc220d-4603-7f90-ec2e-611d3c330f20",\r
+        "Node":"docker00",\r
+        "Address": "10.226.1.15",\r
+        "Datacenter":"solutioning-central",\r
+        "TaggedAddresses": {\r
+          "lan":"10.226.1.15",\r
+          "wan":"10.226.1.15"\r
+        },\r
+        "NodeMeta": {},\r
+        "ServiceID": "472b116f9035:config_binding_service:10000",\r
+        "ServiceName": "config_binding_service",\r
+        "ServiceTags": [],\r
+        "ServiceAddress":"135.205.226.126",\r
+        "ServicePort":10000,\r
+        "ServiceEnableTagOverride": false,\r
+        "CreateIndex":1078990,\r
+        "ModifyIndex":1078990\r
+      }\r
+    ]\r
 \r
-    +-------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+\r
-    | Name                    | Version | Type   | Description                                                   | Status | Modified                   | #Deployed |\r
-    +-------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+\r
-    | cdap.helloworld.endnode | 0.8.0   | cdap   | cdap test component                                           | staged | 2017-05-23 04:14:35.588075 | 0         |\r
-    | sandbox.platform.laika  | 0.5.0   | docker | Web service used as a stand-alone test DCAE service compone.. | staged | 2017-05-23 04:07:44.065610 | 0         |\r
-    +-------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+\r
+Fetch the generated configuration from CONFIG BINDING SERVICE using the\r
+‘serviceaddress’ and ‘serviceport’ from above along with $SERVICE_NAME\r
+from earlier.\r
 \r
-    Use the "--deployed" option to see more details on deployments\r
+::\r
 \r
-.. _setting-profile:\r
+    $ curl http://135.205.226.126:10000/service_component/user12.b599cf0e-75e8-484b-b8e2-557576d77036.0-7-0.sandbox-platform-yourapp\r
 \r
-Setting profile\r
----------------\r
+    {"streams_subscribes": {}, "services_calls": {}, "multiplier": 3, "streams_publishes": {}}\r
 \r
-``profile`` is the sub-command that is used to manage profiles. These\r
-profiles contain environment variables used to connect to different\r
-environments. This is used in the running and deployment of your\r
-component using the ``dcae_cli component run`` command. The ``dcae-cli``\r
-ships with profiles for ``solutioning`` and ``rework``.\r
+--------------\r
 \r
-::\r
+.. _dcae-cli-walkthrough-dmaap-testing:\r
 \r
-    $ dcae_cli profiles --help\r
-    Usage: dcae_cli profiles [OPTIONS] COMMAND [ARGS]...\r
+Create the input file for Dmaap Testing\r
+---------------------------------------\r
 \r
-    Options:\r
-      --help  Show this message and exit.\r
+Currently, the dcae-cli tool does not have the capability to provision\r
+topics or feeds. Therefore, in order to test with ``message router`` or\r
+``data router`` feeds, the developer must manually provision the topic\r
+or feed and then provide the connection details in the form of a DMaap\r
+JSON file for testing. This file is then passed in on the\r
+``component run`` or ``component dev`` commands by using the argument\r
+``--dmaap-file``.\r
 \r
-    Commands:\r
-      activate  Sets profile NAME as the active profile\r
-      create    Creates a new profile NAME initialized with...\r
-      delete    Deletes profile NAME\r
-      list      Lists available profiles\r
-      set       Updates profile NAME such that KEY=VALUE\r
-      show      Prints the profile dictionary\r
+The structure of the DMaaP JSON is an object of config keys with the\r
+topic or feed connection details. The config keys are the ``config_key``\r
+values specified in the component specification streams section where\r
+the streams must be type ``message router`` or ``data router``. This\r
+file corresponds to the ``Dmaap Connection Object`` which is generated\r
+by the platform and provided to the component at runtime. The exception\r
+is that ``delivery_url`` cannot be provided in the dmaap-file because it\r
+is not created until the component is deployed. Refer to :any:`Dmaap Connection Object <dmaap-connection-objects>`, for details on creating the dmaap-file for testing.\r
 \r
-To see what variables a profile contains, you can use the ``show``\r
-command, as in ``dcae_cli profiles show PROFILE_NAME``\r
+--------------\r
 \r
-Use the ``create`` sub-command to create your own profile and assign new\r
-values using the ``set`` command. Afterwards you will need to\r
-``activate`` the profile you wish to use. First take a look at which\r
-profile is active:\r
+Create the input file for *Sourced at Deployment* Testing\r
+---------------------------------------------------------\r
 \r
-::\r
+Components may have configuration parameters whose values are to be\r
+sourced at deployment time. This is established in the\r
+:any:`component specification <common-specification-parameters>`\r
+by setting the property ``sourced_at_deployment`` to ``true`` for each\r
+applicable parameter.\r
 \r
-    $ dcae_cli profiles list\r
-       rework\r
-    *  solutioning\r
+Then, use the ``--inputs-file`` command-line argument when running the\r
+component ``dev`` or ``run`` command for your component. This is to\r
+simulate providing the dynamic, deployment time values for those\r
+parameters marked as ``sourced_at_deployment``.\r
 \r
-The active profile is ``solutioning`` so to activate *rework* to use\r
-``rework``:\r
+For example, if your component specification has the following\r
+configuration parameters:\r
 \r
 ::\r
 \r
-    $ dcae_cli profiles activate rework\r
+    "parameters": [{\r
+        "name": "vnf-ip",\r
+        "value": "",\r
+        "sourced_at_deployment": true\r
+    },\r
+    {\r
+        "name": "static-param",\r
+        "value": 5\r
+    }]\r
 \r
-Check\r
+Pass in an input file that looks like:\r
 \r
 ::\r
 \r
-    $ dcae_cli profiles list\r
-    *  rework\r
-       solutioning\r
+    {\r
+        "vnf-ip": "10.100.1.100"\r
+    }\r
 \r
-.. _development-and-testing:\r
+The application configuration would look like:\r
 \r
-Development and testing\r
------------------------\r
+::\r
 \r
-The following operations under the sub-command ``component`` are aimed\r
-to help developers with testing:\r
+    {\r
+        "vnf-ip": "10.100.1.100",\r
+        "static-param": 5\r
+    }\r
 \r
--  ``run``\r
--  ``undeploy``\r
--  ``dev``\r
+--------------\r
 \r
-``run``\r
-~~~~~~~\r
+Run the component\r
+-----------------\r
 \r
 The ``run`` operation is to be used for running your application in its\r
 container remotely on the activated environment. Docker containers have\r
-the additional option to run locally on your development machine.\r
+the additional option to run locally on your development machine. If the\r
+component uses Dmaap, you can specify the Dmaap Connection Object as\r
+well. Refer to :any:`Dmaap Connection Object <dmaap-connection-objects>`.\r
 \r
-In order to run your application, you must have added your data formats\r
-and your component to your catalog.\r
+In order to run the component, the data formats and component must have\r
+been added to the onboarding catalog.\r
 \r
-Let’s verify that your component is in the catalog:\r
+To verify what’s in the catalog:\r
 \r
 ::\r
 \r
-    $ dcae_cli component list                                                                                       \r
+    $ dcae_cli catalog list --expanded                                                                                      \r
     Active profile: solutioning\r
+    +---------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+\r
+    | Name                      | Version | Type   | Description                                                   | Status | Modified                   | #Deployed |\r
+    +---------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+\r
+    | sandbox.platform.yourapp  | 0.7.0   | docker | Web service used as a stand-alone test DCAE service compone.. | staged | 2017-11-08 20:27:34.168854 | 0         |\r
+    +---------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+\r
 \r
-    +-------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+\r
-    | Name                    | Version | Type   | Description                                                   | Status | Modified                   | #Deployed |\r
-    +-------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+\r
-    | cdap.helloworld.endnode | 0.8.0   | cdap   | cdap test component                                           | staged | 2017-05-23 04:14:35.588075 | 0         |\r
-    | sandbox.platform.laika  | 0.5.0   | docker | Web service used as a stand-alone test DCAE service compone.. | staged | 2017-05-23 04:07:44.065610 | 0         |\r
-    +-------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+\r
-\r
-    Use the "--deployed" option to see more details on deployments\r
-\r
-Docker\r
-^^^^^^\r
+For Docker\r
 \r
-**NOTE** Make sure your Docker image has been uploaded to the shared\r
+**NOTE** Make sure the Docker image has been uploaded to the shared\r
 registry.\r
 \r
-For Docker containers, you can run either attached or unattached.\r
-Attached means that the dcae-cli tool will launch the container and not\r
-terminate. The dcae-cli while attached will stream in the logs of the\r
-Docker container. Doing a Ctrl-C will terminate the run session which\r
-means undeploy your container and force a clean up automatically.\r
-\r
-Running unattached means simply deploy your container. You will need to\r
-execute ``undeploy`` when you are done testing. #### CDAP\r
-\r
-**NOTE** Make sure your CDAP jar has been uploaded to Nexus.\r
-\r
-TODO\r
-\r
-``undeploy``\r
-~~~~~~~~~~~~\r
-\r
-The ``undeploy`` operation is to be used to undeploy any instances of a\r
-specified component, version that you have deployed. This includes\r
-cleaning up of configuration.\r
-\r
-Let’s undeploy ``sandbox.platform.laika`` that was deployed from the\r
-previous section:\r
+A docker component can be run in either ``attached`` or ``unattached``\r
+mode. (Default is unattached).\r
+\r
++------------------+---------------------------------------------------+\r
+| Mode             | Description                                       |\r
++==================+===================================================+\r
+| attached         | component is run in the ‘foreground’, container   |\r
+|                  | logs are streamed to stdout. Ctrl-C is used to    |\r
+|                  | terminate the dcae_cli session.                   |\r
++------------------+---------------------------------------------------+\r
+| unattached       | component is run in the ‘background’, container   |\r
+|                  | logs are viewed via ``docker logs`` command,      |\r
+|                  | container runs until undeployed with dcae_cli     |\r
+|                  | ``undeploy`` command.                             |\r
++------------------+---------------------------------------------------+\r
+\r
+Run a component in attached mode:\r
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r
 \r
 ::\r
 \r
-    $ dcae_cli component undeploy sandbox.platform.laika:0.5.0\r
-    DCAE.Undeploy | WARNING | Undeploying components: 1\r
-    DCAE.Undeploy | WARNING | Undeployed components: 1\r
-\r
-.. _walkthrough-dev:\r
-\r
-``dev``\r
-~~~~~~~\r
-\r
-The ``dev`` operation is a convenient operation that can be useful for\r
-the development and testing of your component. It can be used to:\r
+    $ dcae_cli -v component run --attached sandbox.platform.yourapp:0.7.0\r
+    DCAE.Docker | INFO | Running image 'nexus01.server.com:18443/repository/solutioning01-mte2-docker/dcae-platform/yourapp:0.7.0' as 'user12.dbb13a3c-d870-487e-b584-89929b856b5c.0-7-0.sandbox-platform-yourapp'\r
+    DCAE.Docker.user12.dbb13a3c-d870-487e-b584-89929b856b5c.0-7-0.sandbox-platform-yourapp | INFO | Consul host: yourconsulhost.com\r
 \r
--  Help validate your experimental component specification before\r
-   uploading to the catalog\r
--  Generate the application configuration from the component\r
-   specification and make it available in a test environment. This\r
-   allows you to view your resulting configuration for local development\r
-   and to help debug potential related issues.\r
+    DCAE.Docker.user12.dbb13a3c-d870-487e-b584-89929b856b5c.0-7-0.sandbox-platform-yourapp | INFO | service name: user12.dbb13a3c-d870-487e-b584-89929b856b5c.0-7-0.sandbox-platform-yourapp\r
 \r
-Let’s say you have a component specification called\r
-``component-spec.json``:\r
-\r
-::\r
-\r
-    $ dcae_cli component dev component-spec.json \r
-    Ready for component development\r
+    DCAE.Docker.user12.dbb13a3c-d870-487e-b584-89929b856b5c.0-7-0.sandbox-platform-yourapp | INFO | get_config returned the following configuration: {"streams_subscribes": {}, "multiplier": 3, "services_calls": {}, "streams_publishes": {}}\r
 \r
-    Setup these environment varibles. Run "source env_solutioning":\r
+    DCAE.Docker.user12.dbb13a3c-d870-487e-b584-89929b856b5c.0-7-0.sandbox-platform-yourapp | INFO |  * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)\r
 \r
-    export DOCKER_HOST=SOME_DOCKER_HOST:2376\r
-    export SERVICE_CHECK_INTERVAL=15s\r
-    export CONFIG_BINDING_SERVICE=config_binding_service\r
-    export HOSTNAME=mh677g.95740959-63d2-492a-b964-62a6dce2591d.0-6-0.sandbox-platform-laika\r
-    export CONSUL_HOST=SOME_CONSUL_HOST\r
-    export CDAP_BROKER=cdap_broker\r
-    export SERVICE_NAME=mh677g.95740959-63d2-492a-b964-62a6dce2591d.0-6-0.sandbox-platform-laika\r
-    export SERVICE_CHECK_TIMEOUT=1s\r
-    export SERVICE_CHECK_HTTP=/health\r
+    DCAE.Docker.user12.dbb13a3c-d870-487e-b584-89929b856b5c.0-7-0.sandbox-platform-yourapp | INFO | 135.205.226.156 - - [08/Nov/2017 23:27:30] "GET /health HTTP/1.1" 200 -\r
 \r
-    Press any key to stop and to clean up\r
 \r
-Your application configuration is now available under the name\r
-``mh677g.95740959-63d2-492a-b964-62a6dce2591d.0-6-0.sandbox-platform-laika``.\r
+    Hit Ctrl-C to terminate session.\r
 \r
-To view the resulting configuration, you can ``curl`` a request to the\r
-config binding service or programmatically fetch your configuration\r
-within your application.\r
+    ^C\r
+    DCAE.Docker | INFO | Stopping container 'user12.dbb13a3c-d870-487e-b584-89929b856b5c.0-7-0.sandbox-platform-yourapp' and cleaning up...\r
 \r
-You need to first query Consul to get the ip and port of config binding\r
-service:\r
+Run a component in unattached mode:\r
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r
 \r
 ::\r
 \r
-    curl http://$CONSUL_HOST:8500/v1/catalog/service/$CONFIG_BINDING_SERVICE\r
-    [\r
-      {\r
-        "ID": "983d5c94-c508-4a8a-9be3-5912bd09786b",\r
-        "Node": "realsolcnsl00",\r
-        "Address": "10.226.1.22",\r
-        "TaggedAddresses": {\r
-          "lan": "10.226.1.22",\r
-          "wan": "10.226.1.22"\r
-        },\r
-        "NodeMeta": {},\r
-        "ServiceID": "5f371f295c90:config_binding_service:10000",\r
-        "ServiceName": "config_binding_service",\r
-        "ServiceTags": [],\r
-        "ServiceAddress": "XXXX",\r
-        "ServicePort": 32770,\r
-        "ServiceEnableTagOverride": false,\r
-        "CreateIndex": 487,\r
-        "ModifyIndex": 487\r
-      }\r
-    ]\r
-\r
-.. _dmaap-testing:\r
-\r
-DMaaP testing\r
-~~~~~~~~~~~~~\r
-\r
-Currently, the dcae-cli does not have the capability of provisioning\r
-topics. In order to do testing with message router topics or with data\r
-router feeds, the developer must provision the topic or the feed\r
-manually and provide the connection details in the form of a JSON in a\r
-file to the dcae-cli. This file is to be passed in when using the\r
-``run`` and ``dev`` commands with the option ``--dmaap-file``.\r
-\r
-The structure of the DMaaP JSON is an object of config keys to matching\r
-topic or feed connection details. Config keys are the ``config_key``\r
-values specified in your component specification streams section where\r
-the streams must be type message router or data router. Information\r
-about the associated connection details can be found on `this\r
-page <dmaap-connection-objects.md>`__. Please check it out.\r
-\r
-For example, if you have a component specification that has the\r
-following streams entry:\r
-\r
-.. code:: json\r
-\r
-    "streams": {\r
-        "publishes": [{\r
-            "format": "ves",\r
-            "version": "1.0.0",\r
-            "type": "message router",\r
-            "config_key": "ves_connection"\r
-        }]\r
-    }\r
+    $ dcae_cli -v component run sandbox.platform.yourapp:0.7.0\r
+    DCAE.Docker | INFO | Running image 'nexus01.server.com:18443/repository/solutioning01-mte2-docker/dcae-platform/yourapp:0.7.0' as 'user12.22629ebd-417e-4e61-a9a0-f0cb16d4cef2.0-7-0.sandbox-platform-yourapp'\r
+    DCAE.Run | INFO | Deployed user12.22629ebd-417e-4e61-a9a0-f0cb16d4cef2.0-7-0.sandbox-platform-yourapp. Verifying..\r
+    DCAE.Run | INFO | Container is up and healthy\r
 \r
-Then to deploy and to run your component, you must use the\r
-``--dmaap-file`` command and pass in a JSON that looks like:\r
+**NOTE** You must undeploy this component when finished testing. This is\r
+important to conserve resources in the environment.\r
 \r
-.. code:: json\r
+Run a component that subscribes to Dmaap Message Router or Data Router\r
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r
 \r
-    {\r
-        "ves_connection": {\r
-            "type": "message_router",\r
-            "dmaap_info": {\r
-                "topic_url": "https://we-are-message-router.us:3905/events/some-topic"\r
-            }\r
-        }\r
-    }\r
-\r
-The provided DMaaP JSON is used to simulate the output of provisioning\r
-and will be used to merge with the generated application configuration\r
-at runtime.\r
-\r
-Your final application config will look like:\r
-\r
-.. code:: json\r
-\r
-    {\r
-        "streams_publishes": {\r
-            "ves_connection": {\r
-                "type": "message_router",\r
-                "dmaap_info": {\r
-                    "topic_url": "https://we-are-message-router.us:3905/events/some-topic"\r
-                }\r
-            }\r
-        }\r
-    }\r
+::\r
 \r
-Data router subscribers\r
-^^^^^^^^^^^^^^^^^^^^^^^\r
+    $ dcae_cli -v component run $component-that-uses-dmamp --dmaap-file $dmaap-connection-object\r
 \r
-Note for data router subscriber testing, you will need the delivery url\r
-in order to provision the subscriber to the feed. This is constructed at\r
-deployment time and will be provided by the dcae-cli after you deploy\r
-your component. The delivery urls will be displayed to the screen:\r
+Run a component that expects input that is ``sourced at deployment``\r
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r
 \r
 ::\r
 \r
-    DCAE.Run | WARNING | Your component is a data router subscriber. Here are the delivery urls: \r
+    $ dcae_cli -v component run $component-that-expects-dti --inputs-file $input-file-to-simulate-dti\r
 \r
-            some-sub-dr: http://SOME_IP:32838/identity\r
+--------------\r
 \r
-*Sourced at deployment* testing\r
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
 \r
-Components may have configuration parameters whose values are to be\r
-sourced at deployment time. For example, there are components whose\r
-configuration parameters are to come from DTI events which are only\r
-available when the component is getting deployed. These configuration\r
-parameters must be setup correctly in the `component\r
-specification <http://localhost:8000/components/component-specification/docker-specification/#configuration-parameters>`__\r
-by setting the property ``sourced_at_deployment`` to ``true`` for each\r
-and every parameter that is expected to come in at deployment time.\r
+.. _dcae_cli_undeploy_the_component:\r
 \r
-Once your component specification has been updated correctly, you must\r
-use the ``--inputs-file`` command-line argument when running the\r
-commands ``dev`` or ``run`` with your component. This is to simulate\r
-providing the dynamic, deployment time values for those parameters\r
-marked as ``sourced_at_deployment``.\r
+Undeploy the component\r
+----------------------\r
 \r
-For example, if your component specification has the following\r
-configuration parameters:\r
-\r
-::\r
++-----------------------------------------------------------------+\r
+| The ``undeploy`` command is used to undeploy any instance of a  |\r
+| specified component/version that you have deployed. This        |\r
+| includes cleaning up the configuration.                         |\r
++-----------------------------------------------------------------+\r
+| Undeploy ``sandbox.platform.yourapp:0.7.0`` that was deployed     |\r
+| above:                                                          |\r
++-----------------------------------------------------------------+\r
+| ``$ dcae_cli -v component undeploy sandbox.platform.yourapp:0.7.0 |\r
+|  DCAE.Undeploy | WARNING | Undeploying components: 1 DCAE.Undep |\r
+| loy | WARNING | Undeployed components: 1``                      |\r
++-----------------------------------------------------------------+\r
 \r
-    "parameters": [{\r
-        "name": "vnf-ip",\r
-        "value": "",\r
-        "sourced_at_deployment": true\r
-    },\r
-    {\r
-        "name": "static-param",\r
-        "value": 5\r
-    }]\r
+.. _dcae_cli_publish_the_component_and_data_format:\r
 \r
-You would have to pass in an inputs file that looks like:\r
+Publish the component and data_format\r
+-------------------------------------\r
 \r
-::\r
+Once a component has been tested, it (and the data_format(s)) should be\r
+published in the onboarding catalog using the ``publish`` sub-command\r
+for both the ``data_format`` and ``component`` command.\r
 \r
-    {\r
-        "vnf-ip": "10.100.1.100"\r
-    }\r
+**Note** Before a component can be published, all data_formats that it\r
+references must be published.\r
 \r
-Your application configuration would look like:\r
+Publishing will change the status of a component or data_format,\r
+indicating that it has been tested, make accessible for other developers\r
+to use.\r
 \r
 ::\r
 \r
-    {\r
-        "vnf-ip": "10.100.1.100",\r
-        "static-param": 5\r
-    }\r
-\r
-Publishing component\r
---------------------\r
+    $ dcae_cli data_format publish sandbox.platform.yourapp:0.7.0\r
+    Data format has been published\r
 \r
-Once components have their component specifications crafted and\r
-validated and have been tested, components should be published in the\r
-shared onboarding catalog using the ``publish`` sub-command for both\r
-data formats and components. You must publish all data formats of a\r
-component before publishing a component.\r
+    $dcae_cli component publish sandbox.platform.yourapp:0.7.0\r
+    Component has been published\r
 \r
-Publishing will change the status of a component, be made accessible for\r
-other developers to use, and will generate the associated TOSCA models\r
-for use in designing of compositions.\r
-\r
-::\r
-\r
-    dcae_cli component publish sandbox.platform.laika:0.5.0\r
-\r
-Shared catalog\r
 --------------\r
 \r
-``catalog`` is the sub-command used to access and to browse the shared\r
-onboarding catalog to view components and data formats that have been\r
-published and that are being worked on. Components and data formats have\r
-two statuses ``staged`` and ``published``.\r
-\r
-Staged means that the resource has been simply added and is under\r
-development. It is to be used only by the owner. Published means that\r
-the resource has been fully developed and tested and is ready to be\r
-shared.\r
-\r
-Published components can be deployed by non-owners and published data\r
-formats can be used in component specifications of non-owners.\r
-\r
-There are two available operations:\r
+List the catalog contents\r
+-------------------------\r
 \r
 ::\r
 \r
-    $ dcae_cli catalog --help\r
-    Usage: dcae_cli catalog [OPTIONS] COMMAND [ARGS]...\r
-\r
-    Options:\r
-      --help  Show this message and exit.\r
+    $dcae_cli catalog list\r
 \r
-    Commands:\r
-      list\r
-      show\r
+    $ dcae_cli data_format list | grep sandbox\r
+    | sandbox.platform.yourapp         | 0.7.0   | docker | Web service used as a stand-alone test DCAE service compone..      | user12    | published | 2017-11-13 |\r
+    | sandbox.platform.yourapp.health            | 0.1.0  | Data format used for the /health endpoint                          | published | 2017-11-13 17:48:10.121588 |\r
+    | sandbox.platform.any                       | 0.1.0  | Data format used when no data format is required.                  | published | 2017-11-13 17:47:51.622607 |\r
+    | sandbox.platform.yourapp.identity.response | 0.1.0  | Data format used for the /identity endpoint response which should  | published | 2017-11-13 17:47:43.234715 |\r
+    | sandbox.platform.yourapp.identity.request  | 0.1.0  | Data format used for the /identity endpoint request. This is       | published | 2017-11-13 17:47:36.693643 |\r
+    | sandbox.platform.yourapp.rollcall.response | 0.1.0  | Data format used for the /rollcall endpoint respon..               | published | 2017-11-13 17:46:30.026846 |\r
 \r
-Staged components can be viewed under the ``list`` operation using the\r
-``--expanded`` flag.\r