Skip to content

Commit

Permalink
Merge branch 'master' into release/2.1rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus Vinicius Goncalves Cesario committed Apr 2, 2015
2 parents 6cdeaab + 9f6a22b commit 807b9fd
Show file tree
Hide file tree
Showing 20 changed files with 561 additions and 84 deletions.
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[submodule "cookbooks/mysql"]
path = cookbooks/mysql
url = https://github.com/opscode-cookbooks/mysql.git
[submodule "cookbooks/yum-mysql-community"]
path = cookbooks/yum-mysql-community
url = https://github.com/opscode-cookbooks/yum-mysql-community.git
[submodule "cookbooks/yum"]
path = cookbooks/yum
url = https://github.com/opscode-cookbooks/yum.git
[submodule "cookbooks/apt"]
path = cookbooks/apt
url = https://github.com/opscode-cookbooks/apt.git
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: python
python:
- "2.7"
services: mysql
env:
# - DJANGO=1.2.7
# - DJANGO=1.3.1
- DJANGO=1.3.1
install:
- pip install -q requirements.txt
- pip install -q requirements_test.txt
before_script:
# - "pep8 --exclude=migrations --ignore=E501,E225 src"
# - pyflakes -x W src
- mysql -e 'create database telecom;'
- python manage.py syncdb --noinput
script:
- python manage.py test
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,33 @@
GloboNetworkAPI
===============

API to automate IP Networking documentation, resource allocation and provisioning.
Globo NetworkAPI is a REST API that manages IP networking resources. It is supposed to be not just an IPAM, but a centralized point of network control, allowing documentation from physical and logical network and starting configuration requests to equipments.

Globo NetworkAPI is made to support a Web User Interface features, exposing its funcionality to be used with any other client.

This web tool helps network administrator manage and automate networking resources (routers, switches and load balancers) and document logical and physical networking.

They were created to be vendor agnostic and to support different orquestrators and environments without loosing the centralized view of all network resources allocated.

It was not created to be and inventory database, so it does not have CMDB functionalities.

## Features

* LDAP authentication
* Supports cabling documentation (including patch-panels/DIO’s)
* Separated Layer 2 and Layer 3 documentation (vlan/network)
* IPv4 and IPv6 support
* Automatic allocation of Vlans, Networks and IP’s
* ACL (access control list) automation (documentation/versioning/applying)
* Load-Balancer support
* Automated deploy of allocated resources on switches, routers and load balancers
* Load balancers management
* Expandable plugins for automating configuration

## Documentation
[Documentation](http://globonetworkapi.readthedocs.org/)

## Authors
[Authors](./AUTHORS.md)


26 changes: 26 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hashicorp/precise32"
config.vm.network "private_network", ip:"10.0.0.2"

config.omnibus.chef_version = :latest
config.vm.provision :chef_solo do |chef|
chef.add_recipe "apt"
chef.add_recipe "mysql::server"
chef.json = {
:mysql => {
server_root_password: "password",
server_repl_password: "password",
server_debian_password: "password",
port: '3306',
package_version: '5.6',
data_dir: '/data-mysql',
allow_remote_root: true,
remove_anonymous_Users: true,
remove_test_database: true,
}
}
end
config.vm.provision :shell, path: "vagrant_provision.sh"
end
1 change: 1 addition & 0 deletions cookbooks/apt
Submodule apt added at f9171b
1 change: 1 addition & 0 deletions cookbooks/mysql
Submodule mysql added at b1c9c3
1 change: 1 addition & 0 deletions cookbooks/yum
Submodule yum added at e6d306
1 change: 1 addition & 0 deletions cookbooks/yum-mysql-community
Submodule yum-mysql-community added at fa7934
78 changes: 78 additions & 0 deletions dev/load_example_environment.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
-- load_example_environment.sql
--
-- Script for load into your database the environment used for documentation examples
--
-- Host: localhost Database: telecom
--
-- Current Database: `telecom`
--
-- ----------------------------------------------------------------------------------


-- Dumping data for table `ambiente_logico`
INSERT INTO `ambiente_logico` VALUES (11,'AMBIENTE_LOGICO_RED'),(12,'AMBIENTE_LOGICO_BLUE'),(13,'AMBIENTE_LOGICO_GREEN'),(14,'AMBIENTE_LOGICO_YELLOW'),(15,'AMBIENTE_LOGICO_ORANGE');


-- Dumping data for table `divisao_dc`
INSERT INTO `divisao_dc` VALUES (21,'DIVISAO_DC_RED'),(22,'DIVISAO_DC_BLUE'),(23,'DIVISAO_DC_GREEN'),(24,'DIVISAO_DC_YELLOW'),(25,'DIVISAO_DC_ORANGE');


-- Dumping data for table `grupo_l3`
INSERT INTO `grupo_l3` VALUES (31,'GRUPO_L3_RED'),(32,'GRUPO_L3_BLUE'),(33,'GRUPO_L3_GREEN'),(34,'GRUPO_L3_YELLOW'),(35,'GRUPO_L3_ORANGE');


-- Dumping data for table `filter`
INSERT INTO `filter` VALUES (1,'Servidores','Servidores');


-- Dumping data for table `ambiente`
INSERT INTO `ambiente` VALUES (1,31,11,21,' http://globonetworkapi.readthedocs.org/en/latest/definitions.html#environment','Red',NULL,NULL,NULL,11,20,NULL,NULL),(2,32,12,22,'http://globonetworkapi.readthedocs.org/en/latest/definitions.html#environment','Blue',NULL,NULL,NULL,21,30,NULL,NULL),(3,33,13,23,'http://globonetworkapi.readthedocs.org/en/latest/definitions.html#environment','Green',NULL,NULL,NULL,31,31,NULL,NULL),(4,34,14,24,'http://globonetworkapi.readthedocs.org/en/latest/definitions.html#environment','Yellow',NULL,NULL,NULL,20,20,NULL,NULL),(5,35,15,25,' http://globonetworkapi.readthedocs.org/en/latest/definitions.html#environment','Orange',NULL,NULL,NULL,15,19,21,40);


-- Dumping data for table `marcas`
INSERT INTO `marcas` VALUES (1,'MARCA');


-- Dumping data for table `tipo_equipamento`
INSERT INTO `tipo_equipamento` VALUES (1,'Switch'),(2,'Servidor'),(3,'Roteador');


-- Dumping data for table `tipo_rede`
INSERT INTO `tipo_rede` VALUES (2,'Ponto a ponto'),(6,'Rede invalida equipamentos'),(7,'Rede invalida NAT'),(8,'Rede invalida VIP'),(9,'Rede valida equipamentos'),(10,'Rede valida NAT'),(11,'Rede valida VIP');


-- Dumping data for table `modelos`
INSERT INTO `modelos` VALUES (1,'MODELO',1);


-- Dumping data for table `ip_config`
INSERT INTO `ip_config` VALUES (1,'172.16.0.5/24','24','v4',2),(2,'10.0.0.5/24','24','v4',2),(3,'192.168.0.0/30','30','v4',2),(4,'192.168.1.0/30','30','v4',2);


-- Dumping data for table `vlans`
INSERT INTO `vlans` VALUES (1,'Vlan 31',31,3,'','',1,1,NULL,0),(2,'Vlan 20',20,4,'','',1,1,NULL,0),(3,'Vlan 11',11,1,'','',1,1,NULL,0),(4,'Vlan 21',21,2,'','',1,1,NULL,0),(5,'Vlan 22',22,2,'','',1,1,NULL,0),(6,'Vlan 21',21,5,'','',1,1,NULL,0),(7,'Vlan 15',15,5,'','',1,1,NULL,0);


-- Dumping data for table `equipamentos`
INSERT INTO `equipamentos` VALUES (1,1,1,'Switch R1'),(2,1,1,'Switch R2'),(3,1,1,'Switch R3'),(4,1,1,'Switch B1'),(5,1,1,'Switch B2'),(6,1,1,'Switch B3'),(7,1,1,'Switch 01'),(8,1,1,'Switch 02'),(9,1,1,'Switch 03'),(10,3,1,'SR1'),(11,3,1,'SR2'),(12,3,1,'Router'),(13,2,1,'Server S1');


-- Dumping data for table `ambientevip`
INSERT INTO `ambientevip` VALUES (1,'Red','Red','Red'),(2,'Red','Blue','red'),(3,'Red','Green','Red'),(4,'Red','Yellow','Red'),(5,'Red','Orange','Red'),(6,'Blue','Red','Red'),(7,'Blue','Blue','Red'),(8,'Blue','Blue','Blue'),(9,'Green','Green','Green'),(10,'Yellow','Yellow','Yellow'),(11,'Orange','Orange','Orange');


-- Dumping data for table `redeipv4`
INSERT INTO `redeipv4` VALUES (1,1,192,168,0,0,30,255,255,255,0,2,'192.168.0.3',NULL,0),(2,2,192,168,1,0,30,255,255,255,0,2,'192.168.1.3',NULL,0),(3,4,172,16,0,5,24,255,255,255,0,2,'172.16.0.255',NULL,0),(4,7,10,0,0,5,30,255,255,255,0,2,'10.0.0.255',NULL,0);


-- Dumping data for table `ips`
INSERT INTO `ips` VALUES (1,1,0,168,192,'SR1',1),(2,2,0,168,192,'Router',1),(3,1,1,168,192,'Router',2),(4,2,1,168,192,'SR2',2),(5,6,0,16,172,'Server S1',3),(6,6,0,0,10,'Server S1',4);


-- Dumping data for table `ips_dos_equipamentos`
INSERT INTO `ips_dos_equipamentos` VALUES (1,1,10),(2,2,12),(3,3,12),(4,4,11),(5,5,13),(6,6,13);





1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Contents:
:maxdepth: 2

about
preprovisioned
install
definitions
faq
Expand Down
40 changes: 40 additions & 0 deletions docs/preprovisioned.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Pre-provisioned Server
######################

The pre provisioned Globo NetworkAPI server uses Vagrant with a Hashicorp Ubuntu 32 bit server.

You can test it locally using this server. We don't recommend running this server in a production environment.

Root password for MySQL database is "password".

GloboNetworkAPI admin user password is "default".

By default, the server will use IP 10.0.0.2/24 in a local network. If this settings conflict with you network environment, you can modify it in the "Vagrantfile", in root directory.

Requirements
************

- [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
- [Vagrant](http://www.vagrantup.com/downloads.html) with vagrant Omnibus plugin
```bash
vagrant plugin install vagrant-omnibus)
```
- [Git](http://git-scm.com/downloads)


Setting up the VM
*****************

Execute the following commands:

```bash
$ git clone https://github.com/globocom/GloboNetworkAPI
$ cd GloboNetworkAPI
$ vagrant up
```

The GloboNetworkAPI will be available locally at http://10.0.0.2:8000

The gunicorn logs are at /tmp/gunicorn-*

The Django logs are at /tmp/networkapi.log
Loading

0 comments on commit 807b9fd

Please sign in to comment.