No project description provided
Project description
Introduction
Orkestr is a framework for orchestrating infrastructure and services in a multi-cloud environment. It is designed to be a lightweight, flexible, and extensible framework that can be used to manage infrastructure and services.
Note: Orkestr is currently in the early stages of development. The API and functionality may change as we continue to develop the framework.
Installation
To install Orkestr, you can use pip:
pip install orkestr-core
Usage
Here is an example of how to initialize an Orkestr instance, create a cluster, and scale it:
import asyncio
from orkestr_core import Orkestr, Cluster, Service
from orkestr_core.constants.providers import ProviderName, OrkestrRegion
from orkestr_core.base.node_spec import NodeSpec, NodeSpecConfiguration
from orkestr_core.base.service import ClusterConfiguration
from orkestr_core.datastores.global_datastore import set_global_datastore
from orkestr_core.datastores.sqlite.sqlite_datastore import SQLiteDatastore
async def main():
# Set up the datastore
datastore = SQLiteDatastore(db_path='orkestr.db')
set_global_datastore(datastore)
# Initialize Orkestr
orkestr = Orkestr(
providers=[ProviderName.TEST_PROVIDER],
regions=[OrkestrRegion.US_EAST_1]
)
await orkestr.start_scheduler()
# Define a NodeSpec
node_spec_config = NodeSpecConfiguration(
machine_type="t2.micro",
user_data_script="echo 'Hello World'",
environment_variables={}
)
node_spec = NodeSpec(
name="ExampleNodeSpec",
region=OrkestrRegion.US_EAST_1,
versions=[node_spec_config]
)
# Define a Cluster
cluster = Cluster(
name="ExampleCluster",
cluster_id="example_cluster",
region=OrkestrRegion.US_EAST_1,
provider=ProviderName.TEST_PROVIDER,
node_spec_id=node_spec.id,
node_spec_version=0,
max_nodes=3
)
# Save configurations to the datastore
datastore.save_node_spec(node_spec)
datastore.save_cluster(cluster)
# Scale the cluster
orkestr.cluster_orchestrator.scale(
cluster_id=cluster.cluster_id,
region=OrkestrRegion.US_EAST_1,
desired_nodes=2
)
print("Cluster scaled successfully!")
# Run the example
asyncio.run(main())
Docs
To know more about Orkestr, see the Docs.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orkestr_core-0.1.5.tar.gz.
File metadata
- Download URL: orkestr_core-0.1.5.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.12 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bba5937f9d863a1da5d38b86d1acafbe93a3f7c26d40bccbd6abcdbc1c4798e
|
|
| MD5 |
5d9f2dc471fda8f5f985dd5eed7ac109
|
|
| BLAKE2b-256 |
41821273a62e99d28122af7707fd8a5d75cb9031b2710ddedf1738eca9388394
|
File details
Details for the file orkestr_core-0.1.5-py3-none-any.whl.
File metadata
- Download URL: orkestr_core-0.1.5-py3-none-any.whl
- Upload date:
- Size: 41.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.12 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e16c538b8c3adae733459ddfdbd380509cd1f7bdd9cb5bdd5ecb29f903ad33a8
|
|
| MD5 |
198fc40b36840e72cceb57fb087494ce
|
|
| BLAKE2b-256 |
24a18bd16d3b3527e28ed560bdff7786abb297ccd30789d034e6472dc77aec59
|