{ "info": { "author": "TripleO Team", "author_email": "sbaker@redhat.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Topic :: Utilities" ], "description": "TripleO Modify Image\n====================\n\nA role to allow modification to container images built for the TripleO project.\n\nRole Variables\n--------------\n\n.. list-table:: Variables used for modify image\n :widths: auto\n :header-rows: 1\n\n * - Name\n - Default Value\n - Description\n * - `source_image`\n - `[undefined]`\n - Mandatory fully qualified reference to the source image to be modified. The supplied Dockerfile will be copied and modified to make the FROM directive match this variable.\n * - `modify_dir_path`\n - `[undefined]`\n - Mandatory path to the directory containing the Dockerfile to modify the image\n * - `modified_append_tag`\n - `date +-modified-%Y%m%d%H%M%S`\n - String to be appended after the tag to indicate this is a modified version of the source image.\n * - `target_image`\n - `[undefined]`\n - If set, the modified image will be tagged with `target_image + modified_append_tag`. If `target_image` is not set, the modified image will be tagged with `source_image + modified_append_tag`. If the purpose of the image is not changing, it may be enough to rely on the `source_image + modified_append_tag` tag to identify that this is a modified version of the source image.\n * - `container_build_tool`\n - `docker`\n - Tool used to build containers, can be 'docker' or 'buildah'\n\n.. list-table:: Variables used for yum update\n :widths: auto\n :header-rows: 1\n\n * - Name\n - Default Value\n - Description\n * - `source_image`\n - `[undefined]`\n - See modify image variables\n * - `modified_append_tag`\n - `date +-modified-%Y%m%d%H%M%S`\n - See modify image variables\n * - `target_image`\n - `''`\n - See modify image variables\n * - `update_repo`\n - `''`\n - If set, packages from this repo will be updated. Other repos will only be used for dependencies of these updates.\n * - `yum_repos_dir_path`\n - `None`\n - Optional path of directory to be used as `/etc/yum.repos.d` during the update\n * - `container_build_tool`\n - `docker`\n - See modify image variables\n\n\n.. list-table:: Variables used for dev install\n :widths: auto\n :header-rows: 1\n\n * - Name\n - Default Value\n - Description\n * - `source_image`\n - `[undefined]`\n - See modify image variables\n * - `modified_append_tag`\n - `date +-modified-%Y%m%d%H%M%S`\n - See modify image variables\n * - `target_image`\n - `''`\n - See modify image variables\n * - `container_build_tool`\n - `docker`\n - See modify image variables\n * - `refspecs`\n - `[]`\n - An array of project/refspec pairs that will be installed into the generated container. Currently only supports python source projects.\n * - `python_dir`\n - `[]`\n - Directory which contains a Python project ready to be installed with pip.\n\n\nRequirements\n------------\n\n - ansible >= 2.4\n - python >= 2.6\n - docker-py >= 1.7.0\n - Docker API >= 1.20\n\nDependencies\n------------\n\nNone\n\nExample Playbooks\n-----------------\n\nModify Image\n~~~~~~~~~~~~\n\nThe following playbook will produce a modified image with the tag\n`:latest-modified-` based on the Dockerfile in the custom directory\n`/path/to/example_modify_dir`.\n\n.. code-block::\n\n - hosts: localhost\n tasks:\n - name: include tripleo-modify-image\n import_role:\n name: tripleo-modify-image\n tasks_from: modify_image.yml\n vars:\n source_image: docker.io/tripleomaster/centos-binary-nova-api:latest\n modify_dir_path: /path/to/example_modify_dir\n container_build_tool: docker # or buildah\n\nThe directory `example_modify_dir` contains the `Dockerfile` which will perform\nthe modification, for example:\n\n.. code-block::\n\n # This will be replaced in the file Dockerfile.modified\n FROM centos-binary-nova-api\n\n # switch to root to install packages\n USER root\n\n # install packages\n RUN curl \"https://bootstrap.pypa.io/get-pip.py\" -o \"/tmp/get-pip.py\"\n RUN python /tmp/get-pip.py\n\n # switch the container back to the default user\n USER nova\n\nYum update\n~~~~~~~~~~\n\nThe following playbook will produce a modified image with the tag\n`:latest-updated` which will do a yum update using the host's /etc/yum.repos.d.\nThe yum update will only occur if there are differences between host and image\npackage versions. In this playbook the tasks\\_from is set as a variable instead\nof an `import_role` parameter.\n\n.. code-block::\n\n - hosts: localhost\n tasks:\n - name: include tripleo-modify-image\n import_role:\n name: tripleo-modify-image\n vars:\n tasks_from: yum_update.yml\n source_image: docker.io/tripleomaster/centos-binary-nova-api:latest\n compare_host_packages: true\n yum_repos_dir_path: /etc/yum.repos.d\n modified_append_tag: updated\n container_build_tool: docker # or buildah\n\nRPM install\n~~~~~~~~~~~\n\nThe following playbook will produce a modified image with RPMs from the\nspecified rpms\\_path on the local filesystem installed as a new layer\nfor the container. The new container tag is appened with the '-hotfix'\nsuffix. Useful for creating adhoc hotfix containers with local RPMs with no\nnetwork connectivity.\n\n.. code-block::\n\n - hosts: localhost\n tasks:\n - name: include tripleo-modify-image\n import_role:\n name: tripleo-modify-image\n vars:\n tasks_from: rpm_install.yml\n source_image: docker.io/tripleomaster/centos-binary-nova-api:latest\n rpms_path: /foo/bar\n modified_append_tag: -hotfix\n\nDev install\n~~~~~~~~~~~\n\nThe following playbook will produce a modified image with Python source\ncode installed via pip. To minimize dependencies within the container\nwe generate the sdist locally and then copy it into the resulting\ncontainer image as an sdist tarball to run pip install locally.\n\nIt can be used to pull a review from OpenDev Gerrit:\n\n.. code-block::\n\n - hosts: localhost\n connection: local\n tasks:\n - name: dev install heat-api\n import_role:\n name: tripleo-modify-image\n vars:\n tasks_from: dev_install.yml\n source_image: docker.io/tripleomaster/centos-binary-heat-api:current-tripleo\n refspecs:\n -\n project: heat\n refspec: refs/changes/12/1234/3\n modified_append_tag: -devel\n\nor it can be used to build an image from a local Python directory:\n\n.. code-block::\n\n - hosts: localhost\n connection: local\n tasks:\n - name: dev install heat-api\n import_role:\n name: tripleo-modify-image\n vars:\n tasks_from: dev_install.yml\n source_image: docker.io/tripleomaster/centos-binary-heat-api:current-tripleo\n modified_append_tag: -devel\n python_dir:\n - /home/joe/git/openstack/heat\n\nLicense\n-------\n\nApache 2.0\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://git.openstack.org/cgit/openstack/ansible-role-tripleo-modify-image", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ansible-role-tripleo-modify-image", "package_url": "https://pypi.org/project/ansible-role-tripleo-modify-image/", "platform": "", "project_url": "https://pypi.org/project/ansible-role-tripleo-modify-image/", "project_urls": { "Homepage": "https://git.openstack.org/cgit/openstack/ansible-role-tripleo-modify-image" }, "release_url": "https://pypi.org/project/ansible-role-tripleo-modify-image/1.1.0/", "requires_dist": [ "pbr (>=1.6)", "ansible" ], "requires_python": "", "summary": "ansible-tripleo-modify-image - Ansible role to allow modification to container images built for the TripleO project.", "version": "1.1.0" }, "last_serial": 5469415, "releases": { "1.1.0": [ { "comment_text": "", "digests": { "md5": "a078027f9fb15d232054ab9c0a916818", "sha256": "d57a72efe1c94b83f0cca8867fb161c4b91f7a1d20b01d9cd8e4c19707061dba" }, "downloads": -1, "filename": "ansible_role_tripleo_modify_image-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a078027f9fb15d232054ab9c0a916818", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19397, "upload_time": "2019-07-01T03:04:21", "url": "https://files.pythonhosted.org/packages/fd/e4/aae3d16c0457c9a50505ee58b13561907d40808df59fa16ebc26eb3a7683/ansible_role_tripleo_modify_image-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "46b319aaf82e98d7b70c29ad8ee9b61f", "sha256": "60a9a7d702e536aeca309fab630da04e55cf7e2c5d952f93c03438f53165e413" }, "downloads": -1, "filename": "ansible-role-tripleo-modify-image-1.1.0.tar.gz", "has_sig": false, "md5_digest": "46b319aaf82e98d7b70c29ad8ee9b61f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14876, "upload_time": "2019-07-01T03:04:25", "url": "https://files.pythonhosted.org/packages/8f/99/e27671bd07faecb4a79d888349c418c3f720ca81b1eb43521059d2664e0c/ansible-role-tripleo-modify-image-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a078027f9fb15d232054ab9c0a916818", "sha256": "d57a72efe1c94b83f0cca8867fb161c4b91f7a1d20b01d9cd8e4c19707061dba" }, "downloads": -1, "filename": "ansible_role_tripleo_modify_image-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a078027f9fb15d232054ab9c0a916818", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19397, "upload_time": "2019-07-01T03:04:21", "url": "https://files.pythonhosted.org/packages/fd/e4/aae3d16c0457c9a50505ee58b13561907d40808df59fa16ebc26eb3a7683/ansible_role_tripleo_modify_image-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "46b319aaf82e98d7b70c29ad8ee9b61f", "sha256": "60a9a7d702e536aeca309fab630da04e55cf7e2c5d952f93c03438f53165e413" }, "downloads": -1, "filename": "ansible-role-tripleo-modify-image-1.1.0.tar.gz", "has_sig": false, "md5_digest": "46b319aaf82e98d7b70c29ad8ee9b61f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14876, "upload_time": "2019-07-01T03:04:25", "url": "https://files.pythonhosted.org/packages/8f/99/e27671bd07faecb4a79d888349c418c3f720ca81b1eb43521059d2664e0c/ansible-role-tripleo-modify-image-1.1.0.tar.gz" } ] }