From d2cd31b73c0282f7aafd5b4adada00c0f4533d61 Mon Sep 17 00:00:00 2001 From: Ralph Knag Date: Mon, 2 Apr 2018 16:27:46 -0400 Subject: Onboarding documentation update for CLI Change-Id: I1d4d0111063ea62c3759aa9b7232998b70229644 Issue-ID: DCAEGEN2-350 Signed-off-by: Ralph Knag --- platformdoc/docs/components/dcae-cli/quickstart.md | 85 +++++++++++++++------- 1 file changed, 58 insertions(+), 27 deletions(-) (limited to 'platformdoc/docs/components/dcae-cli/quickstart.md') diff --git a/platformdoc/docs/components/dcae-cli/quickstart.md b/platformdoc/docs/components/dcae-cli/quickstart.md index 905b1372..a70cd037 100644 --- a/platformdoc/docs/components/dcae-cli/quickstart.md +++ b/platformdoc/docs/components/dcae-cli/quickstart.md @@ -1,48 +1,84 @@ -# Quickstart +# Overview -The `dcae-cli` is a Python command-line tool built to aide component developers with the development and testing of their micro-service component for the DCAE platform. It will help developers do functional and integration testing of their components locally and on remote environments as simple as possible. +The `dcae-cli` is a Python command-line tool for component developers. With it, the developer can : -The tool requires the component developers to create a valid component specification for their component which is used by the tool. This same component specification will be published in the [onboarding catalog](../../glossary#onboarding-catalog) at the end of development and testing. +* validate the data formats and component specifications +* publish the validated data formats and component specifications into the `onboarding catalog` +* access the `onboarding catalog` to search for existing data formats (for possible reuse) and component specs +* deploy a component onto a local or remote DCAE platform for functional and pair-wise testing (This is done without Cloudify) -The git repository can be found [here](ONAP LINK TBD) +The git repository for the dcae_cli tool can be found [here](https://codecloud.web.att.com/projects/ST_DCAECNTR/repos/dcae-cli/browse) -## Pre-requisite +## Pre-requisites ### For Docker -There are two options for development with Docker: developing locally on your machine which requires Docker to be installed and developing remotely by deploying onto remote infrastructure. +There are two options for development with Docker: #### For local development -* You must install [Docker engine](https://docs.docker.com/engine/installation/) locally on your machine. -* You must know the *external ip* of where the Docker engine is running. The external ip is needed so that service discovery will wire up correctly. - - For OSX users, this means making sure the VirtualBox VM that is running your Docker engine has a bridged adapter and getting the ip of that adapter. +* Install [Docker engine](https://docs.docker.com/engine/installation/) locally on your machine. +* Know the *external ip* of where the Docker engine is running. The external ip is needed so that service discovery will connect to it. + - *(For OSX users, this means making sure the VirtualBox VM that is running your Docker engine has a bridged adapter and getting the ip of that adapter).* #### For remote development -You need access to a remote host with Docker engine installed with remote API access. You must have the associated connection information: domain name or IP and port (should be either 2375 or 2376). This information should be set in [an active profile](walkthrough.md#setting-profile). +* Have access to a remote host with Docker engine installed and with remote API access. +* Have the associated connection information: + - domain name or IP and port (port should be either 2375 or 2376). Use this information to establish an active [profile](/components/dcae-cli/commands#activate-a-profile). ### For CDAP -TBD +None at this time. -## Install +### Python, Pip, Virtualenv + +Install python, pip (9.0.1 or higher), and virtualenv if they are not installed. Do these when not in a VPN to avoid possible network issues. + +``` + sudo apt-get -f install python + sudo apt-get -f install python-pip + sudo pip install virtualenv +``` + +Set up a virtual environment and activate ``` -pip install --extra-index-url https://YOUR_NEXUS_PYPI_SERVER/simple dcae-cli + virtualenv cli_tool + source cli_tool/biin/activate ``` -To do an upgrade, use the `--upgrade` flag. +## Install dcae_cli + +``` +pip install --extra-index-url https://nexus01.research.att.com:8443/repository/solutioning01-mte2-pypi/simple dcae-cli +``` -### Configuration +## Check dcae_cli version -When you run the tool for the first time, the tool will create a [configuration directory](http://click.pocoo.org/5/api/#click.get_app_dir) and generate a configuration file. +You can verify the version of the dcae-cli with the following command. To get the latest version of the dcae_cli tool, -Configuration is first sourced from an remote server that the platform team manages. This is overlaid with configuration details that you will be prompted to input particularly your user id. +``` +$ dcae_cli --version +``` -#### `--reinit` +## Upgrade dcae_cli -Configuration can be re-initialized or reset. There is a `--reinit` flag that is to be used to re-initialize your configuration and your environment profiles. +Periodically, upgrade the dcae_cli to get the latest version + +``` +pip install --upgrade --extra-index-url https://nexus01.research.att.com:8443/repository/solutioning01-mte2-pypi/simple dcae-cli +``` + +## Configuration + +When running the tool for the first time, a [configuration directory](http://click.pocoo.org/5/api/#click.get_app_dir) and configuration file will be created. + +The configuration is first sourced from a remote server that is managed by the platform team. You will be prompted to enter your ATTUID to complete this process. + +### Re-initializing Configuration + +Configuration can be re-initialized or reset. There is a `--reinit` flag that is to be used to re-initialize your configuration and your environment profiles. You may be instructed to re-initialize after certain updates are made to the dcae_cli tool. When you re-initialize the configuration, your configuration will be added to or updated from the platform configuration and profiles. No profiles will be deleted via the reinit process. To re-initialize: @@ -50,9 +86,9 @@ To re-initialize: $ dcae_cli --reinit ``` -### Verify +## Verify Installation -Verify that its installed: +To Verify that the dcae_cli tool is installed, run the following command and look for the output below. ``` $ dcae_cli --help @@ -70,10 +106,5 @@ Commands: data_format profiles ``` -## Version - -You can verify the version of the dcae-cli with the following command: -``` -$ dcae_cli --version -``` +Refer to [dcae_cli Commands](/components/dcae-cli/commands). -- cgit 1.2.3-korg