CloudShell Version: 8.1 GA

Help Version: 2.0

View / Download All Help Versions

Configuring Execution Servers to Work Offline

Python drivers and scripts in CloudShell may have dependencies or packages stored in PyPi, which is an online repository of Python packages. By default, CloudShell automatically downloads the driver or script's dependencies from PyPi and installs them in a dedicated virtual environment from which the execution server accesses the dependencies. However, in some situations, the execution server does not have internet access and so the required packages need to be prepared in an offline location that is accessible to the execution server.

Note: If you are using a shared folder to store the dependencies offline, make sure your execution server services have permissions to access this folder.

In this article (perform the procedures that are relevant for you):

Create an offline package folder for Python packages and configure the offline execution server to use it

To create the folder and associate the offline execution servers to it:

  1. Create the offline package folder that will contain all driver and script dependencies for CloudShell and the execution servers.

    This can be a location on the execution server's computer or a shared network drive for all the site's execution servers (recommended).

  2. Use the configuration key <PythonOfflineRepositoryPath> to specify the path to the required offline package folder in the CloudShell\Server\customer.config file. To specify a different path for a specific execution server, add the key with the new path to the customer.config file of the required execution server's TestShell\Execution Server\customer.config file. See Setting the Python offline dependencies repository.

  3. Save the file.
  4. Next, add the required Python packages to the offline package folder(s), as explained in the following sections.

Add out-of-the-box packages to the offline package folder

Some native CloudShell operations, such as App deployments on private cloud providers and configuration management operations, require running Python code that uses certain Python packages.

To add out-of-the-box packages to the offline package folder:

  1. If you haven't created and configured the offline package folder to work with the execution server, perform the steps in Create an offline package folder for Python packages and configure the offline execution server to use it.
  2. To enable the installation of applications on App-deployed VMs using a configuration management tool or script, do the following:

    1. Download the suitable offline Python package(s) according to your CloudShell version:

      Configuration management tool CloudShell version Package version Download from:
      Ansible 8.1 GA 1.2.0 8.1_GA_Ansible_Offlinepack.zip
      8.0 GA 1.1.0 8.0_GA_Ansible_Offlinepack.zip
      Custom script 8.1 GA 1.1.0 8.1_GA_Custom_Script_Offlinepack.zip
      8.0 GA 1.0.0 8.0_GA_Custom_Script_Offlinepack.zip
    2. Extract the zip file(s) to the suitable offline package folder(s).
  3. To enable the deployment of Apps using a private cloud provider, such as vCenter or OpenStack, do the following:
    1. From Quali's Download Center, download the suitable offline Python package(s) according to your CloudShell version.

    2. Extract the zip file(s) to the suitable offline package folders.

Add Python driver and script packages to the offline package folder

Drivers and scripts developed and added to CloudShell Portal's Drivers and Scripts management pages, respectively, may also rely on packages in PyPi. Therefore, each time you add a driver or script to CloudShell, to enable your offline execution servers to run this driver or script, make sure to download its dependent packages and place them in the offline package folder as well.

To add Python packages to the offline package folder:

  1. If you haven't created and configured the offline package folder to work with the execution server, perform the steps in Create an offline package folder for Python packages and configure the offline execution server to use it.
  2. For each Python driver or script you add into CloudShell:

    1. Connect to the Internet and download each dependency specified in the requirements.txt file with the following command: 

      pip download -r requirements.txt

      The driver or script's requirements are downloaded as zip files.

    2. Place these zip files in the suitable offline package folder(s).

Add Shell Python packages to the offline package folder

Shells developed by Quali may also have Python package dependencies. Each Shell's dependencies package is provided in a zip file on the Shell's download page in Quali's Developer Center.

To add a Shell's Python packages to the offline package folder

  1. If you haven't created and configured the offline package folder to work with the execution server, perform the steps in Create an offline package folder for Python packages and configure the offline execution server to use it.

  2. In Quali's Developer Center, locate the Shell and click the Shell's Download link.

    The Shell's repository page is displayed.

  3. From the Downloads area, extract the dependencies package zip file to the suitable offline package folder(s).