Skip to content

Commit c76ee12

Browse files
authored
docs: minor improvements on quickstart (#915)
Signed-off-by: Miguel Martinez Trivino <[email protected]>
1 parent 55eca69 commit c76ee12

File tree

2 files changed

+60
-21
lines changed

2 files changed

+60
-21
lines changed

docs/docs/getting-started/workflow-definition.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ A workflow represents the identity of any automation, any CI/CD workflow you wan
2424

2525
### Chainloop API Token
2626

27-
A [Chainloop API Token](/reference/operator/api-tokens) is a long-lasting, though revokable, **secret token associated with a Chainloop organization**. It's meant to be used in the target CI/CD pipeline during the attestation process and/or for unatended operations with the controlplane. This token along with the crafting CLI are the only two things development teams need to perform attestations.
27+
A [Chainloop API Token](/reference/operator/api-tokens) is a long-lasting, though revokable, **secret token associated with a Chainloop organization**. It's meant to be used in the target CI/CD pipeline during the attestation process and/or for unattended operations with the controlplane. This token along with the crafting CLI are the only two things development teams need to perform attestations.
2828

2929
## Workflow and Contract creation
3030

docs/docs/quickstart.md

Lines changed: 59 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,94 @@ title: Quickstart
55

66
# Quickstart
77

8-
In this quickstart, we will install Chainloop and make our first attestation:
8+
This quickstart will guide you through the process of installing the Chainloop CLI and performing your first attestation.
9+
10+
1. Install CLI by running:
911

10-
1. Install Chainloop. This quick snippet will get you through the process:
1112
```bash
1213
curl -sfL https://docs.chainloop.dev/install.sh | bash -s
1314
```
1415
Refer to [these instructions](/getting-started/installation) for more installation options.
1516

16-
2. Authenticate to the Control Plane via OIDC by running:
17+
2. Authenticate to the Control Plane:
18+
1719
```bash
1820
chainloop auth login
1921
```
20-
This will create a personal token that you will use in operations not related to attestations.
2122

22-
3. Create a new Chainloop workflow.
23+
Once logged in and will have access to any operation with the controlplane, like for example inspecting your organization
24+
2325
```bash
24-
chainloop wf create --name mywf --project myproject
26+
chainloop organization describe
2527
```
26-
Chainloop workflows represent any CI or process you might want to attest.
27-
Check [this doc](/getting-started/workflow-definition)
28-
for a complete explanation of Workflows and Contracts.
28+
29+
3. Create a new Chainloop Workflow.
30+
31+
Chainloop workflows represent any CI or process you might want to attest. Check [this doc](/getting-started/workflow-definition) for a complete explanation of Workflows and Contracts.
2932
You might also want to check our [contract reference](/reference/operator/contract).
3033

34+
```bash
35+
chainloop workflow create --name mywf --project myproject
36+
```
37+
38+
3139
4. Create API Token to perform the attestation process:
40+
41+
To perform an attestation process, you need to provide an API Token:
42+
3243
```bash
33-
export CHAINLOOP_TOKEN=$(chainloop org api-token create --name test-api-token -o json | jq -r ".[].jwt")
44+
export CHAINLOOP_TOKEN=$(chainloop org api-token create --name test-api-token -o token)
3445
```
35-
CHAINLOOP_TOKEN environment variable is commonly used from CI/CD scenarios, where a personal token is not available.
36-
Tokens have narrower permissions, ensuring that they can only perform the operations they are granted to.
37-
More information in [API Tokens](/reference/operator/api-tokens#api-tokens).
3846

39-
5. Perform an attestation:
47+
Chainloop API Tokens are commonly used (and required) in CI/CD scenarios. Tokens have narrower permissions, ensuring that they can only perform the operations they are granted to. More information in [API Tokens](/reference/operator/api-tokens#api-tokens).
48+
49+
5. Perform an attestation process:
50+
51+
We are now ready to perform our first attestation, to learn more about its lifecyle refer to [this section](/getting-started/attestation-crafting#introduction)
4052

41-
First, let's [initiate the attestation](/getting-started/attestation-crafting#initialization).
53+
We'll start with the [initialization](/getting-started/attestation-crafting#initialization) of an attestation for our previously created workflow (`mywf`)
54+
4255
```bash
43-
chainloop att init --workflow-name mywf
56+
chainloop att init --name mywf
4457
```
4558
4659
Once attestation is initiated, we can start [adding materials](/getting-started/attestation-crafting#adding-materials) to it.
4760
In this case we are adding an OCI container image.
4861
Many other material types are supported, check the [updated the list](/reference/operator/contract#material-schema)
62+
63+
```bash
64+
chainloop att add --value ghcr.io/chainloop-dev/chainloop/control-plane:latest
65+
```
66+
67+
We just attested the latest version of the control-plane image as an example, remember that you can provide any material you want to attest by pointing to a local filepath too, like for example
68+
4969
```bash
50-
chainloop att add --value "ghcr.io/chainloop-dev/chainloop/control-plane:latest"
70+
chainloop att add --value my-sbom.json
5171
```
5272
5373
And finally [we sign and push the attestation](/getting-started/attestation-crafting#encode-sign-and-push-attestation) to Chainloop for permanent preservation.
74+
5475
```bash
5576
chainloop att push
5677
```
57-
Note that, in this example, we are not specifying any private key for signing.
58-
This will make the CLI to work in key-less mode, generating an ephemeral certificate,
59-
signed by Chainloop CA, to ensure the trust chain, and finally using it for the signature.
78+
79+
6. Operate on your data:
80+
81+
At this point, we've performed our first attestation, now we can just play with the Chainloop CLI to inspect the attestation, verify it and so on.
82+
83+
For example, to list the workflows you can run:
84+
85+
```bash
86+
# List workflow runs, so then you can do `workflow run describe --id <id>` to get more details
87+
chainloop workflow run ls
88+
```
89+
90+
for a complete list of available options and operations refer to
91+
92+
```
93+
chainloop --help
94+
```
95+
96+
Great! You've successfully completed this guide. Now you are ready to dive deeper into our [Getting Started guide](/getting-started/installation)
97+
98+
Good luck and have fun with Chainloop! 🚀

0 commit comments

Comments
 (0)