Giter Site home page Giter Site logo

cloudxtreme / cloud-vswitch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bu-nu-cloud-sp16/cloud-vswitch

0.0 1.0 0.0 96.26 MB

Cloud vSwitch - VPN as a Service

Home Page: http://bu-nu-cloud-sp16.github.io/Cloud-vSwitch/

License: GNU General Public License v3.0

Shell 1.26% JavaScript 80.25% CSS 1.88% HTML 10.37% Batchfile 0.08% ApacheConf 6.16%

cloud-vswitch's Introduction

Cloud vSwitch

Table of Contents

Introduction

Cloud vSwitch Project seeks to provide a secure and streamlined IT independent VPN as a service in the cloud, targeted to organizations with no IT department or users without VPN experience.

Features

Architecture

portal

Key Designs

  • vSwitch Portal
    Cloud vSwitch portal is a key point in the architecture. It allows users to easily create an organization and setup a VPN environment with a few clicks. It is a fully responsive web App built with AngularJS and Bootstrap.

  • vSwitch API
    vSwitch API is a RESTful API to support all Cloud vSwitch operations. We took advantage of Sails.js, a framework that makes it easy to build custom Node.js apps.

  • OpenVPN
    To provide a stable VPN service, we choose to adopt OpenVPN as our choice of VPN service provider. Why build a VPN tool from ground when we already have open source solutions?

  • Instances and vSwitch instance
    Difference between these two terms are "vSwitch instance" is actually the virtual machine that provides the service in the cloud. "Instance" is just simple virtual machine and later it can support any local senstive service such as NFS.

Users and Organizations

Organization

  • Cross-platform applications
    Usage of the VPN as a Service is cross-platform, which means you can access from any main distribution of OS, OS X, Linux, and Windows.

dif-distro

Installation

Prerequisies

Before you start the default install process, make sure you have access to npm, git and bower.

The deployment of Cloud vSwitch requires a cloud environment and a portal to place your own vSwitch portal. After the deployment, you can easily and directly get access to the virtual LAN in the cloud!

Preparing the system (Ubuntu)

$ sudo apt-get update
$ sudo apt-get install build-essential git
$ curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
$ sudo apt-get install -y nodejs

Creating Openssl CA

$ git clone https://github.com/BU-NU-CLOUD-SP16/Cloud-vSwitch.git
$ cd CA
$ sh ca.sh

This will generate cacert.pem, cakey.pem and dh files required by Cloud vSwitch API

Set up MongoDB database

$ sudo apt-get install mongodb-server

Also, Cloud vSwitch can use services like mongolab. It only requires to set the proper env variable as shown below.

Setup the vSwitch API

$ git clone https://github.com/BU-NU-CLOUD-SP16/Cloud-vSwitch.git
$ cd vSwitch-API
$ npm install

# setup environment variables
##  CA 
$ export CACERT=`cat cacert.pem`
$ export CAKEY=`cat cakey.pem`
$ export DH=`cat dh.pem`

## Mongo
$ export MONGO_URI='mongodb://user@host:port/database'

## MOC
$ export MOC_USER='[email protected]'
$ export MOC_PASSWORD='xxxxxxx'
$ export MOC_TENANT='xxxxxxx'
$ export MOC_NETWORK='xxxxxxx'

## Email
$ export SENDGRID_API='xxxxxxx'
$ export SENGRID_FROM='[email protected]'
## App
$ export TOKEN_SECRET='xxxxxxxx'
$ export UI_ENDPOINT='https://...'

To deploy the API, run:

$ npm start

Setup and configure the vSwitch Portal, aka UI

$ git clone https://github.com/BU-NU-CLOUD-SP16/Cloud-vSwitch.git
$ cd vSwitch-UI
$ npm install

Update API endpoint

$ vim app/scripts/app.js
  var endpoint = 'https://xxxxxx';

To run:

$ sudo node index.js

Generate Client Apps

$ npm install electron-packger
$ git clone https://github.com/BU-NU-CLOUD-SP16/Cloud-vSwitch.git
$ cd vSwitch-Client
$ sh build

Documentation

One important part of Cloud vSwitch is the vSwitch API. Taking advantage of Sails.js, RESTful API is automated generated and ready to use.

For possible search or trouble with API design philosophy, see REST API doc

Usage

After successfully setting up the vSwitch API and launching the vSwitch Portal, now you are able to visit the web portal and start to manage your Cloud!

  1. Register and create your organization.
  2. Choose the platform you are working on and follow the client side application process.
  3. Now you should be able to both access and modify. The dashboard should be working, too.

Automated Tests

Note: this part is implemented but combined and released on April 26, 2016

Requirements:

$ npm install newman

Run:

$ newman -c collection.json -e env.json -h report html

This will allow the deployment sending email to the destionation address, e.g. the deploy party. In case some modification or release error occurred.

One simple thing to point out is that: Travis.CI is easy to use and Github enable its webhooks, it is also the way we do our release tests.

Possible future extensions

In this final release of the project, Cloud vSwitch just enables a virtual LAN inside the cloud environment. In this case, users can only have access to the cloud resources via VPN. One good question is, is there any area this kind of VPN service is needed? The answer is yes, as the data center, private cloud or hybrid cloud are envolving, connecting is becoming much more important, expecially connections with the ability of network isolation. Comparing to IPsec or other tunneling technologies, VPN has its stength and limitations. Can we adopt this Cloud vSwitch kind of idea to large scale systems? If positive, how can we achieve it? If not, what are those limitations causing it?

Contributors

Cloud vSwitch Team:

Javier Arguello: jas91[at]bu.edu
Shuwen Sun: shwsun[at]bu.edu
Xuanyi Chen: troychen[at]bu.edu
Varshith Hakkithimmanahalli Anilkumar: varshith[at]bu.edu

Mentors:

Karl Redgate

License

The license is GPLv3 for all parts specific to Cloud vSwitch, this includes:

  • the core files
  • the documentation

Copyright (C) 2016-2017 by Cloud vSwitch(See Contributors).

Cloud vSwitch is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Cloud vSwitch is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Cloud vSwitch.  If not, see <http://www.gnu.org/licenses/>.

cloud-vswitch's People

Contributors

chris-void avatar jarguellososa avatar jas91 avatar jethrosun avatar troyxuanyichen avatar varshithkumar 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.