Giter VIP home page Giter VIP logo

docker-hadoop-secure's Introduction

Apache Hadoop 2.7.1 Docker image with Kerberos enabled

Docker Pulls Software License

This project is a fork from sequenceiq hadoop-docker and extends it with Kerberos enabled. With docker-compose 2 containers get created, one with MIT KDC installed and one with a single node kerberized Hadoop cluster.

The Docker image is also available on Docker Hub.

Versions

  • JDK8
  • Hadoop 2.7.1
  • Maven 3.5.0

Default Environment Variables

Name Value Description
KRB_REALM EXAMPLE.COM The Kerberos Realm, more information here
DOMAIN_REALM example.com The Kerberos Domain Realm, more information here
KERBEROS_ADMIN admin/admin The KDC admin user
KERBEROS_ADMIN_PASSWORD admin The KDC admin password
KERBEROS_ROOT_USER_PASSWORD password The password of the Kerberos principal root which maps to the OS root user

You can simply define these variables in the docker-compose.yml.

Run image

Clone the Github project and run

docker-compose up -d

Usage

Get the container name with docker ps and login to the container with

docker exec -it <container-name> /bin/bash

To obtain a Kerberos ticket, execute

kinit

where you will get prompted to enter your password. Afterwards you can use hdfs CLI like

hdfs dfs -ls /

Known issues

Unable to obtain Kerberos password

Error

docker-compose up fails for the first time with the error

Login failure for nn/[email protected] from keytab /etc/security/keytabs/nn.service.keytab: javax.security.auth.login.LoginException: Unable to obtain password from user

Solution

Stop the containers with docker-compose down and start again with docker-compose up -d.

JDK 8

Make sure you use download a JDK version that is still available. Old versions can be deprecated by Oracle and thus the download link won't be able anymore.

Get the latest JDK8 Download URL with

curl -s https://lv.binarybabel.org/catalog-api/java/jdk8.json

Java Keystore

If the Keystroe has been expired, then create a new keystore.jks:

  1. create private key
openssl genrsa -des3 -out server.key 1024
  1. create csr
openssl req -new -key server.key -out server.csr`
  1. remove passphrase in key
cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
  1. create self-signed cert
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
  1. create JKS and import certificate
keytool -import -keystore keystore.jks -alias CARoot -file server.crt`

docker-hadoop-secure's People

Contributors

akanto avatar cglewis avatar gliptak avatar itsmeolivia avatar keyki avatar kliewkliew avatar knappek avatar lalyos avatar lresende avatar mhmxs avatar paoloantinori avatar smola avatar sroegner avatar thataustin avatar

Stargazers

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

Watchers

 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.