Skip to content

Instantly share code, notes, and snippets.

View rafaeltuelho's full-sized avatar
🎯
Focusing

Rafael T. C. Soares (A.K.A Tuelho) rafaeltuelho

🎯
Focusing
  • Red Hat Inc.
  • Frisco, TX, USA
  • 03:18 (UTC -05:00)
View GitHub Profile
docker run -ti --name rhdm -p 8080:8080 \                                                                                                                                                                                                                     
-e APPLICATION_USERS_PROPERTIES=/opt/kie/data/configuration/application-users.properties \
-e APPLICATION_ROLES_PROPERTIES=/opt/kie/data/configuration/application-roles.properties \
-e KIE_ADMIN_USER=pamAdmin \
-e KIE_ADMIN_PWD="myPwd" \
-e KIE_MBEANS=enabled \
-e KIE_SERVER_CONTROLLER_OPENSHIFT_ENABLED=false \
-e KIE_SERVER_CONTROLLER_OPENSHIFT_GLOBAL_DISCOVERY_ENABLED=false \
-e KIE_SERVER_CONTROLLER_OPENSHIFT_PREFER_KIESERVER_SERVICE=false \
apiVersion: app.kiegroup.org/v2
kind: KieApp
metadata:
name: rhdm-prod
spec:
useImageTags: true #https://issues.redhat.com/browse/RHPAM-3420
environment: rhdm-production-immutable
upgrades:
minor: true
enabled: true
@rafaeltuelho
rafaeltuelho / loan-approval.dmn
Created July 29, 2021 14:09
loan-approval.dmn
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_EC5A0305-6427-48D9-B8A4-EBBE4E697952" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="_0D8FD7B2-A3CD-477C-B572-A81193BDD346" name="loan-approval" expressionLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_EC5A0305-6427-48D9-B8A4-EBBE4E697952">
<dmn:extensionElements/>
<dmn:itemDefinition id="_630A1942-6338-478E-ACA0-22191A69AC39" name="Applicant" isCollection="false">
<dmn:itemComponent id="_8E74686D-BE67-47D2-97D9-2414C8D87D4D" name="age" isCollection="false">
<dmn:typeRef>number</dmn:typeRef>
</dmn:itemComponent>
<dmn:itemComponent id="_37BF9988-5935-44D1-9C64-375483F
@rafaeltuelho
rafaeltuelho / minimal-drools-pom.xml
Last active June 9, 2021 20:47
Minimal Drools (Kie) project pom
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.redhat.demos</groupId>
<artifactId>minimal-drools-project</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>kjar</packaging>
@rafaeltuelho
rafaeltuelho / settings-redhat-repos.xml
Created June 7, 2021 17:21
Maven Settings with Red Hat Enterprise repos
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>nexus-ocp</id>
<username>rhpam</username>
<password>secret_pass</password>
</server>
</servers>
@rafaeltuelho
rafaeltuelho / quarkus-ocp4-dc.yaml
Created April 16, 2021 14:01
Quarkus App DeploymentConfig for Openshift 4 using ubi8/openjdk-8 image
kind: DeploymentConfig
apiVersion: apps.openshift.io/v1
metadata:
annotations:
openshift.io/generated-by: OpenShiftNewApp
name: my-quarkus-app
spec:
strategy:
type: Rolling
rollingParams:

Red Hat UBI OpenJDK Image

Table of Contents

Informational variables

Table 1. Table Informational variables

Name

Value

Description

@rafaeltuelho
rafaeltuelho / maven-ignore-ssl.md
Created April 14, 2021 17:16
Maven ignore SSL Certificate Validation
mvn install \
 -Dmaven.wagon.http.ssl.insecure=true\
 -Dmaven.wagon.http.ssl.allowall=true\
 -Dmaven.wagon.http.ssl.ignore.validity.dates=true
@rafaeltuelho
rafaeltuelho / jbpm-sla-update-api.md
Last active November 22, 2021 18:26
Update a SLA of a instantiated process in jBPM

Get Process Instance SLAs (Timers)

Returns all timers for a specified process instance.
GET /server/admin/containers/{containerId}/processes/instances/{processInstanceId}/timers

curl -X GET "http://localhost:8080/kie-server/services/rest/server/admin/containers/sla-test_1.0.0-SNAPSHOT/processes/instances/165/timers" -H "accept: application/json"

Response

@rafaeltuelho
rafaeltuelho / docker-file-volume.md
Created March 11, 2021 15:12
Copy files to a docker volume
docker container create --name dummy -v myvolume:/root hello-world
docker cp c:\myfolder\myfile.txt dummy:/root/myfile.txt
docker rm dummy

ref: moby/moby#25245 (comment)