Skip to content

Commit cd4ef71

Browse files
committed
[Docs]add env policy section in getting started
1 parent 8474446 commit cd4ef71

File tree

12 files changed

+277
-42
lines changed

12 files changed

+277
-42
lines changed

docs.kosli.com/content/faq/_index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ API-TOKEN = "123456abcdef"
131131
132132
When calling Kosli command you can skip the file extension. For example, to list environments with `org` and `api-token` in the configuration file you would run:
133133
134-
```
135-
$ kosli list environments --config-file kosli-conf
134+
```shell {.command}
135+
kosli list environments --config-file kosli-conf
136136
```
137137

138138
`--config-file` defaults to `kosli`, so if you name your file `kosli.<yaml|toml|json>` and the file is in the same location as where you run Kosli commands from, you can skip the `--config-file` altogether.
@@ -163,8 +163,8 @@ part of the template, the state of the extra evidence will affect the overall co
163163

164164
The `--compliant` flag is a [boolean flag](#boolean-flags).
165165
To report generic evidence as non-compliant use `--compliant=false`, as in this example:
166-
```
167-
$ kosli report evidence artifact generic server:1.0 \
166+
```shell {.command}
167+
kosli report evidence artifact generic server:1.0 \
168168
--artifact-type docker \
169169
--name test \
170170
--description "generic test evidence" \

docs.kosli.com/content/getting_started/approvals.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: "Part 9: Approvals"
2+
title: "Part 10: Approvals"
33
bookCollapseSection: false
44
weight: 300
55
summary: "When an artifact is ready to be deployed to a given environment, an approval may be reported to Kosli. An approval can be requested which will require a manual action, or reported automatically. This will be recorded in Kosli so the decision made outside your CI system won't be lost."
66
---
7-
# Part 9: Approvals
7+
# Part 10: Approvals
88

99
When an artifact is ready to be deployed to a given [environment](/getting_started/environments/), an approval may be reported to Kosli. An approval can be requested which will require a manual action, or reported automatically. This will be recorded in Kosli so the decision made outside your CI system won't be lost.
1010

docs.kosli.com/content/getting_started/artifacts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ By establishing and maintaining binary provenance for artifacts, Kosli enables y
2828

2929
To attest an artifact, you can run a command similar to the one below:
3030

31-
```shell
32-
$ kosli attest artifact project-a-app.bin \
31+
```shell {.command}
32+
kosli attest artifact project-a-app.bin \
3333
--artifact-type file \
3434
--build-url https://exampleci.com \
3535
--commit-url https://github.com/ProjectA/ProjectAApp/commit/e67f2f2b121f9325ebf166b7b3c707f73cb48b14 \
@@ -63,8 +63,8 @@ This will allow you to instantly turn off all Kosli CLI commands if Kosli is dow
6363

6464
The `--dry-run` flag is also useful when trying commands locally. For example:
6565

66-
```shell
67-
$ kosli attest artifact cyberdojo/differ:dde3b2a \
66+
```shell {.command}
67+
kosli attest artifact cyberdojo/differ:dde3b2a \
6868
--artifact-type=docker \
6969
--org=cyber-dojo \
7070
--flow=differ-ci \

docs.kosli.com/content/getting_started/attestations.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ When you make an attestation, you have the choice of what `name` to attach it to
3939

4040
The `jira-ticket` attestation belongs to a single trail and is not linked to a specific artifact. In this example, the id of the trail is the git commit.
4141

42-
```shell
43-
$ kosli attest jira \
42+
```shell {.command}
43+
kosli attest jira \
4444
--flow backend-ci \
4545
--trail $(git rev-parse HEAD) \
4646
--name jira-ticket
@@ -51,8 +51,8 @@ $ kosli attest jira \
5151

5252
Some attestations are attached to a specific artifact, like the unit tests for the `backend` artifact. Often, evidence like unit tests are created _before_ the artifact is built. To attach the evidence to the artifact before its creation, use `backend` (the artifact's `name` from the template), as well as `unit-tests` (the attestation's `name` from the template).
5353

54-
```shell
55-
$ kosli attest junit \
54+
```shell {.command}
55+
kosli attest junit \
5656
--name backend.unit-tests \
5757
--flow backend-ci \
5858
--trail $(git rev-parse HEAD) \
@@ -65,8 +65,8 @@ This attestation belongs to any artifact attested with the matching `name` from
6565

6666
Once the artifact has been built, it can be attested with the following command.
6767

68-
```shell
69-
$ kosli attest artifact my_company/backend:latest \
68+
```shell {.command}
69+
kosli attest artifact my_company/backend:latest \
7070
--artifact-type docker \
7171
--flow backend-ci \
7272
--trail $(git rev-parse HEAD) \
@@ -88,8 +88,8 @@ Often, evidence like snyk reports are created _after_ the artifact is built. In
8888

8989
The following attestation will only belong to the artifact `my_company/backend:latest` attested above and its fingerprint, in this case calculated by the Kosli CLI.
9090

91-
```shell
92-
$ kosli attest snyk \
91+
```shell {.command}
92+
kosli attest snyk \
9393
--artifact-type docker my_company/backend:latest \
9494
--name backend.security-scan \
9595
--flow backend-ci \
@@ -107,12 +107,12 @@ Typically, the Flow and Trail are explicitly setup before making the attestation
107107
This is done with the `create flow` and `begin trail` commands, either of which can specify the name of the template yaml file above
108108
(e.g. `.kosli.yml`) whose contents define overall compliance. For example:
109109

110-
```shell
111-
$ kosli create flow backend-ci \
110+
```shell {.command}
111+
kosli create flow backend-ci \
112112
--template-file .kosli.yml
113113
...
114114
115-
$ kosli begin trail $(git rev-parse HEAD) \
115+
kosli begin trail $(git rev-parse HEAD) \
116116
--flow backend-ci \
117117
...
118118
```
@@ -142,7 +142,6 @@ Attestations are append-only immutable records. You can report the same attestat
142142
However, only the latest version of the attestation is considered when evaluating compliance.
143143

144144

145-
146145
## Evidence Vault
147146

148147
Along with attestations data, you can attach additional supporting evidence files. These will be securely stored in Kosli's **Evidence Vault** and can easily be retrieved when needed. Alternatively, you can store the evidence files in your own preferred storage and only attach links to it in the Kosli attestation.

docs.kosli.com/content/getting_started/environments.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
title: "Part 8: Environments"
33
bookCollapseSection: false
44
weight: 280
5-
summary: "Kosli environments allow you to record the artifacts running in your runtime environments and how they change. Every time an environment change (or a set of changes) is reported, Kosli creates a new environment snapshot containing the status of the environment at a given point in time."
5+
summary: "Kosli environments allow you to record the artifacts running in your runtime environments and how they change. Every time an environment change (or a set of changes) is reported, Kosli creates a new environment snapshot containing the status of the environment at a given point in time. The change record created in Kosli enables you to retrospectively perform runtime forensics about what ran where and when."
66
---
77
# Part 8: Environments
88

9-
Kosli environments allow you to record the artifacts running in your runtime environments and how they change. Every time an environment change (or a set of changes) is reported, Kosli creates a new environment snapshot containing the status of the environment at a given point in time.
9+
Kosli environments allow you to record the artifacts running in your runtime environments and how they change. Every time an environment change (or a set of changes) is reported, Kosli creates a new environment snapshot containing the status of the environment at a given point in time. The change record created in Kosli enables you to retrospectively perform runtime forensics about what ran where and when.
1010

1111
## Create an environment
1212

@@ -21,7 +21,7 @@ Make sure that type of Kosli environment matches the type of the environment you
2121
To create an environment via CLI, you would run a command like this:
2222

2323
```shell {.command}
24-
$ kosli create environment quickstart \
24+
kosli create environment quickstart \
2525
--environment-type docker \
2626
--description "quickstart environment for tutorial"
2727
```
@@ -42,8 +42,8 @@ After the new environment is created you'll be redirected to its page, which wil
4242

4343
## Snapshoting an environment
4444

45-
To record the current status of your environment you need to make Kosli CLI snapshot the running artifacts in it and report it to Kosli.
46-
When Kosli receives an environment report, if the received list of running artifacts is different than what is in the latest environment snapshot, a new environment snapshot is created. Snapshots are immutable and can't be tampered with.
45+
To record the current status of your environment you need to use the Kosli CLI to snapshot the running artifacts in it and report it to Kosli.
46+
When Kosli receives an environment report, if the received list of running artifacts is different than what is in the latest environment snapshot, a new snapshot is created. Snapshots are immutable and can't be tampered with.
4747

4848
Currently, the following environment types are supported:
4949
- Kubernetes
@@ -52,6 +52,7 @@ Currently, the following environment types are supported:
5252
- AWS Simple Storage Service (S3)
5353
- AWS Lambda
5454
- AWS Elastic Container Service (ECS)
55+
- Azure Web Apps and Function Apps
5556

5657
You can report environment snapshots manually using the `kosli snapshot [...]` commands for testing. For production use, however, you would configure the reporting to happen automatically on regular intervals, e.g. via a cron job or scheduled CI job, or on certain events.
5758

docs.kosli.com/content/getting_started/flows.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ In all the commands below we skip the required `--api-token` and `--org` flags f
1616

1717
To create a Flow, you can run:
1818

19-
```shell
20-
$ kosli create flow process-a --description "My SW delivery process" \
19+
```shell {.command}
20+
kosli create flow process-a --description "My SW delivery process" \
2121
--use-empty-template
2222
```
2323

@@ -46,8 +46,8 @@ trail:
4646
4747
To create a Flow with a template, you can run:
4848
49-
```shell
50-
$ kosli create flow process-a --description "My SW delivery process" \
49+
```shell {.command}
50+
kosli create flow process-a --description "My SW delivery process" \
5151
--template-file sw-delivery-template.yml
5252
```
5353

docs.kosli.com/content/getting_started/install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,6 @@ API-TOKEN = "123456abcdef"
163163
When using the `--config-file` flag you can skip the file extension. For example,
164164
to list environments with `org` and `api-token` in the configuration file you would run:
165165

166-
```
167-
$ kosli list environments --config-file=kosli-conf
166+
```shell {.command}
167+
kosli list environments --config-file=kosli-conf
168168
```

docs.kosli.com/content/getting_started/next.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: "Part 10: Next Steps"
2+
title: "Part 11: Next Steps"
33
bookCollapseSection: false
44
weight: 310
55
summary: "In the previous chapters, you explored Kosli Flows and Environments and have reported some data to Kosli.
66
The next steps would be to harness the benefits of your hard work. Here are a few areas to look at next:"
77
---
8-
# Part 10: Next Steps
8+
# Part 11: Next Steps
99

1010
In the previous chapters, you explored Kosli Flows and Environments and have reported some data to Kosli.
1111
The next steps would be to harness the benefits of your hard work. Here are a few areas to look at next:

0 commit comments

Comments
 (0)