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

CLI: subcommand for saving configuration #1317

Open
Tracked by #1276
ava-affine opened this issue Jun 14, 2024 · 3 comments
Open
Tracked by #1276

CLI: subcommand for saving configuration #1317

ava-affine opened this issue Jun 14, 2024 · 3 comments

Comments

@ava-affine
Copy link

ava-affine commented Jun 14, 2024

unitctl should have an option to save the current running configuration, including NJS configuration and certificates.

Currently the closest analogue is for users to run unitctl edit and then to save the file, but this only works in interactive environments and even then does not include NJS configuration or certificates. Its also a weird path to take when all you want to do is save your configuration.

Consider the following:
$ unitctl save golden-working-config.tar

Additionally, config saved with this subcommand should be immediately importable with unitctl import:

$ tar -xvf golden-working-config.tar
$ unitctl import golden-working-config
@avahahn
Copy link
Contributor

avahahn commented Jun 17, 2024

A couple user stories that this work pertains to:

  • As a support person, devops engineer, or sysadmin responsible for applications deployed in one or more instances of NGINX Unit, I want to be able to save a backup of a perfectly working configuration.
  • As an app developer or support person working on deploying an application with sufficiently complex configuration requirements under NGINX Unit, I want to be able to easily extract an existing configuration that I can work on.
  • As an application developer I want to be able to save and distribute a working application server configuration along with my application.

Per @lcrilly's comments in #1321 I think it is worth using unitctl export for the subcommand here.

@ac000
Copy link
Member

ac000 commented Jun 20, 2024

Can this be closed?

@avahahn
Copy link
Contributor

avahahn commented Jun 21, 2024

Not yet! We need to at least add support for js_modules.
I would be in support of editing this ticket, closing it, and then making a new one for the remaining work if that is preferrable.

@avahahn avahahn removed their assignment Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants