Cloudshell Scriptfoundry
A CLI tool to generate, package and upload cloudshell orchestration scripts. This tool is an optional add-on to the shellfoundry shell development cli tool. "Scriptfoundry" has shellfoundry as a dependency, and re-uses the same cli configuration.
Installation
pip install cloudshell-scriptfoundry
Basic Usage
Configure "Shellfoundry" Credentials (shared by "Scriptfoundry")
shellfoundry config host localhost
shellfoundry config username admin
shellfoundry config password admin
To check configured values:
shellfoundry config
See Shellfoundry Reference for more info.
Generate new project:
scriptfoundry new setup_config_firewall --template setup
Zip and upload to cloudshell:
cd setup_config_firewall
scriptfoundry update setup_config_firewall
Commands Overview
Usage: scriptfoundry [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
new Create new script from template
pack Create script zip archive
update Create zip archive and update on CloudShell
version Display scriptfoundry version
Template Generation
"New" command generates script template. The templates map to the orchestration script "types" in cloudshell (setup, teardown, default, save, restore, resource).
Usage: scriptfoundry new [OPTIONS] NAME
Create new script from template
Options:
--template [setup|teardown|save|restore|blueprint|resource]
Specify script template 'type'. Defaults to
'blueprint'. [required]
--output TEXT (Optional) - Specify path to output
directory. Defaults to current directory.
--help Show this message and exit.
Offline Mode
Online mode will pull cookiecutter templates from github repo
To Setup up Offline mode:
- download templates from github release page
- Unzip templates and copy to designated location on client dev machine
- Set Shellfoundry config "online_mode" to False
- Add custom config key to shellfoundry config, with the templates path as value
Sample Configuration:
shellfoundry config online_mode False
shellfoundry config script_template_location "C:\cloudshell_dev_files\cloudshell-script-templates-0.1.0"
Dev Helper
It can be useful to use the api generator helper to get api session without having to add credentials to debug file. With this helper, no need to erase credentials and no accidentally commiting secrets to source control.
from scriptfoundry.utilities.api_generator import AutomationApiGenerator
SANDBOX_ID = "<DEBUG_SANDBOX_ID>"
api = AutomationApiGenerator().create_client()
sb_details = api.GetReservationDetails(SANDBOX_ID, disableCache=True).ReservationDescription
Dependencies
Scriptfoundry is built on top of shellfoundry, and its underlying open-source dependencies
- shellfoundry - cloudshell config management
- Cookiecutter - script template generation
- Click - CLI interface
License
Free Software: MIT License
Metadata
Release files for cloudshell-scriptfoundry 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cloudshell-scriptfoundry-0.1.2.tar.gz | 8.0 kB | Without provenance | Details for cloudshell-scriptfoundry-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cloudshell_scriptfoundry-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for cloudshell_scriptfoundry-0.1.2-py3-none-any.whl |
Total release size: 19.8 kB
Release files / cloudshell-scriptfoundry-0.1.2.tar.gz
| Download URL | cloudshell-scriptfoundry-0.1.2.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30ca83fe81fa3c11ed1d4c80f21308588324a04e57fdbb28aa9ebcd354fc17fc
|
|
BLAKE2b-256 checksum How to use checksums |
b1f04271986b79a28fe71b2132d873ce8ff6eace32401478737c07021e1e3d1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / cloudshell_scriptfoundry-0.1.2-py3-none-any.whl
| Download URL | cloudshell_scriptfoundry-0.1.2-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1eebc6655dd4369adb2e24c5465c556e92adeb59c8cacd26a54bbcc9766ff9eb
|
|
BLAKE2b-256 checksum How to use checksums |
7fc8d5de02a5c6f4c4f2aea94af32faa5f6b947a43f795fbdf3b3a857bfba38d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for cloudshell-scriptfoundry 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.