Giter Club home page Giter Club logo

ansible-role-hadoop's Introduction

License CI

Hadoop Cluster Role

Installs and configure Hadoop system (version 2.X) in a cluster of nodes.

Role Variables

The variables that can be passed to this role and a brief description about them are as follows:

# The type of the node: slave or master or resourcemanager or nodemanager or datanode or namenode 
hadoop_type_of_node: slave
# Hadoop base directory to install the software
hadoop_home: /opt/hadoop-2.X
# List of servers to download the hadoop code
hadoop_mirrors: [ "http://mirror.cc.columbia.edu/pub/software/apache/hadoop/core/stable/",
		"http://ftp.osuosl.org/pub/apache/hadoop/core/stable/",
		"http://apache.rediris.es/hadoop/core/stable/",
		"http://apache.uvigo.es/hadoop/common/stable/" ]
# Hadoop version to install
hadoop_version: latest
# A dictionary with a set of properties to set in the core-site.xml
hdfs_props: {}
# A dictionary with a set of properties to set in the yarn-site.xml
yarn_props: {}
# List of slave nodes
hadoop_slave_nodes: "{{ groups['all']|map('extract', hostvars,'ansible_hostname')|list }}"

Example Playbook

This an example of how to install the Cluster:

In the "Worker Nodes"

  roles:
    - { role: 'grycap.hadoop', hadoop_master: 'MASTER_NODE_NAME_OR_IP' }

In the "Manager Node"

  roles:
    - { role: 'grycap.hadoop', hadoop_master: 'MASTER_NODE_NAME_OR_IP', hadoop_type_of_node: 'master'}

Contributing to the role

In order to keep the code clean, pushing changes to the master branch has been disabled. If you want to contribute, you have to create a branch, upload your changes and then create a pull request.
Thanks

ansible-role-hadoop's People

Contributors

amcaar avatar micafer avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-role-hadoop's Issues

Problem with "Set JAVA_HOME in hadoop-env.sh"

Hi,
There is a problem in the task "Set JAVA_HOME in hadoop-env.sh" on Ubuntu trusty.
The console log:

` TASK [grycap.hadoop : Set JAVA_HOME in hadoop-env.sh] **************************************************************************************************************************
fatal: [10.6.14.40]: FAILED! => {"msg": "No file was found when using with_first_found. Use the 'skip: true' option to allow this task to be skipped if no files are found"}
to retry, use: --limit @/Users/Zsomx/hadoop-installer---ansible/hadoop_namenode.retry

PLAY RECAP *********************************************************************************************************************************************************************
10.6.14.40 : ok=9 changed=7 unreachable=0 failed=1 `

My playbook is a simple one:
`- hosts: hadoop_namenode
become: yes
vars:
namenode_ip: 10.6.14.40
version: '2.9.0'
roles:

  • { role: 'grycap.hadoop', hadoop_master: '{{namenode_ip}}', hadoop_type_of_node: 'master', hadoop_version: '{{version}}' } `

Any suggestions?

Thanks!

Problem in the format step

The step

  • command: "{{ hadoop_home }}/bin/hdfs namenode -format creates=/tmp/hadoop-root/dfs/name"
    when: (hadoop_type_of_node == 'master') or (hadoop_type_of_node == 'namenode')

Uses as test the "/tmp/hadoop-root/dfs/name" directory, instead of the one provided in the hdfs_props collection (dfs.datanode.data.dir)

Example Playbook for 1 node master and 1 node slave

Hello ¿ could you write a simple example to create a playbook for 1 master and 1 node (sharing datanode, resourcenode, etc), in order to check if your ansible role works? Without ansible-galaxy?

- hosts: hadoop_namenode
   become: yes
   vars:
       namenode_ip: 192.168.10.10
       datanode_ip: 192.168.10.10
       version: '2.8.0'
   roles:
      { role: 'grycap.hadoop', hadoop_master: '{{namenode_ip}}', hadoop_type_of_node: 'master', hadoop_version: '{{version}}' }
      { role: 'grycap.hadoop', hadoop_master: '{{datanode_ip}}', hadoop_version: '{{version}}' }

Regards.

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.