Skip to main content

USDN vRouter-agent to execute order on each node

Project description

vRouter-agent

Build and Sync Package to S3

Overview

vRouter-agent is a custom module built by USDN to handle and execute transaction from customer portal to each node.

Requirements

Development

This project is managed by poetry. Use poetry to install and run script.

curl -sSL https://install.python-poetry.org | python3 -
poetry install 
poetry run server

Deployment

Run vrouter-agent as a service

vRouter depends on different services. In order to run vrouter-agent, these services must be up and running:

  • VPP
  • vRouter
  • multichaind@{{chain}}. Chain is what defined in the nodecontrol
  • FRR

Create service file:

sudo nano /etc/systemd/system/vrouter_agent.service
Requires=multichaind@{{chain}}
After=network.target multichaind@{{chain}} vpp.service vrouter.service

[Service]
Type=simple
ExecStartPre=/usr/local/bin/poetry/bin/poetry install 
ExecStart=/usr/local/bin/poetry/bin/poetry run server 
Restart=on-failure
RestartSec=30
WorkingDirectory=/opt/vrouter-agent/bin
User={{user}}
ExecStopPost=/bin/bash -c 'echo "$(date) $(hostname) vrouter agent service stopped" >> /var/log/vrouter-agent.log'
ExecRestartPost=/bin/bash -c 'echo "$(date) $(hostname) vrouter agent service restarted" >> /var/log/vrouter-agent.log'
OnFailure=/bin/bash -c 'echo "$(date) $(hostname) vrouter agent service failed" >> /var/log/vrouter-agent.log'

[Install]
WantedBy=multi-user.target

Enable service at boot and start service:

sudo systemctl enable vrouter-agent && sudo systemctl start vrouter-agent 

Usage

Run manually

cd /opt/vrouter-agent/bin
poetry install && poetry run server

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

US Data Networks

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vrouter_agent-1.4.1.tar.gz (156.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vrouter_agent-1.4.1-py3-none-any.whl (212.2 kB view details)

Uploaded Python 3

File details

Details for the file vrouter_agent-1.4.1.tar.gz.

File metadata

  • Download URL: vrouter_agent-1.4.1.tar.gz
  • Upload date:
  • Size: 156.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.18 Linux/6.11.0-1018-azure

File hashes

Hashes for vrouter_agent-1.4.1.tar.gz
Algorithm Hash digest
SHA256 1369282f63f16993e278e6bc89ad148da4e933e1e5e786e12e7b28ccbca41ccb
MD5 d403087442667637a3eb055ffa23ee79
BLAKE2b-256 761695b0485338cc0ca76d6234410b7d21009c331713ea240052ddd7f7c4d027

See more details on using hashes here.

File details

Details for the file vrouter_agent-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: vrouter_agent-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 212.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.18 Linux/6.11.0-1018-azure

File hashes

Hashes for vrouter_agent-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ce3d3222b6c4aab79a87d7b69e63d027f1f2f847665714e944bed0eb34a92a4
MD5 a01b988d94e9a0fcf3264230bf67a8a9
BLAKE2b-256 475d1bca309825923282d40f8c20bc1878c36eae6943a19695f5d5ee8439ddc4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page