Sync Server beginning of documentation

This commit is contained in:
Petr Kalis 2021-05-05 15:34:26 +02:00
parent b00e9f7ad8
commit 80da5af4f9
9 changed files with 136 additions and 0 deletions

28
website/README.md Normal file
View file

@ -0,0 +1,28 @@
When developing on Windows make sure `start.sh` has the correct line endings (`LF`).
Start via yarn:
---------------
Clone repository
Install yarn if not already installed (https://classic.yarnpkg.com/en/docs/install)
For example via npm (but could be installed differently too)
```npm install --global yarn```
Then go to `website` folder
```yarn install``` (takes a while)
To start local test server:
```yarn start```
Server is accessible by default on http://localhost:3000
Start via docker:
-----------------
Setting for docker container:
```bash
docker build . -t pype-docs
docker run --rm -p 3000:3000 -v /c/Users/admin/openpype.io:/app pype-docs
```

View file

@ -142,6 +142,22 @@ You can set group of selected subsets with shortcut `Ctrl + G`.
You'll set the group in Avalon database so your changes will take effect for all users.
:::
### Site Sync support
If **Site Sync** is enabled additional widget is shown in right bottom corner.
It contains list of all representations of selected version(s). It also shows availability of representation files
on particular site (*active* - mine, *remote* - theirs).
![site_sync_support](assets/site_sync_loader.png)
On this picture you see that representation files are available only on remote site (could be GDrive or other).
If artist wants to work with the file(s) they need to be downloaded first. That could be done by right mouse click on
particular representation (or multiselect all) and select *Download*.
This will mark representation to be download which will happen in the background if OpenPype Tray is running.
For more details of progress, state or possible error details artist should open **[Sync Queue](#Sync-Queue)** item in Tray app.
Work in progress...
## Library Loader
@ -412,3 +428,35 @@ It might also happen that user deletes underlying host item(for example layer in
This could result in phantom issues during publishing. Use Subset Manager to purge workfile from abandoned items.
Please check behaviour in host of your choice.
## Sync Queue
### Details
If **Site Sync** is configured for a project, each asset is marked to be synchronized to a remote site during publishing.
Each artist's OpenPype Tray application handles synchronization in background, it looks for all representation which
are marked with the site of the user (unique site name per artist) and remote site.
Artists then can see progress of synchronization via **Sync Queue** link in the Tray application.
Artists can see all synced representation in this dialog with helpful information such as when representation was created, when it was synched,
status of synchronization (OK or Fail) etc.
### Usage
With this app artists can modify synchronized representation, for example mark failed representation for re-sync etc.
![Sync Queue](assets/site_sync_sync_queue.png)
Actions accessible by context menu on single (or multiple representations):
- *Open in Explorer* - if site is locally accessible, open folder with it with OS based explorer
- *Re-sync Active Site* - mark artist own side for re-download (repre must be accessible on remote side)
- *Re-sync Remote Site* - mark representation for re-upload
- *Completely remove from local* - removes tag of synchronization to artist's local site, removes files from disk (available only for personal sites)
- *Change priority* - mark representations with higher priority for faster synchronization run
Double click on any of the representation open Detail dialog with information about all files for particular representation.
In this dialog error details could be accessed in the context menu.
Artists can also Pause whole server or specific project for synchronization. In that state no download/upload is being run.
This might be helpful if the artist is not interested in a particular project for a while or wants to save bandwidth data limit for a bit.

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -7,4 +7,64 @@ sidebar_label: Site Sync
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## Site Sync
Site Sync allows users to publish assets and synchronize them between 'sites'. Site denotes a location,
it could be a local disk or remote repository.
### Main configuration
To use synchronization *Site Sync* needs to be enabled globally in **OpnePype Settings** in **System** tab.
![Configure module](assets/site_sync_system.png)
Each site implements a so called `provider` which handles most common operations (list files, copy files etc.).
Multiple configured sites could share the same provider (multiple mounted disk - each disk is a separate site,
all share the same provider).
Currently implemented providers:
- **local_drive** - handles files stored on local disk (could be a mounted one)
- **gdrive** - handles files on Google Drive
By default there are two sites created for each OpenPype Tray app:
- **studio** - default site - usually mounted disk accessible to all artists
- **local** - each Tray app has its own with unique site name
There might be many different sites created and configured.
Each OpenPype Tray app works with two sites at one time. (Sites could be the same, no synching is done in this setup).
Sites could be configured differently per project basis.
### Sync to Google Drive
Let's imagine a small globally distributed studio which wants all published work for all their freelancers uploaded to Google Drive folder.
For this use case admin need to configure:
- how many times it tries to synchronize file in case of some issue (network, permissions)
- how often should synchronization check for new assets
- sites for synchronization - 'local' and 'gdrive'
- user credentials
- folder location on Google Drive side
Configuration would look like this:
![Configure project](assets/site_sync_project_settings.png)
*Site Sync* for Google Drive works using its API: https://developers.google.com/drive/api/v3/about-sdk
To configure Google Drive side you would need to have access to Google Cloud Platform project: https://console.cloud.google.com/
To get working connection to Google Drive there are some necessary steps:
- first you need to enable GDrive API: https://developers.google.com/drive/api/v3/enable-drive-api
- next you need to create user, choose **Service Account** (for basic configuration no roles for account are necessary)
- add new key for created account and download .json file with credentials
- share destination folder on the Google Drive with created account (directly in GDrive web application)
- add new site back in OpenPype Settings, name as you want, provider needs to be 'gdrive'
- distribute credentials file via shared mounted disk location
### Local setting
Each user can configure root folder for 'local' site via **Local Settings** in OpenPype Tray
![Local overrides](assets/site_sync_local_setting.png)