Skip to main content

An agent for the myrrh porject using the pyro5 library

Project description

About Myrrh Pyro5 Provider

This is a myrrh provider designed to test the Myrrh framework, especially in a cross-environment. This provider is divided into 2 parts: an agent (the server) to be deployed on the managed entity and a client installed on the Myrrh host.

This provider uses pyro5 for the client-server implementation and exports the API of the Myrrh local provider. (for more information: https://github.com/irmen/Pyro5)

/!\ This provider is intended for test purposes only and should not be deployed in an unsafe environment.

Requirements

  • Python: 3.11
  • Myrrh: 0.1.0
  • OS: Nt or POSIX

Installation

On the Myrrh controller (windows or posix):

To install the plugin, simply run:

$ pip install mplugin_provider_pyro5

You can create a standalone server executable using pyinstaller

$ pip install pyinstaller
$ pip install mplugin_provider_pyro5
$ myrrhc provider pyro5 pyinstaller

On the target (windows or posix):

Install Python and install the mplugin_provider_pyro5 as above

Or

Upload the pyro5s server created with pyinstaller 'dist/myrrh_pyro5s'

Getting Started

To launch the server on the target

$ myrrh_pyro5s --hostname 10.10.10.10 --port 9999
Server started, uri: PYRO:provider@10.10.10.10:9999

Use the Myrrh framework to communicate with the server

Using python:

import bmy

bmy.new(path='**/pyro5', uri='PYRO:provider@10.10.10.10:9999', eid='pyro5')  # defines an entity named "pyro5"
bmy.build(eid='pyro5')  # starts using it

# code sample
bmy.lsdir(eid='pyro5')

with bmy.select(eid='pyro5'):
    from mlib.py import os  # uses python's os module on the "pyro5" entity

os.getcwd()

Using myrrh console:

$ myrrhc
 Welcome to Myrrhc Console (for test purpose only)
  - Use it with fairplay -
Type help, copyright, credits, license for more information

ctrl-D to exit console


(myrrhc)provider new pyro5 --uri PYRO:provider@127.0.0.1:9999 pyro5 && build
pyro5
entity built
 
[pyro5]

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

mplugin_provider_pyro5-0.1.0.tar.gz (47.5 kB view details)

Uploaded Source

Built Distribution

mplugin_provider_pyro5-0.1.0-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

Details for the file mplugin_provider_pyro5-0.1.0.tar.gz.

File metadata

File hashes

Hashes for mplugin_provider_pyro5-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1dfab5cc630e3a5466a271fd2c5278bd05ae42a0b9f299b0d253800711e517f5
MD5 b40eca8002be1a4f4f13a485de5c4794
BLAKE2b-256 7d30dcf268e800f19ade2c81fd5e1d71a45f48844533c7f9c988c3d92d92ac86

See more details on using hashes here.

File details

Details for the file mplugin_provider_pyro5-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mplugin_provider_pyro5-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cc3177c554e930fc9b689af993b1ab1ae71813743539e95a44f656d9257c906
MD5 29d44a029a2260e25866d6200075c708
BLAKE2b-256 5810b7579c9cf1a7e16a550ad31f0a3b7ac308c8ea00a89fe463dae2d8d6c66b

See more details on using hashes here.

Supported by

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