...
ProVision uses a locally-hosted mirror of the PeeringDB database in order to perform non-edit Peering functions. There are a few steps to take in order to set up your locally hosted instance to coordinate with PeeringDB information.
1) First, download the PeeringDB SQL dump file from the following location:
http://www.peeringdb.com/dbexport/peeringdb.sql
Warning |
---|
As of PeeringDB 2.0, SQL dump files are no longer provided. If you are using ProVision 5.3.0 or higher, you must follow this new install process. If you are using a lower version of ProVision, then please follow the instructions in the previous version of this page. |
1) Create a new database to store the PeeringDB data. This must be on the same server as the database which is used by ProVision.
2) Download, install, and use the PeeringDB Python Client to populate the database.
The PeeringDB documentation is available here: http://peeringdb.github.io/peeringdb-py/
2) Then, create a new database to contain that data on your local MySQL installation. Make sure that the MySQL user configured in the data/globals.php file is allowed to read and make changes to the local copy of the PeeringDB database.
3) Once this has been done, edit the ProVision global configuration file located athere:
Code Block | ||
---|---|---|
| ||
[ProVision Root]/data/globals.php |
It must be updated with the following variable variables to inform ProVision of the location of this new install:
Code Block | ||
---|---|---|
| ||
$peeringdb_db_name = 'peeringdb'; // name of the database in MySQL |
...
. The username and password fields correspond to the username and password of the MySQL account which has access to the database (Not the username and password to your PeeringDB account).
Note | |
---|---|
This can, but does not have to be, the same MySQL user which is used for the ProVision database. However, the ProVision MySQL user must have at least READ access to the PeeringDB database. | |
Expand | |
title | Click here for the script...
Code Block | ||
---|---|---|
| ||
#!/bin/bash
$peeringdb_host = 'localhost'; // Database hostDB="peeringdb" DBUSER="root" DBPASS="*******" must be the same for provision and peering $peeringdb_username = 'username';WGET="/usr/bin/wget" MYSQL="/usr/ bin/ mysql"
username for the MySQL user $peeringdb_password = 'password';cd / tmp/
password for the MySQL$WGET user
$peeringdb_db_name = 'peeringdb'; // name of the database in MySQL |
4) Periodically sync with the PeeringDB server to get the latest updates. This can be done manually, or there are instructions in the PeeringDB documentation on how to automatically schedule syncs using cron (http://
...
...