blob: 60370330c0e07a9e3a08a10ef053b63cf08a8973 [file] [log] [blame]
Ralph Knag1fca6ac2017-12-05 12:05:57 -05001.. 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
6Quickstart
7==========
8
9The ``dcae-cli`` is a Python command-line tool built to aide component
10developers with the development and testing of their micro-service
11component for the DCAE platform. It will help developers do functional
12and integration testing of their components locally and on remote
13environments as simple as possible.
14
15The tool requires the component developers to create a valid component
16specification for their component which is used by the tool. This same
17component specification will be published in the :any:`onboarding catalog <glossary-onboarding-catalog>` at the end of development
18and testing.
19
20.. The git repository can be found `here <ONAP%20LINK%20TBD>`__
21
22Pre-requisite
23-------------
24
25For Docker
26~~~~~~~~~~
27
28There are two options for development with Docker: developing locally on
29your machine which requires Docker to be installed and developing
30remotely by deploying onto remote infrastructure.
31
32For 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
46For remote development
47^^^^^^^^^^^^^^^^^^^^^^
48
49You need access to a remote host with Docker engine installed with
50remote API access. You must have the associated connection information:
51domain name or IP and port (should be either 2375 or 2376). This
52information should be set in :any:`an active profile <setting-profile>`.
53
54For CDAP
55~~~~~~~~
56
57TBD
58
59Install
60-------
61
62::
63
64 pip install --extra-index-url https://YOUR_NEXUS_PYPI_SERVER/simple dcae-cli
65
66To do an upgrade, use the ``--upgrade`` flag.
67
68Configuration
69~~~~~~~~~~~~~
70
71When you run the tool for the first time, the tool will create a
72`configuration
73directory <http://click.pocoo.org/5/api/#click.get_app_dir>`__ and
74generate a configuration file.
75
76Configuration is first sourced from an remote server that the platform
77team manages. This is overlaid with configuration details that you will
78be prompted to input particularly your user id.
79
80``--reinit``
81^^^^^^^^^^^^
82
83Configuration can be re-initialized or reset. There is a ``--reinit``
84flag that is to be used to re-initialize your configuration and your
85environment profiles.
86
87To re-initialize:
88
89::
90
91 $ dcae_cli --reinit
92
93Verify
94~~~~~~
95
96Verify 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
115Version
116-------
117
118You can verify the version of the dcae-cli with the following command:
119
120::
121
122 $ dcae_cli --version