Open mrblacyk opened 4 years ago
On it.
Next step is to create a private RSA key and store it in the database using this snippet:
from paramiko import RSAKey
from io import StringIO
# Generate key and make a string out of it
key = RSAKey.generate(4096)
pkey = StringIO()
key.write_private_key(pkey)
pkey_string = pkey.getvalue() # Store in DB
# Make a RSA key out of string
key2 = RSAKey.from_private_key(pkey_string)
public_b64 = key2.get_base64() # This part for authorized_keys file
Overall, the idea is to create a wizard to establish qemu+libssh2://
communication to a hypervisor host so the application can be dockerized
For now, passing /var/run/libvirt/libvirt-sock
socket to docker must be enough.
Right now code in
aplibvirt.py
is:So it's ready to consume different URI.
What needs to be done: