Skip to content

LamNguy/cli-praas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages