Link Search Menu Expand Document

Install Elastio Shell (experimental)

Table of Contents

The Elastio Shell is an alternative interface of Elastio for users who prefer to use a CLI tool that is similar to a Python shell.

Prerequisites to using the Elastio Shell

The following prerequisites must be installed before you can install the Elastio Shell:

  • AWS CLI version 2
  • Elastio CLI
  • Python3 package manager

1. AWS CLI version 2

See the AWS CLI installation docs for further install instructions.

2. The Elastio CLI

See the Elastio CLI installation docs for instructions on how to install the Elastio CLI.

3.1 Installation for Ubuntu 20.04, Debian 11

First of all, ensure fresh packages index and install the Python package manager:

sudo apt update
sudo apt -y install python3-pip

Use installed pip to install the Elastio Shell:

pip3 install \
  --extra-index-url=https://dl.cloudsmith.io/public/elastio/public/python/simple/ \
  elastio-shell

3.2 Installation for Fedora 34

Install Python package manager, along with some dependencies

sudo yum -y install python3-pip python3-devel python3-numpy python3-pandas python3-psycopg2 g++

Then, install the Elastio Shell:

pip3 install \
  --extra-index-url=https://dl.cloudsmith.io/public/elastio/public/python/simple/ \
  elastio-shell

3.3 Installation for Debian 10, 9

For Debian 10 and below, Python 3.8 needs to be built manually. First, make sure your system is up to date:

sudo apt update
sudo apt -y upgrade

Next, install some build dependencies:

sudo apt -y install curl build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev liblzma-dev

Download the latest source code from the Python website. Unpack it, run the configure script and start the build process:

curl -O https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz
tar xf Python-3.8.12.tar.xz
cd Python-3.8.12
./configure --enable-optimizations --enable-loadable-sqlite-extensions
make

This will take some time; to speed things up, add -j flag to make. Once the build is done, install the Python binaries:

sudo make altinstall

Finally, install the Elastio Shell using new Python installation:

pip3.8 install \
  --extra-index-url=https://dl.cloudsmith.io/public/elastio/public/python/simple/ \
  elastio-shell

3.4 Installation for CentOS 7

Note: At the moment, running python3.8 -m elastio-shell will not work, even though the installation is successful. We are investigating the issue and it will be fixed very soon.

Before proceeding, activate EPEL repository and ensure the system is up to date:

sudo yum -y install epel-release
sudo yum -y update

We will have to build Python 3.8 from sources. Install development packages and some dependencies:

sudo yum -y groupinstall "Development Tools"
sudo yum -y install openssl-devel bzip2-devel libffi-devel xz-devel sqlite-devel

Download the latest source code from the Python website. Unpack it, run the configure script and start the build process:

curl -O https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz
tar xf Python-3.8.12.tar.xz
cd Python-3.8.12
./configure --enable-loadable-sqlite-extensions
make

This will take some time; to speed things up, add -j flag to make. Once the build is done, install the Python binaries:

sudo make altinstall

Finally, install the Elastio Shell using new Python installation.

pip3.8 install \
  --extra-index-url=https://dl.cloudsmith.io/public/elastio/public/python/simple/ \
  elastio-shell

3.5 Installation for CentOS 8 Stream

Note: At the moment, running python3.8 -m elastio-shell will not work, even though the installation is successful. We are investigating the issue and it will be fixed very soon.

First, install Python package manager and required build dependencies:

sudo yum -y install python38-pip python38-devel python38-numpy python38-psycopg2 python38-wheel

Then, install the Elastio Shell:

pip3 install \
  --extra-index-url=https://dl.cloudsmith.io/public/elastio/public/python/simple/ \
  elastio-shell

3.6 Installation for Amazon Linux 2

Note: psycopg2 dependency may be removed soon, removing PostgreSQL dependency entirely.

First, install Python 3.8 from Amazon Linux Extras Library. This will install python3.8 and pip3.8 binaries. Then, upgrade pip. You’ll get pip3 executable installed as well.

sudo amazon-linux-extras install python3.8
sudo pip3.8 install --upgrade pip

Next, install PostgreSQL development files and NumPy, which are required build dependencies:

sudo yum -y install postgresql-devel numpy

Finally, install Elastio Shell via the following command:

pip3 install \
  --extra-index-url=https://dl.cloudsmith.io/public/elastio/public/python/simple/ \
  elastio-shell

Use the following command to run the Elastio Shell:

python3.8 -m elastio_shell

You can remove PostgreSQL dependency after installation:

sudo yum remove postgresql

Run the Elastio Shell

Use the following command to run the Elastio Shell:

python3 -m elastio_shell