Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide parameters interactively [Feature Request] #793

Closed
cocowalla opened this issue Nov 6, 2019 · 4 comments
Closed

Provide parameters interactively [Feature Request] #793

cocowalla opened this issue Nov 6, 2019 · 4 comments
Labels
nope This will not be worked on, #SorryNotSorry

Comments

@cocowalla
Copy link

Problem

Some apps have a lot of configurable parameters, which can be fiddly to supply using the porter install --param/param-file syntax. Additionally, having to supply several parameters on the command line can be a bit daunting for some users who are less Linux-savvy.

Request

In addition to the existing --param/param-file syntax, this request is for the possibility to supply parameter values interactively.

There would need to be a means of entering interactive mode, such as:

porter install --interactive or in short form porter install -i

Ideally this could be combined with the existing --param/param-file syntax, which would provide default values that could be changed interactively if required (or perhaps suppress those prompts).

Worked Example

Consider the following porter YAML snippet:

parameters:
- name: database_name
  type: string
  description: Name of the database to create
  default: widgets
  
- name: database_port
  type: integer
  description: TCP port the database server will listen on
  default: 5432

The following command is issued:

porter install MyApp --interactive --param database_name=myergen

The interactive prompts begin:

Please provide parameter values

Name of the database to create
database_name: myergen

Here the value is defaulted from the value provided on the command line, and can be adjusted if required.

TCP port the database server will listen on
database_port: 5432

Here the value is defaulted from the YAML config, and can be adjusted if required.

@cocowalla cocowalla added the bug Oops, sorry! label Nov 6, 2019
@carolynvs carolynvs added enhancement New code incoming! and removed bug Oops, sorry! labels Nov 11, 2019
@squillace
Copy link

This seems similar to #833 in objective. Is that true?

@cocowalla cocowalla reopened this Dec 31, 2019
@cocowalla
Copy link
Author

Woops, hit close by mistake :)

@squillace yes, the objectives are similar; this was opened back in November, #833 more recently.

I think the only material difference is that #833 also describes saving the inputs in a "parameters file" that porter then uses, whereas my issue describes forwarding the values straight to porter without persisting them to disk - I do like the idea of a "parameters file" though.

@vdice
Copy link
Member

vdice commented Jun 23, 2020

A related update here. Although not necessarily fulfilling the request in this ticket, Porter has now introduced structured parameter mappings aka Parameter Sets. These can currently be generated interactively, similar to credentials generation, e.g. porter parameters generate. (Note, however, that interactive generation for both parameters and credentials will most likely be removed in the near future; see #1080)

@carolynvs
Copy link
Member

We have since moved away from interactive commands (#1080). I recommend that we use different UI than porter's CLI (such as VS Code) to improve upon the interactive/discoverable experience.

@carolynvs carolynvs added nope This will not be worked on, #SorryNotSorry and removed enhancement New code incoming! labels Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nope This will not be worked on, #SorryNotSorry
Projects
None yet
Development

No branches or pull requests

4 participants