Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
64033f1
Adding CouchIPC dependences
renerbaffa Jul 5, 2013
d94fb22
Creating README file with Couchbase instructions
renerbaffa Jul 5, 2013
be448f2
Adding couchbase dependences
renerbaffa Jul 5, 2013
753b48b
Connection data changed.
renerbaffa Jul 5, 2013
a1e1c3b
Add new Instructions
denisoliveira Jul 5, 2013
dcc6529
Merge branch 'master' of https://github.com/renerbaffa/RouteFlow
denisoliveira Jul 5, 2013
cb4c371
Inserting data on CouchBase
renerbaffa Jul 5, 2013
f9fa76c
Change CouchIPC send.
renerbaffa Jul 5, 2013
0ae0847
More bugs
denisoliveira Jul 6, 2013
5377558
Merge branch 'master' of https://github.com/renerbaffa/RouteFlow
denisoliveira Jul 6, 2013
2a27e73
Solving merge problems
renerbaffa Jul 6, 2013
ef51674
Fix Bugs
denisoliveira Jul 6, 2013
108c7cf
Instalation Server and Dev Libraries
denisoliveira Jul 6, 2013
9ec89ac
Update couchbase-dev.sh
viniciuskol Jul 6, 2013
a0619b7
Messages were translated to english
viniciuskol Jul 6, 2013
47fadfe
Messages were translated to english
viniciuskol Jul 6, 2013
ab1c04a
Create README-RouteFlow.md
viniciuskol Jul 6, 2013
fe109e7
Update README.md
viniciuskol Jul 6, 2013
32059ea
Update README.md
viniciuskol Jul 8, 2013
02a15b2
Update CouchIPC.py
denisoliveira Jul 9, 2013
f4c3f96
Resumo das alterações feitas
renerbaffa Jul 9, 2013
d6c570d
Merge branch 'master' of https://github.com/renerbaffa/RouteFlow
renerbaffa Jul 9, 2013
1a15941
Update Danilo_Denis_Eloisa_Rener_Vinicius.txt
denisoliveira Jul 9, 2013
df2f9d1
Update README.md
viniciuskol Jul 9, 2013
2c8470c
Adição das instruções das views
renerbaffa Jul 9, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions Danilo_Denis_Eloisa_Rener_Vinicius.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
RESUMO DE ATIVIDADES

- Criamos um script para instalação do Couchbase (é o arquivo 'couchbase-server.sh').
- Criamos um script para instalação da biblioteca e dependências para desenvolver com o Couchbase (é o arquivo 'couchbase-dev.sh').
- Criamos a classe CouchIPC.py (responsável pela conexão com o novo banco de dados e que substitui o MongoIPC.py).
- Retiramos as conversões de dados para/de bson para json (necessário no Mongo e não mais necessário).
- Alteramos as referências do rfserver e o rfproxy para utilizar o CouchIPC



Alteramos os arquivos necessários para fazer o script rftest2 funcionar com o novo BD.

Para funcionar, é necessário:

1 - Instalar o Couchbase (mais informações em <http://www.couchbase.com/download>).
2 - Criar um bucket com o nome 'routeflow' (pode ser outro nome. Mais instruções no passo 5).
3 - Instalar o Couchbase nos demais servidores que farão parte do cluster através da opção 'Join cluster now' (mais informações em http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-getting-started-setup.html>), adicionando usuário, senha e IP do servidor principal (aquele dos passos 1 e 2).
4 - O Couchbase possui uma interface (HTTP) para configuração e manipulação dos dados. Basta acessar o servidor local na porta 8091. Na aba 'Server Nodes', clicar em 'Rebalance' para balancear o uso de cada nó (mais informações em <http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-tasks-addremove-rebalance.html>).
5 - O arquivo rflib/defs.py possui os arquivos de configurações para conexão com o banco de dados. Lembre-se de colocar os IPs das máquinas em cluster na variável COUCH_HOST (exemplo: ["192.168.70.128", "192.168.70.129"]), o nome do Bucket criado na variável COUCH_BUCKET e o valor 0 na variável COUCH_INITIAL_VALUE (que é o valor inicial da chave do conteúdo que será inserido no BD).
6 - View
Para as pesquisas foram criadas views que consistem em funções de javascript para map dos dados dentro do CouchBase, as views são criadas dentro da interface web do CouchBase. Pode ser encontrado um guia para criação de view em <http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-views-types.html>
Foram criadas 2 views:
- com o nome "filter":
function (doc, meta) {
if (meta.type == "base64") {
emit("base64", doc)
}
else {
if (doc.read == false) {
emit(meta.id, doc);
}
}
}

- com o nome "all":
function (doc, meta) {
emit(meta.id, doc)
}

É necessário publicá-las (clicando em publish) para que o código tenha acesso à elas e funcione corretamente.
154 changes: 154 additions & 0 deletions README-RouteFlow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Welcome
This version of RouteFlow is a beta developers' release intended to evaluate RouteFlow for providing virtualized IP routing services on one or more OpenFlow switches.

You can learn more about RouteFlow in our [main page in GitHub](http://cpqd.github.com/RouteFlow/) and in our [website](https://sites.google.com/site/routeflow/).

Please be aware of POX, OpenFlow, Open vSwitch, Quagga, MongoDB, jQuery, JIT and RouteFlow licenses and terms.

# Distribution overview
RouteFlow is a distribution composed by three basic applications: RFClient, RFServer and RFProxy.

* RFClient runs as a daemon in the Virtual Machine (VM), detecting changes in the Linux ARP and routing tables. Routing information is sent to the RFServer when there's an update.

* RFServer is a standalone application that manages the VMs running the RFClient daemons. The RFServer keeps the mapping between the RFClient VM instances and interfaces and the corresponding switches and ports. It connects to RFProxy to instruct it about when to configure flows and also to configure the Open vSwitch to maintain the connectivity in the virtual environment formed by the set of VMs.

* RFProxy is an application (for POX and other controllers) responsible for the interactions with the OpenFlow switches (identified by datapaths) via the OpenFlow protocol. It listens to instructions from the RFServer and notifies it about events in the network. We recommend running POX when you are experimenting and testing your network. Other implementations in different controllers will be available soon.

There is also a library of common functions (rflib). It has implementations of the IPC, utilities like custom types for IP and MAC addresses manipulation and OpenFlow message creation.

Additionally, there's `rfweb`, an extra module that provides an web interface for RouteFlow.

```
The RouteFlow Architecture

+--------VM---------+
| Quagga | RFClient |
+-------------------+
\
M:1 \ RFProtocol
\
+-------------------+
| RFServer |
+-------------------+
\
1:1 \ RFProtocol
\
+-------------------+
| RFProxy |
|-------------------|
| Controller |
+-------------------+
\
1:N \ OpenFlow Protocol
\
+-------------------+
| OpenFlow Switch |
+-------------------+
```

# Building

RouteFlow runs on Ubuntu 12.04.

1. Install the dependencies:
```
sudo apt-get install build-essential git libboost-dev \
libboost-program-options-dev libboost-thread-dev \
libboost-filesystem-dev iproute-dev openvswitch-switch \
mongodb python-pymongo
```

2. Clone RouteFlow's repository on GitHub:
```
$ git clone git://github.com/CPqD/RouteFlow.git
```

3. Build `rfclient`
```
make rfclient
```

That's it! Now you can run tests 1 and 2. The setup to run them is described in the "Running" section.

# Running
The folder rftest contains all that is needed to create and run two test cases.

## Virtual environment
First, create the default LXC containers that will run as virtual machines:
```
$ cd rftest
$ sudo ./create
```
The containers will have a default ubuntu/ubuntu user/password combination. **You should change that if you plan to deploy RouteFlow**.

By default, the tests below will use the LXC containers created by the `create` script. You can use other virtualization technologies. If you have experience with or questions about setting up RouteFlow on a particular technology, contact us! See the "Support" section.

## Test cases

Default configuration files are provided for these tests in the `rftest` directory (you don't need to change anything).
You can stops them at any time by pressing CTRL+C.

### rftest1
1. Run:
```
$ sudo ./rftest1
```

2. You can then log in to the LXC container b1 and try to ping b2:
```
$ sudo lxc-console -n b1
```

3. Inside b1, run:
```
# ping 172.31.2.2
```

For more details on this test, see its [tutorial](https://github.com/CPqD/RouteFlow/wiki/Tutorial-1:-rftest1).

### rftest2
This test should be run with a [Mininet](http://mininet.org/) simulated network.
In the steps below, replace [guest address] with the IP address you use to access your Mininet VM.
The same applies to [host address], that should be the address to access the host from inside the VM.

1. Run:
```
$ sudo ./rftest2
```

2. Once you have a Mininet VM up and running, copy the network topology files in rftest to the VM:
```
$ scp topo-4sw-4host.py mininet@[guest address]:/home/mininet/mininet/custom
$ scp ipconf mininet@[guest address]:/home/mininet
```

3. Then start the network:
```
$ sudo mn --custom mininet/custom/topo-4sw-4host.py --topo=rftest2 --controller=remote,ip=[host address],port=6633 --pre=ipconf
```

Wait for the network to converge (it should take a few seconds), and try to ping:
```
mininet> pingall
...
mininet> h2 ping h3
```

For more details on this test, see its [tutorial](https://github.com/CPqD/RouteFlow/wiki/Tutorial-2:-rftest2).


# Now what?
If you want to use the web interface to inspect RouteFlow behavior, see the wiki page on [rfweb](https://github.com/CPqD/RouteFlow/wiki/The-web-interface).

If you want to create your custom configurations schemes for a given setup, check out the [configuration section of the first tutorial](https://github.com/CPqD/RouteFlow/wiki/Tutorial-1:-rftest1#configuration-file) and the guide on [how to create your virtual environment](https://github.com/CPqD/RouteFlow/wiki/Virtual-environment-creation).

If you're developing for RouteFlow, there are more advanced options and components that can be installed through the `build.sh` script. See its [source](https://github.com/CPqD/RouteFlow/blob/master/build.sh) for more information.


# Support
If you want to know more or need to contact us regarding the project for anything (questions, suggestions, bug reports, discussions about RouteFlow and SDN in general) you can use the following resources:
* RouteFlow repository [wiki](https://github.com/CPqD/RouteFlow/wiki) and [issues](https://github.com/CPqD/RouteFlow/issues) in GitHub

* Google Groups [mailing list](http://groups.google.com/group/routeflow-discuss?hl=en_US)

_RouteFlow - Copyright (c) 2012 CPqD_
175 changes: 46 additions & 129 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,154 +1,71 @@
# Welcome
This version of RouteFlow is a beta developers' release intended to evaluate RouteFlow for providing virtualized IP routing services on one or more OpenFlow switches.

You can learn more about RouteFlow in our [main page in GitHub](http://cpqd.github.com/RouteFlow/) and in our [website](https://sites.google.com/site/routeflow/).

Please be aware of POX, OpenFlow, Open vSwitch, Quagga, MongoDB, jQuery, JIT and RouteFlow licenses and terms.

# Distribution overview
RouteFlow is a distribution composed by three basic applications: RFClient, RFServer and RFProxy.

* RFClient runs as a daemon in the Virtual Machine (VM), detecting changes in the Linux ARP and routing tables. Routing information is sent to the RFServer when there's an update.

* RFServer is a standalone application that manages the VMs running the RFClient daemons. The RFServer keeps the mapping between the RFClient VM instances and interfaces and the corresponding switches and ports. It connects to RFProxy to instruct it about when to configure flows and also to configure the Open vSwitch to maintain the connectivity in the virtual environment formed by the set of VMs.

* RFProxy is an application (for POX and other controllers) responsible for the interactions with the OpenFlow switches (identified by datapaths) via the OpenFlow protocol. It listens to instructions from the RFServer and notifies it about events in the network. We recommend running POX when you are experimenting and testing your network. Other implementations in different controllers will be available soon.

There is also a library of common functions (rflib). It has implementations of the IPC, utilities like custom types for IP and MAC addresses manipulation and OpenFlow message creation.

Additionally, there's `rfweb`, an extra module that provides an web interface for RouteFlow.

```
The RouteFlow Architecture

+--------VM---------+
| Quagga | RFClient |
+-------------------+
\
M:1 \ RFProtocol
\
+-------------------+
| RFServer |
+-------------------+
\
1:1 \ RFProtocol
\
+-------------------+
| RFProxy |
|-------------------|
| Controller |
+-------------------+
\
1:N \ OpenFlow Protocol
\
+-------------------+
| OpenFlow Switch |
+-------------------+
```
# RouteFlow with Database in cluster mode

# Building
- Introduction
- What's new
- Installation
- Licensing/legal
- Feedback

RouteFlow runs on Ubuntu 12.04.

1. Install the dependencies:
```
sudo apt-get install build-essential git libboost-dev \
libboost-program-options-dev libboost-thread-dev \
libboost-filesystem-dev iproute-dev openvswitch-switch \
mongodb python-pymongo
```
# Introduction
This is a version of RouteFlow project managed by CPqD with better support to scalability through a DB in cluster mode. RouteFlow is an open source project to provide virtualized IP routing services over OpenFlow enabled hardware.

2. Clone RouteFlow's repository on GitHub:
```
$ git clone git://github.com/CPqD/RouteFlow.git
```
Minimum Requirements:
- CouchBase 2.0.1 or newer

3. Build `rfclient`
```
make rfclient
```
Recommended Requirements:
- CouchBase 2.0.1

That's it! Now you can run tests 1 and 2. The setup to run them is described in the "Running" section.
Source: https://github.com/renerbaffa/RouteFlow

# Running
The folder rftest contains all that is needed to create and run two test cases.

## Virtual environment
First, create the default LXC containers that will run as virtual machines:
```
$ cd rftest
$ sudo ./create
```
The containers will have a default ubuntu/ubuntu user/password combination. **You should change that if you plan to deploy RouteFlow**.
# What's New

By default, the tests below will use the LXC containers created by the `create` script. You can use other virtualization technologies. If you have experience with or questions about setting up RouteFlow on a particular technology, contact us! See the "Support" section.
This release sees some significant advances in the RouteFlow project.
Notable changes are:

## Test cases
- Couchbase as new Database Management System.
- Support for use RouteFlow with DB in cluster mode.
- Improved scalability of RouteFlow.
- Scripts to install Couchbase and development libraries.
- MongoIPC class was replaced for CouchIPC class. CouchIPC class is responsable for management of connection with Database.
- Conversion from BSon (Binary JSON) to JSON was removed, because this conversion it isn't necessary in Couchbase.
- References for MongoIPC class were changed to CouchIPC class.
- Script rftest2 was updated to use CouchIPC.

Default configuration files are provided for these tests in the `rftest` directory (you don't need to change anything).
You can stops them at any time by pressing CTRL+C.

### rftest1
1. Run:
```
$ sudo ./rftest1
```
# Installation

2. You can then log in to the LXC container b1 and try to ping b2:
```
$ sudo lxc-console -n b1
```
## Manual Installation

3. Inside b1, run:
```
# ping 172.31.2.2
```
1. Download and install Couchbase Server <http://www.couchbase.com/download> on main server. Also, you can run script ```couchbase-server.sh``` to download and install Couchbase server.

For more details on this test, see its [tutorial](https://github.com/CPqD/RouteFlow/wiki/Tutorial-1:-rftest1).
2. Start Couchbase Server, create a bucket with name 'routeflow' and desired configurations.

### rftest2
This test should be run with a [Mininet](http://mininet.org/) simulated network.
In the steps below, replace [guest address] with the IP address you use to access your Mininet VM.
The same applies to [host address], that should be the address to access the host from inside the VM.

1. Run:
```
$ sudo ./rftest2
```

2. Once you have a Mininet VM up and running, copy the network topology files in rftest to the VM:
```
$ scp topo-4sw-4host.py mininet@[guest address]:/home/mininet/mininet/custom
$ scp ipconf mininet@[guest address]:/home/mininet
```

3. Then start the network:
```
$ sudo mn --custom mininet/custom/topo-4sw-4host.py --topo=rftest2 --controller=remote,ip=[host address],port=6633 --pre=ipconf
```

Wait for the network to converge (it should take a few seconds), and try to ping:
```
mininet> pingall
...
mininet> h2 ping h3
```
3. Install Couchbase Server on others servers and choose ```Join Cluster Now```. Set the following data: ```user```, ```password``` and ```main server ip address```. If you have any questions, you can follow this manual: <http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-getting-started-setup.html>

For more details on this test, see its [tutorial](https://github.com/CPqD/RouteFlow/wiki/Tutorial-2:-rftest2).
4. Access Couchbase's administration, go to ```Server Nodes``` and click ```Rebalance``` to optimize all servers. More information are available in: <http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-tasks-addremove-rebalance.html>

5. Setup the file ```rflib/defs.py``` with following data: bucket's name (variable: ```COUCH_BUCKET```); list of all servers in cluster mode (variable: ```COUCH_HOST```, example: ```["192.168.70.128", "192.168.70.129"]```); set variable ```COUCH_INITIAL_VALUE``` with ```0```.

# Now what?
If you want to use the web interface to inspect RouteFlow behavior, see the wiki page on [rfweb](https://github.com/CPqD/RouteFlow/wiki/The-web-interface).
6. Run script ```couchbase-dev.sh``` to install Development libraries.

If you want to create your custom configurations schemes for a given setup, check out the [configuration section of the first tutorial](https://github.com/CPqD/RouteFlow/wiki/Tutorial-1:-rftest1#configuration-file) and the guide on [how to create your virtual environment](https://github.com/CPqD/RouteFlow/wiki/Virtual-environment-creation).
7. Create views in Couchbase, for more information: <http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-views-types.html>

If you're developing for RouteFlow, there are more advanced options and components that can be installed through the `build.sh` script. See its [source](https://github.com/CPqD/RouteFlow/blob/master/build.sh) for more information.

# Licensing/Legal

# Support
If you want to know more or need to contact us regarding the project for anything (questions, suggestions, bug reports, discussions about RouteFlow and SDN in general) you can use the following resources:
* RouteFlow repository [wiki](https://github.com/CPqD/RouteFlow/wiki) and [issues](https://github.com/CPqD/RouteFlow/issues) in GitHub
This version is released under the Apache License, Version 2.0.
The License can be found here: http://www.apache.org/licenses/LICENSE-2.0

* Google Groups [mailing list](http://groups.google.com/group/routeflow-discuss?hl=en_US)

_RouteFlow - Copyright (c) 2012 CPqD_
# Feedback

If you find a problem, obsolete or improper code or such, please let us know by contacting us.
Suggestions and corrections are welcome. Below are contacts of the authors of this project.

- Danilo Pinto da Silva ( *danilo.silva (at) dc.ufscar.br* )
- Denis Wilson de Souza Oliveira ( *denis.oliveira (at) dc.ufscar.br* )
- Eloisa Cristina Silva Santos ( *eloisa.santos (at) dc.ufscar.br* )
- Rener Baffa da Silva ( *rener.silva (at) dc.ufscar.br* )
- Vinícius Afonso Raimundo Ferreira ( *vinicius.ferreira (at) dc.ufscar.br* )
Loading