Code Monkey home page Code Monkey logo

freifunk-berlin-config.berlin.freifunk.net's Introduction

config.berlin.freifunk.net Freifunk Berlin IPAM

Our ip address management system is basically a running NIPAP instance (see https://spritelink.github.io/NIPAP/ ) with two frontends:

How to install nipap for development

The following is mostly outdated. Just follow https://spritelink.github.io/NIPAP/docs/INSTALL.html and use the prebuilt packages. Make sure the postgresql-X.Y-ip4r package is installed as well.

Outdated: The Makefile in v0.26.4 seems to be broken. There are patches in directory patches to fix this. You will need postgresql and virtualenv2 as well.

Get source and patch it:

$ git clone [email protected]:freifunk-berlin/config.berlin.freifunk.net.git
$ git clone https://github.com/SpriteLink/NIPAP
$ cd NIPAP
$ virtualenv2 env
$ . env/bin/activate
$ cd nipap
$ pip install -r requirements.txt
$ cd ..
$ git checkout v0.26.4
$ patch -p1 < ../nipap-wizard/patches/0001-Do-not-install-files-globally-no-root-privileges-nee.patch
$ patch -p1 < ../nipap-wizard/patches/0002-Fix-Makefile-tables-seems-to-be-in-the-wrong-order.patch
$ bash utilities/install-ip4r.sh

Install nipap:

$ cd nipap
$ python setup install
$ cp nipap.conf.dist nipap.conf
$ vim nipap.conf    # set debug=True, pid_file and db_path (something locally)
$ python nipap-passwd -c nipap.conf --create-database
$ cd ..

Install pynipap:

$ cd ../pynipap
$ python setup install

Install nipap-www:

$ cd nipap
# add user 'foo' with password 'bar'
$ python nipap-passwd -c nipap.conf -a foo -p bar -n 'NIPAP web UI' -t
$ vim nipap.conf                  # set xmlrpc_uri
$ cd ../nipap-www
$ cp development.ini devel.ini
$ vim devel.ini                   # set nipap_config_path
$ python setup.py install
$ pip install WebOb==1.3.1        # see https://github.com/SpriteLink/NIPAP/issues/624
$ cd ..

Start everything:

$ cd nipap
$ python nipapd -c nipap.conf
...
$ cd nipap-www
$ paster serve devel.ini

Nipap and nipap-www should run now: http://127.0.0.1:5000

How to run nipap-wizard for development

Install

$ cd nipap-wizard
$ pip install -r requirements.txt
$ cp config.cfg.dist config.cfg
$ vim config.cfg                    # add MAIL_PORT = 1025 for development

We use flask-migrate for database creation and migrations. To create our database and tables you have to use the following commands:

$ python manage.py db init
$ python manage.py db migrate
$ python manage.py db upgrade

Dev Server (including dev smtp server for emails)

$ python -m smtpd -n -c DebuggingServer localhost:1025
$ python manage.py runserver -p 5001
 * Running on http://127.0.0.1:5001/
 * Restarting with reloader

freifunk-berlin-config.berlin.freifunk.net's People

Contributors

andrenarchy avatar booo avatar sarumpaet avatar slomo avatar svenroederer avatar sys3175 avatar

Watchers

 avatar  avatar  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.