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.7.tar.gz (157.0 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.7-py3-none-any.whl (212.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vrouter_agent-1.4.7.tar.gz
  • Upload date:
  • Size: 157.0 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.7.tar.gz
Algorithm Hash digest
SHA256 9c48af10589ba5d68a9f9258e2d6cee91dd7239adfca8b144ebe73139a621668
MD5 b58b884c5dbc6c7047e00132f17bf6e5
BLAKE2b-256 aacc6f101cdbd2839ffa04a6381d2828fce2cdf060b4755301e05e279c6eb515

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vrouter_agent-1.4.7-py3-none-any.whl
  • Upload date:
  • Size: 212.4 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f9654232757205635b678aa501e300292ceb86fe67a639e62d4b86d8551cd7bd
MD5 827809a8c767e8106e5de72a30da39d7
BLAKE2b-256 a56f01cd690beee3e14e3e709e4aca5e3369e57a2ba56fe7632615f395b497d7

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