ansible-bender | ansible-playbook + buildah = a sweet container image | Continuous Deployment library

 by   ansible-community Python Version: 0.10.1 License: MIT

kandi X-RAY | ansible-bender Summary

kandi X-RAY | ansible-bender Summary

ansible-bender is a Python library typically used in Devops, Continuous Deployment, Ansible, Docker applications. ansible-bender has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. However ansible-bender build file is not available. You can install using 'pip install ansible-bender' or download it from GitHub, PyPI.

ansible-playbook + buildah = a sweet container image
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ansible-bender has a low active ecosystem.
              It has 622 star(s) with 74 fork(s). There are 25 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 39 open issues and 110 have been closed. On average issues are closed in 236 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of ansible-bender is 0.10.1

            kandi-Quality Quality

              ansible-bender has 0 bugs and 0 code smells.

            kandi-Security Security

              ansible-bender has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              ansible-bender code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              ansible-bender is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              ansible-bender releases are available to install and integrate.
              Deployable package is available in PyPI.
              ansible-bender has no build file. You will be need to create the build yourself to build the component from source.
              It has 5855 lines of code, 222 functions and 59 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed ansible-bender and discovered the below as its top functions. This is intended to give you an instant insight into ansible-bender implemented functionality, and help decide if they suit your requirements.
            • Commit an image
            • Run a command
            • Get buildah version
            • Return the id of an image
            • Runs the tool
            • Build a new build
            • Try to split a string
            • Return the build and metadata for the build
            • Create a Build from a dictionary
            • Create an instance from a dictionary
            • Create a layer from a JSON representation
            • Configure a logger
            • Update the configuration from a dictionary
            • Push build to target
            • Push build to target
            • Check if an image exists
            • Wrapper for v2
            • Run a pod command
            • Get log lines for a build
            • Wrapper for buildah
            • Checks if the buildah command exists
            • Check if podman command exists
            • Runs the task start
            • Create a dummy container
            • Pull buildah image
            • Check if git command exists
            Get all kandi verified functions for this library.

            ansible-bender Key Features

            No Key Features are available at this moment for ansible-bender.

            ansible-bender Examples and Code Snippets

            No Code Snippets are available at this moment for ansible-bender.

            Community Discussions

            Trending Discussions on ansible-bender

            QUESTION

            How is base container executed on Gitlab runner
            Asked 2019-Nov-18 at 08:05

            I am working on a CI/CD pipeline which uses a containerised environment.

            • On my laptop, everything thing is run within a centos container which contains all of my tools, while the code and configuration reside on a shared volume.
            • Most of that shared volume gets pushed up to master when I submit.
              • But, for example, I exclude any python binaries from the virtual environment.
            • That same container is used as my "base" container in Gitlab to execute some of my runner stages in order to
              • execute static lint testing of both the code and the ansible config
              • build the final product as a new image with ansible-bender

            In order to distinguish the environments, I use a basic shell in the entrypoint.sh which is executed when the container comes up and in that shell, I used an environment variable which is managed by Gitlab: CI_JOB_STAGE. But the shell script doesn't seem to perform in the same way when I run the container locally as opposed to on the runner. Which is crazy, because that the whole point of containers isn't it?

            • it's unclear at what point Gitlab mounts the share between the runner host and the container
            • conditions testing the value CI_JOB_STAGE don't seem to work even though the values are shown when it printed out with and echo
            • for some reason the entrypoint is executed both before AND after the stage executes

            I am attaching gists for

            • the entrypoint.sh script
            • the output when the container is run locally
              • in this case, it see that the virtual env already exist by check for the existence of the activate binary, so that environment is simply activated
              • it then checks for the flask binary to see if it needs to install requirements
              • i know it's primitive, but this is just POC
            • the output for the first stage of the runner
              • based on the shell script, it should not install the requirements because that is part of the stage commands anyway
              • I don't believe it actually does do so, because it goes by too quickly, but the message indicates that it went through the condition
              • if [[ $CI_JOB_STAGE -eq "locally" ]] && ! test -f "./env/bin/flask"
                • if the stage is local (false: we clearly see that stage is lint_code)
                • AND
                • flask is not present (well, it won't be, but it doesn't matter because the first half is already false)

            The stages still run correctly, but I find this all very confusing. Does anyone have detailed knowledge of how these runners execute?

            gists

            ...

            ANSWER

            Answered 2019-Nov-18 at 08:05

            Gitlab supports number of executors where each might behave slightly differently (executor might might mount custom volumes, forbid privileged containers)

            The general workflow is:

            1. Prepare: Create and start the services.
            2. Pre-job: Clone, restore cache and download artifacts from previous stages. This is run on a special Docker image.
            3. Job: User build. This is run on the user-provided Docker image.
            4. Post-job: Create cache, upload artifacts to GitLab. This is run on a special Docker Image.

            I would discourage from scripting in entrypoint.sh. try to rewrite it into .gitlab-ci.yml:

            Source https://stackoverflow.com/questions/58877007

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install ansible-bender

            You can install using 'pip install ansible-bender' or download it from GitHub, PyPI.
            You can use ansible-bender like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            You can read more about this project in the documentation:.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install ansible-bender

          • CLONE
          • HTTPS

            https://github.com/ansible-community/ansible-bender.git

          • CLI

            gh repo clone ansible-community/ansible-bender

          • sshUrl

            git@github.com:ansible-community/ansible-bender.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Continuous Deployment Libraries

            Try Top Libraries by ansible-community

            molecule

            by ansible-communityPython

            ansible-lint

            by ansible-communityPython

            ara

            by ansible-communityPython

            ansible-consul

            by ansible-communityHTML

            ansible-vault

            by ansible-communityHTML