Ricardo Jun
2018-11-29 ecaaf45fbbf2184576c95a7432602bb46dc70e98
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
:scrollbar:
:data-uri:
:toc2:
:linkattrs:
 
= bxms_decision_mgmt_foundations_lab
 
 
The following enables an decision manager execution server whose undertow web server is configured to respond to HTTP OPTION requests with CORS filters
 
. Initialize the template:
+
-----
$ oc create -f resources/rhdm7-full-ng.yaml
-----
 
. Initialize OCP resources from the project template:
+
-----
$ oc new-app --name=dm-demo --template=rhdm7-full-ng \
         -p RHT_IMAGE_STREAM_NAMESPACE=openshift \
         -p KIE_ADMIN_PWD=test1234! \
         -p MAVEN_REPO_PASSWORD=test1234! \
         -p CLUSTER=apps.dev37.openshift.opentlc.com \
         -p APPLICATION_NAME=gpte > /tmp/gpte-dm-demo.txt
-----
 
. Resume DCs that are initially paused by default:
+
-----
$ oc rollout resume dc/gpte-rhdmcentr
$ oc rollout resume dc/gpte-kieserver
$ oc rollout resume dc/gpte-ng-dmf
------
 
. User IDs / passwords
.. *Business Central* : adminUser / admin
.. *kie-server* : adminUser / admin
.. *Mortgage Loan Decision Test* : 
 
. Routes
.. Kie Server documentation:
+
-----
$ echo -en "\n\nhttps://`oc get route secure-gpte-kieserver --template "{{.spec.host}}"`:443/docs/\n\n"
-----
.. KIE Server status:
+
-----
$ echo -en "\n\nhttps://`oc get route secure-gpte-kieserver --template "{{.spec.host}}"`:443/services/rest/server/\n\n"
-----
 
 
 
=== Additional Notes
 
. (Optional) Delete all OCP resources associated with this project:
+
-----
$ oc delete all -l app=dm-demo
$ oc delete sa/bpmsuite-service-account
$ oc delete secret/bpmsuite-app-secret
$ oc delete template/ng-mortgage-bpmsuite70-full-mysql
-----
 
. (Optional) Instantiate a container directly from bpms7 kieserver image:
+
-----
$ oc new-app bpmsuite70-executionserver-openshift:1.0~https://github.com/gpe-mw-training/bxms_decision_mgmt_foundations_lab.git \
--context-dir=exec-server \
--name=exec-test
-----
 
. (Optional) Build BCs in OpenShift namespace
+
-----
$ oc process \
    -p RHT_IMAGE_STREAM_NAMESPACE=openshift \
    -p APPLICATION_NAME=gpte \
    -f resources/rhdm7-bc.yaml \
    | oc create -f - -n openshift --as=system:admin
 
$ oc create -f resources/rhdm7-no-bc-ng.yaml
 
$ oc new-app --name=dm-demo --template=rhdm7-no-bc-ng \
         -p RHT_IMAGE_STREAM_NAMESPACE=openshift \
         -p GPTE_IMAGE_STREAM_NAMESPACE=openshift \
         -p KIE_ADMIN_PWD=test1234! \
         -p MAVEN_REPO_PASSWORD=test1234! \
         -p CLUSTER=apps.dev37.openshift.opentlc.com \
         -p APPLICATION_NAME=gpte > /tmp/gpte-dm-demo.txt
-----
 
 
 
 
=== Deprecated
 
. Create a keystore for execution server
+
-----
$ keytool -genkey \
          -keyalg RSA \
          -alias selfsigned \
          -keystore /tmp/keystore.jks \
          -validity 360 \
          -keysize 2048 \
          -alias jboss \
          -storepass rhtgpte \
          -keypass rhtgpte \
          -dname "CN=mw,OU=gpte,O=redhat.com,L=Raleigh,S=NC,C=US"
-----
 
. Configure a service account that is loaded with the previously created secret:
+
-----
$  oc create serviceaccount bpmsuite-service-account
$  oc policy add-role-to-user view system:serviceaccount:jb-bpms7:bpmsuite-service-account
$  oc secrets new bpmsuite-app-secret /tmp/keystore.jks
$  oc secrets link bpmsuite-service-account bpmsuite-app-secret
-----
 
. Create a configmap from the JBoss CLI that enables the undertow component of the execution server with CORS:
The project template mounts a volume from this configmap to the execution server.
+
-----
$  oc create configmap undertow-cors --from-file=resources/undertow-cors.cli
-----