Skip to content

btbytes/tentacool

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tentacool

Build Status Go Walker Go report

Description

tentacool is a Go server controlled via RESTful API through a Unix Domain Socket.

Goal

Main goal is to manage all under the hood services for a simple "box". All done with a auditable, fast and bulletproof software.

So many software do frontend, backend and system... And finally run in root by easiness.

To build

Be sure to set the correct GOPATH and GOROOT environment variables. You can make use of godeb which set you up with the version of Go you want. (Tentacool is using >= 1.2)

Build Tentacool using gb.

An automatic of the executable from master branch can also be found on drone.io.

How-to GB

# Get GB
go get github.com/constabulary/gb/...
# Fetch dependencies
gb vendor restore
# Build tentacool
gb build
./bin/tentacool -help

Configuration

Recommended /etc/network/interfaces config for your default interface (for instance eth0):

auto eth0
iface eth0 inet manual
  pre-up ifconfig $IFACE up
  post-down ifconfig $IFACE down

API

addresses

address object

  • link: interface to manage
  • ip: ip to add (CIDR format)
  • id

GET /addresses

List all current addresses

Response

GET /addresses/:id

Response

POST /addresses

Add a new address to manage.

parameters
Response
  • address
  • headers
    • X-Error: if address is stored in BD but fail to by apply.
Example
  • without id
==>
{
  "link":"eth0",
  "ip":"192.168.32.11/32",
}
<==
{
  "id":"1",
  "link":"eth0",
  "ip":"192.168.32.11/32",
}
  • with id
==>
{
  "id":"foo",
  "link":"eth0",
  "ip":"192.168.32.12/32",
}
<==
{
  "id":"foo",
  "link":"eth0",
  "ip":"192.168.32.12/32",
}

PUT /addresses/:id

Modify an existing address

parameters
Response
  • address
  • headers
    • X-Error: if address is stored in BD but fail to by apply.

dhcp

GET /dhcp

Checks if DHCP is running on the default interface.

Response

{'active': true|false}

POST /dhcp

Activate/deactive DHCP for default interface.

parameters
  • active true or false

About

REST API to manage Linux networking via netlink

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%