Streamline App Process: From guide to dashboard app via hero AI manager #24

Open
opened 2024-07-23 16:01:44 +00:00 by mik-tf · 1 comment
Owner

Proposition Overview

  • We propose to streamline the process of building an app on the dashboard
  • This is done in two phases:
    • from manual to flist
    • from flist to dashboard app

Uniform Method of Using the TFGrid

  • The manual now documents the essential steps and a uniform method can be built:
    • Uniform method of working with the TFGrid:
      • Using a micro VM
        • can then be easily translated to flist steps
      • Set services with zinit
        • as micro VM works with zinit and not systemd
      • Write bash CLI scripts taking variables
        • in the manual, we give steps to users as CLI commands, so they do not execute a script per se, but the bash codes are acting as scripts (i.e. CLI scripts, not File scripts).
      • Give steps to user for steps done by the user and not the app
        • this info will be written in the README.md

Hero Role

  • Hero takes this markdown guide and turns it into heroscript to build an app
    • 1st phase
      • Turn text in Docker image
        • with README.md of all non-app steps made by user
        • with Dockerfile, zinit and scripts files + directories.
      • Turn Docker into Flist
        • the Flist's README.md contains all information to deploy the flist on the tfgrid
    • 2nd phase
      • Hero turns flist into dashboard app

Markdown File Structure

  • Markdown file structure
    • the markdown file uses a set of headings ensuring optimal hero conversion
      • type of environment
        • micro VM characteristics
      • preparing the environment
        • apt update && apt install -y ...
      • running CLI commands to deploy
        • turn this into scripts and/or Dockerfile steps

Major Aspects

  • Major aspects:
    • differentiating between what goes into Dockerfile and what goes into scripts will be crucial for effective conversion process
    • setting effective yaml zinit files will be crucial for effective conversion process

UX

As writers of guides and apps, we first do some explorations (R&D phase). Then, when we have a working app/product, we write the steps in a markdown file, then hero converts the steps into an flist (as per tf-images repo structure). Finally, Hero converts the Flist into a Dashboard app (as per tfgrid-sdk-ts repo structure).

  • R&D Stage: test on a micro VM the steps to build the app
    • e.g. dashboard suite, zos boot generator, ubuntu image, nextcloud app, casperlabs, etc.
  • Manual Stage: write the steps in a markdown file with distinct section
    • manual section e.g.:
      • prerequisites
      • deployment
      • etc.
    • hero conversion e.g.:
      • Dockerfile, zinit, scripts, README.md
    • each section constitutes logical section necessary for a docker image
      • e.g. scripts go into /scripts
      • yaml files go into /sbin/zinit
  • Hero conversion Stage: Hero
    • takes the manual markdown files of the steps and
    • turns it into a Docker image
    • it pushes the image to Docker Hub
    • then use the TF Hub to convert from docker to flist
    • then creates a dashboard app with all the necessary environment variables and Vue layout

Two Actions: App Actions, User Actions

There are two types of actions, user action, e.g. set the DNS record of a domain (can't be automated directly), and app action, e.g. the app sets the environment (written in scripts, can be automated).

  • We use Hero AI assistant to easily go from one step to another of the TF App process.
    • Hero can differentiate when steps are done by the flist/dashboard app OR by the user (e.g. set DNS A Record is done by user, loading latest TF repos is done by the flist, etc.)

Repos

## Proposition Overview - We propose to streamline the process of building an app on the dashboard - This is done in two phases: - from manual to flist - from flist to dashboard app ## Uniform Method of Using the TFGrid - The manual now documents the essential steps and a uniform method can be built: - Uniform method of working with the TFGrid: - Using a micro VM - can then be easily translated to flist steps - Set services with zinit - as micro VM works with zinit and not systemd - Write bash CLI scripts taking variables - in the manual, we give steps to users as CLI commands, so they do not execute a script per se, but the bash codes are acting as scripts (i.e. CLI scripts, not File scripts). - Give steps to user for steps done by the user and not the app - this info will be written in the README.md ## Hero Role - Hero takes this markdown guide and turns it into heroscript to build an app - 1st phase - Turn text in Docker image - with README.md of all non-app steps made by user - with Dockerfile, zinit and scripts files + directories. - Turn Docker into Flist - the Flist's README.md contains all information to deploy the flist on the tfgrid - 2nd phase - Hero turns flist into dashboard app ## Markdown File Structure - Markdown file structure - the markdown file uses a set of headings ensuring optimal hero conversion - type of environment - micro VM characteristics - preparing the environment - apt update && apt install -y ... - running CLI commands to deploy - turn this into scripts and/or Dockerfile steps ## Major Aspects - Major aspects: - differentiating between what goes into Dockerfile and what goes into scripts will be crucial for effective conversion process - setting effective yaml zinit files will be crucial for effective conversion process ## UX As writers of guides and apps, we first do some explorations (R&D phase). Then, when we have a working app/product, we write the steps in a markdown file, then hero converts the steps into an flist (as per tf-images repo structure). Finally, Hero converts the Flist into a Dashboard app (as per tfgrid-sdk-ts repo structure). - R&D Stage: test on a micro VM the steps to build the app - e.g. dashboard suite, zos boot generator, ubuntu image, nextcloud app, casperlabs, etc. - Manual Stage: write the steps in a markdown file with distinct section - manual section e.g.: - prerequisites - deployment - etc. - hero conversion e.g.: - Dockerfile, zinit, scripts, README.md - each section constitutes logical section necessary for a docker image - e.g. scripts go into /scripts - yaml files go into /sbin/zinit - - Hero conversion Stage: Hero - takes the manual markdown files of the steps and - turns it into a Docker image - it pushes the image to Docker Hub - then use the TF Hub to convert from docker to flist - then creates a dashboard app with all the necessary environment variables and Vue layout ## Two Actions: App Actions, User Actions There are two types of actions, user action, e.g. set the DNS record of a domain (can't be automated directly), and app action, e.g. the app sets the environment (written in scripts, can be automated). - We use Hero AI assistant to easily go from one step to another of the TF App process. - Hero can differentiate when steps are done by the flist/dashboard app OR by the user (e.g. set DNS A Record is done by user, loading latest TF repos is done by the flist, etc.) ## Repos - The structures should follow existing TFGrid repos to ensure flowing CI/CD, e.g. - tf-images: - https://github.com/threefoldtech/tf-images - tfgrid-sdk-ts - https://github.com/threefoldtech/tfgrid-sdk-ts
mik-tf added the
Story
label 2024-07-23 16:01:44 +00:00
Author
Owner

@despiegk
Pinging you so you can have a look. No rush, might be for 3.20. Didn't set a project yet.

@despiegk Pinging you so you can have a look. No rush, might be for 3.20. Didn't set a project yet.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tfgrid/circle_feedback#24
No description provided.