Skip to content

Commit

Permalink
chore: update screenshots, import export docs (#129)
Browse files Browse the repository at this point in the history
* chore: update screenshots, import export docs

* chore: add readonly image
  • Loading branch information
markphelps authored Oct 5, 2023
1 parent b732e87 commit 7b0c37b
Show file tree
Hide file tree
Showing 22 changed files with 21 additions and 45 deletions.
13 changes: 7 additions & 6 deletions configuration/storage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ whereas, the `git` and `object` backends are intended for production and serve f

### Read Only Mode

Once enabled, all filesystem backends put the Flipt API and UI into a `read only` mode that prevents Flipt from writing to the backend. This is useful for production environments where you want to ensure that flag state is only managed via the configured backend.
![Read Only Mode](/images/configuration/readonly.png)

Once enabled, all filesystem backends put the Flipt API and UI into a `read-only` mode that prevents Flipt from writing to the backend. This is useful for production environments where you want to ensure that flag state is only managed via the configured backend.

### Local

Expand Down Expand Up @@ -284,8 +286,8 @@ These files declaratively define what flags, segments, variants, etc. exist and
#### Locating Flag State

Flipt's filesystem backends allow you to define feature flags alongside other configurations in a shared directory, repository, or object storage bucket.
In order to identify which files are intended for Flipt, it uses a naming scheme to index which are flag state files.
By default, Flipt will look for the following filename patterns when identifying files to attempt to parse as Flipt state:

Flipt uses a naming scheme to index which files are flag state files. By default, Flipt will look for the following filename patterns to attempt to parse as Flipt state:

- `**/features.yaml`
- `**/features.yml`
Expand All @@ -294,8 +296,7 @@ By default, Flipt will look for the following filename patterns when identifying

Any file named `features.yaml`, `features.yml`, or with either extension `.features.yaml` or `.features.yml` is considered recursively from the root of your target.

If this naming convention doesn't work for you, it can be overridden by creating a file named `.flipt.yml` in the root of your target directory tree.
This file will be used to instruct Flipt on how to index your directory tree and find flag state files:
If this naming convention doesn't work for you, it can be overridden by creating a file named `.flipt.yml` in the root of your target directory tree. This file will be used to instruct Flipt on how to index your directory tree and find flag state files:

```yaml
version: "1.0"
Expand All @@ -318,7 +319,7 @@ Flipt flag state file format has been taken directly from Flipt's existing
[import and export](/operations/import-export) flag state format.

You can run `flipt export` on your existing Flipt instance, and then
add/commit the result to a directory, object storage, or Git repository to get started quickly.
add/commit the result to a directory, object storage, or Git repository to get started.

This can be used to migrate from a relational database-backed instance of Flipt to a filesystem-backed deployment with ease.

Expand Down
Binary file modified images/concepts/constraints.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/constraints_types.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/distributions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/evaluation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/flags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/flags_boolean.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/flags_variants.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/namespaces_default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/namespaces_production.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/rollouts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/rules.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/segments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/concepts/settings_namespaces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/configuration/readonly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/getting_started/create_constraint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/getting_started/create_flag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/getting_started/create_rule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/getting_started/create_segment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/getting_started/create_variant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/getting_started/evaluation_console.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 14 additions & 39 deletions operations/import-export.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,55 +17,35 @@ Both `HTTP` and `gRPC` are supported by the `--address` flag.

## Import

To import data into Flipt, use the `flipt import` command. You
can import either from a file or from STDIN.
To import data into Flipt, use the `flipt import` command. You can either import from a file or from STDIN.

To import from STDIN, Flipt requires the `--stdin` flag:

```yaml
cat flipt.yaml | flipt import --stdin
```

If not importing using `--stdin`, Flipt requires the file to be imported as an
argument:
If not importing using `--stdin`, Flipt requires the file to be imported as an argument:

```yaml
flipt import flipt.yaml
```

By default, Flipt will import into the `default` namespace.
Use the flag `--namespace` to import into a different namespace.

```yaml
flipt import --namespace production flipt.yaml
```

A namespace must exist before your import into it.
For convenience, you can supply `--create-namespace` in order for Flipt to automatically create the namespace if it doesn't already exist.

```yaml
flipt import --namespace production --create-namespace flipt.yaml
```

<Note>
In [v1.28.0](https://github.com/flipt-io/flipt/releases/tag/v1.28.0), we introduced some breaking changes to `import`.

You no longer have to use the `--namespace` or `--create-namespace` flags to import resources into a specific namespace.

The namespaces are now inferred from the YAML documents themselves. If a namespace your document refers to does not exist in the database, it will be created.

Namespaces are inferred from the YAML documents themselves. If a namespace
your document refers to doesn't exist in the database, it will be created.
</Note>

This command supports the `--drop` flag that will drop all data in your
Flipt database tables before importing. This is to ensure that no data
collisions occur during the import.
This command supports the `--drop` flag that will drop all data in your Flipt database tables before importing. This is to ensure that no data collisions occur during the import.

<Warning>
Be careful when using the `--drop` flag as it will immediately drop all data
and there is no undo. It's recommended to first backup your database before
running this command just to be safe.
</Warning>

See the [CLI reference](/cli/commands/import) for more information on the `import` command.

## Export

To export Flipt data, use the `flipt export` command.
Expand Down Expand Up @@ -94,20 +74,15 @@ flags:
flipt export -o flipt.yaml
```

By default, Flipt will export from the `default` namespace.
Use the flag `--namespace` to export from a different namespace.
By default, Flipt will export from the `default` namespace. Use the flag `--namespaces` to export from a different namespace or multiple namespaces.

```yaml
flipt export --namespace production
flipt export --namespaces production
```

<Note>
In [v1.28.0](https://github.com/flipt-io/flipt/releases/tag/v1.28.0), we have extended this functionality to support exporting state from multiple namespaces to a single YAML file.

The `--namespace` flag is now deprecated.

The `--namespaces` flag will accept a comma-delimited list of namespaces from which you would like to export from.
<Tip>
The `--all-namespaces` flag is a boolean flag that tells export to export all
namespaces.
</Tip>

The `--all-namespaces flag is a boolean flag that tells export to export all namespaces to the single file you specify, or to standard out by default.

</Note>
See the [CLI reference](/cli/commands/export) for more information on the `export` command.

0 comments on commit 7b0c37b

Please sign in to comment.