Metadata-Version: 2.1
Name: kayalab
Version: 0.6.3
Summary: UI to create virtual machines and install HPE Ezmeral products.
License: MIT
Author: Erdinc Kaya
Author-email: erdincka@msn.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: aiofiles (==23.2.1)
Requires-Dist: altgraph (==0.17.4)
Requires-Dist: annotated-types (==0.6.0)
Requires-Dist: anyio (==4.2.0)
Requires-Dist: bcrypt (==4.1.2)
Requires-Dist: bidict (==0.22.1)
Requires-Dist: bottle (==0.12.25)
Requires-Dist: build (==1.0.3)
Requires-Dist: cachetools (==5.3.2)
Requires-Dist: certifi (==2023.11.17)
Requires-Dist: cffi (==1.16.0)
Requires-Dist: charset-normalizer (==3.3.2)
Requires-Dist: click (==8.1.7)
Requires-Dist: cryptography (==41.0.7)
Requires-Dist: debugpy (==1.8.0)
Requires-Dist: docker (==7.0.0)
Requires-Dist: exceptiongroup (==1.2.0)
Requires-Dist: fastapi (==0.109.0)
Requires-Dist: google-auth (==2.25.2)
Requires-Dist: h11 (==0.14.0)
Requires-Dist: httpcore (==1.0.2)
Requires-Dist: httptools (==0.6.1)
Requires-Dist: httpx (==0.26.0)
Requires-Dist: humanize (==4.9.0)
Requires-Dist: idna (==3.6)
Requires-Dist: ifaddr (==0.2.0)
Requires-Dist: importlib-metadata (==7.0.1)
Requires-Dist: itsdangerous (==2.1.2)
Requires-Dist: jinja2 (==3.1.3)
Requires-Dist: kubernetes (==28.1.0)
Requires-Dist: macholib (==1.16.3)
Requires-Dist: markdown-it-py (==3.0.0)
Requires-Dist: markdown2 (==2.4.10)
Requires-Dist: markupsafe (==2.1.3)
Requires-Dist: mdurl (==0.1.2)
Requires-Dist: mdutils (==1.6.0)
Requires-Dist: nicegui (==1.4.13)
Requires-Dist: oauthlib (==3.2.2)
Requires-Dist: ordered-set (==4.1.0)
Requires-Dist: orjson (==3.9.10)
Requires-Dist: packaging (==23.2)
Requires-Dist: paramiko (==3.4.0)
Requires-Dist: paramiko-expect (==0.3.5)
Requires-Dist: prompt-toolkit (==3.0.36)
Requires-Dist: proxmoxer (==2.0.1)
Requires-Dist: proxy-tools (==0.1.0)
Requires-Dist: pscript (==0.7.7)
Requires-Dist: ptyprocess (==0.7.0)
Requires-Dist: pyasn1 (==0.5.1)
Requires-Dist: pyasn1-modules (==0.3.0)
Requires-Dist: pycparser (==2.21)
Requires-Dist: pydantic (==2.5.3)
Requires-Dist: pydantic-core (==2.14.6)
Requires-Dist: pygments (==2.17.2)
Requires-Dist: pyinstaller-hooks-contrib (==2024.0)
Requires-Dist: pynacl (==1.5.0)
Requires-Dist: pyobjc-core (>=10.1,<11.0) ; sys_platform == "darwin"
Requires-Dist: pyobjc-framework-cocoa (>=10.1,<11.0) ; sys_platform == "darwin"
Requires-Dist: pyobjc-framework-security (>=10.1,<11.0) ; sys_platform == "darwin"
Requires-Dist: pyobjc-framework-webkit (>=10.1,<11.0) ; sys_platform == "darwin"
Requires-Dist: pyopenssl (==23.3.0)
Requires-Dist: pyproject-hooks (==1.0.0)
Requires-Dist: python-dateutil (==2.8.2)
Requires-Dist: python-dotenv (==1.0.0)
Requires-Dist: python-engineio (==4.8.2)
Requires-Dist: python-multipart (==0.0.6)
Requires-Dist: python-socketio (==5.11.0)
Requires-Dist: pyvmomi (==8.0.2.0.1)
Requires-Dist: pywebview (==4.4.1)
Requires-Dist: pyyaml (==6.0.1)
Requires-Dist: qtpy (>=2.4.1,<3.0.0) ; sys_platform == "linux"
Requires-Dist: questionary (==2.0.1)
Requires-Dist: requests (==2.31.0)
Requires-Dist: requests-oauthlib (==1.3.1)
Requires-Dist: rich (==13.7.0)
Requires-Dist: rsa (==4.9)
Requires-Dist: simple-websocket (==1.0.0)
Requires-Dist: six (==1.16.0)
Requires-Dist: sniffio (==1.3.0)
Requires-Dist: starlette (==0.35.1)
Requires-Dist: strenum (==0.4.15)
Requires-Dist: tdnss (==0.2.1)
Requires-Dist: tomli (==2.0.1)
Requires-Dist: typer (==0.9.0)
Requires-Dist: typing-extensions (==4.9.0)
Requires-Dist: urllib3 (==1.26.18)
Requires-Dist: uvicorn (==0.25.0)
Requires-Dist: uvloop (==0.19.0)
Requires-Dist: vbuild (==0.8.2)
Requires-Dist: watchfiles (==0.21.0)
Requires-Dist: wcwidth (==0.2.12)
Requires-Dist: websocket-client (==1.7.0)
Requires-Dist: websockets (==12.0)
Requires-Dist: wsproto (==1.2.0)
Requires-Dist: zipp (==3.17.0)
Requires-Dist: zstandard (==0.22.0)
Description-Content-Type: text/markdown

# Ezlab UI

UI to create virtual machines and install HPE Ezmeral products.

## Usage

It supports install operations for Virtual Machines on Proxmox VE.
Libvirt/KVM and VMware might come too.

### Prepare Templates

Download base cloud images for template creation.

Tested images can be found at:
Rocky8:
`https://download.rockylinux.org/pub/rocky/8/images/x86_64/Rocky-8-GenericCloud.latest.x86_64.qcow2`

RHEL8 (login required):
`https://access.cdn.redhat.com/content/origin/files/sha256/5f/5f9cd94d9a9a44ac448b434f3e28d24465deef089bbd452392b3f10e96cb8eaa/rhel-8.8-x86_64-kvm.qcow2`

#### Libvirt/KVM

Create a user with libvirt and sudo groups added, use this command to provide rw access for that user to the pool location (below is the default pool location, change accordingly):

```bash
sudo useradd -d /home/ezmeral -G libvirt,sudo -m -s /bin/bash -U ezmeral
sudo setfacl -Rm u:ezmeral:rwX /var/lib/libvirt/images/
echo "ezmeral ALL=(ALL:ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/ezmeral
```

Copy Base image file (RHEL/Rocky8 qcow2) to storage pool (default: /var/lib/libvirt/images).

`ssh-copy-id <username>@<kvm_host>` since you cannot use password auth with libvirt connection.


#### Vmware

THIS IS NOT WORKING YET/AGAIN!!!

Install required package

`virt-customize -a Rocky-8-GenericCloud.latest.x86_64.qcow2 --install open-vm-tools`
Convert qcow2 image

`qemu-img convert -f qcow2 -O vmdk -o subformat=streamOptimized Rocky-8-GenericCloud.latest.x86_64.qcow2 Rocky-8-GenericCloud.latest.x86_64.img`

Enable SSH for the ESX host
vCenter - Host - Configure - Services - SSH -> Start

Copy image to a datastore (change your host name and datastore path)
`scp Rocky-8-GenericCloud.latest.x86_64.img root@<esx.host>:/vmfs/volumes/<datastore>`

Login to the esx host (change your host name)
`ssh root@<esx.host>`

Convert image to disk
`vmkfstools -i Rocky-8-GenericCloud.latest.x86_64.img rocky-template.vmdk -W file -d thin -N`

#### Proxmox VE

Copy qcow2 base image file(s) into /var/lib/vz/template/qemu folder (create the qemu folder first)

### Configure Utility

Use Settings menu to save environment details. Use placeholder text to see correct/expected format.

Leave empty if not used (ie, proxy, local repository...)

### VMs Menu

Login to hypervisor (currently only ProxmoxVE)

New VM:

Select correct template, if bridge name doesn't pop up, close the dialog (`ESC`) and re-open.

Select the pre-defined configuration:

    UA Control Plane    | 2 VMs | 4 cores | 32GB Memory
    UA Workers          | 3 VMs | 32 cores | 128GB Memory
    DF Single Node      | 1 VM | 16 cores | 64GB Memory
    DF 5-Node Cluster   | 5 VMs | 16 cores | 32GB Memory
    Generic (Client)    | 1 VM | 2 cores | 4GB Memory

### Ezmeral Menu

Only Data Fabric for now. 

#### Install Ezmeral Data Fabric

Version 7.6 with EEP 9.2.1 will be installed on as many hosts provided. Installer will be installed on the first node and system will automatically distribute services across other nodes. Single node installation is also possible. 

Core components (fileserver, DB, Kafka/Streams, s3server, Drill, HBase, Hive) and monitoring tools (Grafana, OpenTSDB...) will be installed. Subject to change to optimize installation time & complexity.

##### Configure Step

Prepare for Data Fabric installation.

Add nodes to prepare multiple nodes.

##### Install Step

Create Data Fabric cluster on as many nodes as given.

##### Cross-Cluster Step

Will be working soon!

##### Connect Step

Will download secure files from the server and install/configure the client for the cluster.

## NOTES

If API servers (ProxmoxVE and/or vSphere) are using self-signed certificates, insecure connection warnings will mess up your screen. You can avoid this using environment variable (this is not recommended due to security concerns):

`export PYTHONWARNINGS="ignore:Unverified HTTPS request"`

## TODO

[ ] Proper documentation and code clean up

[ ] Test on standalone ESX host

[ ] Test airgap

