Skip to content

Commit d11febb

Browse files
authored
Adds documentation for deployments (#6969)
* Adds documentation for deployments * Add docs for fusion configuration
1 parent ab3909e commit d11febb

File tree

7 files changed

+157
-0
lines changed

7 files changed

+157
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: "Deployment"
3+
---
4+
5+
![Deployment](./images/deployments-0.png)
6+
7+
Deploying a service typically involves publishing a client, schema, or fusion configuration to a stage. This process is an integral part of your service's deployment, where artifacts from your CI/CD pipeline are pushed to the platform and then published to a designated stage prior to the actual deployment of your service.
8+
9+
Whenever you initiate a deployment of a client, schema, or fusion configuration through Barista, it logs an entry in the "Deployments" tab. This tab provides a chronological overview of all deployments executed on the stage, offering visibility into the deployment history and status.
10+
11+
## Setup Approvals
12+
In development environments, it's not uncommon for GraphQL changes to introduce breaking changes. To mitigate the risk of manually pushing such changes to a stage, Barista offers the `--wait-for-approval` flag. This option can be utilized when publishing a schema, client, or fusion configuration and serves as a time saver by allowing you to review and approve deployments directly from the "Deployments" tab.
13+
14+
Deployments flagged with `--wait-for-approval` are held in a pending state, awaiting approval. They remain in this state until explicitly approved or automatically timed out after 10 minutes. This mechanism allows for a controlled deployment process, where potentially breaking changes can be reviewed and either approved or rejected directly from the "Deployments" tab.
15+
16+
![Deployment](./images/deployments-1.png)
17+
18+
229 KB
Loading
232 KB
Loading

website/src/docs/barista/v1/commands/client.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ barista client publish \
2525

2626
- `--api-key <api-key>`: Specifies the API key used for authentication. It doesn't have to be provided when you are logged in. Otherwise, it's the secret that `barista api-key create` returns. You can set it from the environment variable `BARISTA_API_KEY`.
2727

28+
- `--wait-for-approval`: Waits for a user to approve the schema change in the app in case of a breaking change.
29+
2830
# Unpublish a Client
2931

3032
The `barista client unpublish` command is used to unpublish a client version from a stage.
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
title: Fusion Configuration Management
3+
---
4+
5+
# Fusion Configuration Publish
6+
The `barista fusion-configuration publish` command provides a set of subcommands that allow you to begin, start, validate, cancel, and commit a fusion configuration publish, facilitating the management and deployment of fusion configurations.
7+
8+
## Begin a Configuration Publish
9+
10+
The `barista fusion-configuration publish begin` command requests a deployment slot to begin the publish process of a fusion configuration.
11+
12+
```shell
13+
barista fusion-configuration publish begin \
14+
--tag <tag> \
15+
--stage <stage> \
16+
--api-id <api-id> \
17+
[--subgraph-id <subgraph-id>] \
18+
[--subgraph-name <subgraph-name>] \
19+
[--wait-for-approval] \
20+
[--api-key <api-key>]
21+
```
22+
23+
**Options:**
24+
25+
- `--tag <tag>` **(required)**: Specifies the tag of the schema version to deploy. You can set it from the environment variable `BARISTA_TAG`.
26+
27+
- `--stage <stage>` **(required)**: Specifies the name of the stage. You can set it from the environment variable `BARISTA_STAGE`.
28+
29+
- `--api-id <api-id>` **(required)**: Specifies the ID of the API. You can set it from the environment variable `BARISTA_API_ID`.
30+
31+
- `--subgraph-id <subgraph-id>`: Specifies the ID of the subgraph. You can set it from the environment variable `BARISTA_SUBGRAPH_ID`.
32+
33+
- `--subgraph-name <subgraph-name>`: Specifies the name of the subgraph. You can set it from the environment variable `BARISTA_SUBGRAPH_NAME`.
34+
35+
- `--wait-for-approval`: Waits for a user to approve the schema change in the app in case of a breaking change.
36+
37+
- `--api-key <api-key>`: Specifies the API key used for authentication. You can set it from the environment variable `BARISTA_API_KEY`.
38+
39+
## Start a Fusion Configuration Publish
40+
41+
The `barista fusion-configuration publish start` command initiates the publish process of a fusion configuration.
42+
This command has to be executed just after the completion of the `begin` command to confirm the deployment slot.
43+
44+
```shell
45+
barista fusion-configuration publish start \
46+
--request-id <request-id> \
47+
[--api-key <api-key>]
48+
```
49+
50+
**Options:**
51+
52+
- `--request-id <request-id>`: Specifies the ID of the request. You do not have to provide this when you executed the `begin` command in the same session.
53+
54+
- `--api-key <api-key>`: Specifies the API key used for authentication. You can set it from the environment variable `BARISTA_API_KEY`.
55+
56+
## Validate a Fusion Configuration
57+
58+
The `barista fusion-configuration publish validate` command validates a fusion configuration against the schema and clients.
59+
This step is optional and can be used to ensure that the configuration is correct before committing the publish.
60+
61+
```shell
62+
barista fusion-configuration publish validate \
63+
--request-id <request-id> \
64+
--configuration <configuration> \
65+
[--api-key <api-key>]
66+
```
67+
68+
**Options:**
69+
70+
- `--request-id <request-id>`: Specifies the ID of the request. You do not have to provide this when you executed the `begin` command in the same session.
71+
72+
- `--configuration <configuration>` **(required)**: Specifies the path to the fusion configuration file. You can set it from the environment variable `BARISTA_FUSION_CONFIG_FILE`.
73+
74+
- `--api-key <api-key>`: Specifies the API key used for authentication. You can set it from the environment variable `BARISTA_API_KEY`.
75+
76+
## Commit a Fusion Configuration Publish
77+
78+
The `barista fusion-configuration publish commit` command commits the publish process of a fusion configuration.
79+
80+
```shell
81+
barista fusion-configuration publish commit \
82+
--request-id <request-id> \
83+
--configuration <configuration> \
84+
[--api-key <api-key>]
85+
```
86+
87+
**Options:**
88+
89+
- `--request-id <request-id>`: Specifies the ID of the request. You do not have to provide this when you executed the `begin` command in the same session.
90+
91+
- `--configuration <configuration>` **(required)**: Specifies the path to the fusion configuration file. You can set it from the environment variable `BARISTA_FUSION_CONFIG_FILE`.
92+
93+
- `--api-key <api-key>`: Specifies the API key used for authentication. You can set it from the environment variable `BARISTA_API_KEY`.
94+
95+
## Cancel a Fusion Configuration Publish
96+
97+
The `barista fusion-configuration publish cancel` command cancels the publish process of a fusion configuration.
98+
99+
```shell
100+
barista fusion-configuration publish cancel \
101+
--request-id <request-id> \
102+
[--api-key <api-key>]
103+
```
104+
105+
**Options:**
106+
107+
- `--request-id <request-id>`: Specifies the ID of the request. You do not have to provide this when you executed the `begin` command in the same session.
108+
109+
- `--api-key <api-key>`: Specifies the API key used for authentication. You can set it from the environment variable `BARISTA_API_KEY`.
110+
111+
# Download the Most Recent Gateway Configuration
112+
113+
The `barista fusion-configuration download` command is used to download the most recent gateway configuration.
114+
115+
```shell
116+
barista fusion-configuration download \
117+
--stage <stage> \
118+
--api-id <api-id> \
119+
[--output-file <output-file>] \
120+
[--api-key <api-key>]
121+
```
122+
123+
**Options:**
124+
125+
- `--stage <stage>` **(required)**: Specifies the name of the stage. You can set it from the environment variable `BARISTA_STAGE`.
126+
127+
- `--api-id <api-id>` **(required)**: Specifies the ID of the API. You can set it from the environment variable `BARISTA_API_ID`.
128+
129+
- `--output-file <output-file>`: Specifies the path and name of the output file where the downloaded configuration will be saved. You can set it from the environment variable `BARISTA_OUTPUT_FILE`.
130+
131+
- `--api-key <api-key>`: Specifies the API key used for authentication. It's required if you are not logged in. You can set it from the environment variable `BARISTA_API_KEY`.

website/src/docs/barista/v1/commands/schema.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ barista schema publish \
2222
- `--api-id <api-id>` **(required)**: Specifies the ID of the API to which you are uploading the schema. This ID can be retrieved with the `barista api list` command. You can set it from the environment variable `BARISTA_API_ID`.
2323
- `--force`: Forces the operation to succeed even if there are errors.
2424
- `--api-key <api-key>`: Specifies the API key used for authentication. It doesn't have to be provided when you are logged in. Otherwise, it's the secret that `barista api-key create` returns. You can set it from the environment variable `BARISTA_API_KEY`.
25+
- `--wait-for-approval`: Waits for a user to approve the schema change in the app in case of a breaking change.
2526

2627
# Validate a Schema
2728

website/src/docs/docs.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"items": [
4747
{ "path": "overview", "title": "Overview" },
4848
{ "path": "stages", "title": "Stages" },
49+
{ "path": "deployments", "title": "Deployments" },
4950
{ "path": "fusion", "title": "Fusion" },
5051
{
5152
"path": "schema-registry",
@@ -1491,6 +1492,10 @@
14911492
{ "path": "logout", "title": "logout" },
14921493
{ "path": "schema", "title": "schema" },
14931494
{ "path": "stage", "title": "stage" },
1495+
{
1496+
"path": "fusion-configuration",
1497+
"title": "fusion-configuration"
1498+
},
14941499
{ "path": "workspace", "title": "workspace" }
14951500
]
14961501
}

0 commit comments

Comments
 (0)