{ "info": { "author": "Open Baton Dev", "author_email": "dev@openbaton.org", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.5" ], "description": "Image-Generator\n===============\n\nA python based generator for lxc images.\n\nIt will read a configuration from a yaml file, starts a container\naccordingly, copies and runs specific scripts and in the end creates a\nlxc image.\n\nPrerequisites\n-------------\n\n.. code:: sh\n\n sudo apt update && sudo apt install -y python3-pip lxd\n\nAfter the installation you will need to configure your lxd environment.\nDepending on your desired image and scripts the container may need\ninternet connectivity, so make sure you activate NAT connectivity for\nyour containers:\n\n.. code:: sh\n\n sudo lxd init\n\n Name of the storage backend to use (dir or zfs) [default=dir]:\n Would you like LXD to be available over the network (yes/no) [default=no]? yes\n Address to bind LXD to (not including port) [default=all]:\n Port to bind LXD to [default=8443]:\n Trust password for new clients:\n Again:\n Do you want to configure the LXD bridge (yes/no) [default=yes]?\n Do you want to setup an IPv4 subnet? Yes\n Default values apply for next questions\n Do you want to setup an IPv6 subnet? No\n\nInstall the image generator tool\n--------------------------------\n\nInstall via :\n\n.. code:: sh\n\n pip3 install image-generator\n\nHow to use\n----------\n\nIt is possible to run it in two way. ``single action`` or with\n``config file``. The config file is a yaml file containing on the root a\nlist of action to be executed in order with some paramters.\n\nEach ``action`` has specific parameters that are listed in the following\nsection\n\nConfigure\n~~~~~~~~~\n\nYou have at least one lxc image already downloaded which you can find in\nyour local lxc image store\n\n.. code:: sh\n\n lxc image list\n\nIf not, you can import an ubuntu image on the local image repo with the\nfollowing command:\n\n.. code:: sh\n\n lxc image copy ubuntu:16.04 local:\n\nAnd take note of the fingerprint you need for the next steps.\n\nThe config file should look like:\n\n.. code:: yaml\n\n connect:\n url: < The URL with port where to reach lxd engine > # Mandatory\n trust-password: < The trust password you have set for the lxd environment > # Mandatory\n\n create-container:\n container-name: < The name of the container which will be created > # default: \"image-generator\"\n container-image-fingerprint: < The fingeprint of the image which will be used as base image for the container > # Mandatory; you do not need the complete image fingerprint, the one shown by lxc image list is enough\n\n copy-files:\n file-tarball: < Path to the tar archive containing all scripts you want to push on the image > # default: \"./etc/files.tar\"\n file-dest: < Path where to copy the content of the tar archive on the container > # default /root/files.tar\n\n execute-script:\n script: < Which script to be executed > # Mandatory\n clean-tmp-files: < remove the temporary files used for copying the tarball on the container> # default: False\n # lxc always assumes you are in /root, thus take care if you use relative paths to the scripts here\n\n create-image:\n destination: < Path of the folder where the image will be saved > # default: \"/tmp\"\n alias: # default: \"Published by image-generator\"\n name: # generated-image\n # if the destination does not yet contain the ending tar.gz it will be added automatically\n\n clean:\n container: < remove the container used for creating the lxc image> # default: True \n image-store: < remove the image created from the container from your local image store> # default: True\n\n # You can (re)import the images anytime by lxc image import < Your path to the desired image.tar.gz > --alias < Your Alias here >\n\nRun\n~~~\n\n**NOTE** if you get this error while running image generator:\n\n.. code:: text\n\n Traceback (most recent call last):\n File \"/usr/bin/pip3\", line 11, in \n sys.exit(main())\n File \"/usr/lib/python3/dist-packages/pip/__init__.py\", line 215, in main\n locale.setlocale(locale.LC_ALL, '')\n File \"/usr/lib/python3.5/locale.py\", line 594, in setlocale\n return _setlocale(category, locale)\n locale.Error: unsupported locale setting\n\nthen as a quick fix, you can run:\n\n.. code:: sh\n\n export LC_ALL=C\n\nCheck the help\n\n.. code:: sh\n\n image-generator --help\n usage: image-generator [-h] [-f FILE] [-d] [-action ACTION] [-params PARAMS]\n [-dry]\n\n optional arguments:\n -h, --help show this help message and exit\n -f FILE, --file FILE the file scenario with the action to execute\n -d, --debug show debug prints\n -action ACTION The action to execute\n -params PARAMS The parameters to the action\n -dry Run dryrun\n\nand then run it **with sudo**:\n\n.. code:: sh\n\n sudo image-generator -f \n\nsudo rights are needed only because it is required by the process of\nextracting the image downloaded from lxd.\n\nTest it\n~~~~~~~\n\nfor testing it is possible to do a dry run by running:\n\n.. code:: sh\n\n sudo image-generator -f -dry --debug\n\nit will execute every step but the installation script and finally will\nalso delete the downloaded image.\n\nUninstall\n---------\n\nUninstall via :\n\n.. code:: sh\n\n pip3 uninstall image-generator\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://openbaton.org/", "keywords": "python vnfm nfvo lxc open baton openbaton sdk lxd", "license": "Apache 2", "maintainer": "", "maintainer_email": "", "name": "image-generator", "package_url": "https://pypi.org/project/image-generator/", "platform": "", "project_url": "https://pypi.org/project/image-generator/", "project_urls": { "Homepage": "http://openbaton.org/" }, "release_url": "https://pypi.org/project/image-generator/1.1.3/", "requires_dist": [ "pylxd", "pyopenssl", "pyyaml", "progress" ], "requires_python": "", "summary": "The Image Generator", "version": "1.1.3" }, "last_serial": 3464614, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "5f47f5bc28c3aa76ab7ab8a2827c170e", "sha256": "07ad679462912829cd8b632c0b349b921465cc8e26143ccbcc7ff16cc62788be" }, "downloads": -1, "filename": "image_generator-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5f47f5bc28c3aa76ab7ab8a2827c170e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10037, "upload_time": "2017-11-30T17:27:46", "url": "https://files.pythonhosted.org/packages/2a/11/9af236a9b3a5997bc7894cd63b9dc00e8c9e3e78deb3bd0d70ace65f6270/image_generator-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fb568b64f6a55aac775a3b61276868a4", "sha256": "94242765dfc5a6c21a4f2542ce2fa80b924c74ec87180a09bab1271c0b505e24" }, "downloads": -1, "filename": "image-generator-1.0.0.tar.gz", "has_sig": false, "md5_digest": "fb568b64f6a55aac775a3b61276868a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12178, "upload_time": "2017-11-30T17:27:48", "url": "https://files.pythonhosted.org/packages/1b/de/da3b7effb93eaad0ec985752c43710ebfdd22052d40f85500361a7b1b289/image-generator-1.0.0.tar.gz" } ], "1.0.0b1": [ { "comment_text": "", "digests": { "md5": "2765c6f4d7a10f86bbf218723f1eabe6", "sha256": "ecf6a805546232ebc3ed172ea9c14af16a531a43dd0bcd90e9e8ac36f511b858" }, "downloads": -1, "filename": "image_generator-1.0.0b1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2765c6f4d7a10f86bbf218723f1eabe6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9728, "upload_time": "2017-11-30T17:02:29", "url": "https://files.pythonhosted.org/packages/64/37/7aa0acec2b2909e4ba863344945d76f53944f0d72ca864cf5319b6122744/image_generator-1.0.0b1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0a91dc9e832cb8b9482527e44dbe6025", "sha256": "23c776f9fce810e547a0110ba4cd2c2c7d4a8abb08c3361556fa7c10d062c33f" }, "downloads": -1, "filename": "image-generator-1.0.0b1.tar.gz", "has_sig": false, "md5_digest": "0a91dc9e832cb8b9482527e44dbe6025", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11874, "upload_time": "2017-11-30T17:02:30", "url": "https://files.pythonhosted.org/packages/44/70/9a64f99913c11180b9ef5924bc8921b811d88e83e2df08d6ed284a92a9f2/image-generator-1.0.0b1.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "be7d841cb646d7e424dc4a91051f5fe7", "sha256": "f5ffa1423f213339161c4a6dc34f1f08836515d382be300560a32d783a440589" }, "downloads": -1, "filename": "image_generator-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "be7d841cb646d7e424dc4a91051f5fe7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10862, "upload_time": "2017-12-01T12:01:44", "url": "https://files.pythonhosted.org/packages/d4/67/cbfc43c8d3e667bee460e08486511f2f1e7223530a12ee91d0f3a31f2395/image_generator-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8088bb076c76071658726d8fb0964cf5", "sha256": "bfafb7b9b746fe2da651469a77bd963a659b7a1b0336a1bda33e55d88b25bab2" }, "downloads": -1, "filename": "image-generator-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8088bb076c76071658726d8fb0964cf5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12900, "upload_time": "2017-12-01T12:01:46", "url": "https://files.pythonhosted.org/packages/60/50/91c7c9792967f139ca146f817d7513736f74b827a7d3e8ddc938d1d41972/image-generator-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "53c3c09dd37fbe432b72aa887cde70fc", "sha256": "6dd933cf2fab2757d041bf622835563cfc7b6db0c609e2279f2a3d8d9abb7043" }, "downloads": -1, "filename": "image-generator-1.0.2.tar.gz", "has_sig": false, "md5_digest": "53c3c09dd37fbe432b72aa887cde70fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11866, "upload_time": "2017-12-04T23:22:33", "url": "https://files.pythonhosted.org/packages/f1/a3/683197e0cd064ecfbb32bca0be4bb3aee990089991751339b2de33619a42/image-generator-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "32553bda6610339cd7d92683079a7ff0", "sha256": "2fd21b6984c7bb320f50becf8bccba4114dd148faf6ce2467748e78898842693" }, "downloads": -1, "filename": "image-generator-1.0.3.tar.gz", "has_sig": false, "md5_digest": "32553bda6610339cd7d92683079a7ff0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11874, "upload_time": "2017-12-05T00:06:03", "url": "https://files.pythonhosted.org/packages/fe/1a/d0421491a2684a8b160a3ccbf439bb65a35d6d18a98cdbd42198ee6f17cc/image-generator-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "9738c0767089716aae316f728aaebefb", "sha256": "df52e2b8d09edbce7408a72ab14e037c6f62a417394a92b6f52b88b7fd259329" }, "downloads": -1, "filename": "image-generator-1.0.4.tar.gz", "has_sig": false, "md5_digest": "9738c0767089716aae316f728aaebefb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12592, "upload_time": "2017-12-05T01:49:28", "url": "https://files.pythonhosted.org/packages/02/69/b8c7bc520cebb7ded3fb0deee80b4f026853c4cee8dd33b68c5600742f71/image-generator-1.0.4.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "fbc53483516391dde5840bbbcf060f46", "sha256": "94ebe0fb1fdb8db809bc44d9310eeb4fabb19b2b100cdb4fc666d89d8205e262" }, "downloads": -1, "filename": "image-generator-1.1.0.tar.gz", "has_sig": false, "md5_digest": "fbc53483516391dde5840bbbcf060f46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13861, "upload_time": "2017-12-06T21:38:59", "url": "https://files.pythonhosted.org/packages/23/f6/3e003f883ef47c4fe2980504e675d066499d1f1443cb7404a62363e9d793/image-generator-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "4163546883ceba505a992c2af1a7c518", "sha256": "cd1baf984c01d276452cbb4211aad86b11f8c387c371121fc25c5a987a217eef" }, "downloads": -1, "filename": "image-generator-1.1.1.tar.gz", "has_sig": false, "md5_digest": "4163546883ceba505a992c2af1a7c518", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13996, "upload_time": "2017-12-08T17:46:48", "url": "https://files.pythonhosted.org/packages/4f/b2/6a0b3a8fbf6b6dea2c56c993f25bbee29a34dd5ffc7898ab2a2b972ec217/image-generator-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "d118d7554c2e24ab0dead6f74aa1f094", "sha256": "45333c888533c300f29d6839ca497728a156699c34dc6a042c352b0e3a3d89e9" }, "downloads": -1, "filename": "image-generator-1.1.2.tar.gz", "has_sig": false, "md5_digest": "d118d7554c2e24ab0dead6f74aa1f094", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14277, "upload_time": "2017-12-08T22:23:18", "url": "https://files.pythonhosted.org/packages/02/5c/b7724c855ed3ba875c343f1afe456d1ece2e69e7dcd28aeb72b86e40a7e3/image-generator-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "6e859c861b496c8ae35f320221b30051", "sha256": "9d117ca6ed34d0c10b3e510269485ff48f8393df86d05a0fcc6c5eba7106558b" }, "downloads": -1, "filename": "image_generator-1.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6e859c861b496c8ae35f320221b30051", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13924, "upload_time": "2018-01-05T13:38:19", "url": "https://files.pythonhosted.org/packages/18/b3/58765a9ac4a4cfd274518904dd985dc7559bc9cf2944281661bfd037d9bf/image_generator-1.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0c344d9b877f41ccbdb26e7f23f90920", "sha256": "f3e40e053c7daa62c50238a3168a35eb58b552657b74805fcf8e57930c86f4ab" }, "downloads": -1, "filename": "image-generator-1.1.3.tar.gz", "has_sig": false, "md5_digest": "0c344d9b877f41ccbdb26e7f23f90920", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14344, "upload_time": "2018-01-05T13:38:21", "url": "https://files.pythonhosted.org/packages/44/e4/42966e6bcc5848baecf8c1f537b784873054857d5b632f9134675261ef5f/image-generator-1.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6e859c861b496c8ae35f320221b30051", "sha256": "9d117ca6ed34d0c10b3e510269485ff48f8393df86d05a0fcc6c5eba7106558b" }, "downloads": -1, "filename": "image_generator-1.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6e859c861b496c8ae35f320221b30051", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13924, "upload_time": "2018-01-05T13:38:19", "url": "https://files.pythonhosted.org/packages/18/b3/58765a9ac4a4cfd274518904dd985dc7559bc9cf2944281661bfd037d9bf/image_generator-1.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0c344d9b877f41ccbdb26e7f23f90920", "sha256": "f3e40e053c7daa62c50238a3168a35eb58b552657b74805fcf8e57930c86f4ab" }, "downloads": -1, "filename": "image-generator-1.1.3.tar.gz", "has_sig": false, "md5_digest": "0c344d9b877f41ccbdb26e7f23f90920", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14344, "upload_time": "2018-01-05T13:38:21", "url": "https://files.pythonhosted.org/packages/44/e4/42966e6bcc5848baecf8c1f537b784873054857d5b632f9134675261ef5f/image-generator-1.1.3.tar.gz" } ] }