# vmm-manager
Python script that manages resources in the System Center Virtual Machine Manager (SCVMM), in a declarative way, based on a YAML configuration file.
[![License](https://img.shields.io/github/license/MP-ES/vmm_manager.svg)](LICENSE)
[![Integration](https://github.com/MP-ES/vmm_manager/workflows/Integration/badge.svg)](https://github.com/MP-ES/vmm_manager/actions?query=workflow%3AIntegration)
[![Release](https://github.com/MP-ES/vmm_manager/workflows/Release/badge.svg)](https://github.com/MP-ES/vmm_manager/actions?query=workflow%3ARelease)
[![Python](https://img.shields.io/pypi/pyversions/vmm-manager.svg)](https://pypi.python.org/pypi/vmm-manager)
[![PyPI](http://img.shields.io/pypi/v/vmm-manager.svg)](https://pypi.python.org/pypi/vmm-manager)
## Breaking changes
### 1.0.0
- The inventory file schema has completely changed. See the [**inventory_example.yaml**](inventory_example.yaml) file for more details.
- The command parameters were renamed to be more consistent.
- The API and inventory schema are now stable.
## Prerequisites
You need a Windows machine, which will serve as the access point to SCVMM, with the following tools:
- OpenSSH
- SCVMM's PowerShell Module (**virtualmachinemanager**), installed with the Virtual Machine Manager (VMM) Console. You can also get it at <https://github.com/MP-ES/VirtualMachineManager-PowerShellModule>
## Installation
```shell
pip install -U vmm-manager
```
## How to use
Use the command below to see the available options:
```shell
vmm_manager -h
```
### Environment variables
You can set environment variables to avoid passing the same parameters every time you run the script. See an example in the [**.env.default**](.env.default) file.
### Example of a inventory file
[inventory_example.yaml](inventory_example.yaml)
## Development
### Install Poetry
Run the following commands to install Poetry:
```shell
# install
curl -sSL https://install.python-poetry.org | python3 -
# auto-completion
# Bash
poetry completions bash >> ~/.bash_completion
```
### Environment variables (optional)
Use the **.env.default** file as a template to create a **.env** file with the environment variables needed to run the script. You can load them by running the command `export $(cat .env | xargs)` before executing the script.
### How to run
```shell
# Loading environment variables (optional)
export $(cat .env | xargs)
# Install dependencies
poetry install --no-root
# Run
poetry run python -m vmm_manager -h
```
### Helpful commands
```shell
# Poetry shell
poetry shell
# Add a dependency
poetry add <pacote> [--dev]
# Update dependencies
poetry update
# Run linting
./lint.sh
# Fix dependencies sorting
isort .
# Run tests
python -m pytest -vv
# List virtualenvs
poetry env list
# Remove a virtualenv
poetry env remove <name>
```
## References
- [Virtual Machine Manager](https://docs.microsoft.com/en-us/powershell/module/virtualmachinemanager/?view=systemcenter-ps-2019)
- [Poetry](https://python-poetry.org/)
Raw data
{
"_id": null,
"home_page": "https://github.com/MP-ES/vmm_manager",
"name": "vmm_manager",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "IaC, scvmm, vmm_manager",
"author": "Estev\u00e3o Costa",
"author_email": "ecosta@mpes.mp.br",
"download_url": "https://files.pythonhosted.org/packages/64/6c/6675f95c6318b37806b9d01f41c695c89850d1a07a222c47ba9ed94f9d2e/vmm_manager-1.1.1.tar.gz",
"platform": null,
"description": "# vmm-manager\n\nPython script that manages resources in the System Center Virtual Machine Manager (SCVMM), in a declarative way, based on a YAML configuration file.\n\n[![License](https://img.shields.io/github/license/MP-ES/vmm_manager.svg)](LICENSE)\n[![Integration](https://github.com/MP-ES/vmm_manager/workflows/Integration/badge.svg)](https://github.com/MP-ES/vmm_manager/actions?query=workflow%3AIntegration)\n[![Release](https://github.com/MP-ES/vmm_manager/workflows/Release/badge.svg)](https://github.com/MP-ES/vmm_manager/actions?query=workflow%3ARelease)\n[![Python](https://img.shields.io/pypi/pyversions/vmm-manager.svg)](https://pypi.python.org/pypi/vmm-manager)\n[![PyPI](http://img.shields.io/pypi/v/vmm-manager.svg)](https://pypi.python.org/pypi/vmm-manager)\n\n## Breaking changes\n\n### 1.0.0\n\n- The inventory file schema has completely changed. See the [**inventory_example.yaml**](inventory_example.yaml) file for more details.\n- The command parameters were renamed to be more consistent.\n- The API and inventory schema are now stable.\n\n## Prerequisites\n\nYou need a Windows machine, which will serve as the access point to SCVMM, with the following tools:\n\n- OpenSSH\n- SCVMM's PowerShell Module (**virtualmachinemanager**), installed with the Virtual Machine Manager (VMM) Console. You can also get it at <https://github.com/MP-ES/VirtualMachineManager-PowerShellModule>\n\n## Installation\n\n```shell\npip install -U vmm-manager\n```\n\n## How to use\n\nUse the command below to see the available options:\n\n```shell\nvmm_manager -h\n```\n\n### Environment variables\n\nYou can set environment variables to avoid passing the same parameters every time you run the script. See an example in the [**.env.default**](.env.default) file.\n\n### Example of a inventory file\n\n[inventory_example.yaml](inventory_example.yaml)\n\n## Development\n\n### Install Poetry\n\nRun the following commands to install Poetry:\n\n```shell\n# install\ncurl -sSL https://install.python-poetry.org | python3 -\n\n# auto-completion\n# Bash\npoetry completions bash >> ~/.bash_completion\n```\n\n### Environment variables (optional)\n\nUse the **.env.default** file as a template to create a **.env** file with the environment variables needed to run the script. You can load them by running the command `export $(cat .env | xargs)` before executing the script.\n\n### How to run\n\n```shell\n# Loading environment variables (optional)\nexport $(cat .env | xargs)\n\n# Install dependencies\npoetry install --no-root\n\n# Run\npoetry run python -m vmm_manager -h\n```\n\n### Helpful commands\n\n```shell\n# Poetry shell\npoetry shell\n\n# Add a dependency\npoetry add <pacote> [--dev]\n\n# Update dependencies\npoetry update\n\n# Run linting\n./lint.sh\n\n# Fix dependencies sorting\nisort .\n\n# Run tests\npython -m pytest -vv\n\n# List virtualenvs\npoetry env list\n\n# Remove a virtualenv\npoetry env remove <name>\n```\n\n## References\n\n- [Virtual Machine Manager](https://docs.microsoft.com/en-us/powershell/module/virtualmachinemanager/?view=systemcenter-ps-2019)\n- [Poetry](https://python-poetry.org/)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Management of resources on System Center Virtual Machine Manager (SCVMM) in a declarative way.",
"version": "1.1.1",
"project_urls": {
"Documentation": "https://github.com/MP-ES/vmm_manager",
"Homepage": "https://github.com/MP-ES/vmm_manager",
"Repository": "https://github.com/MP-ES/vmm_manager"
},
"split_keywords": [
"iac",
" scvmm",
" vmm_manager"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5a8f3da1deb9158ad8502a7e7559c44c3eea5890ea7f5cc663ac6ed22f796ad2",
"md5": "e7f6411e3621ee83689fa57a460518ed",
"sha256": "820692a2a4d818f428a5c1987c0076412acbd921e3cbf1d34e75eb2aade0c82f"
},
"downloads": -1,
"filename": "vmm_manager-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e7f6411e3621ee83689fa57a460518ed",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 45462,
"upload_time": "2024-10-17T18:40:19",
"upload_time_iso_8601": "2024-10-17T18:40:19.007538Z",
"url": "https://files.pythonhosted.org/packages/5a/8f/3da1deb9158ad8502a7e7559c44c3eea5890ea7f5cc663ac6ed22f796ad2/vmm_manager-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "646c6675f95c6318b37806b9d01f41c695c89850d1a07a222c47ba9ed94f9d2e",
"md5": "758b56b6cf75998b6ed8513c054f7f88",
"sha256": "e36c5ffb9d4a679f4928b32a31b8281677ff3b8dc3277401cf311d9047cc9b38"
},
"downloads": -1,
"filename": "vmm_manager-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "758b56b6cf75998b6ed8513c054f7f88",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 29537,
"upload_time": "2024-10-17T18:40:20",
"upload_time_iso_8601": "2024-10-17T18:40:20.005935Z",
"url": "https://files.pythonhosted.org/packages/64/6c/6675f95c6318b37806b9d01f41c695c89850d1a07a222c47ba9ed94f9d2e/vmm_manager-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-17 18:40:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MP-ES",
"github_project": "vmm_manager",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "vmm_manager"
}