A generic Distributed (Python) Applications Platform
Project description
LYDIAN
LYDIAN is a distributed (python) apps platform. It has apps for Traffic Generation, Resource Monitoring, Vulnerability Scan.
It is based on Distributed System principles. It uses RPC for communication across nodes, Local Database for persistence and Daemon services for resiliency.
LYDIAN has its own in-built simple TCP/UDP client and servers for Traffic Generation and it also offers simple integration with other 3rd party tools such as IPERF. It recognizes the collection of nodes (to and from where traffic needs to be generated) as a "Cluster" and nodes can be attached and detached to cluster at any time during the operation.
Installation
LYDIAN is available as Python package and can be installed on Primary nodes using pip
as following.
pip install lydian
Usage
LYDIAN is simple to use. Below are some examples for different capabilities which are available.
Running Traffic
import time
import uuid
from lydian.apps.podium import get_podium
PASSWD = 'MY_PASSWORD' # Password for SSH access to nodes.
VM0_IP = 'a.b.c.d'
VM1_IP = 'w.x.y.z'
podium = get_podium()
podium.add_hosts(VM0_IP, password=PASSWD)
podium.add_hosts(VM1_IP, password=PASSWD)
DUMMY_RULE = {
'reqid': '%s' % uuid.uuid4(), 'ruleid': '%s' % uuid.uuid4(),
'src': VM0_IP, 'dst': VM1_IP,
'protocol': 'TCP', 'port': 9465,
'connected': True
}
# Ask the tool to register your intent.
podium.register_traffic([DUMMY_RULE])
Packet Capture
from lydian.apps.podium import get_podium
from lydian.utils.ssh_host import Host
VM_IP = '1.2.3.4'
# Delete any old PCAP file at endpoint
with Host(VM_IP, user='root', passwd='PASSWD') as host:
host.req_call('rm -rf /tmp/test_pcap.pcap')
# Also remove any local file
try:
os.remove('/tmp/test_pcap.pcap')
except FileNotFoundError:
pass
podium = get_podium()
# Prepare the node (if not done already)
podium.add_host(VM_IP, password=PASSWD)
# Start Packet Capture
podium.start_pcap(VM_IP, pcap_file_name='test_pcap.pcap', interface='eth0')
time.sleep(10)
podium.stop_pcap(vm1, pcap_file_name='test_pcap.pcap')
# Download file locally.
with Host(VM_IP, user='root', passwd='PASSWD') as host:
host.get_file('/tmp/test_pcap.pcap') # Copy PCAP file locally
host.req_call('rm -rf /tmp/test_pcap.pcap') # remove remote file.
# Run any tool on this file like tcpreplay/ wireshark on this file or simply check
# that file exists.
assert os.path.exists(os.path.join('/tmp', 'test_pcap.pcap'))
Generating Traffic from IPERF
from lydian.apps.podium import get_podium
podium = get_podium()
# Prepare the nodes (if not done already)
podium.add_hosts([VM1_IP, VM2_IP], password=PASSWD)
result = podium.run_iperf3(src_ip, dst_ip)
result_dict = json.loads(result)
Try it yourself.
With Lydian, there comes a demo file, which can be used to perform a quick 1 minute test to see things in action. Below are the steps, you can follow to try it yourself. Please note that it creates / overwrites log file /var/log/lydian/lydian.log
.
mkdir -p /tmp/LYDIAN
cd LYDIAN
virtualenv -p python3 .
pip install lydian
python -mlydian.tests.demo -u 'root' -p 'ep_password' -e 20.20.11.1 20.20.11.2
Repository & License
LYDIAN is an Open Source Software (OSS) hosted at https://github.com/vmware/distributed-apps-platform. Check LICENSE.txt for applicable licenses.
https://github.com/vmware/distributed-apps-platform
Requirements
Python 3.6.8+
Share and enjoy!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lydian-1.0.1.tar.gz
.
File metadata
- Download URL: lydian-1.0.1.tar.gz
- Upload date:
- Size: 64.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 416b49afb86a8acf1cd2e7add4fd1d1ca36704e61df09e6058ff1b36ba9ac352 |
|
MD5 | 4374c62886d4b8a409a2dccb39fe0f83 |
|
BLAKE2b-256 | d024f1f48f3aaf150e52f14c2cc9535aa70da2db3faa0a0bd3189b2cf3cb9ee2 |
File details
Details for the file lydian-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: lydian-1.0.1-py3-none-any.whl
- Upload date:
- Size: 101.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17c16dd6b12ec0796dc6f874cdf33764d93c90ca6b2b62960c61c6b55ef43f43 |
|
MD5 | 92f107945dc7f12d10facadedcd8ea23 |
|
BLAKE2b-256 | 5e1b33a42c0074bb39d49ce429b7fa4f753677421c4c704ef27a07ba5cf462b2 |