From 0dac4df9450a7f22e0f557135f45af30304c30bc Mon Sep 17 00:00:00 2001 From: Michael Cook Date: Mon, 26 Jun 2023 18:49:47 -0400 Subject: [PATCH 1/4] enhance messages when blender is not found --- cmd/flamenco-worker/find_exes.go | 8 +++++--- .../content/usage/manager-configuration/_index.md | 13 +++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/cmd/flamenco-worker/find_exes.go b/cmd/flamenco-worker/find_exes.go index f0ee0079..0abad95d 100644 --- a/cmd/flamenco-worker/find_exes.go +++ b/cmd/flamenco-worker/find_exes.go @@ -34,13 +34,15 @@ func findBlender() { result, err := find_blender.Find(ctx) switch { case errors.Is(err, fs.ErrNotExist), errors.Is(err, exec.ErrNotFound): - log.Warn().Msg("Blender could not be found, Flamenco Manager will have to supply a full path") + + log.Warn().Msg(`The Worker could not find Blender on this system. Flamenco Manager will have to supply the full path to Blender when Tasks are sent to this Worker. For more help see https://flamenco.blender.org/usage/variables/blender/`) + case err != nil: - log.Warn().AnErr("cause", err).Msg("there was an issue finding Blender on this system, Flamenco Manager will have to supply a full path") + log.Warn().AnErr("cause", err).Msg(`There was an error finding Blender on this system. Flamenco Manager will have to supply the full path to Blender when Tasks are sent to this Worker. For more help see https://flamenco.blender.org/usage/variables/blender/`) default: log.Info(). Str("path", result.FoundLocation). Str("version", result.BlenderVersion). - Msg("Blender found on this system, it will be used unless Flamenco Manager specifies a path to a different Blender") + Msg("Blender found on this system, it will be used unless the Flamenco Manager configuration specifies a different path.") } } diff --git a/web/project-website/content/usage/manager-configuration/_index.md b/web/project-website/content/usage/manager-configuration/_index.md index ceec3b0a..066958a2 100644 --- a/web/project-website/content/usage/manager-configuration/_index.md +++ b/web/project-website/content/usage/manager-configuration/_index.md @@ -34,18 +34,19 @@ task_fail_after_softfail_count: 3 variables: blender: values: - - platform: linux - value: blender - - platform: windows - value: blender - - platform: darwin - value: blender + - platform: linux + value: /home/sybren/Downloads/blenders/blender-3.2.2-release/blender + - platform: windows + value: B:\Downloads\blenders\blender-3.2.2-release\blender.exe + - platform: darwin + value: /home/sybren/Downloads/blenders/blender-3.2.2-release/blender blenderArgs: values: - platform: all value: -b -y ``` +## Creating a Configuration File The usual way to create a configuration file is simply by starting Flamenco Manager. If there is no config file yet, it will start the setup assistant to create one. If for any reasons the setup assistant is not usable for you, you -- 2.30.2 From fd1935b20a8cb172898c70e1a88fd3886ee2dc00 Mon Sep 17 00:00:00 2001 From: Michael Cook Date: Tue, 4 Jul 2023 20:22:40 -0400 Subject: [PATCH 2/4] PR fixes --- cmd/flamenco-worker/find_exes.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/flamenco-worker/find_exes.go b/cmd/flamenco-worker/find_exes.go index 0abad95d..ba23572f 100644 --- a/cmd/flamenco-worker/find_exes.go +++ b/cmd/flamenco-worker/find_exes.go @@ -31,14 +31,16 @@ func findBlender() { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() + helpMsg := "Flamenco Manager will have to supply the full path to Blender when Tasks are sent to this Worker. For more help see https://flamenco.blender.org/usage/variables/blender/" + result, err := find_blender.Find(ctx) switch { case errors.Is(err, fs.ErrNotExist), errors.Is(err, exec.ErrNotFound): - log.Warn().Msg(`The Worker could not find Blender on this system. Flamenco Manager will have to supply the full path to Blender when Tasks are sent to this Worker. For more help see https://flamenco.blender.org/usage/variables/blender/`) + log.Warn().Msg("The Worker could not find Blender on this system. " + helpMsg) case err != nil: - log.Warn().AnErr("cause", err).Msg(`There was an error finding Blender on this system. Flamenco Manager will have to supply the full path to Blender when Tasks are sent to this Worker. For more help see https://flamenco.blender.org/usage/variables/blender/`) + log.Warn().AnErr("cause", err).Msg("There was an error finding Blender on this system. " + helpMsg) default: log.Info(). Str("path", result.FoundLocation). -- 2.30.2 From 3997d781cd3a7bb31d978f8af63499a86b1647f5 Mon Sep 17 00:00:00 2001 From: Michael Cook Date: Tue, 4 Jul 2023 20:29:48 -0400 Subject: [PATCH 3/4] revert content --- .../content/usage/variables/_index.md | 103 +++++++----------- 1 file changed, 42 insertions(+), 61 deletions(-) diff --git a/web/project-website/content/usage/variables/_index.md b/web/project-website/content/usage/variables/_index.md index fbe7090a..e85ccc65 100644 --- a/web/project-website/content/usage/variables/_index.md +++ b/web/project-website/content/usage/variables/_index.md @@ -1,74 +1,55 @@ --- -title: Variables -weight: 2 +title: Manager Configuration +weight: 3 --- -For managing default parameters for Blender and FFmpeg, as well as for -mixed-platform render farms, Flamenco uses *variables*. +Flamenco Manager reads its configuration from `flamenco-manager.yaml`, located +next to the `flamenco-manager` executable. The previous chapters +([Shared Storage][storage] and [Variables][variables]) also described parts of +that configuration file. -Each variable consists of: +[storage]: {{< ref "shared-storage" >}} +[variables]: {{< ref "usage/variables/multi-platform" >}} -- Its **name**: just a sequence of letters, like `blender` or `whateveryouwant`. -- Its **values**: per *platform* and *audience*, described below. +## Example Configuration -The variables are configured in `flamenco-manager.yaml`. - -Here is an example `blender` variable: +This is an example `flamenco-manager.yaml` file: ```yaml +_meta: + version: 3 +manager_name: Flamenco Manager +database: flamenco-manager.sqlite +listen: :8080 +autodiscoverable: true +local_manager_storage_path: ./flamenco-manager-storage +shared_storage_path: /path/to/storage +shaman: + enabled: true + garbageCollect: + period: 24h0m0s + maxAge: 744h0m0s + extraCheckoutPaths: [] +task_timeout: 10m0s +worker_timeout: 1m0s +blocklist_threshold: 3 +task_fail_after_softfail_count: 3 variables: blender: values: - - platform: linux - value: /home/sybren/Downloads/blenders/blender-3.2.2-release/blender - - platform: windows - value: B:\Downloads\blenders\blender-3.2.2-release\blender.exe - - platform: darwin - value: /home/sybren/Downloads/blenders/blender-3.2.2-release/blender + - platform: linux + value: blender + - platform: windows + value: blender + - platform: darwin + value: blender + blenderArgs: + values: + - platform: all + value: -b -y ``` -Whenever a Worker gets a task that contains `{blender}`, that'll be replaced by -the appropriate value for that worker. - -## Platform - -**The goal of the variables system is to cater for different platforms.** -Blender will very likely be installed in different locations on Windows and -Linux. It might even require some different parameters for your farm, depending -on the platform. The variables system allows you to configure this. - -The platform can be `windows`, `linux`, or `darwin` for macOS. Other platforms -are also allowed, if you happen to use them in your farm. - -## Two-way Variables for Mixed-platform Farms - -Variables are not just used to point to specific things, like `blender` above. -They can also tell Flamenco that the path `/media/shared/flamenco` on Linux is -the same as `S:\flamenco` on Windows, or `/Volumes/shared/flamenco` on macOS. -This is documented further in [Two-way Variables for Multi-Platform Support][two-way]. - -## Custom Job Types - -This documentation section focuses on pre-existing variables, `blender` and -`blenderArgs`. There is nothing special about these. Apart from being part of -Flamenco's default configuration, that is. When you go the more advanced route -of creating your own [custom job types][jobtypes] you're free to create your own -set of variables to suit your needs. - -[jobtypes]: {{< ref "usage/job-types" >}} -[two-way]: {{< ref "usage/variables/multi-platform" >}} - -## Advanced: Audience - -The audience of a value is who that value is for: `workers`, `users`, or `all` -if there is no difference in value for workers and users. - -This is an advanced feature, and was introduced for in-the-cloud render farms. -In such situations, the location where the workers store the rendered frames -might be different from where users go to pick them up. - -- `all`: values that are used for all audiences. This is the default, and is - what's used in the above example (because there is no `audience` mentioned). -- `users`: values are used when submitting jobs from Blender and showing them in - the web interface. -- `workers`: values that are used when sending tasks to workers. +The usual way to create a configuration file is simply by starting Flamenco +Manager. If there is no config file yet, it will start the setup assistant to +create one. If for any reasons the setup assistant is not usable for you, you +can use the above example to create `flamenco-manager.yaml` yourself. -- 2.30.2 From 5ca3e8f45fb50be1396fbe9576c3dc2f52f4cb50 Mon Sep 17 00:00:00 2001 From: Michael Cook Date: Tue, 4 Jul 2023 20:36:25 -0400 Subject: [PATCH 4/4] fix merge errors --- .../usage/manager-configuration/_index.md | 13 +-- .../content/usage/variables/_index.md | 103 +++++++++++------- 2 files changed, 67 insertions(+), 49 deletions(-) diff --git a/web/project-website/content/usage/manager-configuration/_index.md b/web/project-website/content/usage/manager-configuration/_index.md index a749f3c6..e85ccc65 100644 --- a/web/project-website/content/usage/manager-configuration/_index.md +++ b/web/project-website/content/usage/manager-configuration/_index.md @@ -37,19 +37,18 @@ task_fail_after_softfail_count: 3 variables: blender: values: - - platform: linux - value: /home/sybren/Downloads/blenders/blender-3.2.2-release/blender - - platform: windows - value: B:\Downloads\blenders\blender-3.2.2-release\blender.exe - - platform: darwin - value: /home/sybren/Downloads/blenders/blender-3.2.2-release/blender + - platform: linux + value: blender + - platform: windows + value: blender + - platform: darwin + value: blender blenderArgs: values: - platform: all value: -b -y ``` -## Creating a Configuration File The usual way to create a configuration file is simply by starting Flamenco Manager. If there is no config file yet, it will start the setup assistant to create one. If for any reasons the setup assistant is not usable for you, you diff --git a/web/project-website/content/usage/variables/_index.md b/web/project-website/content/usage/variables/_index.md index e85ccc65..fbe7090a 100644 --- a/web/project-website/content/usage/variables/_index.md +++ b/web/project-website/content/usage/variables/_index.md @@ -1,55 +1,74 @@ --- -title: Manager Configuration -weight: 3 +title: Variables +weight: 2 --- -Flamenco Manager reads its configuration from `flamenco-manager.yaml`, located -next to the `flamenco-manager` executable. The previous chapters -([Shared Storage][storage] and [Variables][variables]) also described parts of -that configuration file. +For managing default parameters for Blender and FFmpeg, as well as for +mixed-platform render farms, Flamenco uses *variables*. -[storage]: {{< ref "shared-storage" >}} -[variables]: {{< ref "usage/variables/multi-platform" >}} +Each variable consists of: -## Example Configuration +- Its **name**: just a sequence of letters, like `blender` or `whateveryouwant`. +- Its **values**: per *platform* and *audience*, described below. -This is an example `flamenco-manager.yaml` file: +The variables are configured in `flamenco-manager.yaml`. + +Here is an example `blender` variable: ```yaml -_meta: - version: 3 -manager_name: Flamenco Manager -database: flamenco-manager.sqlite -listen: :8080 -autodiscoverable: true -local_manager_storage_path: ./flamenco-manager-storage -shared_storage_path: /path/to/storage -shaman: - enabled: true - garbageCollect: - period: 24h0m0s - maxAge: 744h0m0s - extraCheckoutPaths: [] -task_timeout: 10m0s -worker_timeout: 1m0s -blocklist_threshold: 3 -task_fail_after_softfail_count: 3 variables: blender: values: - - platform: linux - value: blender - - platform: windows - value: blender - - platform: darwin - value: blender - blenderArgs: - values: - - platform: all - value: -b -y + - platform: linux + value: /home/sybren/Downloads/blenders/blender-3.2.2-release/blender + - platform: windows + value: B:\Downloads\blenders\blender-3.2.2-release\blender.exe + - platform: darwin + value: /home/sybren/Downloads/blenders/blender-3.2.2-release/blender ``` -The usual way to create a configuration file is simply by starting Flamenco -Manager. If there is no config file yet, it will start the setup assistant to -create one. If for any reasons the setup assistant is not usable for you, you -can use the above example to create `flamenco-manager.yaml` yourself. +Whenever a Worker gets a task that contains `{blender}`, that'll be replaced by +the appropriate value for that worker. + +## Platform + +**The goal of the variables system is to cater for different platforms.** +Blender will very likely be installed in different locations on Windows and +Linux. It might even require some different parameters for your farm, depending +on the platform. The variables system allows you to configure this. + +The platform can be `windows`, `linux`, or `darwin` for macOS. Other platforms +are also allowed, if you happen to use them in your farm. + +## Two-way Variables for Mixed-platform Farms + +Variables are not just used to point to specific things, like `blender` above. +They can also tell Flamenco that the path `/media/shared/flamenco` on Linux is +the same as `S:\flamenco` on Windows, or `/Volumes/shared/flamenco` on macOS. +This is documented further in [Two-way Variables for Multi-Platform Support][two-way]. + +## Custom Job Types + +This documentation section focuses on pre-existing variables, `blender` and +`blenderArgs`. There is nothing special about these. Apart from being part of +Flamenco's default configuration, that is. When you go the more advanced route +of creating your own [custom job types][jobtypes] you're free to create your own +set of variables to suit your needs. + +[jobtypes]: {{< ref "usage/job-types" >}} +[two-way]: {{< ref "usage/variables/multi-platform" >}} + +## Advanced: Audience + +The audience of a value is who that value is for: `workers`, `users`, or `all` +if there is no difference in value for workers and users. + +This is an advanced feature, and was introduced for in-the-cloud render farms. +In such situations, the location where the workers store the rendered frames +might be different from where users go to pick them up. + +- `all`: values that are used for all audiences. This is the default, and is + what's used in the above example (because there is no `audience` mentioned). +- `users`: values are used when submitting jobs from Blender and showing them in + the web interface. +- `workers`: values that are used when sending tasks to workers. -- 2.30.2