Skip to main content

ExaBGP Process Package

PyPI version PyPI

This application is a simple API that interfaces with the ExaBGP service.

Each time this app receives a new command, it forwards the command to ExaBGP via stdout. The registered ExaBGP service monitors the stdout of this API application.

Installation

Install the package using pip:

pip install exabgp-process

Alternative installation methods:

# Using uv
uv pip install exabgp-process

# Using Poetry (create a new project first)
poetry new my-exabgp-project
cd my-exabgp-project
poetry add exabgp-process

Configuration

1. Generate Configuration File

After installation, generate the configuration file:

exabgp-process --generate-config > process.conf

2. Edit Configuration

Open process.conf and configure according to your needs:

For RabbitMQ (recommended for production):

[api]
type = rabbitmq

Don't forged to set you rabbitmq host, username, password etc.

For HTTP (development/testing only - no security layer):

[api]
type = http

You can then configure the server IP and PORT if you need.

3. Set Up Log Directory

Ensure the log directory exists and is writable by the ExaBGP process:

# Create the log directory specified in your config
sudo mkdir -p /var/log/myapp
sudo chown exabgp:exabgp /var/log/myapp  # Adjust user/group as needed

4. Install Configuration

Copy the configuration file to the appropriate location:

sudo mv process.conf /etc/exabgp/process.conf

The application searches for configuration files in the following locations (in order):

  • api.conf (current directory)
  • process.conf (current directory)
  • /etc/exabgp_process/process.conf
  • /etc/exabgp/process.conf
  • /usr/local/etc/exabgp_process/process.conf

Integration with ExaBGP

Add the following to your ExaBGP configuration file:

process flowspec {
    run /usr/local/bin/exabgp-process;
    encoder json;
}

Note: The exact path to exabgp-process may vary depending on your installation. You can find it using:

which exabgp-process

Usage

Standalone Mode (for testing)

You can run the process directly for testing:

exabgp-process

Message Format

The application expects JSON messages with the following structure:

{
    "author": "username",
    "source": "application_name",
    "command": "announce route 192.0.2.1/32 next-hop 192.0.2.254"
}
  • author: For logging purposes (who initiated the command)
  • source: For logging purposes (which application sent the command)
  • command: The actual ExaBGP command to execute

RabbitMQ Setup

When using RabbitMQ, ensure your RabbitMQ server is running and accessible with the credentials specified in your configuration file.

HTTP Setup

Security Warning: The HTTP version has no authentication or encryption. Only use it for development/testing, and restrict access to localhost only. It also uses only Flask development server, that is also not recomended for production usage.

Development and Testing

For development and testing, the HTTP version is available. However, please note that this web app lacks any security layer. Therefore, it's recommended to:

  • Restrict access to localhost only
  • Use RabbitMQ for production environments
  • Never expose the HTTP API to public networks

For more information, refer to the ExaBGP documentation.

Troubleshooting

Package Not Found

If exabgp-process command is not found after installation:

# Verify installation
pip show exabgp-process

# Find the executable
which exabgp-process

# If using a virtual environment, make sure it's activated
source venv/bin/activate

Permission Errors

Ensure the log directory has proper permissions:

sudo chown -R <exabgp-user>:<exabgp-group> /var/log/myapp

Connection Issues with RabbitMQ

  • Verify RabbitMQ is running: sudo systemctl status rabbitmq-server
  • Check credentials and vhost configuration
  • Ensure the queue exists or the user has permissions to create it

Changelog

  • 1.0.4 - Fixed template for config file
  • 1.0.3 - New format of message from server - JSON with keys: author, source, command. Author and source are for logging purposes, command is sent to the process
  • 1.0.2 - Switch to pyproject.toml for better description

License

See LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Metadata

Release files for exabgp-process 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for exabgp-process 1.0.5
File Size Uploaded Provenance Actions
exabgp_process-1.0.5.tar.gz 6.4 kB Without provenance Details for exabgp_process-1.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for exabgp-process 1.0.5
File Interpreter ABI Platform Actions
exabgp_process-1.0.5-py3-none-any.whl Python 3 none any Details for exabgp_process-1.0.5-py3-none-any.whl

Total release size: 14.3 kB

Release files / exabgp_process-1.0.5.tar.gz

Download URL exabgp_process-1.0.5.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ab1a06308a9869e33181d459a144bbd05aea89074f7c0cb9c50068b3bf29a0cf
BLAKE2b-256 checksum
How to use checksums
d7dd6bcc2be8527aed1ff57e5d47bf169c4933c26c506f5d59c93ca143fb0f9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / exabgp_process-1.0.5-py3-none-any.whl

Download URL exabgp_process-1.0.5-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5bba8030cc1a2093c10fbbd7336b63ce86a73c3514afb5e0a7f6a282d05f2fe6
BLAKE2b-256 checksum
How to use checksums
d58c7c97f6630637f9941d08156b1e31a639fce596088cd814e5cdbc1f4d178f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for exabgp-process 1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page