GithubHelp home page GithubHelp logo

sivel / ansible-memory-profiler Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 19 KB

Docker image to aid in memory profiling an ansible playbook using cgroups

License: GNU General Public License v3.0

Python 87.30% Shell 12.70%

ansible-memory-profiler's Introduction

ansible-memory-profiler

This Docker image was created to aid in memory profiling an Ansible playbook using the cgroup_memory_recap callback plugin on a system without access to cgroups

Using

docker run --rm -ti --privileged \
    -v /path/to/playbook_dir:/playbook \
    -v /path/to/ansible/source:/ansible \
    sivel/ansible-memory-profiler \
    ansible-playbook -v -i /playbook/hosts /playbook/playbook.yml

Notes

ansible directory

This image assumes that /ansible will be mounted, and should be the path to the Ansible source. It will be used following the Running from Source instructions. If /ansible is not mounted, you will presented with an error.

playbook directory

The /playbook directory can be whatever you want, I've just used it as an easy to follow convention.

cgroup_memory_recap callback plugin

This is the same callback plugin that will be included in Ansible 2.6.0, but bundled here for use in earlier Ansible versions.

Why?

I develop on a Mac, and as such I don't have direct access to cgroups, but I do have access to Docker. This image gives easy access to use cgroup based memory profiling locally, with little hoops to jump through.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.