In this section we’ll discuss the procedure of packaging and readying a Shell for deployment in a production environment. This diagram, that we’ve visited before, illustrates the development flow for Shells:

Context Object

We’ll be concentrating on the last two phases in the above diagram - creating a distributable package and deploying it to the production server.

Creating a distributable package

To create a distributable package which can be imported to CloudShell, run the following from Command Line, make sure you are in the root directory of the Shell project:

shellfoundry pack

This will create two artifacts in the ‘dist’ sub-folder of the Shell project:

  1. A zip file archive called <shellname>.zip - This is the Shell distributable package
  2. A folder named offline_requirements - The Python packages required by the Shell. This folder should be used with any offline execution servers, i.e. execution servers where pip will not be able to reach the internet to download the packages specified in requirements.txt

Configuring offline Execution Servers

Before deploying to the production environment, its important to make sure that all Execution Servers will be able to execute the Shell commands, even if they’re configured to offline access and can’t retrieve the Shell dependencies.

If some of the Execution Servers in your production environment are running in offline mode, simply copy the content of the offline_requirements folder to the offline repository folder. The offline repo folder is defined in the Execution Server customer.config file under PythonOfflineRepositoryPath. For more information on how to configure the offline Execution Server, consult the relevant CloudShell Documentation article.

Deploying to the production CloudShell Server

To deploy the Shell to the production CloudShell server:

  1. Log in as an administrator.
  2. Open the Admin menu located on the top of the page, and select Import Package
  3. Select the Shell zip file created earlier and click Open to import it.

Context Object

Your Shell should now be ready for use in the production environment.