gen-vm-image


Namegen-vm-image JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/ucphhpc/gen-vm-image
SummaryThis tool can be used for generating virtual machine images.
upload_time2024-11-15 15:26:17
maintainerNone
docs_urlNone
authorRasmus Munk
requires_pythonNone
licenseGNU General Public License v2 (GPLv2)
keywords virtual machine vm images
VCS
bugtrack_url
requirements PyYaml argparse jinja2 wget requests
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ============
gen-vm-image
============

.. image:: https://img.shields.io/pypi/pyversions/gen-vm-image.svg
    :target: https://img.shields.io/pypi/pyversions/gen-vm-image
.. image:: https://badge.fury.io/py/gen-vm-image.svg
    :target: https://badge.fury.io/py/gen-vm-image

This package can be used for generating virtual machine images.

------------
Dependencies
------------

The dependencies required to use this package to generate virtual machine images
can be found in the ``dep`` directory for the supported distributions.

------------
Installation
------------

The current stable release version ``gen-vm-image`` tool can be installed directly from pypi via::

    pip install gen-vm-image

Alternatively, you can install the current development version by firstly cloning the repository::

  git clone https://github.com/ucphhpc/gen-vm-image.git

Then, secondly installing the ``gen-vm-image`` tool either in its own virtual environment::

  cd gen-vm-image
  make install

or systemwide::

    cd gen-vm-image
    make install PYTHON=path/to/your/systemwide/python

-----------------------------
Build a Virtual Machine Image
-----------------------------

Before an image can be generated, you first have to create an architecture file that defines which images should be built.
What name this architecture file is given is not important, but it should be in YAML format and contain the following structure::

    owner: <string> # The owner of the image.
    images: <key-value pair> # The images to be generated.
      <image-name>:
        name: <string> # The name of the image.
        version: <string> # (Optional) The version of the image.
        size: <string> # The size of the to be generated vm image disk, can use suffixes such as 'K', 'M', 'G', 'T'.
        input: <dict> # Input can be defined if the generated image should be based on a pre-existing image.
          url: <string> # An URL to an image that should be used as the input image for the generated image.
          format: <string> # The format of the input image, could for instance be `raw` or `qcow2`.
          checksum: <dict> # A dictionary that defines the checksum that should be used to validate the input image.
            type: <string> # The type of checksum that should be used to validate the image. For valid types, see the supported algorithms `Here <https://docs.python.org/3/library/hashlib.html#hashlib.new>`_
            value: <string> # The checksum value that should be used to validate the image.


An example of such a file can be found in the ``examples`` directory.

Upon creating such a file, the `gen-vm-image` command can be used to generate the virtual machine image.
The totality of the command can be seen below::

    usage: gen-vm-image [-h]
                        [--images-output-directory IMAGES_OUTPUT_DIRECTORY]
                        [--overwrite]
                        [--generate-gocd-config]
                        [--gocd-config-name GOCD_CONFIG_NAME]
                        [--gocd-build-branch GOCD_BUILD_BRANCH]
                        [--verbose]
                        [--version]
                        architecture_path

    positional arguments:
      architecture_path     The path to the architecture file that defines the images to build

    options:
      -h, --help            show this help message and exit
      --images-output-directory IMAGES_OUTPUT_DIRECTORY
                            The path to the output directory where the images will be saved (default: generated-images)
      --overwrite           Whether the tool should overwrite existing image disks (default: False)
      --generate-gocd-config
                            Generate a GoCD config based on the architecture file (default: False)
      --gocd-config-name GOCD_CONFIG_NAME
                            Name of the generated gocd config file (default: 1.gocd.yml)
      --gocd-build-branch GOCD_BUILD_BRANCH
                            The branch that GoCD should use to build images (default: main)
      --verbose, -v         Print verbose output (default: False)
      --version             Print the version of the program

In summation, when the ``gen-vm-image path/to/architecture.yml`` command is executed,
the specified images will be generated in the ``--image-output-path`` directory.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ucphhpc/gen-vm-image",
    "name": "gen-vm-image",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "Virtual Machine, VM, Images",
    "author": "Rasmus Munk",
    "author_email": "munk1@live.dk",
    "download_url": "https://files.pythonhosted.org/packages/2f/b8/e1382d87ad5d849f9e1b1dbda2403af7fd289d0f62007a676297fd4c79b5/gen_vm_image-0.0.5.tar.gz",
    "platform": null,
    "description": "============\ngen-vm-image\n============\n\n.. image:: https://img.shields.io/pypi/pyversions/gen-vm-image.svg\n    :target: https://img.shields.io/pypi/pyversions/gen-vm-image\n.. image:: https://badge.fury.io/py/gen-vm-image.svg\n    :target: https://badge.fury.io/py/gen-vm-image\n\nThis package can be used for generating virtual machine images.\n\n------------\nDependencies\n------------\n\nThe dependencies required to use this package to generate virtual machine images\ncan be found in the ``dep`` directory for the supported distributions.\n\n------------\nInstallation\n------------\n\nThe current stable release version ``gen-vm-image`` tool can be installed directly from pypi via::\n\n    pip install gen-vm-image\n\nAlternatively, you can install the current development version by firstly cloning the repository::\n\n  git clone https://github.com/ucphhpc/gen-vm-image.git\n\nThen, secondly installing the ``gen-vm-image`` tool either in its own virtual environment::\n\n  cd gen-vm-image\n  make install\n\nor systemwide::\n\n    cd gen-vm-image\n    make install PYTHON=path/to/your/systemwide/python\n\n-----------------------------\nBuild a Virtual Machine Image\n-----------------------------\n\nBefore an image can be generated, you first have to create an architecture file that defines which images should be built.\nWhat name this architecture file is given is not important, but it should be in YAML format and contain the following structure::\n\n    owner: <string> # The owner of the image.\n    images: <key-value pair> # The images to be generated.\n      <image-name>:\n        name: <string> # The name of the image.\n        version: <string> # (Optional) The version of the image.\n        size: <string> # The size of the to be generated vm image disk, can use suffixes such as 'K', 'M', 'G', 'T'.\n        input: <dict> # Input can be defined if the generated image should be based on a pre-existing image.\n          url: <string> # An URL to an image that should be used as the input image for the generated image.\n          format: <string> # The format of the input image, could for instance be `raw` or `qcow2`.\n          checksum: <dict> # A dictionary that defines the checksum that should be used to validate the input image.\n            type: <string> # The type of checksum that should be used to validate the image. For valid types, see the supported algorithms `Here <https://docs.python.org/3/library/hashlib.html#hashlib.new>`_\n            value: <string> # The checksum value that should be used to validate the image.\n\n\nAn example of such a file can be found in the ``examples`` directory.\n\nUpon creating such a file, the `gen-vm-image` command can be used to generate the virtual machine image.\nThe totality of the command can be seen below::\n\n    usage: gen-vm-image [-h]\n                        [--images-output-directory IMAGES_OUTPUT_DIRECTORY]\n                        [--overwrite]\n                        [--generate-gocd-config]\n                        [--gocd-config-name GOCD_CONFIG_NAME]\n                        [--gocd-build-branch GOCD_BUILD_BRANCH]\n                        [--verbose]\n                        [--version]\n                        architecture_path\n\n    positional arguments:\n      architecture_path     The path to the architecture file that defines the images to build\n\n    options:\n      -h, --help            show this help message and exit\n      --images-output-directory IMAGES_OUTPUT_DIRECTORY\n                            The path to the output directory where the images will be saved (default: generated-images)\n      --overwrite           Whether the tool should overwrite existing image disks (default: False)\n      --generate-gocd-config\n                            Generate a GoCD config based on the architecture file (default: False)\n      --gocd-config-name GOCD_CONFIG_NAME\n                            Name of the generated gocd config file (default: 1.gocd.yml)\n      --gocd-build-branch GOCD_BUILD_BRANCH\n                            The branch that GoCD should use to build images (default: main)\n      --verbose, -v         Print verbose output (default: False)\n      --version             Print the version of the program\n\nIn summation, when the ``gen-vm-image path/to/architecture.yml`` command is executed,\nthe specified images will be generated in the ``--image-output-path`` directory.\n",
    "bugtrack_url": null,
    "license": "GNU General Public License v2 (GPLv2)",
    "summary": "This tool can be used for generating virtual machine images.",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/ucphhpc/gen-vm-image"
    },
    "split_keywords": [
        "virtual machine",
        " vm",
        " images"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d4d0f3589559520102a9d42a491cd1dec8bde22f1ee6ae33b2b53e3182f60509",
                "md5": "379b7429047c514a673a50033e4c3dde",
                "sha256": "06fe382dc15d10d889ae023f862545db42100b146a197892ea971e2255da714e"
            },
            "downloads": -1,
            "filename": "gen_vm_image-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "379b7429047c514a673a50033e4c3dde",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 25503,
            "upload_time": "2024-11-15T15:26:16",
            "upload_time_iso_8601": "2024-11-15T15:26:16.244211Z",
            "url": "https://files.pythonhosted.org/packages/d4/d0/f3589559520102a9d42a491cd1dec8bde22f1ee6ae33b2b53e3182f60509/gen_vm_image-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2fb8e1382d87ad5d849f9e1b1dbda2403af7fd289d0f62007a676297fd4c79b5",
                "md5": "ab8ee67016acc7435f5917e57e20e1ca",
                "sha256": "0d95edd0d8f50027c59c391dcff00b63b0ae6e0cc01802ec86af3d3529870fd8"
            },
            "downloads": -1,
            "filename": "gen_vm_image-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "ab8ee67016acc7435f5917e57e20e1ca",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21025,
            "upload_time": "2024-11-15T15:26:17",
            "upload_time_iso_8601": "2024-11-15T15:26:17.369532Z",
            "url": "https://files.pythonhosted.org/packages/2f/b8/e1382d87ad5d849f9e1b1dbda2403af7fd289d0f62007a676297fd4c79b5/gen_vm_image-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-15 15:26:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ucphhpc",
    "github_project": "gen-vm-image",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "PyYaml",
            "specs": []
        },
        {
            "name": "argparse",
            "specs": []
        },
        {
            "name": "jinja2",
            "specs": []
        },
        {
            "name": "wget",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        }
    ],
    "lcname": "gen-vm-image"
}
        
Elapsed time: 0.39286s