apache / openserverless

Apache OpenServerless
https://openserverless.apache.org
Apache License 2.0
22 stars 13 forks source link

write a configurator script #25

Closed sciabarracom closed 2 months ago

sciabarracom commented 3 months ago

Write a configurator script that will replace nuv configuratos that can be executed with bun such as:

bun config.sh config.json will execute a configuation like the one performed by npm create svelte

The configuration itself is sprecified by someting like this:

{
   "AWS_ACCESS_ID": {
      type: "string"
    },
    "AWS_VM_COUNT": {
       type: "int"
     } 
}

include the more common options for string, boolen, int, fixed lists, hidden password etc

it shold read the current confgurations (invoking nuv -config -d) and complete setting the configurations (invoking nuv -config A=b)

It should replace the configurator at the moment on nuv cloud eks config (and aks and gke and so on) with a single config.json

All the dependencies required should be donwloaded automatically

implement in a separate repo until we are read to include in openserverless-task

dcremonini commented 3 months ago

You can find the library @clack/prompts here https://www.npmjs.com/package/@clack/prompts

There is also a demo here https://stackblitz.com/edit/clack-prompts?file=index.js

Hope this helps.

sciabarracom commented 3 months ago

contribute a PR to be usable as $OPS util config with bun storing the result in an attribute

add tests under ops tests