Skip to content

Commit

Permalink
[docs] update docs for data-lifecycle API
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Cragun <[email protected]>
  • Loading branch information
ryancragun committed Nov 14, 2019
1 parent 0e93b1d commit 18416e0
Show file tree
Hide file tree
Showing 2 changed files with 312 additions and 82 deletions.
82 changes: 0 additions & 82 deletions components/automate-chef-io/content/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,88 +370,6 @@ To configure your Chef Automate installation's load balancer, create a TOML file
# key = "-----BEGIN RSA PRIVATE KEY-----\n<your load balancer private key>\n-----END RSA PRIVATE KEY-----\n"
```

#### Data Retention

The bulk of Chef Automate's data is stored by the ingest, event-feed, and compliance services.
The retention policies for each service can be modified using the service's
gRPC `Purge.Configure` interface.

To configure each service's retention policies run the following commands with the
configuration request tailored to your specific needs. The `recurrence` field can be set
to any valid recurrence rule [as defined in section 4.3.10 of RFC 2445](https://www.ietf.org/rfc/rfc2445.txt).
Any omitted fields will not be updated or overwritten.

```bash
chef-automate dev grpcurl compliance-service -- chef.automate.infra.data_lifecycle.api.Purge.Configure -d '{
"enabled":true,
"recurrence":"FREQ=DAILY;DTSTART=20190820T221315Z;INTERVAL=1",
"policy_update": {
"es": [
{
"disabled": false,
"policy_name":"compliance-scans",
"older_than_days":"60"
},
{
"disabled": false,
"policy_name":"compliance-reports",
"older_than_days":"60"
}
]
}
}'

chef-automate dev grpcurl ingest-service -- chef.automate.infra.data_lifecycle.api.Purge.Configure -d '{
"enabled":true,
"recurrence":"FREQ=DAILY;DTSTART=20190820T221315Z;INTERVAL=1",
"policy_update": {
"es": [
{
"disabled": false,
"policy_name":"converge-history",
"older_than_days":"30"
},
{
"disabled": false,
"policy_name":"actions",
"older_than_days":"30"
}
]
}
}'

chef-automate dev grpcurl event-feed-service -- chef.automate.infra.data_lifecycle.api.Purge.Configure -d '{
"enabled":true,
"recurrence":"FREQ=DAILY;DTSTART=20190820T221315Z;INTERVAL=1",
"policy_update": {
"es": [
{
"disabled": false,
"policy_name":"feed",
"older_than_days":"7"
}
]
}
}'

```

To see the current retention policies for each service use the gRPC `Purge.Show` interface.
```bash
chef-automate dev grpcurl event-feed-service -- chef.automate.infra.data_lifecycle.api.Purge.Show
```

Substitute `event-feed-service` with `ingest-service` or `compliance-service`
to see each service's retention policies.

To immediately run a purge for a service use `Purge.Run` interface.
```bash
chef-automate dev grpcurl event-feed-service -- chef.automate.infra.data_lifecycle.api.Purge.Run
```

Substitute `event-feed-service` with `ingest-service` or `compliance-service`
to run each service's retention policies.

### Troubleshooting

Common syntax errors may cause issues in configuration files:
Expand Down
Loading

0 comments on commit 18416e0

Please sign in to comment.