Ask feature for auto installation #1661
Replies: 2 comments 4 replies
-
So the user needs to generate such a relatively complex jsonnet and also a script with 10 lines including a regexp? I'm really not familiar with the topic and how it is done now on AutoYaST, so I'm just commenting from a very high-level (uninformed) point of view. But if I understood correctly what the user needs to do, I find it a little bit too much. Our users already tend to create complex and kind of hacky solutions relying on the internal technologies of AutoYaST... which is sometimes great but sometimes also a problem for us. This seems to push users a bit to continue in that direction instead of providing some more high-level abstractions. As said, is just an uninformed perception, but it feels to me a bit in the line of "you have scripts and files, so you can do anything... you just need to build it yourself". |
Beta Was this translation helpful? Give feedback.
-
After reading the examples, me as user would prefer to simply indicate questions (complex or not) directly in the JSON profile. Passing a separate file with questions and also a custom script could be too complex. But I like the usage of jsonnet and What about the following (disclaimer: I am basically thinking aloud)?
I don't know if 2. if possible. Maybe we need to generate a JSON from a jsonnet without passing any extVar and read the questions. Of course, questions cannot use jsonnet syntax. And for 3., I think the question definition should indicate the name of the variable in which to store the answer. Then Agama can solve the jsonnet file with that extVar data. If all that is possible, then a user only has to provide a jsonnet file with a questions section and use |
Beta Was this translation helpful? Give feedback.
-
Ask List Feature
The idea of this document is to document an Agama approach to dynamic autoinstallation
profiles based on user interaction via UI. It should cover
All use cases for AutoYast Ask List feature.
The example use cases for this feature is when customer has some deployment
and wants user to decide configuration on system, but on higher level than installer.
such as setting up the network according to the given office location, partitioning
based on the role of the machine in the server room, or security settings based on
required certifications for given machine.
Below is a list of different ideas/possibilities how to implement this in Agama. Nothing is decided yet
but it can be used as a basis for decision and implementation.
Part of JSON profile
This is basically similar way as ask feature in AutoYast. Having question specified directly in some format
in JSON profile and then update profile according to answer. ( Note: AutoYast ask feature also allows to set
variable or write answer to file, probably for possible use in post install script).
Pros:
Cons:
Example: Ask for Root password
Example: Ask to specify ipv4 gateway for primary connection
note: missing type means use default text based question
Encourage CLI usage
Agama provides CLI for asking questions with options to specify either just a button
click, text field, password field
or selection, either exclusive as radio buttons or non-exclusive as checkboxes.
And the user has freedom what to do with the result of this question. The answer can be
to edit profile, do something directly in shell or e.g. provide it as input for jsonnet.
The CLI for asking questions can also be used in pre/post scripts and base some action on user's decision.
decision. For example, some additional software installation and configuration can be done in a
post-installation script based on checkboxes where the user selects what he wants additionally.
Pros:
Cons:
Example ask to specify role of server
Note: this example shows usage of another ideas of separate question file and
also using jsonnet for processing result. But it is not limited to it.
The example expects that admin already prepare files:
Question file question.json
snippet from profile.jsonnet
script to pass to agama.auto
Jsonnet support
Idea is to pass result of question as jsonnet extvar, allowing to do complex modification of json profile.
The source of question can be either in jsonnet ( so it needs initial processing with empty extVars to get
(so basically using questions as part of profile idea), in external questions.json file
or passed from other sources ( e.g. CLI ).
Pros:
Cons:
For example, see example in Encourage CLI usage with possible combination of example for question in json profile.
Possible options
This section is just a different organization of ideas from an implementation POV. It shows options for implementation
and does not mean that only one option can be implemented or that all of them must be implemented.
Where Ask List is specified
How JSON format looks like
How the response is processed
Notes
Few notes that do not fit into ideas, but is worth mentioning.
There was a discussion if composition is the best from user POV or if it needs another layer on top that is even more user friendly.
The layer may also be needed to provide defaults where it makes sense. Current CLI does not support defaults.
Beta Was this translation helpful? Give feedback.
All reactions