Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License.
|
| 2 | .. http://creativecommons.org/licenses/by/4.0
|
| 3 |
|
| 4 | .. _walkthrough:
|
| 5 |
|
| 6 | Walk-through
|
| 7 | ============
|
| 8 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 9 | This section demonstrates the flow and usage of the dcae_cli tool to
|
| 10 | onboard a typical component to the DCAE platform. The commands are
|
| 11 | explained in more detail in :doc:`dcae_cli Commands <commands>`.
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 12 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 13 | - `Add (and validate) a data format <#add-a-data-format>`__
|
| 14 | - `Add (and validate) the component <#add-the-component>`__
|
| 15 | - `View the platform generated
|
| 16 | configuration <#view-the-platform-generated-configuration>`__
|
| 17 | - `If needed, Create the dmaap file for Dmaap Testing <#create-the-input-file-for-dmaap-testing>`__
|
| 18 | - `If needed, Create the input file for *Sourced at Deployment* Testing <#create-the-input-file-for-sourced-at-deployment-testing>`__
|
| 19 | - `Run the component <#run-the-component>`__
|
| 20 | - :any:`Undeploy the component <dcae_cli_undeploy_the_component>`
|
| 21 | - :any:`Publish the component and data_format <dcae_cli_publish_the_component_and_data_format>` to let others
|
| 22 | know its ready for reuse
|
| 23 | - `List the Catalog Contents <#list-the-catalog-contents>`__ to see
|
| 24 | your published resources
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 25 |
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 26 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 27 | --------------
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 28 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 29 | Add a Data Format
|
| 30 | -----------------
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 31 |
|
| 32 | ::
|
| 33 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 34 | $ dcae_cli data_format add $HOME/yourapp/data-formats/health.json
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 35 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 36 | Verify that the data_format was added
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 37 |
|
| 38 | ::
|
| 39 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 40 | $ dcae_cli data_format list | grep yourapp
|
| 41 | | sandbox.platform.yourapp.health | 0.1.0 | Data format used for the /health endpoint | staged | 2017-11-07 21:48:47.736518 |
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 42 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 43 | (Note: Each of the data formats for your component need to be added,
|
| 44 | unless already existing in the onboarding catalog )
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 45 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 46 | --------------
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 47 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 48 | Add the Component
|
| 49 | -----------------
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 50 |
|
| 51 | ::
|
| 52 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 53 | $ dcae_cli component add $HOME/yourapp/component-spec.json
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 54 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 55 | Verify that the component was added
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 56 |
|
| 57 | ::
|
| 58 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 59 | $ dcae_cli component list
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 60 | Active profile: solutioning
|
| 61 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 62 | +-------------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+
|
| 63 | | Name | Version | Type | Description | Status | Modified | #Deployed |
|
| 64 | +-------------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+
|
| 65 | | 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 |
|
| 66 | +-------------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 67 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 68 | --------------
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 69 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 70 | .. _dcae-cli-view-the-platform:
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 71 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 72 | View the platform generated configuration
|
| 73 | -----------------------------------------
|
| 74 |
|
| 75 | The ``component dev`` command is useful during onboarding. Running this
|
| 76 | command is part of a multi-step process that sets up a temporary test
|
| 77 | environment, generates your application configuration, makes it
|
| 78 | available in that environment, and allows you to view that configuration
|
| 79 | to help with debugging.
|
| 80 |
|
| 81 | Here is a step-by-step example based on a component specification called
|
| 82 | ``component-spec.json``.
|
| 83 |
|
| 84 | Step 1 - Run the component dev command
|
| 85 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 86 |
|
| 87 | (This creates a file called env_$ENV (in the current directory)- where
|
| 88 | $ENV is the name of the active profile. Note: SERVICE_NAME and HOSTNAME
|
| 89 | always resolve to the same value).
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 90 |
|
| 91 | ::
|
| 92 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 93 | $ dcae_cli component dev component-spec.json
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 94 | Ready for component development
|
| 95 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 96 | Setup these environment variables. Run "source env_solutioning":
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 97 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 98 | export DOCKER_HOST=yourdockerhost.com:2376
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 99 | export SERVICE_CHECK_INTERVAL=15s
|
| 100 | export CONFIG_BINDING_SERVICE=config_binding_service
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 101 | export HOSTNAME=user12.b599cf0e-75e8-484b-b8e2-557576d77036.0-7-0.sandbox-platform-yourapp
|
| 102 | export CONSUL_HOST=yourconsulhost.com
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 103 | export CDAP_BROKER=cdap_broker
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 104 | export SERVICE_NAME=user12.b599cf0e-75e8-484b-b8e2-557576d77036.0-7-0.sandbox-platform-yourapp
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 105 | export SERVICE_CHECK_TIMEOUT=1s
|
| 106 | export SERVICE_CHECK_HTTP=/health
|
| 107 |
|
| 108 | Press any key to stop and to clean up
|
| 109 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 110 | Step 2 - Setup the environment
|
| 111 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 112 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 113 | In another window, setup the temporary testing environment, by executing
|
| 114 | the environment file created above.
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 115 |
|
| 116 | ::
|
| 117 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 118 | $ source env_solutioning
|
| 119 |
|
| 120 | (The application configuration is now available under the SERVICE_NAME
|
| 121 | shown above -
|
| 122 | ``user12.b599cf0e-75e8-484b-b8e2-557576d77036.0-7-0.sandbox-platform-yourapp``).
|
| 123 |
|
| 124 | Step 3 - Query CONSUL
|
| 125 | ~~~~~~~~~~~~~~~~~~~~~
|
| 126 |
|
| 127 | Query CONSUL to get the IP/PORT of CONFIG BINDING SERVICE
|
| 128 |
|
| 129 | ::
|
| 130 |
|
| 131 | $ curl http://$CONSUL_HOST:8500/v1/catalog/service/$CONFIG_BINDING_SERVICE
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 132 | [
|
| 133 | {
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 134 | "ID": "bfbc220d-4603-7f90-ec2e-611d3c330f20",
|
| 135 | "Node":"docker00",
|
VENKATESH KUMAR | fac34a1 | 2019-01-20 20:15:08 -0500 | [diff] [blame] | 136 | "Address": "127.0.0.1",
|
| 137 | "Datacenter":"dcae-central",
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 138 | "TaggedAddresses": {
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 139 | "lan":"10.226.1.15",
|
| 140 | "wan":"10.226.1.15"
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 141 | },
|
| 142 | "NodeMeta": {},
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 143 | "ServiceID": "472b116f9035:config_binding_service:10000",
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 144 | "ServiceName": "config_binding_service",
|
| 145 | "ServiceTags": [],
|
VENKATESH KUMAR | fac34a1 | 2019-01-20 20:15:08 -0500 | [diff] [blame] | 146 | "ServiceAddress":"127.0.0.1",
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 147 | "ServicePort":10000,
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 148 | "ServiceEnableTagOverride": false,
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 149 | "CreateIndex":1078990,
|
| 150 | "ModifyIndex":1078990
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 151 | }
|
| 152 | ]
|
| 153 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 154 | Fetch the generated configuration from CONFIG BINDING SERVICE using the
|
| 155 | ‘serviceaddress’ and ‘serviceport’ from above along with $SERVICE_NAME
|
| 156 | from earlier.
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 157 |
|
| 158 | ::
|
| 159 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 160 | $ curl http://135.205.226.126:10000/service_component/user12.b599cf0e-75e8-484b-b8e2-557576d77036.0-7-0.sandbox-platform-yourapp
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 161 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 162 | {"streams_subscribes": {}, "services_calls": {}, "multiplier": 3, "streams_publishes": {}}
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 163 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 164 | --------------
|
| 165 |
|
| 166 | .. _dcae-cli-walkthrough-dmaap-testing:
|
| 167 |
|
| 168 | Create the input file for Dmaap Testing
|
| 169 | ---------------------------------------
|
| 170 |
|
| 171 | Currently, the dcae-cli tool does not have the capability to provision
|
| 172 | topics or feeds. Therefore, in order to test with ``message router`` or
|
| 173 | ``data router`` feeds, the developer must manually provision the topic
|
| 174 | or feed and then provide the connection details in the form of a DMaap
|
| 175 | JSON file for testing. This file is then passed in on the
|
| 176 | ``component run`` or ``component dev`` commands by using the argument
|
| 177 | ``--dmaap-file``.
|
| 178 |
|
| 179 | The structure of the DMaaP JSON is an object of config keys with the
|
| 180 | topic or feed connection details. The config keys are the ``config_key``
|
| 181 | values specified in the component specification streams section where
|
| 182 | the streams must be type ``message router`` or ``data router``. This
|
| 183 | file corresponds to the ``Dmaap Connection Object`` which is generated
|
| 184 | by the platform and provided to the component at runtime. The exception
|
| 185 | is that ``delivery_url`` cannot be provided in the dmaap-file because it
|
| 186 | 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.
|
| 187 |
|
| 188 | --------------
|
| 189 |
|
| 190 | Create the input file for *Sourced at Deployment* Testing
|
| 191 | ---------------------------------------------------------
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 192 |
|
| 193 | Components may have configuration parameters whose values are to be
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 194 | sourced at deployment time. This is established in the
|
| 195 | :any:`component specification <common-specification-parameters>`
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 196 | by setting the property ``sourced_at_deployment`` to ``true`` for each
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 197 | applicable parameter.
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 198 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 199 | Then, use the ``--inputs-file`` command-line argument when running the
|
| 200 | component ``dev`` or ``run`` command for your component. This is to
|
| 201 | simulate providing the dynamic, deployment time values for those
|
| 202 | parameters marked as ``sourced_at_deployment``.
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 203 |
|
| 204 | For example, if your component specification has the following
|
| 205 | configuration parameters:
|
| 206 |
|
| 207 | ::
|
| 208 |
|
| 209 | "parameters": [{
|
| 210 | "name": "vnf-ip",
|
| 211 | "value": "",
|
| 212 | "sourced_at_deployment": true
|
| 213 | },
|
| 214 | {
|
| 215 | "name": "static-param",
|
| 216 | "value": 5
|
| 217 | }]
|
| 218 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 219 | Pass in an input file that looks like:
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 220 |
|
| 221 | ::
|
| 222 |
|
| 223 | {
|
| 224 | "vnf-ip": "10.100.1.100"
|
| 225 | }
|
| 226 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 227 | The application configuration would look like:
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 228 |
|
| 229 | ::
|
| 230 |
|
| 231 | {
|
| 232 | "vnf-ip": "10.100.1.100",
|
| 233 | "static-param": 5
|
| 234 | }
|
| 235 |
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 236 | --------------
|
| 237 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 238 | Run the component
|
| 239 | -----------------
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 240 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 241 | The ``run`` operation is to be used for running your application in its
|
| 242 | container remotely on the activated environment. Docker containers have
|
| 243 | the additional option to run locally on your development machine. If the
|
| 244 | component uses Dmaap, you can specify the Dmaap Connection Object as
|
| 245 | well. Refer to :any:`Dmaap Connection Object <dmaap-connection-objects>`.
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 246 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 247 | In order to run the component, the data formats and component must have
|
| 248 | been added to the onboarding catalog.
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 249 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 250 | To verify what’s in the catalog:
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 251 |
|
| 252 | ::
|
| 253 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 254 | $ dcae_cli catalog list --expanded
|
| 255 | Active profile: solutioning
|
| 256 | +---------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+
|
| 257 | | Name | Version | Type | Description | Status | Modified | #Deployed |
|
| 258 | +---------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+
|
| 259 | | 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 |
|
| 260 | +---------------------------+---------+--------+---------------------------------------------------------------+--------+----------------------------+-----------+
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 261 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 262 | For Docker
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 263 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 264 | **NOTE** Make sure the Docker image has been uploaded to the shared
|
| 265 | registry.
|
Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame] | 266 |
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 267 | A docker component can be run in either ``attached`` or ``unattached``
|
| 268 | mode. (Default is unattached).
|
| 269 |
|
Lusheng Ji | eaac78d | 2018-06-06 00:20:03 -0400 | [diff] [blame] | 270 | +------------------+-----------------------------------------------------------+
|
| 271 | | Mode | Description |
|
| 272 | +==================+===========================================================+
|
| 273 | | attached | component is run in the foreground, container |
|
| 274 | | | logs are streamed to stdout. Ctrl-C is used to |
|
| 275 | | | terminate the dcae_cli session. |
|
| 276 | +------------------+-----------------------------------------------------------+
|
| 277 | | unattached | component is run in the background container |
|
| 278 | | | logs are viewed via ``docker logs`` command, |
|
| 279 | | | container runs until undeployed with dcae_cli |
|
| 280 | | | ``undeploy`` command. |
|
| 281 | +------------------+-----------------------------------------------------------+
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 282 |
|
| 283 | Run a component in attached mode:
|
Lusheng Ji | eaac78d | 2018-06-06 00:20:03 -0400 | [diff] [blame] | 284 | ---------------------------------
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 285 |
|
| 286 | ::
|
| 287 |
|
| 288 | $ dcae_cli -v component run --attached sandbox.platform.yourapp:0.7.0
|
| 289 | 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'
|
| 290 | DCAE.Docker.user12.dbb13a3c-d870-487e-b584-89929b856b5c.0-7-0.sandbox-platform-yourapp | INFO | Consul host: yourconsulhost.com
|
| 291 |
|
| 292 | 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
|
| 293 |
|
| 294 | 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": {}}
|
| 295 |
|
| 296 | 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)
|
| 297 |
|
VENKATESH KUMAR | fac34a1 | 2019-01-20 20:15:08 -0500 | [diff] [blame] | 298 | DCAE.Docker.user12.dbb13a3c-d870-487e-b584-89929b856b5c.0-7-0.sandbox-platform-yourapp | INFO | 127.0.0.1 - - [08/Nov/2017 23:27:30] "GET /health HTTP/1.1" 200 -
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 299 |
|
| 300 |
|
| 301 | Hit Ctrl-C to terminate session.
|
| 302 |
|
| 303 | ^C
|
| 304 | DCAE.Docker | INFO | Stopping container 'user12.dbb13a3c-d870-487e-b584-89929b856b5c.0-7-0.sandbox-platform-yourapp' and cleaning up...
|
| 305 |
|
| 306 | Run a component in unattached mode:
|
Lusheng Ji | eaac78d | 2018-06-06 00:20:03 -0400 | [diff] [blame] | 307 | -----------------------------------
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 308 |
|
| 309 | ::
|
| 310 |
|
| 311 | $ dcae_cli -v component run sandbox.platform.yourapp:0.7.0
|
| 312 | 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'
|
| 313 | DCAE.Run | INFO | Deployed user12.22629ebd-417e-4e61-a9a0-f0cb16d4cef2.0-7-0.sandbox-platform-yourapp. Verifying..
|
| 314 | DCAE.Run | INFO | Container is up and healthy
|
| 315 |
|
| 316 | **NOTE** You must undeploy this component when finished testing. This is
|
| 317 | important to conserve resources in the environment.
|
| 318 |
|
| 319 | Run a component that subscribes to Dmaap Message Router or Data Router
|
Lusheng Ji | eaac78d | 2018-06-06 00:20:03 -0400 | [diff] [blame] | 320 | ----------------------------------------------------------------------
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 321 |
|
| 322 | ::
|
| 323 |
|
| 324 | $ dcae_cli -v component run $component-that-uses-dmamp --dmaap-file $dmaap-connection-object
|
| 325 |
|
| 326 | Run a component that expects input that is ``sourced at deployment``
|
Lusheng Ji | eaac78d | 2018-06-06 00:20:03 -0400 | [diff] [blame] | 327 | --------------------------------------------------------------------
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 328 |
|
| 329 | ::
|
| 330 |
|
| 331 | $ dcae_cli -v component run $component-that-expects-dti --inputs-file $input-file-to-simulate-dti
|
| 332 |
|
| 333 | --------------
|
| 334 |
|
| 335 |
|
| 336 | .. _dcae_cli_undeploy_the_component:
|
| 337 |
|
| 338 | Undeploy the component
|
| 339 | ----------------------
|
| 340 |
|
Lusheng Ji | eaac78d | 2018-06-06 00:20:03 -0400 | [diff] [blame] | 341 | The ``undeploy`` command is used to undeploy any instance of a specified component/version that you have deployed. This includes cleaning up the configuration.
|
| 342 | Undeploy ``sandbox.platform.yourapp:0.7.0`` that was deployed above:
|
| 343 | ``$ dcae_cli -v component undeploy sandbox.platform.yourapp:0.7.0 DCAE.Undeploy | WARNING | Undeploying components: 1 DCAE.Undeploy | WARNING | Undeployed components: 1``
|
Ralph Knag | d2cd31b | 2018-04-02 16:27:46 -0400 | [diff] [blame] | 344 |
|
| 345 | .. _dcae_cli_publish_the_component_and_data_format:
|
| 346 |
|
| 347 | Publish the component and data_format
|
| 348 | -------------------------------------
|
| 349 |
|
| 350 | Once a component has been tested, it (and the data_format(s)) should be
|
| 351 | published in the onboarding catalog using the ``publish`` sub-command
|
| 352 | for both the ``data_format`` and ``component`` command.
|
| 353 |
|
| 354 | **Note** Before a component can be published, all data_formats that it
|
| 355 | references must be published.
|
| 356 |
|
| 357 | Publishing will change the status of a component or data_format,
|
| 358 | indicating that it has been tested, make accessible for other developers
|
| 359 | to use.
|
| 360 |
|
| 361 | ::
|
| 362 |
|
| 363 | $ dcae_cli data_format publish sandbox.platform.yourapp:0.7.0
|
| 364 | Data format has been published
|
| 365 |
|
| 366 | $dcae_cli component publish sandbox.platform.yourapp:0.7.0
|
| 367 | Component has been published
|
| 368 |
|
| 369 | --------------
|
| 370 |
|
| 371 | List the catalog contents
|
| 372 | -------------------------
|
| 373 |
|
| 374 | ::
|
| 375 |
|
| 376 | $dcae_cli catalog list
|
| 377 |
|
| 378 | $ dcae_cli data_format list | grep sandbox
|
| 379 | | sandbox.platform.yourapp | 0.7.0 | docker | Web service used as a stand-alone test DCAE service compone.. | user12 | published | 2017-11-13 |
|
| 380 | | sandbox.platform.yourapp.health | 0.1.0 | Data format used for the /health endpoint | published | 2017-11-13 17:48:10.121588 |
|
| 381 | | sandbox.platform.any | 0.1.0 | Data format used when no data format is required. | published | 2017-11-13 17:47:51.622607 |
|
| 382 | | 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 |
|
| 383 | | 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 |
|
| 384 | | sandbox.platform.yourapp.rollcall.response | 0.1.0 | Data format used for the /rollcall endpoint respon.. | published | 2017-11-13 17:46:30.026846 |
|
| 385 |
|