CLI cook-book
To Run OCLIP on local docker machine
Login to docker repository:
docker login -u docker -p docker nexus3.onap.org:10001
Pull cli docker image and run locally:
docker run -d --name oclip -e OPEN_CLI_MODE=daemon -p 9090:8080 -p 8080:80 nexus3.onap.org:10001/onap/cli:2.0-STAGING-latest
Access the CLI console
Web command console:
http://localhost:9090
Linux console:
docker exec -it oclip oclip
How to run OCLIP on ubuntu server
Download install script:
wget -O ~/oclip-install.sh https://gerrit.onap.org/r/gitweb?p=cli.git;a=blob_plain;f=deployment/zip/installer/install-latest.sh;h=71488dae78a3ecbb27711c95475b4568883f799f;hb=refs/heads/master
Set execution mode and run installer:
cd ~ chmod +x oclip-install.sh ./oclip-install.sh
verify the installation, by running:
oclip --version NOTE: Make sure OPEN_CLI_HOME is set to /opt/oclip, type echo $OPEN_CLI_HOME
Setup profile
Run oclip console:
oclip
Create a profile:
profile <name>
Add basic parameters in to profile:
set <service-name>:<parameter-name> Example: To set the host url for service AAI in ONAP, type 'set AAI:host-url=https://192.168.17.35:30233'
For ONAP beijing version, OCLIP provides default profile named onap-beijing. To use this profile, type:
profile onap-beijing set aai:host-url=<AAI service URL> set msb:host-url=<MSB service URL> set sdc:host-url=<SDC service URL> set so:host-url=<SO service URL> NOTE: This step is not applicable for other products, so it could be skipped.
Exit console:
exit
Use the existing profile
In console mode, type:
profile <profile-name>
In scripting mode, type:
oclip -c <profile-name> <command name> Example: To list the VNF cloud registered in the ONAP, type 'oclip -c onap-beijing cloud-list'.
How to configure OCLIP to use for given product version
In console mode
Identify the available and current product version, type:
version It will report as below: CLI version : 2.0.0 [2018-03-21 11:04 UTC] Available products: [open-cli, onap-beijing, onap-amsterdam, sample-helloworld] Enabled product : open-cli
To enable a product say onap-beijing, type:
use onap-beijing
List available commands, type:
help
In scripting mode
Identify the available and current product version, type:
oclip --version It will report as below: CLI version : 2.0.0 [2018-03-21 11:04 UTC] Available products: [open-cli, onap-beijing, onap-amsterdam, sample-helloworld] Enabled product : open-cli
To enable a product say onap-beijing, set environment variable OPEN_CLI_PRODUCT_IN_USE:
export OPEN_CLI_PRODUCT_IN_USE=onap-beijing
List available commands, type:
oclip --help