---
title: Step by Step Deployment OCP
slug: docuflow-guides/step-by-step-deployment-ocp
docTags: 
createdAt: 2025-07-11T16:44:00.698Z
---

## Intro

Example how to deploy on Red Hat OpenShift Container Platform (`RH OCP`)

- Use configMap for configuration
- No RWX storage
- GUI read only

## Bash/Shell commands to deploy on RH OCP

```bash
##set vars to use in script
vfns="dflow-ns"
vflocalfilepath="/home/myuser/dflow-files"

#make local folder
mkdir -p $vflocalfilepath/$vfns/ssl-cert
mkdir -p $vflocalfilepath/$vfns/config
mkdir -p $vflocalfilepath/$vfns/sap-cert

##copy the main.ini file to the 'config' file. 
##copy the 'certificate.crt' and 'cert-private.key' to the 'ssl-cert folder
##copy the CS1P81-Y7.cer to the 'sap-cert' folder, after send cert in SAP check /dflow/config/certificates folder for the cert. 
### naming convention is <<content.system>>-<<Archive Name>>.cer

## create NS
kubectl create namespace $vfns
##set as default ns
kubectl config set-context --current --namespace=$vfns

## create image pull secret ##
kubectl -n $vfns create secret docker-registry image-repo-login-secret \
  --docker-username=my-username \
  --docker-password=pass123 \
  --docker-server=versafile.azurecr.io \
  --docker-email=dummy@localdummy.local

##deploy config (via configMaps and secret)
#kubectl -n $vfns delete cm dflow-config
kubectl -n $vfns create configmap dflow-config --from-file=$vflocalfilepath/$vfns/config

## import SSL cert and key as secret
#kubectl -n $vfns delete secret dflow-x509
kubectl -n $vfns  create secret tls dflow-x509 \
  --cert=$vflocalfilepath/$vfns/ssl-cert/certificate.crt \
  --key=$vflocalfilepath/$vfns/ssl-cert/cert-private.key

##add SAP certs we trust (seckey sigValidation) as secret
#kubectl -n $vfns delete secret dflow-sap-cert
kubectl -n $vfns create secret generic dflow-sap-cert --from-file=$vflocalfilepath/$vfns/sap-cert


##yaml with deployment and service kind. 
kubectl -n $vfns apply -f dflow-deploy.yml

## deploy route for GUI and CS
## modify first to set the hostname to correct hostname. 

#check hostname
yq .spec.host route-dflow-cs.yaml

kubectl -n $vfns apply -f route-dflow-gui.yaml
kubectl -n $vfns apply -f route-dflow-cs.yaml

##tips how to scale up/down

```

## YAML files

::File{src="https://api.archbee.com/api/presign/yOGFZUX1_8Bfhhcr8vHDE-6Z5_lpb9sNqaqm-DSAbu6-20250711-221122.yml" label="dflow-deploy.yml"}

::File{src="https://api.archbee.com/api/presign/yOGFZUX1_8Bfhhcr8vHDE-QQ_i0iVITt45T2DID_ih3-20250711-221123.yaml" label="route-dflow-cs.yaml"}

::File{src="https://api.archbee.com/api/presign/yOGFZUX1_8Bfhhcr8vHDE-AbiJoauZGCylZzKXitrBf-20250711-221123.yaml" label="route-dflow-gui-scrud.yaml"}

## Example of config folders

::File{src="https://api.archbee.com/api/presign/yOGFZUX1_8Bfhhcr8vHDE-wxKhPLg6v8PwfyQPElpwB-20250711-220552.ini" label="main.ini"}

::File{src="https://api.archbee.com/api/presign/yOGFZUX1_8Bfhhcr8vHDE-lRudUeWctry72T-CQLzm2-20250711-220641.properties" label="Config.properties"}

