Coder Social home page Coder Social logo

ambari-ansible-module's Introduction

Description

This project contains a custom ansible module for managing an ambari cluster. It supports creating a cluster, starting all cluster services, stopping all cluster services, and deleting the cluster. This assumes the existence of a running ambari server with a set of cluster nodes running the ambari agent. The custom module is located in extra_modules/ambari_cluster_state.py. The ambari_state.yml playbook and roles/ambari_state role demonstrate how to use the custom module.

Motivation

The power of dynamic inventory variables in ansible make it an excellent tool for managing cloud infrastructure. Ambari does much of the hard work in installing and configuring the hadoop ecosystem. This custom module helps us automate and simplify the management of dynamically provisioned hadoop clusters.

Defining a blueprint

The standard for ambari is to define a blueprint as a JSON file. This file maps ambari services (e.g. namenode, datanode) to user defined host groups. Then, you can map hosts to those same host groups as a separate JSON structure known as a host map. In the spirit of ansible, I combine these two structures into a more concise yaml file. See roles/ambari_state/files/blueprint.yml for an example. If useful, it would pretty simple to support the use of existing blueprint/host map files as well.

Running the sample playbook

Specify the appropriate vars in ambari_state.yml for your ambari server, and specify the appropriate services, groups, and hosts in roles/ambari_state/files/blueprint.yml. This sample playbook simple executes the main task in the ambari_state role. See roles/ambari_state/tasks/main.yml for how to create, stop, start, and delete an ambari cluster.

ansible-playbook ambari_state.yml

Dependencies

This project uses the requests and pyyaml python packages.

ambari-ansible-module's People

Contributors

mbittmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

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.