Coder Social home page Coder Social logo

cli-praas's Introduction

Proxy as a Service - Thesis graduation project

CLI tool for PRaaS

The project separated into two part, including Proxy CLI and Proxy as a Service (PRaaS) and the part here is for Proxy CLI. Proxy CLI is a tool which use a command-line to send operations request to PRaaS. CLI use keystone api of OpenStack for authorization and authentication. So the administrator login with username and password similar as OpenStack and use menu options it provide. CLI is designed that can be installed a remote pc withc can ping to both controller and PRaaS. In thesis, it will be installed on the controller node OpenStack to satisfy the requirement.

Features

  • Operations for PAT (creating, removing, modifying)
  • Manage PAT information on project routers in OpenStack
  • Change user, project in OpenStack (just support for convenience)

1. Prerequisite

  • Python virtual environment such as virtualenv or anaconda. (optional)
  • Python >= 2.7

2. Installation

CLI use python interpreter in the current environment. Use virtual environment is a safe and low-risk aprroach for not conflicting and the virtual python interpreter will be choosen. The guide using tool python virtualenv for creating environment. A recommend that if CLI and PraaS services are installed on same location so it's effective to use only one environment. Install virtualenv

$ pip install virtualenv

Create virtual python env

$ virtualenv myenv

Activate env

$ source myenv/bin/activate

Deactivate env

$ deactivate

Clone the project

$ git clone https://github.com/LamNguy/cli-praas 

Install packages

$ cd cli-praas
$ pip install -e .

If the install fail due to missing package "pbr", install it and re-run install packages

$ pip install pbr

3. Configuration

CLI is a portable tool and needing edit config file on config/proxy_config. File config/clouds.yaml is used for testing, so ignore it.

# config authentication
[config]
user_domain_name = Default
project_domain_name = Default
auth_url = http://controller:5000/v3  #ip or hostname of controller
region_name = RegionOne

# config api url to PAT agent
[api]
# default PRaaS is installed on controller node because neutron server are installed on it
# if neutron l3-agent are installed on difference node, so change the url.
remove_pat = http://controller:3000/pat/remove
router_server_pat = http://controller:3000/router_server_pat
create_pat = http://controller:3000/pat/create
modify_pat = http://controller:3000/pat/modify
router_pat = http://controller:3000/router_pat

4. Run CLI

$ cli-proxy

5. Note

CLI will generate log file in the directory cli-praas directory.

cli-praas's People

Contributors

lamnguy avatar

Stargazers

 avatar

Watchers

 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.