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.4.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.4-py3-none-any.whl (212.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vrouter_agent-1.4.4.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.4.tar.gz
Algorithm Hash digest
SHA256 0a237e16d8850587cc468f2e37a61b84d94ec4ff8a811012c41af02238b42e7c
MD5 01a9a73a18ec29effb27dbdfc2d124e2
BLAKE2b-256 579d4802487f094049b4c52e8bb0e76d14fda9946f8e895f863c5efca077fe50

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vrouter_agent-1.4.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 99a90f6f7bc49a298b45baadd957aec5d77a15f9dde9e1ef74d9aa0db9effc61
MD5 18fa0042b20c002ebbdeaa8c78576a8e
BLAKE2b-256 50cbae69329247cd3e414f69dce4da98d1f00dd68b53abccde5de9804339fb49

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