Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to 7.8.0 #19

Open
wants to merge 6 commits into
base: dm78-upgrade
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Released versions
-----------------
See the tagged releases for the following versions of the product:

- v1.6 - Red Hat Decision Manager 7.8.0 GA
- v1.5 - Red Hat Decision Manager 7.7.0 GA
- v1.4 - Red Hat Decision Manager 7.5.0.GA
- v1.3 - Red Hat Decision Manager 7.3.0.GA
Expand Down
8 changes: 4 additions & 4 deletions init-properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ $SERVER_BIN="$JBOSS_HOME\bin"
$SRC_DIR="$PROJECT_HOME\installs"
$SUPPORT_DIR="$PROJECT_HOME\support"
$PRJ_DIR="$PROJECT_HOME\projects"
$DM_VERSION="7.7.0"
$DM_VERSION="7.8.0"
$DM_DECISION_CENTRAL="rhdm-$DM_VERSION-decision-central-eap7-deployable.zip"
$DM_KIE_SERVER="rhdm-$DM_VERSION-kie-server-ee8.zip"
$EAP="jboss-eap-7.2.0.zip"
#$EAP_PATCH="jboss-eap-6.4.7-patch.zip"
$VERSION="7.7"
$EAP="jboss-eap-7.3.0.zip"
#$EAP_PATCH="jboss-eap-7.3.1-patch.zip"
$VERSION="7.8"
#$PROJECT_GIT_REPO="https://github.com/jbossdemocentral/rhpam7-mortgage-demo-repo"
#$PROJECT_GIT_REPO_NAME="examples-rhpam7-mortgage-demo-repo.git"
#$NIOGIT_PROJECT_GIT_REPO="MySpace/$PROJECT_GIT_REPO_NAME"
10 changes: 5 additions & 5 deletions init-properties.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ AUTHORS="Red Hat"
PROJECT="[email protected]:jbossdemocentral/rhdm7-install-demo.git"
PRODUCT="Red Hat Decision Manager"
TARGET=./target
JBOSS_EAP=jboss-eap-7.2
JBOSS_EAP=jboss-eap-7.3
JBOSS_HOME=$TARGET/$JBOSS_EAP
SERVER_DIR=$JBOSS_HOME/standalone/deployments
SERVER_CONF=$JBOSS_HOME/standalone/configuration/
SERVER_BIN=$JBOSS_HOME/bin
SRC_DIR=./installs
SUPPORT_DIR=./support
DM_VERSION=7.7.0
DM_VERSION=7.8.0
DM_DECISION_CENTRAL=rhdm-$DM_VERSION-decision-central-eap7-deployable.zip
DM_KIE_SERVER=rhdm-$DM_VERSION-kie-server-ee8.zip
EAP=jboss-eap-7.2.0.zip
#EAP_PATCH=jboss-eap-6.4.7-patch.zip
VERSION=7.7
EAP=jboss-eap-7.3.0.zip
#EAP_PATCH=jboss-eap-7.3.1-patch.zip
VERSION=7.8
#PROJECT_GIT_REPO=https://github.com/jbossdemocentral/rhpam7-mortgage-demo-repo
#PROJECT_GIT_REPO_NAME=examples-rhpam7-mortgage-demo-repo.git
#NIOGIT_PROJECT_GIT_REPO="MySpace/$PROJECT_GIT_REPO_NAME"
2 changes: 1 addition & 1 deletion init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ if [ $? -ne 0 ]; then
fi

#echo
#echo "Applying JBoss EAP 6.4.7 patch now..."
#echo "Applying JBoss EAP 7.3.1 patch now..."
#echo
#$JBOSS_HOME/bin/jboss-cli.sh --command="patch apply $SRC_DIR/$EAP_PATCH"
#
Expand Down
6 changes: 3 additions & 3 deletions installs/README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Download the following from http://developers.redhat.com

* EAP zip (jboss-eap-7.2.0.zip)
* Decision Manager: Decision Central deployable (rhdm-7.7.0-decision-central-eap7-deployable.zip)
* Decision Manager: Decision Server (KIE Server) deployable (rhdm-7.7.0-kie-server-ee8.zip)
* EAP zip (jboss-eap-7.3.0.zip)
* Decision Manager: Decision Central deployable (rhdm-7.8.0-decision-central-eap7-deployable.zip)
* Decision Manager: Decision Server (KIE Server) deployable (rhdm-7.8.0-kie-server-ee8.zip)

and copy to this directory for the init.sh and init.ps1 scripts to work.
2 changes: 1 addition & 1 deletion support/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ USER jboss
EXPOSE 9990 9999 8080

# Run BRMS
ENTRYPOINT ["/opt/jboss/jboss-eap-7.2/bin/standalone.sh"]
ENTRYPOINT ["/opt/jboss/jboss-eap-7.3/bin/standalone.sh"]
CMD ["-c","standalone-full.xml","-b", "0.0.0.0","-bmanagement","0.0.0.0"]
10 changes: 10 additions & 0 deletions support/openshift/credentials.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
name: rhdm-credentials
type: Opaque
data:
# dmAdmin
KIE_ADMIN_USER: ZG1BZG1pbgo=
# redhatpam1!
KIE_ADMIN_PWD: cmVkaGF0ZG0xIQ==
34 changes: 22 additions & 12 deletions support/openshift/provision.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ if (-not ([string]::IsNullOrEmpty($ARG_PROJECT_SUFFIX)))

$PRJ=@("rhdm7-install-$PRJ_SUFFIX","RHDM7 Install Demo","Red Hat Decision Manager 7 Install Demo")

$SCRIPT_DIR=$scriptName = $myInvocation.MyCommand.Path
$SCRIPT_DIR= Split-Path $myInvocation.MyCommand.Path

# KIE Parameters
$KIE_ADMIN_USER="dmAdmin"
Expand All @@ -107,9 +107,9 @@ $KIE_SERVER_PWD="kieserver1!"

#OpenShift Template Parameters
#GitHub tag referencing the image streams and templates.
$OPENSHIFT_DM7_TEMPLATES_TAG="7.7.0.GA"
$IMAGE_STREAM_TAG="7.7.0"
$DM7_VERSION="77"
$OPENSHIFT_DM7_TEMPLATES_TAG="7.8.0.GA"
$IMAGE_STREAM_TAG="7.8.0"
$DM7_VERSION="78"

################################################################################
# DEMO MATRIX #
Expand Down Expand Up @@ -232,6 +232,10 @@ Function Import-ImageStreams-And-Templates() {
Write-Output-Header "Importing Templates"
Call-Oc "create -f https://raw.githubusercontent.com/jboss-container-images/rhdm-7-openshift-image/$OPENSHIFT_DM7_TEMPLATES_TAG/templates/rhdm$DM7_VERSION-authoring.yaml" $True "Error importing Template" $True

Write-Output-Header "Patching templates to ajust the DeploymentConfig readiness/liveness probes"

Call-Oc "patch template/rhdm78-authoring --type='json' -p '[{""op"": ""replace"", ""path"": ""/objects/8/spec/template/spec/containers/0/livenessProbe/initialDelaySeconds"", value: 250}]'"
Call-Oc "patch template/rhdm78-authoring --type='json' -p '[{""op"": ""replace"", ""path"": ""/objects/8/spec/template/spec/containers/0/readinessProbe/initialDelaySeconds"", value: 60}]'"
}

Function Create-Rhn-Secret-For-Pull() {
Expand All @@ -247,21 +251,29 @@ Function Create-Rhn-Secret-For-Pull() {
$RHN_PASSWORD_SECURED = Read-Host "Enter RHN password" -AsSecureString
$RHN_EMAIL = Read-Host "Enter e-mail address"

$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($RHN_PASSWORD_SECURED)
$RHN_PASSWORD = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)
if ($PSVersionTable.PSVersion.Major -ge 7 ) {
$RHN_PASSWORD = ConvertFrom-SecureString -SecureString $RHN_PASSWORD_SECURED -AsPlainText
}
else {
$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($RHN_PASSWORD_SECURED)
$RHN_PASSWORD = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)
}

oc create secret docker-registry red-hat-container-registry --docker-server=registry.redhat.io --docker-username=$RHN_USERNAME --docker-password=$RHN_PASSWORD --docker-email=$RHN_EMAIL
oc secrets link default red-hat-container-registry --for=pull
oc secrets link builder red-hat-container-registry --for=pull
}

Function Import-Secrets-And-Service-Account() {
Write-Output-Header "Importing secrets and service account."
oc process -f https://raw.githubusercontent.com/jboss-container-images/rhdm-7-openshift-image/$OPENSHIFT_DM7_TEMPLATES_TAG/example-app-secret-template.yaml -p SECRET_NAME=decisioncentral-app-secret | oc create -f -
oc process -f https://raw.githubusercontent.com/jboss-container-images/rhdm-7-openshift-image/$OPENSHIFT_DM7_TEMPLATES_TAG/example-app-secret-template.yaml -p SECRET_NAME=kieserver-app-secret | oc create -f -

oc create -f $SCRIPT_DIR/credentials.yaml
}

Function Create-Application() {
Write-Output-Header "Creating BPM Suite 7 Application config."
Write-Output-Header "Creating Red Hat Decision Manager Authoring environment ."

$IMAGE_STREAM_NAMESPACE="openshift"

Expand All @@ -272,11 +284,9 @@ Function Create-Application() {
$argList = "new-app --template=rhdm$DM7_VERSION-authoring"`
+ " -p APPLICATION_NAME=""$ARG_DEMO""" `
+ " -p IMAGE_STREAM_NAMESPACE=""$IMAGE_STREAM_NAMESPACE""" `
+ " -p KIE_ADMIN_USER=""$KIE_ADMIN_USER""" `
+ " -p KIE_ADMIN_PWD=""$KIE_ADMIN_PWD""" `
+ " -p KIE_SERVER_CONTROLLER_USER=""$KIE_SERVER_CONTROLLER_USER""" `
+ " -p KIE_SERVER_CONTROLLER_PWD=""$KIE_SERVER_CONTROLLER_PWD""" `
+ " -p CREDENTIALS_SECRET=""rhdm-credentials""" `
+ " -p DECISION_CENTRAL_HTTPS_SECRET=""decisioncentral-app-secret""" `
+ " -p CREDENTIALS_SECRET=""kieserver-app-secret""" `
+ " -p KIE_SERVER_HTTPS_SECRET=""kieserver-app-secret""" `
+ " -p MAVEN_REPO_USERNAME=""$KIE_ADMIN_USER""" `
+ " -p MAVEN_REPO_PASSWORD=""$KIE_ADMIN_PWD""" `
Expand Down Expand Up @@ -434,7 +444,7 @@ switch ( $ARG_COMMAND )
Print-Info
#Pre-Condition-Check
Create-Projects
`Create-Rhn-Secret-For-Pull`
Create-Rhn-Secret-For-Pull
if ($ARG_WITH_IMAGESTREAMS) {
Import-ImageStreams-And-Templates
}
Expand Down
25 changes: 14 additions & 11 deletions support/openshift/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ KIE_SERVER_USER=kieserver
KIE_SERVER_PWD=kieserver1!

# Version Configuration Parameters
OPENSHIFT_DM7_TEMPLATES_TAG=7.7.0.GA
IMAGE_STREAM_TAG=7.7.0
DM7_VERSION=77
OPENSHIFT_DM7_TEMPLATES_TAG=7.8.0.GA
IMAGE_STREAM_TAG=7.8.0
DM7_VERSION=78


################################################################################
Expand Down Expand Up @@ -263,6 +263,10 @@ function import_imagestreams_and_templates() {

echo_header "Importing Templates"
oc create -f https://raw.githubusercontent.com/jboss-container-images/rhdm-7-openshift-image/$OPENSHIFT_DM7_TEMPLATES_TAG/templates/rhdm$DM7_VERSION-authoring.yaml

echo_header "Patching templates to ajust the DeploymentConfig readiness/liveness probes"
oc patch template/rhdm78-authoring --type='json' -p '[{"op": "replace", "path": "/objects/8/spec/template/spec/containers/0/livenessProbe/initialDelaySeconds", value: 250}]'
oc patch template/rhdm78-authoring --type='json' -p '[{"op": "replace", "path": "/objects/8/spec/template/spec/containers/0/readinessProbe/initialDelaySeconds", value: 60}]'
}

#Runs a spinner for the time passed to the function.
Expand Down Expand Up @@ -304,6 +308,7 @@ function createRhnSecretForPull() {
--docker-password="$RHN_PASSWORD" \
--docker-email="$RHN_EMAIL"

oc secrets link default red-hat-container-registry --for=pull
oc secrets link builder red-hat-container-registry --for=pull
}

Expand All @@ -312,10 +317,12 @@ function import_secrets_and_service_account() {
echo_header "Importing secrets and service account."
oc process -f https://raw.githubusercontent.com/jboss-container-images/rhdm-7-openshift-image/$OPENSHIFT_DM7_TEMPLATES_TAG/example-app-secret-template.yaml -p SECRET_NAME=decisioncentral-app-secret | oc create -f -
oc process -f https://raw.githubusercontent.com/jboss-container-images/rhdm-7-openshift-image/$OPENSHIFT_DM7_TEMPLATES_TAG/example-app-secret-template.yaml -p SECRET_NAME=kieserver-app-secret | oc create -f -

oc create -f $SCRIPT_DIR/credentials.yaml
}

function create_application() {
echo_header "Creating Decision Manager 7 Application config."
echo_header "Creating Red Hat Decision Manager 7 Authoring environment."

IMAGE_STREAM_NAMESPACE="openshift"

Expand All @@ -326,13 +333,9 @@ function create_application() {
oc new-app --template=rhdm$DM7_VERSION-authoring \
-p APPLICATION_NAME="$ARG_DEMO" \
-p IMAGE_STREAM_NAMESPACE="$IMAGE_STREAM_NAMESPACE" \
-p KIE_ADMIN_USER="$KIE_ADMIN_USER" \
-p KIE_ADMIN_PWD="$KIE_ADMIN_PWD" \
-p KIE_SERVER_CONTROLLER_USER="$KIE_SERVER_CONTROLLER_USER" \
-p KIE_SERVER_CONTROLLER_PWD="$KIE_SERVER_CONTROLLER_PWD" \
-p KIE_SERVER_USER="$KIE_SERVER_USER" \
-p KIE_SERVER_PWD="$KIE_SERVER_PWD" \
-p CREDENTIALS_SECRET="rhdm-credentials" \
-p DECISION_CENTRAL_HTTPS_SECRET="decisioncentral-app-secret" \
-p CREDENTIALS_SECRET="kieserver-app-secret" \
-p KIE_SERVER_HTTPS_SECRET="kieserver-app-secret" \
-p MAVEN_REPO_USERNAME="$KIE_ADMIN_USER" \
-p MAVEN_REPO_PASSWORD="$KIE_ADMIN_PWD" \
Expand Down Expand Up @@ -454,7 +457,7 @@ case "$ARG_COMMAND" in
echo "Setting up and deploying $DEMO_NAME ($ARG_DEMO)..."

print_info
#pre_condition_check
pre_condition_check
create_projects
createRhnSecretForPull
if [ "$ARG_WITH_IMAGESTREAMS" = true ] ; then
Expand Down
Loading