Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
[KOGITO-1770] - Renaming examples and CR to match kogito-examples repo (
Browse files Browse the repository at this point in the history
#294)

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
  • Loading branch information
ricardozanini committed Apr 13, 2020
1 parent 1646a4e commit 21a1bf5
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 39 deletions.
20 changes: 10 additions & 10 deletions README.md
Expand Up @@ -217,12 +217,12 @@ Example of memory request configuration:
apiVersion: app.kiegroup.org/v1alpha1
kind: KogitoApp
metadata:
name: jbpm-quarkus-example
name: process-quarkus-example
namespace: kogito
spec:
build:
gitSource:
contextDir: jbpm-quarkus-example
contextDir: process-quarkus-example
uri: 'https://github.com/kiegroup/kogito-examples'
native: true
resources:
Expand All @@ -234,7 +234,7 @@ spec:
:warning: Ensure that you have these resources available on your OpenShift nodes when running native builds. Otherwise the S2I build will fail.
You can check currently allocated and total resources of your nodes using the command `oc describe nodes` invoked by a user with admin rights.

The user can also limit the maximum heap space for the JVM used for a native build. The limitation can be applied by setting the `quarkus.native.native-image-xmx` property in the application.properties file. In such case the build pod will require roughly xmx + 2 GB of memory. The xmx value depends on the complexity of the application, for example for [jbpm-quarkus-example](https://github.com/kiegroup/kogito-examples/tree/master/jbpm-quarkus-example) the xmx value `2g` is enough, resulting in builder pod consuming just up to 4.2 GB of memory.
The user can also limit the maximum heap space for the JVM used for a native build. The limitation can be applied by setting the `quarkus.native.native-image-xmx` property in the application.properties file. In such case the build pod will require roughly xmx + 2 GB of memory. The xmx value depends on the complexity of the application, for example for [process-quarkus-example](https://github.com/kiegroup/kogito-examples/tree/master/process-quarkus-example) the xmx value `2g` is enough, resulting in builder pod consuming just up to 4.2 GB of memory.

The user can also set resource limits for a native build pod. In that case 80% of the memory limit is used for heap space in the JVM responsible for native build. If the computed heap space limit for the JVM is less than 1024 MB then all the memory from resource limits is used.

Expand All @@ -243,12 +243,12 @@ Example of memory limit configuration:
apiVersion: app.kiegroup.org/v1alpha1
kind: KogitoApp
metadata:
name: jbpm-quarkus-example
name: process-quarkus-example
namespace: kogito
spec:
build:
gitSource:
contextDir: jbpm-quarkus-example
contextDir: process-quarkus-example
uri: 'https://github.com/kiegroup/kogito-examples'
native: true
resources:
Expand All @@ -273,7 +273,7 @@ The name of the `configMap` consists of the name of the Kogito service and the s
kind: ConfigMap
apiVersion: v1
metadata:
name: jbpm-quarkus-example-properties
name: process-quarkus-example-properties
data:
application.properties : |-
dummy1=dummy1
Expand Down Expand Up @@ -910,7 +910,7 @@ If this happens, please uninstall AMQ Streams and install Strimzi manually since
To enable Kafka installation during deployment of your service, use the following Kogito CLI command:

```bash
$ kogito deploy jbpm-quarkus-example https://github.com/kiegroup/kogito-examples --context-dir=jbpm-quarkus-example --enable-events"
$ kogito deploy process-quarkus-example https://github.com/kiegroup/kogito-examples --context-dir=process-quarkus-example --enable-events"
```
Or using the custom resource (CR) yaml file:
Expand All @@ -919,7 +919,7 @@ Or using the custom resource (CR) yaml file:
apiVersion: app.kiegroup.org/v1alpha1
kind: KogitoApp
metadata:
name: jbpm-quarkus-example
name: process-quarkus-example
spec:
enableEvents: true
build:
Expand All @@ -928,7 +928,7 @@ spec:
value: -Pevents
gitSource:
uri: https://github.com/mswiderski/kogito-quickstarts
contextDir: jbpm-quarkus-example
contextDir: process-quarkus-example
```
The flag `--enable-events` in the CLI and the attribute `spec.enableEvents: true` in the CR tells to the operator
Expand All @@ -946,7 +946,7 @@ Also, if the container has any environment variable with the suffix `_BOOTSTRAP_
value of `KAFKA_BOOTSTRAP_SERVERS` variable as well. For example, by running:
```bash
$ kogito deploy jbpm-quarkus-example https://github.com/kiegroup/kogito-examples --context-dir=jbpm-quarkus-example --enable-events \
$ kogito deploy process-quarkus-example https://github.com/kiegroup/kogito-examples --context-dir=process-quarkus-example --enable-events \
--build-env MAVEN_ARGS_APPEND="-Pevents" \
-e MP_MESSAGING_INCOMING_TRAVELLERS_BOOTSTRAP_SERVERS -e MP_MESSAGING_OUTGOING_PROCESSEDTRAVELLERS_BOOTSTRAP_SERVERS"
```
Expand Down
4 changes: 2 additions & 2 deletions cmd/kogito/command/deploy/deploy_service_test.go
Expand Up @@ -182,7 +182,7 @@ func Test_DeployCmd_WrongGitURL(t *testing.T) {
func Test_DeployCmd_CommasOnSlicesParameters(t *testing.T) {
ns := t.Name()
cli :=
fmt.Sprintf("deploy-service process-example https://github.com/kiegroup/kogito-examples --context-dir jbpm-quarkus-example --build-env MAVEN_ARGS_APPEND=-Ppersistence,events --env JAVA_OPTIONS=-Dvalue1=test1,value2=test2 --project %s", ns)
fmt.Sprintf("deploy-service process-example https://github.com/kiegroup/kogito-examples --context-dir process-quarkus-example --build-env MAVEN_ARGS_APPEND=-Ppersistence,events --env JAVA_OPTIONS=-Dvalue1=test1,value2=test2 --project %s", ns)
ctx := test.SetupCliTest(cli,
context.CommandFactory{BuildCommands: BuildCommands},
&corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns}},
Expand All @@ -209,7 +209,7 @@ func Test_DeployCmd_CommasOnSlicesParameters(t *testing.T) {
func Test_DeployCmd_CommasOnMultipleSlicesParameters(t *testing.T) {
ns := t.Name()
cli :=
fmt.Sprintf("deploy-service process-example https://github.com/kiegroup/kogito-examples --context-dir jbpm-quarkus-example --build-env MAVEN_ARGS_APPEND=-Ppersistence,events --build-env DEBUG=true --project %s", ns)
fmt.Sprintf("deploy-service process-example https://github.com/kiegroup/kogito-examples --context-dir process-quarkus-example --build-env MAVEN_ARGS_APPEND=-Ppersistence,events --build-env DEBUG=true --project %s", ns)
ctx := test.SetupCliTest(cli,
context.CommandFactory{BuildCommands: BuildCommands},
&corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns}},
Expand Down
3 changes: 1 addition & 2 deletions deploy/crds/app.kiegroup.org_v1alpha1_kogitoapp_cr.yaml
Expand Up @@ -6,7 +6,6 @@ spec:
build:
gitSource:
uri: https://github.com/kiegroup/kogito-examples
contextDir: jbpm-quarkus-example
imageVersion: 0.9.1
contextDir: process-quarkus-example
# set your maven nexus repository
#mavenMirrorURL: http://nexus3-nexus.apps-crc.testing/repository/maven-public/
3 changes: 1 addition & 2 deletions deploy/examples/example-custom-build-images.yaml
Expand Up @@ -9,9 +9,8 @@ spec:
#- name: MY_CUSTOM_ENV
# value: "my value"
gitSource:
contextDir: jbpm-quarkus-example
contextDir: process-quarkus-example
uri: 'https://github.com/kiegroup/kogito-examples'
reference: 0.8.0
# images that don't have a custom tag, will use this version
imageVersion: 0.8.0
# the image runtime build will use this image (a pretty different namespace)
Expand Down
3 changes: 0 additions & 3 deletions deploy/examples/onboarding-example.yaml
Expand Up @@ -7,7 +7,6 @@ spec:
gitSource:
uri: https://github.com/kiegroup/kogito-examples
contextDir: onboarding-example/onboarding
imageVersion: 0.8.0
# set your maven nexus repository
#mavenMirrorURL: http://nexus3-nexus.apps-crc.testing/repository/maven-public/
service:
Expand All @@ -27,7 +26,6 @@ spec:
gitSource:
uri: https://github.com/kiegroup/kogito-examples
contextDir: onboarding-example/hr
imageVersion: 0.8.0
# set your maven nexus repository
#mavenMirrorURL: http://nexus3-nexus.apps-crc.testing/repository/maven-public/
service:
Expand All @@ -46,7 +44,6 @@ spec:
gitSource:
uri: https://github.com/kiegroup/kogito-examples
contextDir: onboarding-example/payroll
imageVersion: 0.8.0
# set your maven nexus repository
#mavenMirrorURL: http://nexus3-nexus.apps-crc.testing/repository/maven-public/
service:
Expand Down
Expand Up @@ -4,6 +4,5 @@ metadata:
name: example-quarkus-flash
spec:
# you only need to inform the correct image tag if you wish to build from a custom image
build:
imageVersion: 0.9.1 # will use it as a reference to create the imagestreams that the Operator uses
build: {}
# run this from your terminal on your project's root: oc start-build example-quarkus-flash-binary --from-dir=target
Expand Up @@ -11,8 +11,7 @@ spec:
- name: MAVEN_ARGS_APPEND
value: "-Ppersistence,events"
gitSource:
contextDir: jbpm-quarkus-example
contextDir: process-quarkus-example
uri: 'https://github.com/kiegroup/kogito-examples'
imageVersion: 0.9.1
# set your maven nexus repository
#mavenMirrorURL: http://nexus3-nexus.apps-crc.testing/repository/maven-public/
Expand Up @@ -9,8 +9,7 @@ spec:
#- name: MY_CUSTOM_ENV
# value: "my value"
gitSource:
contextDir: jbpm-quarkus-example
contextDir: process-quarkus-example
uri: 'https://github.com/kiegroup/kogito-examples'
imageVersion: 0.8.0
# set your maven nexus repository
#mavenMirrorURL: http://nexus3-nexus.apps-crc.testing/repository/maven-public/
2 changes: 1 addition & 1 deletion deploy/examples/service-labels.yaml
Expand Up @@ -6,7 +6,7 @@ spec:
build:
gitSource:
uri: https://github.com/kiegroup/kogito-examples
contextDir: jbpm-quarkus-example
contextDir: process-quarkus-example
service:
labels:
operator: abc-operator
Expand Down
2 changes: 1 addition & 1 deletion deploy/examples/springboot.yaml
Expand Up @@ -10,7 +10,7 @@ spec:
build:
gitSource:
uri: https://github.com/kiegroup/kogito-examples
contextDir: jbpm-springboot-example
contextDir: process-springboot-example
reference: master
incremental: true
envs:
Expand Down
1 change: 0 additions & 1 deletion deploy/examples/travelapp-kogito-travel-agency.yaml
Expand Up @@ -15,6 +15,5 @@ spec:
gitSource:
contextDir: 06-kogito-travel-agency
uri: "https://github.com/kiegroup/kogito-travel-agency-tutorial/"
imageVersion: 0.8.0
# set your maven nexus repository
#mavenMirrorURL: http://nexus3-nexus.apps-crc.testing/repository/maven-public/
1 change: 0 additions & 1 deletion deploy/examples/travelapp-kogito-visas.yaml
Expand Up @@ -15,6 +15,5 @@ spec:
gitSource:
contextDir: 06-kogito-visas
uri: "https://github.com/kiegroup/kogito-travel-agency-tutorial/"
imageVersion: 0.8.0
# set your maven nexus repository
#mavenMirrorURL: http://nexus3-nexus.apps-crc.testing/repository/maven-public/
Expand Up @@ -13,10 +13,9 @@ metadata:
"spec": {
"build": {
"gitSource": {
"contextDir": "jbpm-quarkus-example",
"contextDir": "process-quarkus-example",
"uri": "https://github.com/kiegroup/kogito-examples"
},
"imageVersion": "0.9.1"
}
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/kogitoapp/kogitoapp_controller_test.go
Expand Up @@ -73,7 +73,7 @@ var (
Native: false,
GitSource: v1alpha1.GitSource{
URI: gitURL,
ContextDir: "jbpm-quarkus-example",
ContextDir: "process-quarkus-example",
},
},
},
Expand Down
6 changes: 3 additions & 3 deletions pkg/controller/kogitoapp/resource/build_config_test.go
Expand Up @@ -45,7 +45,7 @@ func Test_BuidConfig_NonNativeBuild(t *testing.T) {
},
GitSource: v1alpha1.GitSource{
URI: uri,
ContextDir: "jbpm-quarkus-example",
ContextDir: "process-quarkus-example",
},
Native: false,
MavenMirrorURL: "https://localhost.nexus:8080/public",
Expand Down Expand Up @@ -75,7 +75,7 @@ func Test_BuildConfig_WithCustomImage(t *testing.T) {
Build: &v1alpha1.KogitoAppBuildObject{
GitSource: v1alpha1.GitSource{
URI: uri,
ContextDir: "jbpm-quarkus-example",
ContextDir: "process-quarkus-example",
},
ImageVersion: "latest",
ImageRuntimeTag: "quay.io/namespace/my-image:0.2",
Expand Down Expand Up @@ -111,7 +111,7 @@ func Test_buildConfigResource_New(t *testing.T) {
},
GitSource: v1alpha1.GitSource{
URI: uri,
ContextDir: "jbpm-quarkus-example",
ContextDir: "process-quarkus-example",
},
Native: true,
MavenMirrorURL: "https://localhost.nexus:8080/public",
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/kogitoapp/resource/deployment_config_test.go
Expand Up @@ -49,7 +49,7 @@ func Test_deploymentConfigResource_NewWithValidDocker(t *testing.T) {
Build: &v1alpha1.KogitoAppBuildObject{
GitSource: v1alpha1.GitSource{
URI: uri,
ContextDir: "jbpm-quarkus-example",
ContextDir: "process-quarkus-example",
},
},
},
Expand Down Expand Up @@ -95,7 +95,7 @@ func Test_deploymentConfigResource_NewWithInvalidDocker(t *testing.T) {
Build: &v1alpha1.KogitoAppBuildObject{
GitSource: v1alpha1.GitSource{
URI: uri,
ContextDir: "jbpm-quarkus-example",
ContextDir: "process-quarkus-example",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/kogitoapp/resource/service_test.go
Expand Up @@ -38,7 +38,7 @@ func Test_serviceResource_NewWithAndWithoutDockerImg(t *testing.T) {
Build: &v1alpha1.KogitoAppBuildObject{
GitSource: v1alpha1.GitSource{
URI: uri,
ContextDir: "jbpm-quarkus-example",
ContextDir: "process-quarkus-example",
},
},
},
Expand Down

0 comments on commit 21a1bf5

Please sign in to comment.