ECS 2.0 – Install the ECS CLI

Table of Contents

Install the ECS CLI

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

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

Back to Top

ECS CLI prerequisites

Understand the supported operating systems and resources needed to run the ECS CLI.

When installing the CLI, the required Python packages are downloaded and installed automatically if your installer has access to DNS server services and the internet. For best results, install the ECS CLI on a machine outside of the ECS cluster.

Back to Top

Install the ECS CLI on Linux

You can install the ECS command line interface from EMC onto a supported Linux host.

Before you begin

  • You need access to the ECS appliance host.
  • You need root access to the Linux host.
  • The installer requires access to DNS services and the internet. If your installer will not have this access, 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. Download the CLI to your temporary directory from the following URL: https://community.emc.com/docs/DOC-45150.
  4. Extract the ecscli_<date>.tar.gz file using tar -xvzf to a folder of your choice. For example, /opt/storageos/cli.
  5. Change directory to /opt/storageos/cli or to the directory where the CLI is installed.
  6. Edit the ecscli.profile file using the vi command and set the ECS_HOSTNAME to the ECS public IP address and ECS_PORT=4443 environment variable and save the file.
    # vi ecscli .profile
    #!/usr/bin/sh
    
    # Installation directory of ECS CLI
    ECS_CLI_INSTALL_DIR=/opt/storageos/cli
    
    # Add the ECS install directory to the PATH and PYTHONPATH env variables
    if [ -n $ECS_CLI_INSTALL_DIR ]then	
        export PATH=$ECS_CLI_INSTALL_DIR/bin:$PATH	
        export PYTHONPATH=$ECS_CLI_INSTALL_DIR/bin:$PYTHONPATH
    fi
    
    # USER CONFIGURABLE ECS VARIABLES
    
    # ECS Host fully qualified domain name
    ECS_HOSTNAME=<FQDN or Public IP>
    
    # ECS Port Numbers
    ECS_PORT=4443
    ECS_UI_PORT=443
    
    #api version like v1,v2..etc
    ECS_CONTROL_API_VERSION=
    
    :wq
  7. Run the source command to set the path environment variable for the ECS executable.
    source ./ecscli.profile
  8. From the command prompt run the python ecscli.py -h command.
    If the help for ecscli is displayed, then the installation is successful.
Back to Top

Install the ECS CLI on Windows

You can download and install the ECS command line interface from EMC onto a supported Windows host.

Before you begin

  • You need access to the ECS appliance host.
  • You need to be logged in to the Windows host as a user with administrator privileges.
  • The installer requires access to DNS services and the internet. If your installer does not have this access, 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. Download the CLI from the following URL: https://community.emc.com/docs/DOC-45150 to your temporary directory.
  4. Extract the ecscli_<date>.tar.gz file to a folder of your choice. For example, c:\opt\storageos\cli.
  5. Open a command prompt and navigate to the directory you extracted the files to.
  6. Edit ecscli.profile.bat and change the user variables as needed:
    Variable Value
    SET ECS_CLI_INSTALL_DIR The ECS installation directory. The default value is c:\opt\storageos\cli.
    SET PYTHONHOME The Python 2.7 installation directory. For example: c:\Python27.
    SET ECS_HOSTNAME The ECS hostname, set to the fully qualified domain name (FQDN) of the ECS host, or the public IP address of the ECS host.
    SET ECS_PORT The ECS port. The default value is 4443.
    SET ECS_UI_PORT The ECS UI port. The default value is 443.
  7. Enter ecscli.profile.bat from the command line.
    The CLI is now ready to use.
  8. (Optional) If you need to change the variables in ecscli.profile.bat, enter ecscli.profile.bat from the command line to load your new values.
  9. Change to the CLI source directory: cd \src.
  10. Run the python ecscli.py - h command to verify success and see a list of CLI commands.
Back to Top