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 | .. _quickstart:
|
| 5 |
|
| 6 | Quickstart
|
| 7 | ==========
|
| 8 |
|
| 9 | The ``dcae-cli`` is a Python command-line tool built to aide component
|
| 10 | developers with the development and testing of their micro-service
|
| 11 | component for the DCAE platform. It will help developers do functional
|
| 12 | and integration testing of their components locally and on remote
|
| 13 | environments as simple as possible.
|
| 14 |
|
| 15 | The tool requires the component developers to create a valid component
|
| 16 | specification for their component which is used by the tool. This same
|
| 17 | component specification will be published in the :any:`onboarding catalog <glossary-onboarding-catalog>` at the end of development
|
| 18 | and testing.
|
| 19 |
|
| 20 | .. The git repository can be found `here <ONAP%20LINK%20TBD>`__
|
| 21 |
|
| 22 | Pre-requisite
|
| 23 | -------------
|
| 24 |
|
| 25 | For Docker
|
| 26 | ~~~~~~~~~~
|
| 27 |
|
| 28 | There are two options for development with Docker: developing locally on
|
| 29 | your machine which requires Docker to be installed and developing
|
| 30 | remotely by deploying onto remote infrastructure.
|
| 31 |
|
| 32 | For local development
|
| 33 | ^^^^^^^^^^^^^^^^^^^^^
|
| 34 |
|
| 35 | - You must install `Docker
|
| 36 | engine <https://docs.docker.com/engine/installation/>`__ locally on
|
| 37 | your machine.
|
| 38 | - You must know the *external ip* of where the Docker engine is
|
| 39 | running. The external ip is needed so that service discovery will
|
| 40 | wire up correctly.
|
| 41 |
|
| 42 | - For OSX users, this means making sure the VirtualBox VM that is
|
| 43 | running your Docker engine has a bridged adapter and getting the
|
| 44 | ip of that adapter.
|
| 45 |
|
| 46 | For remote development
|
| 47 | ^^^^^^^^^^^^^^^^^^^^^^
|
| 48 |
|
| 49 | You need access to a remote host with Docker engine installed with
|
| 50 | remote API access. You must have the associated connection information:
|
| 51 | domain name or IP and port (should be either 2375 or 2376). This
|
| 52 | information should be set in :any:`an active profile <setting-profile>`.
|
| 53 |
|
| 54 | For CDAP
|
| 55 | ~~~~~~~~
|
| 56 |
|
| 57 | TBD
|
| 58 |
|
| 59 | Install
|
| 60 | -------
|
| 61 |
|
| 62 | ::
|
| 63 |
|
| 64 | pip install --extra-index-url https://YOUR_NEXUS_PYPI_SERVER/simple dcae-cli
|
| 65 |
|
| 66 | To do an upgrade, use the ``--upgrade`` flag.
|
| 67 |
|
| 68 | Configuration
|
| 69 | ~~~~~~~~~~~~~
|
| 70 |
|
| 71 | When you run the tool for the first time, the tool will create a
|
| 72 | `configuration
|
| 73 | directory <http://click.pocoo.org/5/api/#click.get_app_dir>`__ and
|
| 74 | generate a configuration file.
|
| 75 |
|
| 76 | Configuration is first sourced from an remote server that the platform
|
| 77 | team manages. This is overlaid with configuration details that you will
|
| 78 | be prompted to input particularly your user id.
|
| 79 |
|
| 80 | ``--reinit``
|
| 81 | ^^^^^^^^^^^^
|
| 82 |
|
| 83 | Configuration can be re-initialized or reset. There is a ``--reinit``
|
| 84 | flag that is to be used to re-initialize your configuration and your
|
| 85 | environment profiles.
|
| 86 |
|
| 87 | To re-initialize:
|
| 88 |
|
| 89 | ::
|
| 90 |
|
| 91 | $ dcae_cli --reinit
|
| 92 |
|
| 93 | Verify
|
| 94 | ~~~~~~
|
| 95 |
|
| 96 | Verify that its installed:
|
| 97 |
|
| 98 | ::
|
| 99 |
|
| 100 | $ dcae_cli --help
|
| 101 | Usage: dcae_cli [OPTIONS] COMMAND [ARGS]...
|
| 102 |
|
| 103 | Options:
|
| 104 | -v, --verbose Prints INFO-level logs to screen.
|
| 105 | --reinit Re-initialize dcae-cli configuration
|
| 106 | --version Show the version and exit.
|
| 107 | --help Show this message and exit.
|
| 108 |
|
| 109 | Commands:
|
| 110 | catalog
|
| 111 | component
|
| 112 | data_format
|
| 113 | profiles
|
| 114 |
|
| 115 | Version
|
| 116 | -------
|
| 117 |
|
| 118 | You can verify the version of the dcae-cli with the following command:
|
| 119 |
|
| 120 | ::
|
| 121 |
|
| 122 | $ dcae_cli --version
|