# Mobius-python
# Table of contents
- [Description](#descr)
- [Installation](#install)
# <a name="descr"></a>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
```
# <a name="install"></a>Installation
You can install using the following command
```
pip install mobius-py
```
## Requirements:
Requires python 3.9 or above version
Raw data
{
"_id": null,
"home_page": null,
"name": "mobius-py",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "Mobius Framework,Cloud,FABRIC,Chameleon,MOC",
"author": null,
"author_email": "Komal Thareja <kthare10@renci.org>",
"download_url": "https://files.pythonhosted.org/packages/54/8b/11d653688eb1fe991a28502348af16fc4b18176fccc03eff3347355cde18/mobius-py-1.3.1.tar.gz",
"platform": null,
"description": "# Mobius-python\n\n# Table of contents\n\n - [Description](#descr)\n - [Installation](#install)\n \n# <a name=\"descr\"></a>Description\nThe Mobius API is a Python library that simplifies the native cloud interfaces for various clouds such as FABRIC, \nChameleon and adds many additional capabilities that are commonly used to create experiments.\n\nThe easiest way to get started using Mobius API is to use the example shown below.\n\n```\n # Create a controller obect\n # Default slice name is picked up from the config file\n controller = Controller(config_file_location=\"./config.yml\")\n # User specified slice name is used to identify the resources\n #controller = Controller(config_file_location=\"./config.yml\", slice_name=\"test-slice\")\n # Provision the resources as specified in the configuration file\n controller.create()\n # Get the provisioned resources\n resources = controller.get_resources()\n # Print the resources provisioned\n for r in resources:\n print(r)\n print(r.list_nodes())\n```\n\nUser is expected to provide a config file `config.yml` containing their credentials and resource parameters. Template\n`mobius/config/config_template.yml` can be used to create a `config.yml`. Please find below the list of the parameters \nthat must be updated.\n\n- Update the SSH public and private key files to be used for the provisioned VMs/Bare Metals\n```\nruntime:\n slice-private-key-location: /Users/kthare10/.ssh/id_rsa\n slice-public-key-location: /Users/kthare10/.ssh/id_rsa.pub\n```\n- Update FABRIC credentials\n - Location of the user's FABRIC tokens\n - User's Bastion User name\n - User's Fabric Bastion Private Key\n - User's Project Id\n```\nfabric:\n token-location: /Users/kthare10/renci/code/fabric/notebooks/tokens.json\n bastion-user-name: kthare10_0011904101\n bastion-key-location: /Users/kthare10/.ssh/fabric-bastion\n project_id: b9847fa1-13ef-49f9-9e07-ae6ad06cda3f\n```\n\n- Update Chameleon credentials\n - UserName\n - Password\n - Key Pair\n - Project Name\n - Project Id\n```\nchameleon:\n user: kthare10\n password: \n key_pair: kthare10\n project_name: CH-822154\n project_id:\n tacc: a400724e818d40cbba1a5c6b5e714462\n uc: ae76673270164b048b59d3bd30676721\n kvm: a400724e818d40cbba1a5c6b5e714462\n edge:\n```\n- Update the resource counts\n - Set count to 0 or more depending on where the resources should be provisioned.\n - Copy and add more resource blocks if resources are needed at additional sites\n - Change other parameters as needed\n```\nresources:\n - resource:\n type: VM\n site: RENC # use FABRIC.RANDOM to choose a random site instead\n count: 1\n image: default_rocky_8\n nic_model: NIC_Basic # NIC_Basic(SRIOV), NIC_ConnectX_5 => 25GB, NIC_ConnectX_6 => 100GB\n name_prefix: node\n network:\n type: IPv6 # Allowed values IPv4 or IPv6\n flavor:\n cores: 2\n ram: 8\n disk: 10\n\n - resource:\n type: Baremetal\n site: KVM@TACC\n count: 1\n image: CC-CentOS8\n network:\n type: sharednet1\n name_prefix: node\n flavor:\n name: m1.large\n```\n\n# <a name=\"install\"></a>Installation\nYou can install using the following command\n```\npip install mobius-py\n```\n\n## Requirements:\nRequires python 3.9 or above version",
"bugtrack_url": null,
"license": null,
"summary": "Mobius Multi Testbed Framework",
"version": "1.3.1",
"project_urls": {
"Home": "https://github.com/RENCI-NRIG/Mobius",
"Sources": "https://github.com/RENCI-NRIG/Mobius-python"
},
"split_keywords": [
"mobius framework",
"cloud",
"fabric",
"chameleon",
"moc"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "34cde72ab394165a8f123d6615132fee106a94262ca97b875e8fa30ee5625cdd",
"md5": "c6a4995caf405dfe2974ef9b4a7971ff",
"sha256": "16782bd5210fc69354b26e0143567f3e5a01b7eec981df2564d0eed38110f591"
},
"downloads": -1,
"filename": "mobius_py-1.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c6a4995caf405dfe2974ef9b4a7971ff",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 25495,
"upload_time": "2023-09-11T19:24:42",
"upload_time_iso_8601": "2023-09-11T19:24:42.801334Z",
"url": "https://files.pythonhosted.org/packages/34/cd/e72ab394165a8f123d6615132fee106a94262ca97b875e8fa30ee5625cdd/mobius_py-1.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "548b11d653688eb1fe991a28502348af16fc4b18176fccc03eff3347355cde18",
"md5": "562eee0f7318fa3a9d83ea3fa8d098e0",
"sha256": "505f58fa62ee267a4219f1bd9bee093cbfe09ef0b358fa1977d7a94624ff436f"
},
"downloads": -1,
"filename": "mobius-py-1.3.1.tar.gz",
"has_sig": false,
"md5_digest": "562eee0f7318fa3a9d83ea3fa8d098e0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 16984,
"upload_time": "2023-09-11T19:24:44",
"upload_time_iso_8601": "2023-09-11T19:24:44.503597Z",
"url": "https://files.pythonhosted.org/packages/54/8b/11d653688eb1fe991a28502348af16fc4b18176fccc03eff3347355cde18/mobius-py-1.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-11 19:24:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "RENCI-NRIG",
"github_project": "Mobius",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mobius-py"
}