aboutsummaryrefslogtreecommitdiffstats
path: root/fap/README.md
blob: f07a968bd8cac3d0367010e6e75b429492515859 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# FAP - Fast and Agile Provisioning

Tools (DHCP daemon + HTTP daemon + DB) for managing provisioning towards a large number of factory default Juniper switches (EX2200) using ZTP (Zero Touch Protocol) over DHCP relays.

The project is built with Python (>3.4.0) and PostgreSQL (>9.3.5).

Licensed under the GNU GPL, version 2. See the included COPYING file.



## Usage

### Installation/configuration
* Install apache2, postgresql, php, php-cli, python3, python-psycopg2
* Configure Postgresql with user + db name "fap", and password to your liking
* Create DB tables from database/create_tables.sql
* Configure Apache, necessary config in fap/httpd/apache_base_config
* Enable mod_rewrite in Apache - "a2enmod rewrite"
* Start/restart Apache

### FAP workflow
* planning.cpp generates switches.txt and patchlist.txt
* "php -f fap/tools/create_queries/create_queries.php" generates SQL queries
* Manually insert queries from create_queries.php into DB
* "php -f fap/tools/generate_distro_config_ae_event-options/generate.php" generates distroconfig into generated_configs/<distro>
* Copy distro config from generated_configs/* to HTTPD (fap/httpd/files/), and load them from the distros (load merge <ip>/files/<distro>.conf in configure mode)
* Start FAP DHCPD (sudo python3 fap/dhcpd/server_dhcp.py)


# TODO
* DONE: Support for IPv6 management
* DONE: Process multiple HTTP request simultaneously
* Support for only pushing JunOS image to switch - no config (for backup switches)
* Try/catch on whole ethernet frame in DHCPD
* Timestamps on each line in log both from DHCPD and HTTPD