Skip to content
Boris Modylevsky edited this page Aug 18, 2016 · 3 revisions

Creating new shell

shellfoundry allows creating new shells based on templates. The below command-line creates a directory nutshell and initializes a shell skeleton based on the resource template. This template is the base shell template for inventory resources. Its structure is located at https://github.com/QualiSystems/shell-resource-standard

$ shellfoundry new nutshell

Creating new shell from custom template

shellfoundry also allows creating a new shell based on a specific template. The below command-line creates a shell that is based on a networking/router template:

$ shellfoundry new nutshell --template networking/router

After creating a shell, it's recommended to change to current directory to the new created shell's directory by running:

cd nutshell

Listing available templates

shellfoundry displays list of the available templates by executing the following command-line:

$ shellfoundry list

To add a new template or modify an existing one, please refer to Contributing

Packaging a shell

shellfoundry allows packing the shell's source code, data model and configuration into a ZIP file. Use the pack command to do this:

$ shellfoundry pack

The pack command requires the presence of shell.yml file in the following structure:

###shell.yml

 shell:
    name: nutshell

Pack should be executed from the shell root folder where the shell.yml is located. A ZIP package is created in the dist directory with the name "nutshell.zip". If your shell was created using shellfoundry, the shell.yml file should exist.

In addition, shellfoundry downloads Python driver's requirements from PyPI and stores them for offline usage under dist\offline_requirements directory.

Note:

Some users encountered issues with running pack command on outdated versions of pip. Upgrading pip to version 8.1.2 fixes the problem. Please refer to Upgrading pip for further instructions.

Installing a shell

The shell package can be installed into CloudShell using the install command. Please execute it from the shell's root folder

$ shellfoundry install

Return to Table of Contents