Skip to main content

Mobius-python

Table of contents

Description

The Mobius API is a Python library that simplifies the native cloud interfaces for various clouds such as FABRIC, Chameleon and adds many additional capabilities that are commonly used to create experiments.

The easiest way to get started using Mobius API is to use the example shown below.

    # Create a controller obect
    # Default slice name is picked up from the config file
    controller = Controller(config_file_location="./config.yml")
    # User specified slice name is used to identify the resources
    #controller = Controller(config_file_location="./config.yml", slice_name="test-slice")
    # Provision the resources as specified in the configuration file
    controller.create()
    # Get the provisioned resources
    resources = controller.get_resources()
    # Print the resources provisioned
    for r in resources:
        print(r)
        print(r.list_nodes())

User is expected to provide a config file config.yml containing their credentials and resource parameters. Template mobius/config/config_template.yml can be used to create a config.yml. Please find below the list of the parameters that must be updated.

  • Update the SSH public and private key files to be used for the provisioned VMs/Bare Metals
runtime:
  slice-private-key-location: /Users/kthare10/.ssh/id_rsa
  slice-public-key-location: /Users/kthare10/.ssh/id_rsa.pub
  • Update FABRIC credentials
    • Location of the user's FABRIC tokens
    • User's Bastion User name
    • User's Fabric Bastion Private Key
    • User's Project Id
fabric:
  token-location: /Users/kthare10/renci/code/fabric/notebooks/tokens.json
  bastion-user-name: kthare10_0011904101
  bastion-key-location: /Users/kthare10/.ssh/fabric-bastion
  project_id: b9847fa1-13ef-49f9-9e07-ae6ad06cda3f
  • Update Chameleon credentials
    • UserName
    • Password
    • Key Pair
    • Project Name
    • Project Id
chameleon:
  user: kthare10
  password: 
  key_pair: kthare10
  project_name: CH-822154
  project_id:
    tacc: a400724e818d40cbba1a5c6b5e714462
    uc: ae76673270164b048b59d3bd30676721
    kvm: a400724e818d40cbba1a5c6b5e714462
    edge:
  • Update the resource counts
    • Set count to 0 or more depending on where the resources should be provisioned.
    • Copy and add more resource blocks if resources are needed at additional sites
    • Change other parameters as needed
resources:
    - resource:
        type: VM
        site: RENC # use FABRIC.RANDOM to choose a random site instead
        count: 1
        image: default_rocky_8
        nic_model: NIC_Basic # NIC_Basic(SRIOV), NIC_ConnectX_5 => 25GB, NIC_ConnectX_6 => 100GB
        name_prefix: node
        network:
          type: IPv6 # Allowed values IPv4 or IPv6
        flavor:
          cores: 2
          ram: 8
          disk: 10

    - resource:
        type: Baremetal
        site: KVM@TACC
        count: 1
        image: CC-CentOS8
        network:
          type: sharednet1
        name_prefix: node
        flavor:
          name: m1.large

Installation

You can install using the following command

pip install mobius-py

Requirements:

Requires python 3.9 or above version

Release files for mobius-py 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mobius-py 1.3.1
File Size Uploaded
mobius-py-1.3.1.tar.gz 17.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mobius-py 1.3.1
File Interpreter ABI Platform
mobius_py-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 42.5 kB

Release files / mobius-py-1.3.1.tar.gz

Download URL mobius-py-1.3.1.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
505f58fa62ee267a4219f1bd9bee093cbfe09ef0b358fa1977d7a94624ff436f
BLAKE2b-256 checksum
How to use checksums
548b11d653688eb1fe991a28502348af16fc4b18176fccc03eff3347355cde18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.2

Release files / mobius_py-1.3.1-py3-none-any.whl

Download URL mobius_py-1.3.1-py3-none-any.whl
Size 25.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16782bd5210fc69354b26e0143567f3e5a01b7eec981df2564d0eed38110f591
BLAKE2b-256 checksum
How to use checksums
34cde72ab394165a8f123d6615132fee106a94262ca97b875e8fa30ee5625cdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.2

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page