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

Uploaded Python 3

File details

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

File metadata

  • Download URL: vrouter_agent-1.5.0.tar.gz
  • Upload date:
  • Size: 157.1 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.5.0.tar.gz
Algorithm Hash digest
SHA256 94e15d7505a4592d758e16a7df030d04a6b6ae6ac18ef089088aefad6c6257a8
MD5 e30ad152a85053bb62aff8a88489b5b7
BLAKE2b-256 beecc2f883fa94a1334a62dcff5eb2fdc04d53a3152a3da640cff813e85760e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vrouter_agent-1.5.0-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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f371fe0835e80e20ced4894612d21935e5a8605757490b1a5bdc1daadca2673
MD5 bae165052a069ce5913831608f31ea4a
BLAKE2b-256 e68939f9558abe7d958644e04f613fc458bb1c303d442f576deb12143e863da1

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