If you want to run a local Red Hat OpenShift on your Laptop then this guide is written just for you. This guide is not meant for Production setup or any use where actual customer traffic is anticipated. CRC is a tool created for deployment of minimal OpenShift Container Platform 4 cluster and Podman container runtime on a local computer. This is fit for development and testing purposes only. Local OpenShift is mainly targeted at running on developers’ desktops. For deployment of Production grade OpenShift Container Platform use cases, refer to official Red Hat documentation on using the full OpenShift installer.
We also have guide on running Red Hat OpenShift Container Platform in KVM virtualization;
How To Deploy OpenShift Container Platform on KVM
Here are the key points to note about Local Red Hat OpenShift Container platform using CRC:
The cluster is ephemeral
Both the control plane and worker node runs on a single node
The Cluster Monitoring Operator is disabled by default.
There is no supported upgrade path to newer OpenShift Container Platform versions
The cluster uses 2 DNS domain names, crc.testing and apps-crc.testing
crc.testing domain is for core OpenShift services and apps-crc.testing is for applications deployed on the cluster.
The cluster uses the 172 address range for internal cluster communication.
Requirements for running Local OpenShift Container Platform:
A computer with AMD64 and Intel 64 processor
Physical CPU cores: 4
Free memory: 9 GB
Disk space: 35 GB
1. Local Computer Preparation
We shall be performing this installation on a Red Hat Linux 9 system.
$ cat /etc/redhat-release
Red Hat Enterprise Linux release 9.0 (Plow)
OS specifications are as shared below:
[jkmutai@crc ~]$ free -h
total used free shared buff/cache available
Mem: 31Gi 238Mi 30Gi 8.0Mi 282Mi 30Gi
Swap: 9Gi 0B 9Gi
[jkmutai@crc ~]$ grep -c ^processor /proc/cpuinfo
8
[jkmutai@crc ~]$ ip ad
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens18: mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether b2:42:4e:64:fb:17 brd ff:ff:ff:ff:ff:ff
altname enp0s18
inet 192.168.207.2/24 brd 192.168.207.255 scope global noprefixroute ens18
valid_lft forever preferred_lft forever
inet6 fe80::b042:4eff:fe64:fb17/64 scope link noprefixroute
valid_lft forever preferred_lft forever
For RHEL register system
If you’re performing this setup on RHEL system, use the commands below to register the system.
$ sudo subscription-manager register --auto-attach
Registering to: subscription.rhsm.redhat.com:443/subscription
Username:
Password:
The registered system name is: crc.example.com
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64
Status: Subscribed
The command will automatically associate any available subscription matching the system. You can also provide username and password in one command line.
sudo subscription-manager register --username --password --auto-attach
If you would like to register system without immediate subscription attachment, then run:
sudo subscription-manager register
Once the system is registered, attach a subscription from a specific pool using the following command:
sudo subscription-manager attach --pool=
To find which pools are available in the system, run the commands:
sudo subscription-manager list --available
sudo subscription-manager list --available --all
Update your system and reboot
sudo dnf -y update
sudo reboot
Install required dependencies
You need to install libvirt and NetworkManager packages which are the dependencies for running local OpenShift cluster.
### Fedora / RHEL 8+ ###
sudo dnf -y install wget vim NetworkManager
### RHEL 7 / CentOS 7 ###
sudo yum -y install wget vim NetworkManager
### Debian / Ubuntu ###
sudo apt update
sudo apt install wget vim libvirt-daemon-system qemu-kvm libvirt-daemon network-manager
2. Download Red Hat OpenShift Local
Next we download CRC portable executable. Visit Red Hat OpenShift downloads page to pull local cluster installer program.
Under Cluster select “Local” as option to create your cluster. You’ll see Download link and Pull secret download link as well.
Here is the direct download link provided for reference purposes.
wget https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz
Extract the package downloaded
tar xvf crc-linux-amd64.tar.xz
Move the binary file to location in your PATH:
sudo mv crc-linux-*-amd64/crc /usr/local/bin
sudo rm -rf crc-linux-*-amd64/
Confirm installation was successful by checking software version.
$ crc version
CRC version: 2.7.1+a8e9854
OpenShift version: 4.11.0
Podman version: 4.1.1
Data collection can be enabled or disabled with the following commands:
#Enable
crc config set consent-telemetry yes
#Disable
crc config set consent-telemetry no
3. Run Local OpenShift Cluster in Linux Computer
You’ll run the crc setup command to create a new Red Hat OpenShift Local Cluster. All the prerequisites for using CRC are handled automatically for you.
$ crc setup
CRC is constantly improving and we would like to know more about usage (more details at https://developers.redhat.com/article/tool-data-collection)
Your preference can be changed manually if desired using 'crc config set consent-telemetry '
Would you like to contribute anonymous usage statistics? [y/N]: y
Thanks for helping us! You can disable telemetry with the command 'crc config set consent-telemetry no'.
INFO Using bundle path /home/jkmutai/.crc/cache/crc_libvirt_4.11.0_amd64.crcbundle
INFO Checking if running as non-root
INFO Checking if running inside WSL2
INFO Checking if crc-admin-helper executable is cached
INFO Caching crc-admin-helper executable
INFO Using root access: Changing ownership of /home/jkmutai/.crc/bin/crc-admin-helper-linux
INFO Using root access: Setting suid for /home/jkmutai/.crc/bin/crc-admin-helper-linux
INFO Checking for obsolete admin-helper executable
INFO Checking if running on a supported CPU architecture
INFO Checking minimum RAM requirements
INFO Checking if crc executable symlink exists
INFO Creating symlink for crc executable
INFO Checking if Virtualization is enabled
INFO Checking if KVM is enabled
INFO Checking if libvirt is installed
INFO Installing libvirt service and dependencies
INFO Using root access: Installing virtualization packages
INFO Checking if user is part of libvirt group
INFO Adding user to libvirt group
INFO Using root access: Adding user to the libvirt group
INFO Checking if active user/process is currently part of the libvirt group
INFO Checking if libvirt daemon is running
WARN No active (running) libvirtd systemd unit could be found - make sure one of libvirt systemd units is enabled so that it's autostarted at boot time.
INFO Starting libvirt service
INFO Using root access: Executing systemctl daemon-reload command
INFO Using root access: Executing systemctl start libvirtd
INFO Checking if a supported libvirt version is installed
INFO Checking if crc-driver-libvirt is installed
INFO Installing crc-driver-libvirt
INFO Checking crc daemon systemd service
INFO Setting up crc daemon systemd service
INFO Checking crc daemon systemd socket units
INFO Setting up crc daemon systemd socket units
INFO Checking if systemd-networkd is running
INFO Checking if NetworkManager is installed
INFO Checking if NetworkManager service is running
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists
INFO Writing Network Manager config for crc
INFO Using root access: Writing NetworkManager configuration to /etc/NetworkManager/conf.
d/crc-nm-dnsmasq.conf
INFO Using root access: Changing permissions for /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf to 644
INFO Using root access: Executing systemctl daemon-reload command
INFO Using root access: Executing systemctl reload NetworkManager
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists
INFO Writing dnsmasq config for crc
INFO Using root access: Writing NetworkManager configuration to /etc/NetworkManager/dnsmasq.d/crc.conf
INFO Using root access: Changing permissions for /etc/NetworkManager/dnsmasq.d/crc.conf to 644
INFO Using root access: Executing systemctl daemon-reload command
INFO Using root access: Executing systemctl reload NetworkManager
INFO Checking if libvirt 'crc' network is available
INFO Setting up libvirt 'crc' network
INFO Checking if libvirt 'crc' network is active
INFO Starting libvirt 'crc' network
INFO Checking if CRC bundle is extracted in '$HOME/.crc'
INFO Checking if /home/jkmutai/.crc/cache/crc_libvirt_4.11.0_amd64.crcbundle exists
INFO Getting bundle for the CRC executable
INFO Downloading crc_libvirt_4.11.0_amd64.crcbundle
CRC bundle is downloaded locally within few seconds / minutes depending on your network connectivity speed.
INFO Downloading crc_libvirt_4.11.0_amd64.crcbundle
3.28 GiB / 3.28 GiB [----------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 85.19 MiB p/s
INFO Uncompressing /home/jkmutai/.crc/cache/crc_libvirt_4.11.0_amd64.crcbundle
crc.qcow2: 12.48 GiB / 12.48 GiB [-----------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00%
oc: 118.13 MiB / 118.13 MiB [----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00%
Once the system is correctly setup for using CRC, start the new Red Hat OpenShift Local instance:
$ crc start
INFO Checking if running as non-root
INFO Checking if running inside WSL2
INFO Checking if crc-admin-helper executable is cached
INFO Checking for obsolete admin-helper executable
INFO Checking if running on a supported CPU architecture
INFO Checking minimum RAM requirements
INFO Checking if crc executable symlink exists
INFO Checking if Virtualization is enabled
INFO Checking if KVM is enabled
INFO Checking if libvirt is installed
INFO Checking if user is part of libvirt group
INFO Checking if active user/process is currently part of the libvirt group
INFO Checking if libvirt daemon is running
INFO Checking if a supported libvirt version is installed
INFO Checking if crc-driver-libvirt is installed
INFO Checking crc daemon systemd socket units
INFO Checking if systemd-networkd is running
INFO Checking if NetworkManager is installed
INFO Checking if NetworkManager service is running
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists
INFO Checking if libvirt 'crc' network is available
INFO Checking if libvirt 'crc' network is active
INFO Loading bundle: crc_libvirt_4.11.0_amd64...
CRC requires a pull secret to download content from Red Hat.
You can copy it from the Pull Secret section of https://console.redhat.com/openshift/create/local.
Paste the contents of the Pull secret.
? Please enter the pull secret
This can be obtained from Red Hat OpenShift Portal.
Local OpenShift cluster creation process should continue.
INFO Creating CRC VM for openshift 4.11.0...
INFO Generating new SSH key pair...
INFO Generating new password for the kubeadmin user
INFO Starting CRC VM for openshift 4.11.0...
INFO CRC instance is running with IP 192.168.130.11
INFO CRC VM is running
INFO Updating authorized keys...
INFO Configuring shared directories
INFO Check internal and public DNS query...
INFO Check DNS query from host...
INFO Verifying validity of the kubelet certificates...
INFO Starting kubelet service
INFO Waiting for kube-apiserver availability... [takes around 2min]
INFO Adding user's pull secret to the cluster...
INFO Updating SSH key to machine config resource...
INFO Waiting for user's pull secret part of instance disk...
INFO Changing the password for the kubeadmin user
INFO Updating cluster ID...
INFO Updating root CA cert to admin-kubeconfig-client-ca configmap...
INFO Starting openshift instance... [waiting for the cluster to stabilize]
INFO 3 operators are progressing: image-registry, network, openshift-controller-manager
[INFO 3 operators are progressing: image-registry, network, openshift-controller-manager
INFO 2 operators are progressing: image-registry, openshift-controller-manager
INFO Operator openshift-controller-manager is progressing
INFO Operator authentication is not yet available
INFO Operator kube-apiserver is progressing
INFO All operators are available. Ensuring stability...
INFO Operators are stable (2/3)...
INFO Operators are stable (3/3)...
INFO Adding crc-admin and crc-developer contexts to kubeconfig...
If creation was successful you should get output like below in your console.
Started the OpenShift cluster.
The server is accessible via web console at:
https://console-openshift-console.apps-crc.testing
Log in as administrator:
Username: kubeadmin
Password: yHhxX-fqAjW-8Zzw5-Eg2jg
Log in as user:
Username: developer
Password: developer
Use the 'oc' command line interface:
$ eval $(crc oc-env)
$ oc login -u developer https://api.crc.testing:6443
Virtual Machine created can be checked with virsh command:
$ sudo virsh list
Id Name State
----------------------
1 crc running
4. Manage Local OpenShift Cluster using crc commands
Update number of vCPUs available to the instance:
crc config set cpus
Configure the memory available to the instance:
$ crc config set memory
Display status of the OpenShift cluster
## When running ###
$ crc status
CRC VM: Running
OpenShift: Running (v4.11.0)
Podman:
Disk Usage: 15.29GB of 32.74GB (Inside the CRC VM)
Cache Usage: 17.09GB
Cache Directory: /home/jkmutai/.crc/cache
## When Stopped ###
$ crc status
CRC VM: Stopped
OpenShift: Stopped (v4.11.0)
Podman:
Disk Usage: 0B of 0B (Inside the CRC VM)
Cache Usage: 17.09GB
Cache Directory: /home/jkmutai/.crc/cache
Get IP address of the running OpenShift cluster
$ crc ip
192.168.130.11
Open the OpenShift Web Console in the default browser
crc console
Accept SSL certificate warnings to access OpenShift dashboard.
Accept risk and continue
Authenticate with username and password given on screen after deployment of crc instance.
The following command can also be used to view the password for the developer and kubeadmin users:
crc console --credentials
To stop the instance run the commands:
crc stop
If you want to permanently delete the instance, use:
crc delete
5. Configure oc environment
Let’s add oc executable our system’s PATH:
$ crc oc-env
export PATH="/home/jkmutai/.crc/bin/oc:$PATH"
# Run this command to configure your shell:
# eval $(crc oc-env)
$ vim ~/.bashrc
export PATH="/home/$USER/.crc/bin/oc:$PATH"
eval $(crc oc-env)
Logout and back in to validate it works.
$ exit
Check oc binary path after getting in to the system.
$ which oc
~/.crc/bin/oc/oc
$ oc get nodes
NAME STATUS ROLES AGE VERSION
crc-9jm8r-master-0 Ready master,worker 21d v1.24.0+9546431
Confirm this works by checking installed cluster version
$ oc get clusterversion
NAME VERSION AVAILABLE PROGRESSING SINCE STATUS
version 4.11.0 True False 20d Cluster version is 4.11.0
To log in as the developer user:
crc console --credentials
oc login -u developer https://api.crc.testing:6443
To log in as the kubeadmin user and run the following command:
$ oc config use-context crc-admin
$ oc whoami
kubeadmin
To log in to the registry as that user with its token, run:
oc registry login --insecure=true
Listing available Cluster Operators.
$ oc get co
NAME VERSION AVAILABLE PROGRESSING DEGRADED SINCE MESSAGE
authentication 4.11.0 True False False 11m
config-operator 4.11.0 True False False 21d
console 4.11.0 True False False 13m
dns 4.11.0 True False False 19m
etcd 4.11.0 True False False 21d
image-registry 4.11.0 True False False 14m
ingress 4.11.0 True False False 21d
kube-apiserver 4.11.0 True False False 21d
kube-controller-manager 4.11.0 True False False 21d
kube-scheduler 4.11.0 True False False 21d
machine-api 4.11.0 True False False 21d
machine-approver 4.11.0 True False False 21d
machine-config 4.11.0 True False False 21d
marketplace 4.11.0 True False False 21d
network 4.11.0 True False False 21d
node-tuning 4.11.0 True False False 13m
openshift-apiserver 4.11.0 True False False 11m
openshift-controller-manager 4.11.0 True False False 14m
openshift-samples 4.11.0 True False False 21d
operator-lifecycle-manager 4.11.0 True False False 21d
operator-lifecycle-manager-catalog 4.11.0 True False False 21d
operator-lifecycle-manager-packageserver 4.11.0 True False False 19m
service-ca 4.11.0 True False False 21d
Display information about the release:
oc adm release info
Note that the OpenShift Local reserves IP subnets for its internal use and they should not collide with your host network. These IP subnets are:
10.217.0.0/22
10.217.4.0/23
192.168.126.0/24
If your local system is behind a proxy, then define proxy settings using environment variable. See examples below:
crc config set http-proxy http://proxy.example.com:
crc config set https-proxy http://proxy.example.com:
crc config set no-proxy
If Proxy server uses SSL, set CA certificate as below:
crc config set proxy-ca-file
6. Install and Connecting to remote OpenShift Local instance
If the deployment is on a remote server, install CRC and start the instance using process in steps 1-3. With the cluster up and running, install HAProxy package:
sudo dnf install haproxy /usr/sbin/semanage
Allow access to cluster in firewall:
sudo firewall-cmd --add-service=http,https,kube-apiserver --permanent
sudo firewall-cmd --reload
If you have SELinux enforcing, allow HAProxy to listen on TCP port 6443 for serving kube-apiserver on this port:
sudo semanage port -a -t http_port_t -p tcp 6443
Backup the current haproxy configuration file:
sudo cp /etc/haproxy/haproxy.cfg,.bak
Save the current IP address of CRC in variable:
export CRC_IP=$(crc ip)
Create a new configuration:
sudo tee /etc/haproxy/haproxy.cfg
0 notes
Your first Business Rules application on OpenShift: from Zero to Hero in 30 minutes
We disclosed how to convey a current JBoss BRMS/Drools rules extend onto an OpenShift DecisionServer. We made a choice/business-rules microservice on OpenShift Container Platform that was actualized by a BRMS application. The bilingual way of a microservice engineering enabled us to utilize the best usage (a guidelines motor) for this given usefulness (business rules execution) in our design.
The venture we utilized was a current standards extend that was accessible on GitHub. We did however not clarify how one can make a venture sans preparation in the JBoss BRMS Business Central condition and convey it on OpenShift Container Platform. That is the thing that we will investigate in this article.
Building the standards extend
Red Hat JBoss BRMS gives a workbench, creating condition and venture and guidelines vault called "Business Central". We will utilize Business Central to make our tenets venture, characterize our information display, and make our principles.
We give a Red Hat JBoss BRMS Installation Demo that gives a simple establishment of the BRMS stage. It would be ideal if you take after this demo to introduce and begin the stage. Once the stage is begun, we can make our venture. The venture will be a straightforward "Advance Application" demo (truth be told, it will be founded on one of our current demo's, which can be found here).
Open "Business Central" at "http://localhost:8080/business-focal" and give the username (brmsAdmin) and secret key (jbossbrms1!) (on the off chance that you've introduced the stage in a Docker compartment, utilize the URL of your Docker have as clarified in the README of the Install Demo). We initially need to make a purported Organizational Unit (OU) in the "Business Central" interface:
Tap on "Composing - > Administration"
Tap on "Hierarchical Units - > Manage Organizational Units"
Tap on "Include" and make another Organizational Unit with name "Demos" (you can leave alternate fields in the screen exhaust).
Presently will make another vault in which we can store our venture:
Tap on "Stores - > New storehouse"
Give it the name "advance" and dole out it to the "Demos" OU we made prior (leave "Oversaw Repository" unchecked).
Our next assignment is to make the venture:
Tap on "Creating - > Project Authoring"
Tap on "New Item - > Project"
Give the accompanying points of interest:
– Project Name: loandemo
– Group ID: com.redhat.demos
– Artifact ID: loandemo
– Version: 1.0
Making the Data Model
Since we have a venture, we can make our information display. In this illustration, we will make a basic information demonstrate comprising of 2 classes: Applicant and Loan.
Tap on "New Item - > Data Object"
Give the protest the name "Candidate"
Set the bundle to "com.redhat.demos.loandemo"
Give the question two fields:
– creditScore: int (Label: CreditScore)
– name: String (Label: Name)
Next, make an information question with name "Credit" in bundle "com.redhat.demos.loandemo" with the accompanying fields:
Sum: int (Label: Amount)
endorsed: boolean (Label: Approved)
Span: int (Label: Duration)
InterestRate: twofold (Label: InterestRate)
Make a point to spare the articles utilizing the "spare" catch (upper right corner) of the editorial manager. We can now make our standards.
Composing the tenets
We will make our tenets as a choice table:
Tap on "New Item - > Guided Decision Table"
Give it the name "LoanApproval"
Set the bundle to "com.redhat.demos.loan"
Try to choose "Expanded section, values characterized in table body"
Our choice table will comprise of 4 Constraint segments and one Action section. Our Constraint sections characterize the purported Left-Hand-Side of our tenets, the "when" part. The Action section characterizes the Right-Hand-Side or "at that point" part.
To include a Condition section:
Tap on the "+" sign beside "Choice Table"
Tap on "New Column"
Select "Include a Simple Condition" and characterize the accompanying settings:
– Pattern: Applicant (set "a" for official)
– Calculation Type: Literal Value
– Field: creditScore
– Operator: more prominent than or equivalent to
– Column Header: Minimum Credit Score
Characterize 3 extra Condition segments with the accompanying esteems:
Design: Applicant (set "a" for official)
Estimation Type: Literal Value
Field: creditScore
Administrator: not exactly or equivalent to
Segment Header: Maximum Credit Score
Design: Loan (set "l" for official)
Estimation Type: Literal Value
Field: sum
Administrator: more noteworthy than or equivalent to
Section Header: Minimum Amount
Design: Loan (set "l" for authoritative)
Figuring Type: Literal Value
Field: amountOperator: not exactly or equivalent to
Section Header: Maximum Amount
At last, we have to design our Action section:
Click again on "New Column"
Select "Set the estimation of a field"
Give the accompanying esteems:
– Fact: l (this is our Loan certainty that we characterized in our Condition segments)
– Field: endorsed
– Column header: Approved?
Spare the Decision Table. We can now set the qualities in our choice table. Each column in our table characterizes a run the show. Whenever finish, the table ought to resemble this:
Arranging the venture for OpenShift S2I manufactures
The Red Hat JBoss BRMS Decision Server in OpenShift Container Platform utilizes the supposed S2I, or Source-to-Image, idea to manufacture its OpenShift (Docker) holder pictures. Basically, you give S2I the source code of your standards extend, and the manufacture framework will utilize Maven to assemble the KJAR (Knowledge JAR) containing the information model and guidelines, send this KJAR onto the Decision Server and make the compartment picture.
Since S2I utilizes Maven, we initially need to ensure that our venture is buildable by Maven. To check this, we clone the venture onto our nearby filesystem. Business Central uses a Git storehouse for capacity under the spreads, so we can essentially utilize our most loved Git instrument to clone the BRMS vault:
> git clone ssh://brmsAdmin@localhost:8001/advance
Take note of that the Git execution of Business Central uses a more established open key calculation (DAS), which may oblige you to add the accompanying settings to your SSH arrangement document (on Linux and macOS this record is situated at "~/.ssh/config").
Have localhost
HostKeyAlgorithms +ssh-dss
After the venture has been effectively cloned, go to the "advance/loandemo" catalog and run "mvn clean introduce" to begin the Maven assemble. On the off chance that all his right, this will create an assemble disappointment:
[INFO] - - - - -
[INFO] BUILD FAILURE
[INFO] - - - - -
[INFO] Total time: 7.982 s
[INFO] Finished at: 2017-06-07T23:26:18+02:00
[INFO] Final Memory: 34M/396M
[INFO] - - - - -
[ERROR] Failed to execute objective org.apache.maven.plugins:maven-compiler-plugin:2.5.1-jboss-2:compile (default-arrange) on venture loandemo: Compilation disappointment: Compilation disappointment:
[ERROR]/Users/ddoyle/Development/github/jbossdemocentral/bla/credit/loandemo/src/primary/java/com/redhat/demos/loandemo/Applicant.java:[12,32] bundle org.kie.api.definition.type does not exist
[ERROR]/Users/ddoyle/Development/github/jbossdemocentral/bla/advance/loandemo/src/principle/java/com/redhat/demos/loandemo/Applicant.java:[14,32] bundle org.kie.api.definition.type does not exist
[ERROR]/Users/ddoyle/Development/github/jbossdemocentral/bla/advance/loandemo/src/fundamental/java/com/redhat/demos/loandemo/Loan.java:[12,32] bundle org.kie.api.definition.type does not exist
[ERROR]/Users/ddoyle/Development/github/jbossdemocentral/bla/credit/loandemo/src/fundamental/java/com/redhat/demos/loandemo/Loan.java:[14,32] bundle org.kie.api.definition.type does not exist
[ERROR]/Users/ddoyle/Development/github/jbossdemocentral/bla/credit/loandemo/src/fundamental/java/com/redhat/demos/loandemo/Loan.java:[16,32] bundle org.kie.api.definition.type does not exist
[ERROR]/Users/ddoyle/Development/github/jbossdemocentral/bla/credit/loandemo/src/fundamental/java/com/redhat/demos/loandemo/Loan.java:[18,32] bundle org.kie.api.definition.type does not exist
This is on the grounds that our space demonstrate contains Java explanations from the "kie-programming interface" library, in any case, that reliance is not characterized in the "pom.xml" extend descriptor of our venture. This reliance is not required for fabricates done in Business Central, as Business Central gives this JAR on the manufacture way verifiably. In any case, we have to expressly characterize this reliance in our "pom.xml" petition for our neighborhood and Decision Server S2I Maven works to succeed.
Add the accompanying reliance to the "pom.xml" record of the venture:
<dependencies>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-api</artifactId>
<version>6.4.0.Final-redhat-13</version>
<scope>provided</scope>
</dependency>
</dependencies>
Take note of the "gave" scope, as we just require this reliance at assemble time. At runtime, this reliance is given by the Decision Server stage.
Run the construct once more: "mvn clean introduce". The manufacture ought to now succeed. We can confer these progressions and drive them back to our Git store in Business Central with the accompanying charges:
> git include pom.xml
> git confer - m "Added kie-programming interface reliance to POM."
> git push
Making the venture available to OpenShift S2I
As clarified before, the BRMS Decision Server S2I assemble takes the source code of your venture, for instance from a Git storehouse, arranges the sources into a KJAR, sends the KJAR onto the Decision Server and fabricates the OpenShift picture (nitty gritty data about the xPaaS BRMS picture for OpenShift can be found in the manual). In this way, the S2I fabricate needs access to our venture's source code.
0 notes