|
| 1 | +# BCS pod launcher |
| 2 | + |
| 3 | +BCS pod launcher starts once Media Proxy Agent instance (on one machine) and MCM Media Proxy instances on each machine. It enables to starts BCS ffmpeg pipeline with bound NMOS client node application. |
| 4 | + |
| 5 | +## Description |
| 6 | + |
| 7 | +The tool can operate in two modes: |
| 8 | + |
| 9 | +- Kubernetes Mode: For multi-node cluster deployment. |
| 10 | +- Docker Mode: For single-node using Docker containers. |
| 11 | + |
| 12 | +**Flow (Common to Both Modes)** |
| 13 | + |
| 14 | +1. Run MediaProxy Agent |
| 15 | +2. Run MCM Media Proxy |
| 16 | +3. Run BcsFfmpeg pipeline with NMOS |
| 17 | + |
| 18 | +In case of docker, MediaProxy/MCM things should only start/run once and on every run of launcher, one should start the app according to input file. It does not store the state of apps, just check appropriate conditions. |
| 19 | + |
| 20 | +In case of kuberenetes, MediaProxy/MCM things should only be run once and BCS pod launcher works as operator in the understanding of Kuberenetes operators within pod. That is way, input file in this way is CustomReaource called BcsConfig. |
| 21 | + |
| 22 | +## Getting Started |
| 23 | + |
| 24 | +### Prerequisites |
| 25 | + |
| 26 | +- go version v1.22.0+ |
| 27 | +- docker version 17.03+. |
| 28 | +- kubectl version v1.27+ |
| 29 | +- Access to a Kubernetes v1.11.3+ cluster. |
| 30 | + |
| 31 | +### To Run containers on single node |
| 32 | + |
| 33 | +```bash |
| 34 | +# currently only in dev phase |
| 35 | +cd <repo>/launcher/cmd/ |
| 36 | +# Adjust to your needs: ./configuration_files/bcslauncher-static-config.yaml |
| 37 | +go run main.go |
| 38 | + |
| 39 | +``` |
| 40 | + |
| 41 | +### To Deploy on the cluster |
| 42 | + |
| 43 | +**Build image:** |
| 44 | +Modify `./launcher/configuration_files/bcslauncher-static-config.yaml`. `k8s: false` defines docker (containers on single host) mode. |
| 45 | +`docker build -t controller:bcs_pod_launcher .` |
| 46 | + |
| 47 | +**BCS pod launcher installer in k8s cluster:** |
| 48 | + |
| 49 | +Users can just run kubectl apply -f <file> to install the project: |
| 50 | + |
| 51 | +```bash |
| 52 | +cd <repo>/launcher/ |
| 53 | +kubectl apply -f ./configuration_files/bcslauncher-k8s-config.yaml |
| 54 | +kubectl apply -f ./configuration_files/bcsconfig-crd.yaml |
| 55 | +kubectl apply -f ./configuration_files/bcs-launcher.yaml |
| 56 | +# Adjust to your needs: ./configuration_files/bcsconfig-example.yaml |
| 57 | +kubectl apply -f ./configuration_files/bcsconfig-example.yaml |
| 58 | + |
| 59 | +``` |
| 60 | + |
| 61 | +**BCS pod launcher roles of files in k8s cluster:** |
| 62 | + |
| 63 | +- `configuration_files/bcslauncher-k8s-config.yaml` -> configmap for setting up the mode of launcher. `k8s: true` defines kuberenets mode. Currently, you should not modify this in that file. |
| 64 | +- `configuration_files/bcs-launcher.yaml` -> install set of kuberenetes resources that are needed to run bcs pod luancher, no additional configuration required |
| 65 | +- `configuration_files/bcsconfig-crd.yaml` -> Custom Resource Definition for `BcsConfig` |
| 66 | +- `configuration_files/bcsconfig-example.yaml` -> example `BcsConfig` file that it is an input to provide information about **bcs ffmpeg piepeline and NMOS client**, you can adjust file to your needs, |
| 67 | +- `configuration_files/bcslauncher-static-config.yaml` -> static config for docker mode. `k8s: false` defines docker mode. Currently, you should not modify this in that file. |
| 68 | + |
| 69 | +**BCS pod launcher deletion of implementationn of BCS pod launcher in k8s cluster:** |
| 70 | + |
| 71 | +```bash |
| 72 | +cd <repo>/launcher/ |
| 73 | +kubectl delete -f ./configuration_files/bcslauncher-k8s-config.yaml |
| 74 | +kubectl delete -f ./configuration_files/bcsconfig-crd.yaml |
| 75 | +kubectl delete -f ./configuration_files/bcs-launcher.yaml |
| 76 | +kubectl delete -f ./configuration_files/bcsconfig-example.yaml |
| 77 | +``` |
| 78 | + |
| 79 | +## License |
| 80 | + |
| 81 | +SPDX-FileCopyrightText: Copyright (c) 2024 Intel Corporation |
| 82 | + |
| 83 | +SPDX-License-Identifier: BSD-3-Clause |
| 84 | + |
| 85 | +=============================================================== |
| 86 | + |
| 87 | +Copyright 2024. |
| 88 | + |
| 89 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 90 | +you may not use this file except in compliance with the License. |
| 91 | +You may obtain a copy of the License at |
| 92 | + |
| 93 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 94 | + |
| 95 | +Unless required by applicable law or agreed to in writing, software |
| 96 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 97 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 98 | +See the License for the specific language governing permissions and |
| 99 | +limitations under the License. |
0 commit comments