Skip to content

Evsio0n/alice-lg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alice-LG - Your friendly looking glass

"No, no! The adventures first, explanations take such a dreadful time."
Lewis Carroll, Alice's Adventures in Wonderland & Through the Looking-Glass

Take a look at an Alice-LG production example:

Alice has moved

We decided to move Alice into it's own Github organisation.

Future development is taking place here: https://github.com/alice-lg/alice-lg

Explanations

Alice-LG is a BGP looking glass which gets its data from external APIs.

Currently Alice-LG supports the following APIs:

Normally you would first install the birdwatcher API directly on the machine(s) where you run BIRD on and then install Alice-LG on a seperate public facing server and point her to the afore mentioned birdwatcher API.

This project was a direct result of the RIPE IXP Tools Hackathon just prior to RIPE73 in Madrid, Spain.

Major thanks to Barry O'Donovan who built the original INEX Bird's Eye BIRD API of which Alice-LG is a spinnoff

Building Alice-LG from scratch

These examples include setting up your Go environment, if you already have set that up then you can obviously skip that

In case you have trouble with npm and gulp you can try using yarn.

CentOS 7:

First add the following lines at the end of your ~/.bash_profile:

GOPATH=$HOME/go
export GOPATH
PATH=$PATH:$GOPATH/bin
export PATH

Now run:

source ~/.bash_profile

# Install frontend build dependencies
sudo yum install golang npm
sudo npm install --global gulp-cli

go get github.com/GeertJohan/go.rice
go get github.com/GeertJohan/go.rice/rice
mkdir -p ~/go/bin ~/go/pkg ~/go/src/github.com/ecix/

cd ~/go/src/github.com/ecix
git clone https://github.com/ecix/alice-lg.git

cd alice-lg
make

Your Alice-LG source will now be located at ~/go/src/alice-lg and your alice-LG executable should be at ~/go/src/alice-lg/bin/alice-lg-linux-amd64

Configuration

An example configuration can be found at etc/alicelg/alice.example.conf.

You can copy it to any of the following locations:

etc/alicelg/alice.conf        # local
etc/alicelg/alice.local.conf  # local
/etc/alicelg/alice.conf       # global

You will have to edit the configuration file as you need to point Alice-LG to the correct APIs:

[source.0]
name = rs1.example.com (IPv4)
[source.0.birdwatcher]
api = http://rs1.example.com:29184/
# show_last_reboot = true
# timezone = UTC

[source.1]
name = rs1.example.com (IPv6)
[source.1.birdwatcher]
api = http://rs1.example.com:29186/

Running

Launch the server by running

./bin/alice-lg-linux-amd64

Deployment

We added a Makefile for packaging Alice as an RPM using fpm.

If you have all tools available locally, you can just type:

make rpm

If you want to build the package on a remote machine, just use

make remote_rpm BUILD_SERVER=my-rpm-building-server.example.com

which will copy the dist to the remote server and executes fpm via ssh.

You can specify which system integration to use: Set the SYSTEM_INIT variable to upstart or systemd (default) prior to building the RPM.

make remote_rpm BUILD_SERVER=rpmbuild.example.com SYSTEM_INIT=upstart

Hacking

The client is a Single Page React Application. All sources are available in client/.

Install build tools as needed:

npm install -g gulp-cli

Create a fresh UI build with

cd client/
make client

This will install all dependencies and run gulp.

While working on the UI you might want to use make watch, which will keep the gulp watch task up and running.

About

Alice - Through the Looking Glass

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 46.6%
  • JavaScript 46.1%
  • CSS 3.7%
  • Makefile 3.0%
  • Other 0.6%