generated from nginx/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 89
feature: Add import, export, bulk management of Staged Configs #553
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
38d8e25
feature: staged configs import, export, bulk management
mjang 53779c3
feature: import, export, bulk API changes
mjang 941b4db
Update content/nginx-one/how-to/staged-configs/import-export-staged-c…
mjang 7a497da
Update content/nginx-one/how-to/staged-configs/import-export-staged-c…
mjang 5e4d753
Apply suggestions from code review
mjang 7f97528
Update content/nginx-one/how-to/staged-configs/import-export-staged-c…
mjang d07c590
Merge branch 'main' into feature-n1c-import-export-bulk2
mjang f8a3a12
Update content/nginx-one/changelog.md
mjang 45cb5d0
Apply suggestions from code review
mjang c7b9f89
Update content/nginx-one/how-to/staged-configs/api-staged-config.md
mjang 2656884
Merge branch 'main' into feature-n1c-import-export-bulk2
mjang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
content/nginx-one/how-to/staged-configs/import-export-staged-config.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
# We use sentence case and present imperative tone | ||
title: Import and export a Staged Configuration | ||
# Weights are assigned in increments of 100: determines sorting order | ||
weight: 300 | ||
# Creates a table of contents and sidebar, useful for large documents | ||
toc: true | ||
# Types have a 1:1 relationship with Hugo archetypes, so you shouldn't need to change this | ||
type: how-to | ||
# Intended for internal catalogue and search, case sensitive: | ||
# Agent, N4Azure, NIC, NIM, NGF, NAP-DOS, NAP-WAF, NGINX One, NGINX+, Solutions, Unit | ||
product: NGINX One | ||
--- | ||
|
||
## Overview | ||
|
||
Many administrators do their work on local systems, virtual machines, Docker containers, and more. F5 NGINX One Console | ||
supports import and export of such configurations. | ||
This guide explains how to import or export a Staged Configuration to your NGINX One Console. | ||
|
||
{{< include "nginx-one/staged-config-overview.md" >}} | ||
|
||
## Before you start | ||
|
||
Before you import or export a Staged Configuration to NGINX One Console, ensure: | ||
|
||
- You have an NGINX One Console account with staged configuration permissions. | ||
|
||
You can also import, export, and manage multiple Staged Configurations through [the API]({{< ref "/nginx-one/how-to/staged-configs/api-staged-config.md" >}}). | ||
|
||
## Considerations | ||
|
||
NGINX One Console supports imports and exports as a compressed archive known as a [tarball](https://en.wikipedia.org/wiki/Tar_(computing)), in `tar.gz` format. | ||
When you work with such archives, consider the following: | ||
|
||
- Do _not_ unpack archives directly to your NGINX configuration directories. You do not want to accidentally overwrite existing configuration files. | ||
- The files are set to a default file permission mode of 0644. | ||
- Do not include files with secrets or personally identifying information. | ||
- We ignore hidden files. | ||
- If you import or export such files in archives, NGINX One Console does not include those files. | ||
- The size of the archive is limited to 5 MB. The size of all uncompressed files in the archive is limited to 10 MB. | ||
|
||
{{< tip >}} | ||
|
||
Before you unpack an archive, run the `tar -tvzf <archive-name>.tar.gz` command. It displays the files and directories in that archive, without overwriting anything. | ||
You'll then know where files are written when you extract an archive with a command like `tar -xvzf <archive-name>.tar.gz`. | ||
|
||
mjang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{{< /tip >}} | ||
|
||
## Import a Staged Configuration | ||
|
||
To import a Staged Configuration from your system to the NGINX One Console, you need to: | ||
|
||
- Package your configuration in `tar.gz` format. For example, the following command creates an archive file named for-import.tar.gz` from files in the `/etc/nginx` directory: | ||
```bash | ||
tar czvf /etc/nginx for-import.tar.gz | ||
``` | ||
|
||
You would then import that file to the NGINX One Console. To do so, follow these steps: | ||
|
||
1. On the left menu, select **Staged Configurations**. | ||
1. Select **Add Staged Configuration**. | ||
1. Select **Import Configuration**. | ||
1. Add a name for the Staged Configuration to be imported. | ||
1. Select **Import from File**. | ||
1. Choose the file. The process depends on your operating system. | ||
1. If successful, you'll see a success message. | ||
- A typical error suggests that the file is too large. | ||
|
||
## Export a Staged Configuration | ||
|
||
You can export a Staged Configuration from the NGINX One Console, as a download, to your system. To do so, follow these steps: | ||
|
||
1. On the left menu, select **Staged Configurations**. | ||
1. Select the Staged Configuration you want to export. | ||
1. Select the ellipsis (...) on the right side of the row with the Staged Configuration. | ||
1. Select **Export** | ||
1. In the file menu that appears, choose a filename for your archive and save the result | ||
1. Be careful. Do not unpack the archive in a way that overwrites your current NGINX configuration. | ||
|
||
## Manage multiple Staged Configurations | ||
|
||
You can also delete multiple Staged Configurations through the UI: | ||
|
||
1. On the left menu, select **Staged Configurations**. | ||
1. Select the Staged Configuration you want to delete. | ||
1. You can then select the **Delete selected** button. | ||
|
||
You can do more from the API. Specifically, with the `object_id` of each configuration, you can create, modify, or delete multiple staged configurations with the [Bulk Staged Configurations endpoint]({{< ref "/nginx-one/api/api-reference-guide/#operation/bulkStagedConfigs" >}}). |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.