You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/documentation/docs/user-guide/installation/installing-package-manager.md
+103-7Lines changed: 103 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,14 @@ Although Package Manager can be used to copy any kind of file to/from a wide arr
18
18
19
19
:::caution
20
20
21
-
At this time, the Package Manager worker process is Windows-only. Therefore, these instructions as a whole will only work on Windows. The worker will not work on WSL2.
21
+
Sofie supports only one package manager running for a Studio. Attaching more at a time will result in weird behaviour due to them fighting over reporting the statuses of packages.
22
+
If you feel like you need multiple, then you likely want to run package manager in the distributed setup instead.
23
+
24
+
:::
25
+
26
+
:::caution
27
+
28
+
The package manager worker process is primarily tested on Windows only. It does run on Linux (without support for network shares), but has not been extensively tested.
22
29
23
30
:::
24
31
@@ -49,10 +56,13 @@ To setup, go into Core and add this device to a Studio
49
56
50
57
This first run is necessary to get the Package Manager device registered with _Sofie Core_. We'll restart Package Manager later on in the [Configuration](#configuration) instructions.
51
58
52
-
53
59
## Installation In Production
54
60
55
-
We provide pre-built executables for Windows (x64) systems that can be used in production environments. These can be found on the [Releases](https://github.com/nrkno/sofie-package-manager/releases) GitHub repository page for Package Manager. For a minimal installation, you'll need the `package-manager-single-app.exe` and `worker.exe`. Put them in a folder of your choice. You can also place `ffmpeg.exe` and `ffprobe.exe` alongside them, if you don't want to make them available in `PATH`.
61
+
Only one package manager can be running for a Sofie Studio. If you reached this point thinking of deploying multiple, you will want to follow the distributed setup.
62
+
63
+
### Simple Setup
64
+
65
+
For setups where you only need to interact with CasparCG on one machine, we provide pre-built executables for Windows (x64) systems. These can be found on the [Releases](https://github.com/nrkno/sofie-package-manager/releases) GitHub repository page for Package Manager. For a minimal installation, you'll need the `package-manager-single-app.exe` and `worker.exe`. Put them in a folder of your choice. You can also place `ffmpeg.exe` and `ffprobe.exe` alongside them, if you don't want to make them available in `PATH`.
@@ -62,22 +72,108 @@ Package Manager can be launched from [CasparCG Launcher](./installing-connection
62
72
63
73
You can see a list of available options by running `package-manager-single-app.exe --help`.
64
74
75
+
In some cases, you will need to run the HTTP proxy server component elsewhere so that it can be accessed from your Sofie UI machines.
76
+
For this, you can run the `sofietv/package-manager-http-server` docker image, which exposes its service on port 8080 and expects `/data/http-server` to be persistent storage.
77
+
When configuring the http proxy server in Sofie, you may need to follow extra configuration steps for this to work as expected.
78
+
79
+
### Distributed Setup
80
+
81
+
For setups where you need to interact with multiple CasparCG machines, or want a more resilient/scalable setup, package manager can be partially deployed in Docker, with just the workers running on each CasparCG machine.
82
+
83
+
An example `docker-compose` of the setup is as follows:
84
+
85
+
```
86
+
services:
87
+
http-server:
88
+
build:
89
+
context: .
90
+
dockerfile: sofietv/package-manager-http-server
91
+
environment:
92
+
HTTP_SERVER_BASE_PATH: '/data/http-server'
93
+
ports:
94
+
- '8080:8080'
95
+
volumes:
96
+
- http-server-data:/data/http-server
97
+
98
+
workforce:
99
+
build:
100
+
context: .
101
+
dockerfile: sofietv/package-manager-workforce
102
+
ports:
103
+
- '8070:8070' # this needs to be exposed so that the workers can connect back to it
CORE_HOST: '172.18.0.1' # the address for connecting back to sofie core from this image
114
+
CORE_PORT: '3000'
115
+
DEVICE_ID: 'my-package-manager-id'
116
+
DEVICE_TOKEN: 'some-secret'
117
+
WORKFORCE_URL: 'ws://workforce:8070' # referencing the workforce component above
118
+
PACKAGE_MANAGER_PORT: '8060'
119
+
PACKAGE_MANAGER_URL: 'ws://insert-service-ip-here:8060' # the workers connect back to this address, so it needs to be accessible from CasparCG
120
+
# CONCURRENCY: 10 # How many expectation states can be evaluated at the same time
121
+
ports:
122
+
- '8060:8060'
123
+
124
+
networks:
125
+
default:
126
+
volumes:
127
+
http-server-data:
128
+
```
129
+
130
+
In addition to this, you will need to run the appContainer and workers on each windows machine that package-manager needs access to:
131
+
132
+
```
133
+
./appContainer-node.exe
134
+
--appContainerId=caspar01 // This is a unique id for this instance of the appContainer
135
+
--workforceURL=ws://workforce-service-ip:8070
136
+
--resourceId=caspar01 // This should also be set in the 'resource id' field of the `casparcgLocalFolder1` accessor. This is how package manager can identify which machine is which.
137
+
--networkIds=pm-net // This is not necessary, but can be useful for more complex setups
138
+
```
139
+
140
+
You can get the windows executables from [Releases](https://github.com/nrkno/sofie-package-manager/releases) GitHub repository page for Package Manager. You'll need the `appContainer-node.exe` and `worker.exe`. Put them in a folder of your choice. You can also place `ffmpeg.exe` and `ffprobe.exe` alongside them, if you don't want to make them available in `PATH`.
141
+
142
+
Note that each appContainer needs to use a different resourceId and will need its own package containers set to use the same resourceIds if they need to access the local disk. This is how package-manager knows which workers have access to which machines.
143
+
65
144
## Configuration
66
145
67
-
1. Open the _Sofie Core_ Settings page ([http://localhost:3000/settings?admin=1](http://localhost:3000/settings?admin=1)), click on your Studio, and scroll down to the Attached Devices section.
68
-
1. Click the plus button (`+`) and select Package Manager to add the Package Manager device to your Studio.
69
-
1. On this same settings page, scroll down to the Package Manager section.
146
+
1. Open the _Sofie Core_ Settings page ([http://localhost:3000/settings?admin=1](http://localhost:3000/settings?admin=1)), click on your Studio, and then Peripheral Devices.
147
+
1. Click the plus button (`+`) in the Parent Devices section and configure the created device to be for your Package manager.
148
+
1. On the sidebar under the current Studio, select to the Package Manager section.
70
149
1. Click the plus button under the Package Containers heading, then click the edit icon (pencil) to the right of the newly-created package container.
71
150
1. Give this package container an ID of `casparcgContainer0` and a label of `CasparCG Package Container`.
72
151
1. Click on the dropdown under "Playout devices which use this package container" and select `casparcg0`.
73
152
- If you don't have a `casparcg0` device, add it to the Playout Gateway under the Devices heading, then restart the Playout Gateway.
153
+
- If you are using the distributed setup, you will likely want to repeat this step for each CasparCG machine. You will also want to set `Resource Id` to match the `resourceId` value provided in the appContainer command line.
74
154
1. Click the plus button under "Accessors", then click the edit icon to the right of the newly-created accessor.
75
155
1. Give this accessor an ID of `casparcgHttpProxy0`, a Label of `CasparCG HTTP Proxy Accessor`, an Accessor Type of `HTTP_PROXY`, and a Base URL of `http://localhost:8080/package`. Then, ensure that both the "Allow Read access" and "Allow Write access" boxes are checked. Finally, click the done button (checkmark icon) in the bottom right.
76
-
1. Scroll back up a bit to the "Studio Settings" subsection (still in the Package Manager section) and select "CasparCG Package Container" for both "Package Containers to use for previews" and "Package Containers to use for thumbnails".
156
+
1. Scroll back to the top of the page and select "CasparCG Package Container" for both "Package Containers to use for previews" and "Package Containers to use for thumbnails".
77
157
1. Your settings should look like this once all the above steps have been completed:
1. If Package Manager `start:single-app` is running, restart it. If not, start it (see the above [Installation instructions](#installation-quick-start) for the relevant command line).
80
160
161
+
### Separate HTTP proxy server
162
+
163
+
In some setups, the URL of the HTTP proxy server is different when accessing the Sofie UI and Package Manager.
164
+
You can use the 'Network ID' concept in Package Manager to provide guidance on which to use when.
165
+
166
+
By adding `--networkIds=pm-net` (a semi colon separated list) when launching the exes on the CasparCG machine, the application will know to prefer certain accessors with matching values.
167
+
168
+
Then in the Sofie UI:
169
+
170
+
1. Return to the Package manager settings under the studio
171
+
1. Expand the `casparcgContainer` container.
172
+
1. Edit the `casparcgHttpProxy` accessor to have a `Base URL` that is accessible from the casparcg machines.
173
+
1. Set the `Network ID` to `pm-net` (matching what was passed in the command line)
174
+
1. Click the plus button under "Accessors", then click the edit icon to the right of the newly-created accessor.
175
+
1. Give this accessor an ID of `casparcgHttpProxyThumbnails0`, a Label of `CasparCG Thumbnail HTTP Proxy Accessor`, an Accessor Type of `HTTP_PROXY`, and a Base URL that is accessible to your Sofie client network. Then, ensure that only the "Allow Write access" box is checked. Finally, click the done button (checkmark icon) in the bottom right.
176
+
81
177
## Usage
82
178
83
179
In this basic configuration, Package Manager won't be copying any packages into your CasparCG Server media folder. Instead, it will simply check that the files in the rundown are present in your CasparCG Server media folder, and you'll have to manually place those files in the correct directory. However, thumbnail and preview generation will still function, as will status reporting.
0 commit comments