MicroStrategy ONE
Create and Edit Python Runtimes
MicroStrategy ONE (June 2024) adds support for multi-tenant Python in un-containerized MicroStrategy Cloud Environments (MCE). Contact MicroStrategy Support to enable the feature.
Python scripts normally run on a user’s computer. Newer containerized environments allow you to run scripts directly in a MicroStrategy environment without the need to leave a computer running. You can save your scripts in these environments and access them anywhere within Workstation, as well as provide access to other administrators.
You must have the Manage runtime privilege and your environment must support Python server-side script execution. Currently, the support of server-side script execution is turned on for containerized environments only.
- Open the Workstation window and connect to an environment.
-
In the Navigation pane, click Monitors.
-
In the left pane, click Runtimes.
Here you can see and manage currently existing runtimes. All environments have a default runtime with mstrio package installed. When creating a runtime you can manage its name, description, Python version, addresses it can connect to, packages installed on it, and size for script execution, script execution timeout, and the cached and maximum instance number.
-
A default runtime is available. It is named (Default) MicroStrategy:
-
The default runtime includes the latest versions of both Python and mstrio packages, as well as a default instance size and a default network access configuration. You can use mstrio package to access MicroStrategy data using the default runtime.
-
The default runtime is a simplified sample if you want a trial without updating the configuration. You can create a new dedicated runtime using the steps below to customize the configuration such as the instance size, network access, or package configuration.
-
Create a Python Runtime
-
In Runtimes, click Create a new runtime.
-
In the runtime dialog, enter values in the following fields:
-
Name
-
Description
-
Python Version
-
Runtime Instance Size
-
Network Access: The network or library URL to connect by default from the Python runtime.
MicroStrategy supports the following formats:
-
Classless Inter-Domain Routing (CIDR) format: For example, 192.0.0.0/8.
-
Fully qualified domain name (FQDN) format: For example, microstrategy.com.
-
-
Package: The Python packages to be installed in the Python runtime. The latest version will be installed if the package version is not provided.
-
-
Click OK. Wait for the runtime installation to finish.
-
Refresh the page to check the status. Normally, the runtime creation process will take several minutes, depending on Python package size to install. If no customized package is needed, it will be ready within one minute.
Edit Python Runtime Settings
-
Right-click the runtime and choose Properties.
-
Click All Settings.
-
Edit the following fields, as needed:
-
Script timeout(sec): This setting determines the timeout for executing Python scripts. The default value is 600 seconds.
-
Default Pod instance number: This setting determines the default number of cached Python execution instances. Once a pod instance is cached, it will exist long to avoid warm-up costs. Otherwise, the pod instance will be recycled after two minutes of idle time.
-
Maximum Pod instance number(total run scripts limits): This setting determines the maximum number of Python execution instances that can be created based on the runtime.
-
-
Click OK.
Multi-Tenant Python Limits
Single-tenant Python is one component of MicroStrategy Containerized Environment shipped to customer.
Starting in MicroStrategy ONE (June 2024), multi-tenant Python is available on MicroStrategy Managed Cloud Service and you can connect to this environment after on-boarding process maintained by MicroStrategy Cloud Team.
-
In a multi-tenant environment, the maximum allowed Script timeout value is set to 3600 seconds (equivalent to 1 hour). Any value that exceeds 3600 seconds will automatically adjust to the maximum value of 3600 seconds.
-
In a multi-tenant environment, the cached pod instance will remain preserved for 30 minutes while it is in an idle state. Single-tenant Python has no limit.
-
The Default Library whitelist. To allow the whitelist in multi-tenant Python, the library address should be a public IP. Otherwise, it cannot be resolved by a multi-tenant Python environment.