Skip to content

Commit

Permalink
[KIECLOUD-134] Enhance KieServerStateOpenShiftRepository - Adding glo…
Browse files Browse the repository at this point in the history
…bal discovery switch
  • Loading branch information
Evan Zhang committed Mar 6, 2019
1 parent 8008755 commit af5c2ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jboss-kie-workbench/added/launch/jboss-kie-workbench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function prepareEnv() {
unset APPFORMER_JMS_CONNECTION_PARAMS
unset GIT_HOOKS_DIR
unset KIE_CONTROLLER_OCP_ENABLED
unset KIE_CONTROLLER_OCP_GLOBAL_DISCOVERY_ENABLED
unset KIE_CONTROLLER_OPENSHIFT_PREFER_KIESERVER_SERVICE
unset KIE_CONTROLLER_TEMPLATE_CACHE_TTL
unset_kie_security_env
Expand Down Expand Up @@ -113,10 +114,12 @@ function configure_server_access() {

function configure_openshift_enhancement() {
local kscOpenShiftEnabled=$(find_env "KIE_CONTROLLER_OCP_ENABLED" "false")
local kscGlobalDiscoveryEnabled=$(find_env "KIE_CONTROLLER_OCP_GLOBAL_DISCOVERY_ENABLED" "false")
local kscPreferKieService=$(find_env "KIE_CONTROLLER_OPENSHIFT_PREFER_KIESERVER_SERVICE" "false")
local kscTemplateCacheTTL=$(find_env "KIE_CONTROLLER_TEMPLATE_CACHE_TTL" "60000")

JBOSS_KIE_ARGS="${JBOSS_KIE_ARGS} -Dorg.kie.workbench.controller.openshift.enabled=${kscOpenShiftEnabled}"
JBOSS_KIE_ARGS="${JBOSS_KIE_ARGS} -Dorg.kie.server.controller.openshift.global.discovery.enabled=${kscGlobalDiscoveryEnabled}"
JBOSS_KIE_ARGS="${JBOSS_KIE_ARGS} -Dorg.kie.server.controller.openshift.prefer.kieserver.service=${kscPreferKieService}"
JBOSS_KIE_ARGS="${JBOSS_KIE_ARGS} -Dorg.kie.server.controller.template.cache.ttl=${kscTemplateCacheTTL}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,15 @@ Feature: RHPAM Business Central Monitoring configuration tests
Then file /opt/eap/standalone/configuration/standalone-openshift.xml should contain <login-module code="org.kie.security.jaas.KieLoginModule"
# https://issues.jboss.org/browse/JBPM-7834
# https://issues.jboss.org/projects/JBPM/issues/JBPM-8269
Scenario: Check OpenShiftStartupStrategy is enabled in RHPAM 7
When container is started with env
| variable | value |
| KIE_CONTROLLER_OCP_ENABLED | true |
| KIE_CONTROLLER_OCP_GLOBAL_DISCOVERY_ENABLED | false |
| KIE_CONTROLLER_OPENSHIFT_PREFER_KIESERVER_SERVICE | false |
| KIE_CONTROLLER_TEMPLATE_CACHE_TTL | 60000 |
Then container log should contain -Dorg.kie.workbench.controller.openshift.enabled=true
Then container log should contain -Dorg.kie.server.controller.openshift.global.discovery.enabled=false
Then container log should contain -Dorg.kie.server.controller.openshift.prefer.kieserver.service=false
Then container log should contain -Dorg.kie.server.controller.template.cache.ttl=60000
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,15 @@ Feature: RHPAM Business Central configuration tests
Then file /opt/eap/standalone/configuration/standalone-openshift.xml should contain <login-module code="org.kie.security.jaas.KieLoginModule"
# https://issues.jboss.org/browse/JBPM-7834
# https://issues.jboss.org/projects/JBPM/issues/JBPM-8269
Scenario: Check OpenShiftStartupStrategy is enabled in RHPAM 7
When container is started with env
| variable | value |
| KIE_CONTROLLER_OCP_ENABLED | true |
| KIE_CONTROLLER_OCP_GLOBAL_DISCOVERY_ENABLED | false |
| KIE_CONTROLLER_OPENSHIFT_PREFER_KIESERVER_SERVICE | false |
| KIE_CONTROLLER_TEMPLATE_CACHE_TTL | 60000 |
Then container log should contain -Dorg.kie.workbench.controller.openshift.enabled=true
Then container log should contain -Dorg.kie.server.controller.openshift.global.discovery.enabled=false
Then container log should contain -Dorg.kie.server.controller.openshift.prefer.kieserver.service=false
Then container log should contain -Dorg.kie.server.controller.template.cache.ttl=60000

0 comments on commit af5c2ac

Please sign in to comment.