ViPR CLI – install on Linux

ViPR CLIIn the short post I documented how to install ViPR Controller CLI if your Linux server doesn’t have direct access to Internet.

  • Check the python version
[root@linuxhost cli]# python --version
Python 2.6.6
  • Install setuptools
[root@linuxhost ViPRcli]# unzip setuptools-5.7.zip 
Archive: setuptools-5.7.zip
inflating: setuptools-5.7/CHANGES (links).txt 
…
inflating: setuptools-5.7/_markerlib/__init__.py 

[root@linuxhost ViPRcli]# cd /tmp/ViPRcli/setuptools-5.7
[root@linuxhost setuptools-5.7]# python setup.py install
running install
…
Installed /usr/lib/python2.6/site-packages/setuptools-5.7-py2.6.egg
Processing dependencies for setuptools==5.7
Finished processing dependencies for setuptools==5.7
  • Install argparse
[root@linuxhost ViPRcli]# tar zxvf argparse-1.2.1.tar.gz 
argparse-1.2.1/
argparse-1.2.1/LICENSE.txt
…
argparse-1.2.1/setup.py

[root@linuxhost setuptools-5.7]# cd ../argparse-1.2.1
[root@linuxhost argparse-1.2.1]# python setup.py install
running install
…
Installed /usr/lib/python2.6/site-packages/argparse-1.2.1-py2.6.egg
Processing dependencies for argparse==1.2.1
Finished processing dependencies for argparse==1.2.1
  • Install requests
[root@linuxhost ViPRcli]# tar zxvf requests-0.13.5.tar.gz 
requests-0.13.5/
requests-0.13.5/HISTORY.rst
…
requests-0.13.5/tests/test_requests_https.py

[root@linuxhost argparse-1.2.1]# cd ../requests-0.13.5
[root@linuxhost requests-0.13.5]# python setup.py install
running install
…
Installed /usr/lib/python2.6/site-packages/requests-0.13.5-py2.6.egg
Processing dependencies for requests==0.13.5
Finished processing dependencies for requests==0.13.5
  • Install ViPR CLI
[root@linuxhost ViPRcli]# wget http:// <ViPR_Controller_VIP>:9998/cli
--2016-03-25 11:39:36--  http://<ViPR_Controller_VIP>:9998/cli
Connecting to <ViPR_Controller_VIP>:9998... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/octet-stream]
Saving to: “cli”
    [ <=> ] 257,125     --.-K/s   in 0.04s
2016-03-25 11:39:36 (6.79 MB/s) - “cli” saved [257125]

[root@linuxhost ViPRcli]# tar zxvf cli 
viprcli/
viprcli/setup.py
…
docs/isilon_setup_cmd_helps

[root@linuxhost ViPRcli]# cd ../viprcli
[root@linuxhost ViPRcli]# python setup.py install
Please specify the directory where ViPR Commands will be installed.
Installation Directory [/opt/storageos/cli] : <ENTER>
Please specify the ViPR HOSTNAME (Fully Qualified Domain name).
ViPR host FQDN/IP [localhost] : <vipr node1>
Please specify the ViPR PORT.
ViPR port [4443] : <ENTER>
running install
…
Using /usr/lib/python2.6/site-packages/setuptools-5.7-py2.6.egg
Finished processing dependencies for viprcli==2.4
  • Test ViPR CLI
[root@linuxhost ViPRcli]# cd /opt/storageos/cli/
[root@linuxhost cli]# source viprcli.profile
[root@linuxhost cli]# viprcli authenticate -u root -d /tmp
Password : <ViPR password>
root : Authenticated Successfully
/tmp/rootcookie16734: Cookie saved successfully

[root@linuxhost cli]# viprcli -cf /tmp/rootcookie16734 varray list
  NAME             
  VA_Site1
  VA_Site2

[root@linuxhost cli]# viprcli -cf /tmp/rootcookie16734 vpool list
NAME TYPE        PROTOCOLS
  VP_AIX_Site1_D        block       FC
  VP_ AIX_Site1_D        block       FC

[root@linuxhost cli]# viprcli -cf /tmp/rootcookie16734 tenant list
NAME           
  Provider Tenant
  ESX Tenant     
  AIX Tenant

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s