|
| 1 | +# REDHAWK Container Orchestration |
| 2 | +REDHAWK offers a standardized methodology for running waveforms on container orchestration technologies by means of an extensible plugin class. These capabilities have been integrated into core-framework through modifications to the Application Factory and Sandbox but in a manner that emphaised backwards compatibility; it is still possible to use the standard Domain Manager and GPP combo to run native Executable and SharedLibrary type components on your REDHAWK systems. |
| 3 | + |
| 4 | +Each cluster technology has its own unique ways to launch, configure, and delete containers, so the plugin system allows users to develop their own Sandbox and Application Factory plugins that Domain Manager dynamically loads at run-time to spawn waveforms on a cluster according a global cluster configuration file called `cluster.cfg` that controls the parameters passed to each plugin. |
| 5 | + |
| 6 | +*NOTE* These additions have *not* been reconciled with REDHAWK IDE. Viewing Components with spd.xml files modified in support of using these features will generate visual errors in RHIDE. |
| 7 | + |
| 8 | +# General Installation Dependencies |
| 9 | + |
| 10 | +1. Install the dependencies for REDHAWK with the [REDHAWK Manual](https://redhawksdr.org/2.2.8/manual/appendices/dependencies/) |
| 11 | +2. Yum install the `yaml-cpp-devel` package for the plugins' yaml generation |
| 12 | +3. Docker version 19.03.12 is required for building REDHAWK Component docker images |
| 13 | +4. Download and install [docker-redhawk](https://github.com/Geontech/docker-redhawk.git) tag 2.2.8-0 or [docker-redhawk-ubuntu](https://github.com/Geontech/docker-redhawk-ubuntu.git) branch develop-2.2.1 (Ubuntu is only required for GNURadio components) |
| 14 | +5. The following must be present in your environment (have network connectivity to your system running REDHAWK and proper configuration) in order to use RH components in clusters: |
| 15 | + * A cluster running the desired orchestration technology |
| 16 | + * The matching RH cluster plugin installed |
| 17 | + * Your networking, firewalls and DNS setup to communicate with your cluster's control plane/nodes/API |
| 18 | + * Your local system with REDHAWK installed must have its `cluster.cfg` file set correctly and the plugin's approprriate environment variables set |
| 19 | + |
| 20 | +For plugin specific instructions, please see that plugin's corresponding documentation. |
| 21 | + |
| 22 | +# Plugin Execution Path |
| 23 | +The Application Factory loops through the list of components in the waveform making note of the component's code type. If the code type is set to "Container", then the spd parsing mechanism checks the component's entrypoint. The entrypoint element has been extended to identify the suffix of a docker image path. Consider the example below pulled from SigGen's spd.xml file. |
| 24 | +``` |
| 25 | +<code type="Container"> |
| 26 | + <localfile name="cpp/SigGen"/> |
| 27 | + <entrypoint>cpp/SigGen::rh.siggen</entrypoint> |
| 28 | +</code> |
| 29 | +``` |
| 30 | +In this entrypoint element, everything after the "::" is regarded as the desired image name suffix. The "::" is a delimiter. The prefix of the image is found in the `cluster.cfg` file. |
| 31 | + |
| 32 | +If all components in the waveform are of Container code type, then no GPP is required to run the waveform. Waveforms can be ran in a "hybrid" manner in which components with Executable or SharedLibrary code types will run on the native REDHAWK system while those with Container code type are executed on the cluster dictated by the installed plugin and `cluster.cfg` file. Hybrid waveforms, or any waveform that uses Executable or SharedLibrary code types still required a GPP to run (this is for backwards compatibility). |
| 33 | + |
| 34 | +# Building and Installing core-framework from Source |
| 35 | +```bash |
| 36 | +$ cd /core-framework/redhawk/src |
| 37 | +$ ./build.sh |
| 38 | +$ sudo make install |
| 39 | +``` |
| 40 | +## Building and Installing Plugins |
| 41 | +No plugin is installed by default. Three plugins are currently included with REDHAWK: |
| 42 | +1. [Docker](plugin-docker.md) |
| 43 | +2. [DockerSwarm](plugin-dockerswarm.md) |
| 44 | +3. [EksKube](plugin-ekskube.md) |
| 45 | + |
| 46 | +## The cluster.cfg file |
| 47 | +The `$OSSIEHOME/cluster.cfg` file contains sections named according to the cluster orchestration plugin technology (EKS, Docker Swarm, etc). Each plugin-specific section contains variables (key value pairs) used by the specific plugin. You should ensure the values set in this file are correct prior to running a waveform. |
| 48 | + |
| 49 | +#### Installing the Cluster Configuration File |
| 50 | +```bash |
| 51 | +$ cd ./core-framework/redhawk/src/base/cfg |
| 52 | +$ sudo -E ./build.py --cluster <Desired_Plugin_Name> <Arguments to set variables in cluster.cfg> |
| 53 | +``` |
| 54 | + |
| 55 | +This will render the template cluster.cfg file into your $OSSIEHOME/cluster.cfg file. The plugin name argument you specify sets the plugin's top section which controls will plugin REDHAWK will use, assuming the plugin is already installed. |
| 56 | + |
| 57 | +Possible values for the plugin name argument are: |
| 58 | +1. [EksKube](plugin-ekskube.md) |
| 59 | +2. [Docker](plugin-docker.md) |
| 60 | +3. [DockerSwarm](plugin-dockerswarm.md) |
| 61 | + |
| 62 | +## Networking |
| 63 | +Networking can get complicated quickly because it will vary depending on what you're trying to run in your cluster, what that cluster's networking setup looks like, and your local system's ability to send traffic to that cluster. Guiding rules of thumb are: |
| 64 | +* If you are running DomMgr and/or GPP with OmniORB on your local system and only running waveforms on a cluster, those launched components need to be able to initiate connections to omniORB. This boils down to there being a "flat" network between where OmniORB runs and where the waveform runs. NAT will break one party's ability to talk to the other. |
| 65 | +* In the scenario where all REDHAWK services (OmniORB, DomMgr, and/or GPP) run inside the cluster alongside the waveform payloads, so long as the containers can network resolve each other (almost always the case barring network security restrictions on the cluster), then there should not be any difficulties with networking. |
| 66 | + |
| 67 | +Please see each plugin's documention for more more network specifics. |
| 68 | + |
| 69 | +## Misc additions |
| 70 | +Each plugin behaves differently. Some require specialized networking, other require special credentials, and some might require environment variables. Please consult the specific plugin's documentation to learn more. |
0 commit comments