Dear Isar Community,

We are currently evaluating enhancements to the Isar installer and would like to share our plans, collect feedback, and align with upstream expectations before we proceed.

During our work with the existing installer (deploy-image-wic.sh), we observed that both the backend logic and the frontend elements (dialogs, progress bars, UI prompts) are tightly coupled within a single script. This makes it difficult to extend the installer with new capabilities or integrate more advanced user-facing features.

 

1. Goals for Enhancing the Installer

We would like to upgrade the installer across the following areas:

•Advanced installation features

Support for RAID creation from menu, etc.

•Improved user experience

The current shell-based UI is functional but limited. We would like to explore a more modern and user-friendly installer experience.

 

2. Proposed Refactoring

To enable better extensibility, we propose to separate the frontend and backend:

•Backend:

Extract all installation logic into reusable shell-based API functions, allowing a clean and consistent interface.

•Frontend:

Move user interaction elements (dialogs, text UI, progress visualization) into separate files to avoid mixing UI with logic.

This separation would keep the codebase more maintainable and make it easier to introduce new features or alternative frontends.

 

3. Optional Python-Based Frontend

We are also considering offering an enhanced UI frontend using a Python-based framework. A Python UI would allow us to provide a richer, more intuitive interface that is difficult to achieve with pure shell scripting.

Our intention is:

•If upstream is open to a Python-based UI, we would like to contribute this as an optional frontend.

•If upstream prefers to keep the installer shell-based, we are happy to maintain the Python UI downstream while keeping the core backend APIs in upstream shell scripts.

In this model, the backend APIs would remain shell-based and stable, while both shell and Python frontends would call into the same underlying API functions. This would ensure compatibility and avoid duplicating backend logic.

Here is the basic example:

Shell api:

```

sys_is_device_empty() {

    local -A ARGS

    local required=(device)

    api_args ARGS required[@] "$@" || {

        pack_return_data error "$_args_error" retval "1"

        return 1

    }

 

    local fn="${FUNCNAME[0]}"

    local device="${ARGS[device]}"

    log_info "$fn" "Checking if device '$device' is empty"

 

    if cmp /dev/zero "$device" -n 1M >/dev/null 2>&1; then

        pack_return_data error "" retval "0" status "empty"

    else

        pack_return_data error "" retval "1" status "not_empty"

    fi

}

```

Calling api from shell :       

```

#  Check if device is empty

echo "Checking if device /dev/sdb is empty..."

output=$(sys_is_device_empty device="/dev/sdb")

echo "Output: $output"

echo                                                                                           

```

calling same api from python:

```

import subprocess

def main():                   

   # Check empty status

    result = is_device_empty(device="/dev/sdb")

    print("Result:", json.dumps(result, indent=2))

```

4. Request for Feedback

Before we move ahead, we would appreciate feedback from the community on:

1.The idea of splitting the installer into modular backend and frontend components

2.Contributing backend installer logic as structured shell APIs

3.The possibility of supporting an optional Python-based UI frontend

4.Any concerns or suggestions regarding maintainability or integration

We want to ensure that our work aligns with the long-term vision of the Isar project and benefits both upstream and downstream users.

We look forward to the community’s thoughts and guidance on the best way to proceed.

 

Thanks,

Kasturi.

 

--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/58f37a12-3796-489d-be3f-f142ccf2d98dn%40googlegroups.com.