Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aliartiza75/zookeeper-rest-api

Apache Zookeeper REST API
https://github.com/aliartiza75/zookeeper-rest-api

Last synced: 26 days ago
JSON representation

Apache Zookeeper REST API

Awesome Lists containing this project

README

        

# Zookeeper REST API
This repository contains endpoint to perform operation on the Apache Zookeeper.

## Endpoints
Its under development!

## Setup

Install the packages defined below for this project:

- python3+
- pip3 # python package manager

##### Install the project specific pakages:

Follow the steps given below to install the project specific packages

To use virtual enviornment for this project follow the steps given below, this is an `optional` step:

* To create virtual environment
```sh
$ virtualenv zk-env
```
* To activate virtual environment
```
$ source zk-env/bin/activate
```
* To deactivate the virtual environemnt
```sh
$ deactivate
```

```sh
$ cd ~/zookeeper-rest-api
$ pip3 install -r requirements.txt # install all packages defined in requirenments.txt file
$ pip3 freeze # to validate packeges have been installed
```

## To start server

To start the server use the command given below:

```
$ flask run --host=$FLASK_HOST_IP --port=$((FLASK_HOST_PORT))
```

* Starting Zookeeper REST API:
```bash
$ sudo docker run -it -e FLASK_ENV=development -e FLASK_HOST_IP=<0.0.0.0> -e FLASK_HOST_PORT=<5000> -e ZOOKEEPER_IP= -e ZOOKEEPER_PORT= -p 5000:5000 -d zookeeper-rest-api
```

* Starting Zookeeper REST API using UWsgi

uwsgi --wsgi-file app.py --callable app --http :5000

In the app folder app.py is being used by wsgi and __init__.py file is being used by flask run command

Refrences

* Riptutorials for configurations