gmazoyer.peering_manager
Ansible Role: Peering Manager
This Ansible Role installs Peering Manager on Debian or Ubuntu systems.
It installs everything that Peering Manager needs, including the PostgreSQL database, allowing you to set it up on a single machine.
You can skip setting up the web backend and frontend if you have your own solutions for that.
Dependencies
There are no additional dependencies.
Role Variables
Below are the available variables and their default values:
PostgreSQL database setup:
peering_manager_database
: peering-managerpeering_manager_database_user
: peering-managerpeering_manager_database_password
: peering-managerpeering_manager_database_host
: localhost
Peering Manager source and version:
peering_manager_version
: latestpeering_manager_git_url
: https://github.com/peering-manager/peering-manager.git
By default, it will always fetch the latest stable version. You can specify a version, for example, v1.7.0
.
Installation directory for Peering Manager:
peering_manager_install_directory
: /opt/peering-manager
Superuser credentials:
peering_manager_superuser_username
: adminpeering_manager_superuser_password
: adminpeering_manager_superuser_email
: admin@example.com
You can also list extra Python packages to be installed in the virtual environment:
peering_manager_local_requirements
: []
LDAP authentication setup:
If you want to use LDAP for authentication, it needs to be enabled, and you must provide the configuration:
peering_manager_setup_ldap_auth
: falsepeering_manager_ldap_config
: ""
Peering Manager configuration options:
Provide the configuration as key: value
pairs. Note that the secret key is generated automatically:
peering_manager_config
:- ALLOWED_HOSTS:
- localhost
- 127.0.0.1
- TIME_ZONE: "Europe/Paris"
- ALLOWED_HOSTS:
Scheduled tasks:
Scheduled tasks are managed with systemd timers. You can specify when to run each task with on_unit_active_sec
or on_calendar
:
peering_manager_tasks
:peeringdb-sync
:- enabled: true
- command: "{{ peering_manager_virtualenv_path }}/bin/python {{ peering_manager_install_directory }}/manage.py peeringdb_sync"
- on_calendar: "--* 2:30:00"
prefix-fetch
:- enabled: true
- command: "{{ peering_manager_virtualenv_path }}/bin/python {{ peering_manager_install_directory }}/manage.py grab_prefixes"
- on_calendar: "--* 4:30:00"
poll-bgp-sessions
:- enabled: true
- command: "{{ peering_manager_virtualenv_path }}/bin/python {{ peering_manager_install_directory }}/manage.py poll_bgp_sessions --all"
- on_unit_active_sec: "30m"
configure-routers
:- enabled: true
- command: "{{ peering_manager_virtualenv_path }}/bin/python {{ peering_manager_install_directory }}/manage.py configure_routers"
- on_calendar: "--* *:55:00"
Backend web server and systemd configuration:
peering_manager_setup_systemd
: falsepeering_manager_gunicorn_address
: 127.0.0.1peering_manager_gunicorn_port
: 8001peering_manager_gunicorn_workers_number
: 5
Frontend web server configuration:
peering_manager_setup_web_frontend
: false
Example Playbook
- hosts: peering_manager
roles:
- { role: gmazoyer.peering_manager }
License
This Ansible Role is licensed under the GNU GPLv3. Please check the LICENSE file for more details.
Author Information
This role was created by Guillaume Mazoyer in 2019.
A role to install and update Peering Manager.
ansible-galaxy install gmazoyer.peering_manager