ViPR 2.2 - Install the ViPR CLI

Table of Contents

The ViPR CLI

The EMC® ViPR® Command Line Interface (CLI) allows data center personnel to use ViPR to manage storage resources from a command line interface environment.

Note Image
Throughout this article, Virtual Storage Pools are known as virtual pools, and Virtual Storage Arrays are known as virtual arrays.

Back to Top

Install the ViPR CLI

The ViPR CLI (viprcli) is installed, along with all the necessary support files, on each ViPR virtual machine. For best results, install the viprcli on a standalone Linux or Windows machine.

Back to Top

ViPR CLI prerequisites

The ViPR CLI can be installed on the following operating systems.

When installing the CLI, the required Python Argparse packages are downloaded and installed automatically if your installer has access to DNS server services and the internet. It is advisable to install the ViPR CLI on a physical or virtual machine outside of the ViPR cluster.

Back to Top

Install the ViPR CLI on Linux

You can install the ViPR command line interface executable directly from ViPR appliance onto a supported Linux host.

Before you begin

  • You need access to the ViPR appliance host.
  • You need root access to the Linux host.
  • The installer requires access to DNS server services and the internet. If your installer will not have access to these requirements, you must install the required Python packages manually before running the installer.

Procedure

  1. Log in to the Linux server as root.
  2. Create a temporary directory to download the CLI installer.
    mkdir cli/temp
    cd cli/temp
  3. Either point your browser to https://<FQDN>:4443/cli or run the wget command to retrieve the ViPR CLI installation bundle:
    wgethttps://<FQDN>:4443/cli
    Note Image
    For sites with self-signed certificates or where issues are detected, optionally use http://<ViPR_virtual_IP>:9998/cli only when you are inside a trusted network. <ViPR_virtual_IP> is the ViPR public virtual IP address, also known as the network vip. The CLI installation bundle is downloaded to the current directory.

  4. Use tar to extract the CLI and its support files from the installation bundle.
    tar -xvzf <cli_install_bundle>
  5. Run the CLI installation program.
    python setup.py install
  6. Change directory to /opt/storageos/cli or to the directory where the CLI is installed.
  7. Note Image
    Perform this step only when you have not provided the correct input in step 5.

    Edit the viprcli.profile file using the vi command and set the VIPR_HOSTNAME to the ViPR public virtual IP address and VIPR_PORT=4443 environment variable and save the file.
    # vi viprcli.profile
    #!/usr/bin/sh
    
    
    # Installation directory of ViPR CLI
    ViPR_CLI_INSTALL_DIR=/opt/storageos/cli
    
    # Add the ViPR install directory to the PATH and PYTHONPATH env variables
    if [ -n $ViPR_CLI_INSTALL_DIR ]
    then
            export PATH=$ViPR_CLI_INSTALL_DIR/bin:$PATH
            export PYTHONPATH=$ViPR_CLI_INSTALL_DIR/bin:$PYTHONPATH
    fi
    
    # USER CONFIGURABLE ViPR VARIABLES
    
    # ViPR Host fully qualified domain name
    ViPR_HOSTNAME=example.mydomain.com
    
    # ViPR Port Number
    ViPR_PORT=4443
    
    :wq
  8. Run the source command to set the path environment variable for the ViPR executable.
    source ./viprcli.profile
  9. From the command prompt run the viprcli -h command.
    If the help for viprcli is displayed, then the installation is successful.
Back to Top

Install the ViPR CLI on Windows

You can download and install the ViPR command line interface executable directly from the ViPR appliance onto a supported Windows host.

Before you begin

  • You need access to the ViPR appliance host.
  • You need to be logged in to the Windows host as a user with administrator privileges.
  • The installer requires access to DNS server services and the internet. If your installer will not have access to these requirements, you must install the required Python packages manually before running the installer.

Procedure

  1. Log in to the Windows server as <admin user>.
  2. Create a temporary directory to download the CLI installer.
    mkdir cli/temp
    cd cli/temp
  3. Point your browser to https://<FQDN>:4443/cli
    Note Image
    For sites with self-signed certificates or where issues are detected, optionally use http://<ViPR_virtual_IP>:9998/cli only when you are inside a trusted network. <ViPR_virtual_IP> is the ViPR public virtual IP address, also known as the network vip. The CLI installation bundle is downloaded to the current directory.

  4. Extract the ViPR-cli.tar file to a folder of your choice. For example, c:\opt\vipr\cli.
  5. Open a command prompt and navigate to the directory you extracted the files to.
  6. Run the python setup.py install command. Follow the installation instructions and provide the required information.
  7. (Optional) If incorrect information was provided in the previous step, edit the viprcli.profile.bat file and set the following variables.
    Variable Value
    SET VIPR_HOSTNAME The ViPR hostname, set to the fully qualified domain name (FQDN) of the ViPR host, or the virtual IP address of your ViPR configuration.
    SET VIPR_PORT The ViPR port. The default value is 4443.
  8. Navigate to the installation directory.
  9. Run the viprcli.profile.bat command.
Back to Top

Uninstall the ViPR CLI

You can uninstall the ViPR command line interface (CLI) executable.

Before you begin

Procedure

  1. Log in to the Linux server as root.
  2. Create a temporary directory to download the CLI uninstaller.
    mkdir cli/temp
    cd cli/temp
  3. Either point your browser to https://<FQDN>:4443/cli or run the wget command to retrieve the ViPR CLI uninstall bundle:
    wgethttps://<FQDN>:4443/cli
    Note Image
    For sites with self-signed certificates or where issues are detected, optionally use http://<ViPR_virtual_IP>:9998/cli only when you are inside a trusted network. <ViPR_virtual_IP> is the ViPR public virtual IP address, also known as the network vip. The CLI uninstall bundle is downloaded to the current directory.

  4. Use tar to extract the CLI and its support files from the uninstall bundle.
    tar -xvzf <cli_uninstall_bundle>
  5. Run the CLI uninstall program.
    python setup.py uninstall
  6. When prompted, provide the directory where the CLI is installed, for example /opt/storageos/cli.
Back to Top