File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -62,4 +62,52 @@ curl -X POST "http://127.0.0.1:8000/api/v1/text/contents" \
6262 "contents": ["My email address is [email protected] and [email protected] "], 6363 "regex_pattern": "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}"
6464}'
65+ ```
66+
67+ ## Running app on OpenShift
68+
69+ 1 . Create a new Openshift project, i.e.
70+
71+ ``` bash
72+ oc project deploy-regex
73+ ```
74+
75+ 2 . If using KServe on a ROSA cluster, apply the following service account configuration yaml:
76+
77+ ``` bash
78+ oc apply -f regex_match/deploy/service_account.yaml
79+ ```
80+
81+ 3 . Create a new deployment configuration:
82+
83+ ``` bash
84+ oc apply -f regex_match/deploy/deploy.yaml
85+ ```
86+
87+ 4 . Confirm pods are running:
88+
89+ ``` bash
90+ oc get pods
91+ ```
92+
93+ 5 . Generate an authentication token for the service account:
94+
95+ ``` bash
96+ SA_TOKEN=$( oc create token user-one)
97+ ```
98+
99+ 6 . Get the service URL:
100+
101+ ``` bash
102+ REGEX_URL=" $( oc get inferenceservice regex-detector -o jsonpath=' {.status.url}' ) /api/v1/text/contents"
103+ ```
104+
105+ 7 . Once the pods are running, you can send a request to the service:
106+
107+ ``` bash
108+ curl -X POST " $REGEX_URL " \
109+ -H " Content-Type: application/json" \
110+ -H " detector-id: has_regex_match" \
111+ -H " Authorization: Bearer $SA_TOKEN " \
112+ -d @regex_match/data/sample.json
65113```
You can’t perform that action at this time.
0 commit comments