Skip to main content

Framework for orchestrating infrastructure and services in a multi-cloud environment

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

orkestr_core-0.1.8.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orkestr_core-0.1.8-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

File details

Details for the file orkestr_core-0.1.8.tar.gz.

File metadata

  • Download URL: orkestr_core-0.1.8.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.12 Linux/6.11.0-1012-azure

File hashes

Hashes for orkestr_core-0.1.8.tar.gz
Algorithm Hash digest
SHA256 5d88ac4478df30678dc30915aed6045fb7349657e4361688271d4d210126c1e6
MD5 4333a1d8909d05801bf262df571a43c6
BLAKE2b-256 0cc0159b90e7b4ecc30785d0fe593577c8009ab65d087b056d4334a7f3ccf288

See more details on using hashes here.

File details

Details for the file orkestr_core-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: orkestr_core-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 41.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.12 Linux/6.11.0-1012-azure

File hashes

Hashes for orkestr_core-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a7ad6c078fd95f6afc0434a50a90ad2d18eccd27765649924281208da56387e9
MD5 ceed56af4aceb9c65545a79e91ce6f9d
BLAKE2b-256 afb5737bf530d413e7c4895c91d7198cc44a252fac9034a70faf0d9836803891

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page