Skip to content

Commit

Permalink
Merge pull request #548 from merico-dev/docs-s3-remote-state-doc
Browse files Browse the repository at this point in the history
docs: add s3 remote state doc
  • Loading branch information
daniel-hutao authored May 19, 2022
2 parents 2b3b2f7 + bf7c706 commit 25b6830
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 23 deletions.
6 changes: 4 additions & 2 deletions docs/core-concepts/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ tools:

### State

The `state` section specifies where to store DevStream state. As of now (v0.5.0,) we only support local "backend" to store the DevStream state. AWS S3 backend is being supported and will be released soon.
The `state` section specifies where to store DevStream state. As of now (v0.5.0), we only support local backend.

The `state` section has some options. For example, `stateFile` is mandatory for local backend.
From v0.6.0 on, we will support both "local" and "s3" backend store the DevStream state.

Read the section [The State Section in the Main Config](./stateconfig.md) for more details.

## Default Values

Expand Down
20 changes: 0 additions & 20 deletions docs/core-concepts/state.md

This file was deleted.

40 changes: 40 additions & 0 deletions docs/core-concepts/stateconfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# The State Section in the Main Config

In the main config, we can specify which "backend" to use to store DevStream state.

We support the following types of backend:

- local
- s3

## Local backend config example:

```yaml
varFile: variables-gitops.yaml

toolFile: tools-gitops.yaml

state:
backend: local
options:
stateFile: devstream.state
```
The `stateFile` under the `options` section is mandatory for local backend.

## S3 backend config example:

```yaml
varFile: variables-gitops.yaml
toolFile: tools-gitops.yaml
state:
backend: s3
options:
bucket: devstream-remote-state
region: ap-southeast-1
key: devstream.state
```

The `bucket`, `region`, and `key` under the `ptions` section are all mandatory fields for s3 backend.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ nav:
- 'core-concepts/core-concepts.md'
- 'core-concepts/config.md'
- 'core-concepts/variables.md'
- 'core-concepts/state.md'
- 'core-concepts/stateconfig.md'
- 'core-concepts/dependencies.md'
- 'core-concepts/output.md'
- Plugins:
Expand Down

0 comments on commit 25b6830

Please sign in to comment.