This document describes the steps to launch FishNet on an OpenShift 4 cluster.
- Create a new project.
project.yaml
can be used. - Create a secret with your FishNet API key. Number of CPU cores to be used can also be set here.
- Create a new deployment using the provided
deployment.yaml
file. - Set the number of replicas/pods to your preference.
We assume, that you are already logged in to your OCP cluster. For simplicity the steps shown in this document refer to the commandline, but can also be done via the OCP GUI.
There are two simple ways to create a new project:
oc new-project fishnet
(this command also changes to the project automatically)
or use the provided project.yaml
file
oc apply -f project.yaml
(you need to change to the new project manually:oc project fishnet
)
Create a secret named fishnet
:
oc create secret generic fishnet -n fishnet --from-literal KEY="<Your_API_Key>"
By default FishNet sets the number of cores to be used to n-1
. So if you dont want the worker to use this value, you could add a CORES
value to the command like this:
oc create secret generic fishnet -n fishnet --from-literal KEY="<Your_API_Key>" --from-literal CORES="1"
Apply the provided deployment.yaml
file like this:
oc apply -f deployment.yaml -n fishnet
By default there is one replica defined, which results in one pod running. You can check the deployment and the pods like this:
oc get deployment -n fishnet
and oc get pods -n fishnet
To scale the number of pods up and down use this command and provide the number of replicas you want to use:
oc scale deployment fishnet -n fishnet --replicas=<Number_of_Replicas>