apache / incubator-kie-issues

Apache License 2.0
12 stars 1 forks source link

[kn-plugin-workflow] Upgrade deployment mechanism to deploy via zip #1590

Open treblereel opened 4 weeks ago

treblereel commented 4 weeks ago

How to run the apiserver snapshot version in RHBA cluster

  1. create a {{SonataFlowProj}} instance and give the name you want for your resources
apiVersion: sonataflow.org/v1alpha08
kind: SonataFlowProj
metadata:
  name: <workflowprojname>
  1. Upload the zip file via {{curl}}

# We need the token to authenticate ourselves, given that you have admin credentials or have permissions to create SonataFlowProjInstances in the given namespace
TOKEN=$(oc whoami -t) 

curl -H "Authorization: Bearer $TOKEN" -H "Content-type: application/zip" --data-binary @myproject.zip https://c130-e.us-so
uth.containers.cloud.ibm.com:30741/apis/workflowproj.sonataflow.org/v1alpha08/namespaces/<namespace>/sonataflowprojinstances/<workflowprojname>/instantiate
  1. You should receive a response like this:
{
  "kind": "SonataFlowProjInstance",
  "apiVersion": "workflowproj.sonataflow.org/v1alpha08",
  "metadata": {
    "name": "service",
    "uid": "c369e550-6e1a-4df9-bd66-0c24c28e3e82",
    "creationTimestamp": "2023-07-27T11:48:07Z"
  },
  "spec": {},
  "status": {
    "objectsRef": {
      "Workflow": {
        "name": "service"
      },
      "Properties": {
        "name": "service-props"
      },
      "Resources": [
        {
          "name": "01-service-resources"
        }
      ]
    }
  }
}
  1. Check if the workflow is running with:
oc get workflow/service -n zanini
NAME      PROFILE   VERSION   URL                                                                                                            READY   REASON
service   dev                 http://service-zanini.rhba-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud/service   True