Code Monkey home page Code Monkey logo

livy-reverse-proxy's Introduction

Livy Reverse Proxy Server

This project is a simple TCP reverse proxy server, able to forward from IP:Port such as 127.0.0.1:8998 to an internal or external IP:Port. The server is configured using the Apache Shiro security framework, allowing for user authentication through Shiro's INI configuration.

Image

At Involve Asia, we use the ProxyUser that associated with IAM Role to grant access to EMRFS based on the authenticated user.

Prerequisites

  • Python 3.7+
  • Apache Zeppelin with Shiro Authentication
  • Apache Livy

Setup and Configuration

Please note that by default, this project should work right of the box with AWS EMR. You may need to use this guideline to configure the Livy

Clone this repository from the Master EC2 machine :

cd /home/hadoop/
git clone https://github.com/mahadirz/livy-reverse-proxy
cd livy-reverse-proxy

Before you can run the server, you'll need to set up your Shiro INI configuration file. You can do this by editing the shiro.ini file in the /etc/zeppelin/conf/ directory.

Running the Server You can run the server with the following command:

python proxy.py

The server will listen on 0.0.0.0:8998 and forward to 127.0.0.1:8999 by default.

Customizing the Server

You can customize the server's configuration through command-line arguments:

  • --server_address: the IP and port the server will listen on. Default is 0.0.0.0:8998.
  • --forward_to: the IP and port the server will forward to. Default is 127.0.0.1:8999.
  • --shiro_path: the path to the Shiro INI file. Default is /etc/zeppelin/conf/shiro.ini.
  • --log_level: the logging level. Default is INFO.

For example, to run the server on 192.168.1.2:8000 and forward to 192.168.1.3:9000, you would use the following command:

python proxy.py --server_address 192.168.1.2 8000 --forward_to 192.168.1.3 9000

To automatically

sudo cp proxy.service /usr/lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable proxy
sudo service proxy start

Contributing

Please feel free to submit issues, fork the repository and send pull requests!

livy-reverse-proxy's People

Contributors

mahadirz avatar

Watchers

 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.