Skip to content

Commit 477d6c3

Browse files
committed
docs(gooddata-pipelines): public documentation
1 parent 371ce50 commit 477d6c3

File tree

9 files changed

+149
-1
lines changed

9 files changed

+149
-1
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ The project documentation is done in hugo. To contribute:
6060

6161
2. Run `make new-docs`
6262

63+
3. Open [http://localhost:1313/latest/](http://localhost:1313/latest/) in your browser to see the preview.
64+
6365
The documentation is deployed using manually triggered GitHub workflows.
6466

6567
One logical change is done in one commit.

docs/content/en/latest/api-reference/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "API Reference"
33
linkTitle: "API Reference"
4-
weight: 60
4+
weight: 70
55
navigationLabel: true
66
---
77

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
title: "Pipelines Overview"
3+
linkTitle: "Pipelines Overview"
4+
weight: 14
5+
---
6+
7+
GoodData Pipelines contains tools for automation of GoodData life cycle. Built over GoodData Python SDK, it allows you to conveniently manage user profiles, workspace permissions and more.
8+
9+
For further information, refer to the PIPELINES section in the left navigation menu.
10+
11+
## Installation
12+
13+
14+
Run the following command to install the ``gooddata-pipelines`` package on your system:
15+
16+
```bash
17+
pip install gooddata-pipelines
18+
```
19+
20+
### Requirements
21+
22+
- Python 3.10 or newer
23+
- GoodData.CN or GoodData Cloud
24+
25+
26+
27+
## Examples
28+
Here are a couple of introductory examples how to manage GoodData resources using Pipelines:
29+
30+
### Provision Child Workspaces
31+
```python
32+
from gooddata_pipelines import WorkspaceProvisioner, WorkspaceFullLoad
33+
34+
# GoodData.CN host in the form of uri eg. "http://localhost:3000"
35+
host = "http://localhost:3000"
36+
37+
# GoodData.CN user token
38+
token = "some_user_token"
39+
40+
# Initialize the provisioner
41+
provisioner = WorkspaceProvisioner.create(host=host, token=token)
42+
43+
# Gather the definitions of the workspaces you want to create
44+
raw_data: list[dict] = [
45+
{
46+
"parent_id": "parent_workspace_id",
47+
"workspace_id": "child_workspace_0",
48+
"workspace_name": "Child Workspace 0",
49+
"workspace_data_filter_id": "data_filter_id",
50+
"workspace_data_filter_values": ["value_0"],
51+
},
52+
...
53+
]
54+
55+
# Validate the data
56+
validated_data = [WorkspaceFullLoad(**item) for item in raw_data]
57+
58+
# Run the provisioning
59+
provisioner.full_load(validated_data)
60+
```
61+
62+
### Workspace Backup
63+
```python
64+
from gooddata_pipelines import BackupManager, BackupRestoreConfig
65+
66+
# GoodData.CN host in the form of uri eg. "http://localhost:3000"
67+
host = "http://localhost:3000"
68+
69+
# GoodData.CN user token
70+
token = "some_user_token"
71+
72+
# Define a list with IDs of workspaces you want to back up
73+
workspaces_to_back_up = ["workspace_id_1", "workspace_id_2"]
74+
75+
# Configure backup options
76+
config = BackupRestoreConfig(storage_type="local")
77+
78+
# Initialize the backup manager
79+
backup_manager = BackupManager.create(config, host, token)
80+
81+
# Run the backup
82+
backup_manager.backup_workspaces(workspace_ids=workspaces_to_back_up)
83+
84+
```
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "GOODDATA PIPELINES"
3+
linkTitle: "GOODDATA PIPELINES"
4+
weight: 60
5+
navigationLabel: true
6+
---
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: "Provisioning"
3+
linkTitle: "Provisioning"
4+
weight: 1
5+
no_list: true
6+
---
7+
8+
Manage resources in GoodData.
9+
10+
11+
## Supported Resources
12+
13+
Resources you can provision using GoodData Pipelines:
14+
15+
- [Workspaces](./workspaces.md)
16+
- [Users](users.md)
17+
- [User Groups](user_groups.md)
18+
- [Workspace Permissions](workspace-permissions.md)
19+
20+
21+
## Workflow Types
22+
23+
There are two types of provisioning supported by GoodData Pipelines:
24+
25+
- [Full load](#full-load)
26+
- [Incremental load](#incremental-load)
27+
28+
The provisioning types employ different algorithms and expect different structure of input data. For details about the expected inputs, check out the documentation page of individual provisioned resource.
29+
30+
### Full Load
31+
32+
Full load provisioning aims to fully synchronize the state of your GoodData instance with the provided input. This workflow will create new resources and update existing ones based on the input. Any resources existing on GoodData Cloud not inluded in the input will be deleted.
33+
34+
### Incremental Load
35+
36+
During incremental provisioning, the algorithm will only interact with resources specified in the input. During the incremental load, the input data expects an extra parameter: `is_active`. Resources with `True` value will be updated. On the other hand, by setting it to `False`, you can mark resources for deletion. Any other resources already existing in GoodData will not be altered.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "User Groups"
3+
linkTitle: "User Group"
4+
weight: 3
5+
---
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "Users"
3+
linkTitle: "Users"
4+
weight: 2
5+
---
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "Workspace Permissions"
3+
linkTitle: "Workspace Permissions"
4+
weight: 4
5+
---
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "Workspaces"
3+
linkTitle: "Workspaces"
4+
weight: 1
5+
---

0 commit comments

Comments
 (0)