https://github.com/qualisystems/oci-shell-2g
https://github.com/qualisystems/oci-shell-2g
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/qualisystems/oci-shell-2g
- Owner: QualiSystems
- Created: 2020-05-29T13:05:02.000Z (about 6 years ago)
- Default Branch: dev
- Last Pushed: 2021-02-10T02:09:25.000Z (over 5 years ago)
- Last Synced: 2025-01-14T01:12:09.868Z (over 1 year ago)
- Language: Python
- Size: 209 KB
- Stars: 0
- Watchers: 13
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OCI Shell
Virtual Internet Routing Lab cloud provider
![Image][1]
# OCI Shell
Release date: May 2020
`Shell version: 1.1.3`
`Document version: 1.0`
# In This Guide
* [Overview](#overview)
* [Downloading the Shell](#downloading-the-shell)
* [Importing and Configuring the Shell](#importing-and-configuring-the-shell)
* [Updating Python Dependencies for Shells](#updating-python-dependencies-for-shells)
* [Typical Workflows](#typical-workflows)
* [References](#references)
* [Release Notes](#release-notes)
# Overview
A shell integrates a device model, application or other technology with CloudShell. A shell consists of a data model that defines how the device and its properties are modeled in CloudShell, along with automation that enables interaction with the device via CloudShell.
### Cloud Provider Shells
CloudShell Cloud Providers shells provide L2 or L3 connectivity between resources and/or Apps.
### OCI Shell
OCI Shell provides you with apps deployment and management capabilities.
For more information on the device, see the vendor's official product documentation.
### Standard version
OCI Shell is based on the Cloud Provider Standard version **1.0.0**.
For detailed information about the shell’s structure and attributes, see the [Cloud Provider Standard](https://github.com/QualiSystems/cloudshell-standards/blob/master/Documentation/cloud_provider_standard.md) in GitHub.
### Requirements
Release: OCI Shell
▪ CloudShell version **9.3 and above**
**Note:** If your CloudShell version does not support this shell, you should consider upgrading to a later version of CloudShell or contact customer support.
### Data Model
The shell's data model includes all shell metadata, families, and attributes.
#### **OCI Shell Attributes**
The attribute names and types are listed in the following section of the Cloud Provider Shell Standard:
[Common Cloud Provider Attributes](https://github.com/QualiSystems/cloudshell-standards/blob/master/Documentation/cloud_provider_standard.md#attributes)
The following table describes attributes that are unique to this shell and are not documented in the Shell Standard:
|Attribute Name|Data Type|Description|
|:---|:---|:---|
|API User Name|string|OCI User OCID|
|API Key File Path|string|Path to generated PEM Private Key file|
|API Key Passphrase|Password|Key passphrase, leave empty if no password created|
|API Key File Fingerprint|string|API Private Key fingerprint|
|Tenant ID|string|OCI Tenant OCID|
|Compartment OCID|string|OCI Compartment OCID|
|Availability Domain|string|Full Availability Domain name or number (1, 2, 3)|
|Region|string|Account Region|
### Automation
This section describes the automation (driver) associated with the data model. The shell’s driver is provided as part of the shell package. There are two types of automation processes, Autoload and Resource. Autoload is executed when creating the resource in the **Inventory** dashboard.
For detailed information on each available commands, see the following section of the Cloud Provider Standard:
[Common Cloud Provider Commands](https://github.com/QualiSystems/cloudshell-standards/blob/master/Documentation/cloud_provider_standard.md#commands)
# Downloading the Shell
The OCI Shell shell is available from the [Quali Community Integrations](https://community.quali.com/integrations) page.
Download the files into a temporary location on your local machine.
The shell comprises:
|File name|Description|
|:---|:---|
|OCI Shell.zip|Device shell package|
|cloudshell-CP-OCI-dependencies-package-1.0.x.zip|Shell Python dependencies (for offline deployments only)|
# Importing and Configuring the Shell
This section describes how to import the OCI Shell shell and configure and modify the shell’s devices.
### Importing the shell into CloudShell
**To import the shell into CloudShell:**
1. Make sure you have the shell’s zip package. If not, download the shell from the [Quali Community's Integrations](https://community.quali.com/integrations) page.
2. In CloudShell Portal, as Global administrator, open the **Manage – Shells** page.
3. Click **Import**.
4. In the dialog box, navigate to the shell's zip package, select it and click **Open**.
The shell is displayed in the **Shells** page and can be used by domain administrators in all CloudShell domains to create new inventory resources, as explained in [Adding Inventory Resources](http://help.quali.com/Online%20Help/9.0/Portal/Content/CSP/INVN/Add-Rsrc-Tmplt.htm?Highlight=adding%20inventory%20resources).
### Offline installation of a shell
**Note:** Offline installation instructions are relevant only if CloudShell Execution Server has no access to PyPi. You can skip this section if your execution server has access to PyPi. For additional information, see the online help topic on offline dependencies.
In offline mode, import the shell into CloudShell and place any dependencies in the appropriate dependencies folder. The dependencies folder may differ, depending on the CloudShell version you are using:
* For CloudShell version 8.3 and above, see [Adding Shell and script packages to the local PyPi Server repository](#adding-shell-and-script-packages-to-the-local-pypi-server-repository).
* For CloudShell version 8.2, perform the appropriate procedure: [Adding Shell and script packages to the local PyPi Server repository](#adding-shell-and-script-packages-to-the-local-pypi-server-repository) or [Setting the Python pythonOfflineRepositoryPath configuration key](#setting-the-python-pythonofflinerepositorypath-configuration-key).
* For CloudShell versions prior to 8.2, see [Setting the Python pythonOfflineRepositoryPath configuration key](#setting-the-python-pythonofflinerepositorypath-configuration-key).
### Adding shell and script packages to the local PyPi Server repository
If your Quali Server and/or execution servers work offline, you will need to copy all required Python packages, including the out-of-the-box ones, to the PyPi Server's repository on the Quali Server computer (by default *C:\Program Files (x86)\QualiSystems\CloudShell\Server\Config\Pypi Server Repository*).
For more information, see [Configuring CloudShell to Execute Python Commands in Offline Mode](http://help.quali.com/Online%20Help/9.0/Portal/Content/Admn/Cnfgr-Pyth-Env-Wrk-Offln.htm?Highlight=Configuring%20CloudShell%20to%20Execute%20Python%20Commands%20in%20Offline%20Mode).
**To add Python packages to the local PyPi Server repository:**
1. If you haven't created and configured the local PyPi Server repository to work with the execution server, perform the steps in [Add Python packages to the local PyPi Server repository (offline mode)](http://help.quali.com/Online%20Help/9.0/Portal/Content/Admn/Cnfgr-Pyth-Env-Wrk-Offln.htm?Highlight=offline%20dependencies#Add).
2. For each shell or script you add into CloudShell, do one of the following (from an online computer):
* Connect to the Internet and download each dependency specified in the *requirements.txt* file with the following command:
`pip download -r requirements.txt`.
The shell or script's requirements are downloaded as zip files.
* In the [Quali Community's Integrations](https://community.quali.com/integrations) page, locate the shell and click the shell's **Download** link. In the page that is displayed, from the Downloads area, extract the dependencies package zip file.
3. Place these zip files in the local PyPi Server repository.
### Configuring a new resource
This section explains how to create a new resource from the shell.
In CloudShell, the component that models the device is called a resource. It is based on the shell that models the device and allows the CloudShell user and API to remotely control the device from CloudShell.
You can also modify existing resources, see [Managing Resources in the Inventory](http://help.quali.com/Online%20Help/9.0/Portal/Content/CSP/INVN/Mng-Rsrc-in-Invnt.htm?Highlight=managing%20resources).
**To create a resource for the device:**
1. Create User API Key for your OCI User following this [instructions](https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm)
2. In the CloudShell Portal, in the **Inventory** dashboard, click **Add New**.
![Image][2]
3. From the list, select **OCI Shell 2G**.
4. Click **Create**.
5. In the **Resource** dialog box, enter the following attributes with data from step 1:
- **API User Name** - Paste here your User OCID
- **API Key File Path** Path to generated pem private key file
- **API Key Passphrase** Key passphrase, leave empty if no password created
- **API Key File Fingerprint** key file fingerprint, see step 1 for reference
- **Tenant ID** Tenant OCID, see step 1 for reference
- **Compartment OCID** Compartment OCID, see step 1 for reference
- **Availability Domain** Availability Domain full name or number (1, 2, 3)
- **Region** Account Region
6. Click **Continue**.
CloudShell validates the device’s settings and updates the new resource with the device’s structure.
_**OCI Shell requires you to create an appropriate App template, which would be deployed as part of the sandbox reservation. For details, see the following CloudShell Help article: [Applications' Typical Workflow](https://help.quali.com/Online%20Help/0.0/Portal/Content/CSP/MNG/Mng-Apps.htm?Highlight=App#Adding)**_
# Updating Python Dependencies for Shells
This section explains how to update your Python dependencies folder. This is required when you upgrade a shell that uses new/updated dependencies. It applies to both online and offline dependencies.
### Updating offline Python dependencies
**To update offline Python dependencies:**
1. Download the latest Python dependencies package zip file locally.
2. Extract the zip file to the suitable offline package folder(s).
3. Terminate the shell’s instance, as explained [here](http://help.quali.com/Online%20Help/9.0/Portal/Content/CSP/MNG/Mng-Exctn-Srv-Exct.htm#Terminat).
### Updating online Python dependencies
In online mode, the execution server automatically downloads and extracts the appropriate dependencies file to the online Python dependencies repository every time a new instance of the driver or script is created.
**To update online Python dependencies:**
* If there is a live instance of the shell's driver or script, terminate the shell’s instance, as explained [here](http://help.quali.com/Online%20Help/9.0/Portal/Content/CSP/MNG/Mng-Exctn-Srv-Exct.htm#Terminat). If an instance does not exist, the execution server will download the Python dependencies the next time a command of the driver or script runs.
# References
To download and share integrations, see [Quali Community's Integrations](https://community.quali.com/integrations).
For instructional training and documentation, see [Quali University](https://www.quali.com/university/).
To suggest an idea for the product, see [Quali's Idea box](https://community.quali.com/ideabox).
To connect with Quali users and experts from around the world, ask questions and discuss issues, see [Quali's Community forums](https://community.quali.com/forums).
# Specific Workflow
Additionally to a commonly used approach, OCI Shell allows to create completely subnet isolated
environment, by creating each subnet in a separate VCN. To use this approach please import `VCN Service.zip`
file and use VCN Service instead of Subnet Service.
# Release Notes
### What's New
For release updates, see the shell's [GitHub releases page](https://github.com/QualiSystems/OCI-Shell-2G/releases).
[1]: https://github.com/QualiSystems/cloudshell-shells-documentaion-templates/blob/master/cloudshell_logo.png
[2]: https://github.com/QualiSystems/cloudshell-shells-documentaion-templates/blob/master/create_a_resource_device.png