From 1e07b99dbedeeb6f56b2245712e27a3e0f3f5642 Mon Sep 17 00:00:00 2001 From: Cristiano Nicolai Date: Tue, 21 Apr 2020 06:53:45 -0400 Subject: [PATCH 01/37] Release of version 0.10.0 --- decisiontable-quarkus-example/pom.xml | 2 +- decisiontable-springboot-example/pom.xml | 2 +- dmn-quarkus-example/pom.xml | 2 +- dmn-springboot-example/pom.xml | 2 +- kogito-travel-agency/pom.xml | 2 +- kogito-travel-agency/travels/pom.xml | 2 +- kogito-travel-agency/visas/pom.xml | 2 +- onboarding-example/hr/pom.xml | 2 +- onboarding-example/onboarding/pom.xml | 2 +- onboarding-example/payroll/pom.xml | 2 +- onboarding-example/pom.xml | 2 +- pom.xml | 2 +- process-business-rules-quarkus/pom.xml | 2 +- process-business-rules-springboot/pom.xml | 2 +- process-infinispan-persistence-quarkus/pom.xml | 2 +- process-infinispan-persistence-springboot/pom.xml | 2 +- process-kafka-quickstart-quarkus/pom.xml | 2 +- process-kafka-quickstart-springboot/pom.xml | 2 +- process-optaplanner-springboot/pom.xml | 2 +- process-quarkus-example/pom.xml | 2 +- process-scripts-quarkus/pom.xml | 2 +- process-scripts-springboot/pom.xml | 2 +- process-service-calls-quarkus/pom.xml | 2 +- process-service-calls-springboot/pom.xml | 2 +- process-service-rest-call-quarkus/pom.xml | 2 +- process-service-rest-call-springboot/pom.xml | 2 +- process-springboot-example/pom.xml | 2 +- process-timer-quarkus/pom.xml | 2 +- process-timer-springboot/pom.xml | 2 +- process-usertasks-custom-lifecycle-quarkus/pom.xml | 2 +- process-usertasks-custom-lifecycle-springboot/pom.xml | 2 +- process-usertasks-quarkus/pom.xml | 2 +- process-usertasks-springboot/pom.xml | 2 +- process-usertasks-with-security-oidc-quarkus/pom.xml | 2 +- process-usertasks-with-security-oidc-springboot/pom.xml | 2 +- process-usertasks-with-security-quarkus/pom.xml | 2 +- process-usertasks-with-security-springboot/pom.xml | 2 +- rules-quarkus-helloworld/pom.xml | 2 +- ruleunit-quarkus-example/pom.xml | 2 +- ruleunit-springboot-example/pom.xml | 2 +- serverless-workflow-greeting-quarkus/pom.xml | 2 +- serverless-workflow-greeting-springboot/pom.xml | 2 +- serverless-workflow-service-calls-quarkus/pom.xml | 2 +- serverless-workflow-service-calls-springboot/pom.xml | 2 +- 44 files changed, 44 insertions(+), 44 deletions(-) diff --git a/decisiontable-quarkus-example/pom.xml b/decisiontable-quarkus-example/pom.xml index 1c389bb695..83b49b884c 100644 --- a/decisiontable-quarkus-example/pom.xml +++ b/decisiontable-quarkus-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples decisiontable-quarkus-example diff --git a/decisiontable-springboot-example/pom.xml b/decisiontable-springboot-example/pom.xml index 0da391c29e..2132ca7dd1 100644 --- a/decisiontable-springboot-example/pom.xml +++ b/decisiontable-springboot-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples decisiontable-springboot-example diff --git a/dmn-quarkus-example/pom.xml b/dmn-quarkus-example/pom.xml index 68b79507a1..93258aabd0 100644 --- a/dmn-quarkus-example/pom.xml +++ b/dmn-quarkus-example/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 dmn-quarkus-example Kogito Example :: DMN diff --git a/dmn-springboot-example/pom.xml b/dmn-springboot-example/pom.xml index b8e5a44f60..0bdf551b69 100644 --- a/dmn-springboot-example/pom.xml +++ b/dmn-springboot-example/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 dmn-springboot-example Kogito Example :: DMN - Spring Boot diff --git a/kogito-travel-agency/pom.xml b/kogito-travel-agency/pom.xml index b064b345bb..76ae7cb85c 100644 --- a/kogito-travel-agency/pom.xml +++ b/kogito-travel-agency/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 kogito-travel-agency-example diff --git a/kogito-travel-agency/travels/pom.xml b/kogito-travel-agency/travels/pom.xml index 1d7c4c886a..02950799f0 100644 --- a/kogito-travel-agency/travels/pom.xml +++ b/kogito-travel-agency/travels/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-travel-agency-example - 8.0.0-SNAPSHOT + 0.10.0 travels diff --git a/kogito-travel-agency/visas/pom.xml b/kogito-travel-agency/visas/pom.xml index 976d60b1bb..c3c8ff238e 100644 --- a/kogito-travel-agency/visas/pom.xml +++ b/kogito-travel-agency/visas/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-travel-agency-example - 8.0.0-SNAPSHOT + 0.10.0 visas diff --git a/onboarding-example/hr/pom.xml b/onboarding-example/hr/pom.xml index 1bb1917d2e..0088c408ee 100644 --- a/onboarding-example/hr/pom.xml +++ b/onboarding-example/hr/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito onboarding-example - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples hr diff --git a/onboarding-example/onboarding/pom.xml b/onboarding-example/onboarding/pom.xml index daf90db474..f8545310ea 100644 --- a/onboarding-example/onboarding/pom.xml +++ b/onboarding-example/onboarding/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito onboarding-example - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples onboarding diff --git a/onboarding-example/payroll/pom.xml b/onboarding-example/payroll/pom.xml index fdd85bf3f6..c30df6f5c0 100644 --- a/onboarding-example/payroll/pom.xml +++ b/onboarding-example/payroll/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito onboarding-example - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples payroll diff --git a/onboarding-example/pom.xml b/onboarding-example/pom.xml index 32063507cb..c4184dff4b 100644 --- a/onboarding-example/pom.xml +++ b/onboarding-example/pom.xml @@ -3,7 +3,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 onboarding-example pom diff --git a/pom.xml b/pom.xml index 243191c484..22199201db 100755 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 pom Kogito Example diff --git a/process-business-rules-quarkus/pom.xml b/process-business-rules-quarkus/pom.xml index 12344e6153..11aa74d141 100644 --- a/process-business-rules-quarkus/pom.xml +++ b/process-business-rules-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-business-rules-quarkus diff --git a/process-business-rules-springboot/pom.xml b/process-business-rules-springboot/pom.xml index 4290b0444e..0de13674f5 100644 --- a/process-business-rules-springboot/pom.xml +++ b/process-business-rules-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 Kogito Examples :: Process Business Rules Spring Boot diff --git a/process-infinispan-persistence-quarkus/pom.xml b/process-infinispan-persistence-quarkus/pom.xml index a4a4f57347..61a968cf7b 100644 --- a/process-infinispan-persistence-quarkus/pom.xml +++ b/process-infinispan-persistence-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-infinispan-persistence-quarkus diff --git a/process-infinispan-persistence-springboot/pom.xml b/process-infinispan-persistence-springboot/pom.xml index ffbf016d4a..982ba9ade0 100644 --- a/process-infinispan-persistence-springboot/pom.xml +++ b/process-infinispan-persistence-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-infinispan-persistence-springboot diff --git a/process-kafka-quickstart-quarkus/pom.xml b/process-kafka-quickstart-quarkus/pom.xml index bc57a4e831..05986e84e5 100644 --- a/process-kafka-quickstart-quarkus/pom.xml +++ b/process-kafka-quickstart-quarkus/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 processs-kafka-quickstart-quarkus diff --git a/process-kafka-quickstart-springboot/pom.xml b/process-kafka-quickstart-springboot/pom.xml index 6d4e49f0e3..6a6a88725b 100644 --- a/process-kafka-quickstart-springboot/pom.xml +++ b/process-kafka-quickstart-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-kafka-quickstart-springboot diff --git a/process-optaplanner-springboot/pom.xml b/process-optaplanner-springboot/pom.xml index 5672b33233..dee3b08697 100644 --- a/process-optaplanner-springboot/pom.xml +++ b/process-optaplanner-springboot/pom.xml @@ -4,7 +4,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples process-optaplanner-springboot diff --git a/process-quarkus-example/pom.xml b/process-quarkus-example/pom.xml index 3e3b0e3da4..f7b29ec30d 100755 --- a/process-quarkus-example/pom.xml +++ b/process-quarkus-example/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples process-quarkus-example diff --git a/process-scripts-quarkus/pom.xml b/process-scripts-quarkus/pom.xml index 605d2894f8..dd318091e2 100644 --- a/process-scripts-quarkus/pom.xml +++ b/process-scripts-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-scripts-quarkus diff --git a/process-scripts-springboot/pom.xml b/process-scripts-springboot/pom.xml index 0cb24e9fe4..18e133e2f1 100644 --- a/process-scripts-springboot/pom.xml +++ b/process-scripts-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-scripts-springboot diff --git a/process-service-calls-quarkus/pom.xml b/process-service-calls-quarkus/pom.xml index ac67ecd892..6c809f5677 100644 --- a/process-service-calls-quarkus/pom.xml +++ b/process-service-calls-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-service-calls-quarkus diff --git a/process-service-calls-springboot/pom.xml b/process-service-calls-springboot/pom.xml index 1aa7d00533..1e31d909e3 100644 --- a/process-service-calls-springboot/pom.xml +++ b/process-service-calls-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-service-calls-springboot diff --git a/process-service-rest-call-quarkus/pom.xml b/process-service-rest-call-quarkus/pom.xml index 9b8f6c0e29..45bd2f0400 100644 --- a/process-service-rest-call-quarkus/pom.xml +++ b/process-service-rest-call-quarkus/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-service-rest-call-quarkus Kogito Examples :: Process Service Rest Cal with Quarkus diff --git a/process-service-rest-call-springboot/pom.xml b/process-service-rest-call-springboot/pom.xml index 1f0673174b..10bc1d67ca 100644 --- a/process-service-rest-call-springboot/pom.xml +++ b/process-service-rest-call-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-service-rest-call-springboot diff --git a/process-springboot-example/pom.xml b/process-springboot-example/pom.xml index 934c8c01f7..8c55e32e1c 100644 --- a/process-springboot-example/pom.xml +++ b/process-springboot-example/pom.xml @@ -4,7 +4,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples process-springboot-example diff --git a/process-timer-quarkus/pom.xml b/process-timer-quarkus/pom.xml index 1ef3d84bad..ce8d12c6e9 100644 --- a/process-timer-quarkus/pom.xml +++ b/process-timer-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-timer-quarkus diff --git a/process-timer-springboot/pom.xml b/process-timer-springboot/pom.xml index 7bf6e530af..139ff2a953 100644 --- a/process-timer-springboot/pom.xml +++ b/process-timer-springboot/pom.xml @@ -4,7 +4,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 Kogito Examples :: Process Timer With Spring Boot diff --git a/process-usertasks-custom-lifecycle-quarkus/pom.xml b/process-usertasks-custom-lifecycle-quarkus/pom.xml index 4d87c2d5d2..876676f3c2 100644 --- a/process-usertasks-custom-lifecycle-quarkus/pom.xml +++ b/process-usertasks-custom-lifecycle-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-custom-lifecycle-quarkus diff --git a/process-usertasks-custom-lifecycle-springboot/pom.xml b/process-usertasks-custom-lifecycle-springboot/pom.xml index d0326a71dc..3e4f63a7d4 100644 --- a/process-usertasks-custom-lifecycle-springboot/pom.xml +++ b/process-usertasks-custom-lifecycle-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-custom-lifecycle-springboot diff --git a/process-usertasks-quarkus/pom.xml b/process-usertasks-quarkus/pom.xml index 9b34cfdb87..fecdbe4f43 100644 --- a/process-usertasks-quarkus/pom.xml +++ b/process-usertasks-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-quarkus diff --git a/process-usertasks-springboot/pom.xml b/process-usertasks-springboot/pom.xml index dec0bb7a71..f6f2776091 100644 --- a/process-usertasks-springboot/pom.xml +++ b/process-usertasks-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-springboot diff --git a/process-usertasks-with-security-oidc-quarkus/pom.xml b/process-usertasks-with-security-oidc-quarkus/pom.xml index 2e58704154..7d0dac471d 100644 --- a/process-usertasks-with-security-oidc-quarkus/pom.xml +++ b/process-usertasks-with-security-oidc-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-with-security-oidc-quarkus diff --git a/process-usertasks-with-security-oidc-springboot/pom.xml b/process-usertasks-with-security-oidc-springboot/pom.xml index d8906f0aac..dbfeca690b 100644 --- a/process-usertasks-with-security-oidc-springboot/pom.xml +++ b/process-usertasks-with-security-oidc-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-with-security-oidc-springboot diff --git a/process-usertasks-with-security-quarkus/pom.xml b/process-usertasks-with-security-quarkus/pom.xml index bcdba7346c..c612760d7d 100644 --- a/process-usertasks-with-security-quarkus/pom.xml +++ b/process-usertasks-with-security-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-with-security-quarkus diff --git a/process-usertasks-with-security-springboot/pom.xml b/process-usertasks-with-security-springboot/pom.xml index b4ba6fe9e4..704162273c 100644 --- a/process-usertasks-with-security-springboot/pom.xml +++ b/process-usertasks-with-security-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-with-security-springboot diff --git a/rules-quarkus-helloworld/pom.xml b/rules-quarkus-helloworld/pom.xml index 9b6b1bc4c0..82759e48a9 100755 --- a/rules-quarkus-helloworld/pom.xml +++ b/rules-quarkus-helloworld/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples rules-quarkus-helloworld diff --git a/ruleunit-quarkus-example/pom.xml b/ruleunit-quarkus-example/pom.xml index 069938ad13..30d9e36453 100644 --- a/ruleunit-quarkus-example/pom.xml +++ b/ruleunit-quarkus-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples ruleunit-quarkus-example diff --git a/ruleunit-springboot-example/pom.xml b/ruleunit-springboot-example/pom.xml index 8bf240d4f6..bdc48da13d 100644 --- a/ruleunit-springboot-example/pom.xml +++ b/ruleunit-springboot-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples ruleunit-springboot-example diff --git a/serverless-workflow-greeting-quarkus/pom.xml b/serverless-workflow-greeting-quarkus/pom.xml index 8799e20bc1..a660a1066b 100644 --- a/serverless-workflow-greeting-quarkus/pom.xml +++ b/serverless-workflow-greeting-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 serverless-workflow-greeting-quarkus diff --git a/serverless-workflow-greeting-springboot/pom.xml b/serverless-workflow-greeting-springboot/pom.xml index b154ebb879..c24b3a443d 100644 --- a/serverless-workflow-greeting-springboot/pom.xml +++ b/serverless-workflow-greeting-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 serverless-workflow-greeting-springboot diff --git a/serverless-workflow-service-calls-quarkus/pom.xml b/serverless-workflow-service-calls-quarkus/pom.xml index a189bbbbe7..d7112abcab 100644 --- a/serverless-workflow-service-calls-quarkus/pom.xml +++ b/serverless-workflow-service-calls-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 serverless-workflow-service-calls-quarkus diff --git a/serverless-workflow-service-calls-springboot/pom.xml b/serverless-workflow-service-calls-springboot/pom.xml index cb8b1d87ca..550fd3fede 100644 --- a/serverless-workflow-service-calls-springboot/pom.xml +++ b/serverless-workflow-service-calls-springboot/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 serverless-workflow-service-calls-springboot From 654af19b9bd72e3ca642579ef3ac0e1786c13239 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 15 May 2020 17:01:25 +0200 Subject: [PATCH 02/37] Kogito examples with ansible automation --- README.md | 5 + kogito-ansible/README.md | 57 +++++++++++ kogito-ansible/playbook_crc.yaml | 55 +++++++++++ kogito-ansible/playbook_create.yaml | 131 +++++++++++++++++++++++++ kogito-ansible/playbook_deploy.yaml | 55 +++++++++++ kogito-ansible/playbook_etc_hosts.yaml | 28 ++++++ kogito-ansible/playbook_libs.yaml | 11 +++ 7 files changed, 342 insertions(+) create mode 100644 kogito-ansible/README.md create mode 100644 kogito-ansible/playbook_crc.yaml create mode 100644 kogito-ansible/playbook_create.yaml create mode 100644 kogito-ansible/playbook_deploy.yaml create mode 100644 kogito-ansible/playbook_etc_hosts.yaml create mode 100644 kogito-ansible/playbook_libs.yaml diff --git a/README.md b/README.md index 70cd61d8d2..d8582dd3df 100644 --- a/README.md +++ b/README.md @@ -108,3 +108,8 @@ shows timers (intermediate and boundary) that allows to introduce delays in proc Every example has a directory named `operator` including the YAML files to deploy it using the Kogito Operator in an OpenShift cluster. Please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift) of how to install the operator to your environment in order to try it there. + +## Deploying the Kogito example applications on OpenShift CRC using Ansible playbooks + +In the [Kogito Ansible folder](kogito-ansible/README.md) you find the documentation plus some external videos about how to +setup Openshift locally (CRC) and deploy the kogito examples using ansible, with few commands \ No newline at end of file diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md new file mode 100644 index 0000000000..352cbdebda --- /dev/null +++ b/kogito-ansible/README.md @@ -0,0 +1,57 @@ +# Openshift (CRC) Kogito ansible automation + +Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. + +CRC 1.10.0, and Ansible must be installed. +No previous CRC setup (no /home/{user}/.crc folder), otherwise the create script will fail, delete .crc if you want run more than once the create playbook + +### Create an account on cloud.redhat.com +https://cloud.redhat.com/openshift/install and download or copy your Pull secret from the the laptop installation https://cloud.redhat.com/openshift/install/crc/installer-provisioned + + +### Install CRC +(If you haven't already installed) + +Pre requisite on Debian/Ubuntu: + +Install libvirt libs on Debian/Ubuntu only: +```sh +sudo ansible-playbook ./playbook_libs.yaml +``` + + +Download and copy CRC in the user's path (2GB), +change the app_name (my-kafka-project) in the file if you want different name +```sh +ansible-playbook ./playbook_crc.yaml +``` + +Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") +```sh +sudo ansible-playbook ./playbook_etc_hosts.yaml +``` + + + +### Install Kogito on CRC + +The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. +The name of the Project to create and the Pull secret will be asked in the beginning of the run. +To use the default project name (my-kogito-project) just press enter. +```sh +ansible-playbook ./playbook_create.yaml +``` +Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording + +Video Duration: 1:39 min. +[![asciicast](https://asciinema.org/a/313700.png)](https://asciinema.org/a/313700) + + +To deploy one of the kogito examples, enter the name of one of the example, +at the end the browser show you the login page, the output of the deploy with the instructions to see +the logs from cli will be on the ansible output. +```sh +ansible-playbook ./playbook_deploy.yaml +``` +Video Duration 27:sec +[![asciicast](https://asciinema.org/a/313703.png)](https://asciinema.org/a/313703) diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml new file mode 100644 index 0000000000..cbe90aa237 --- /dev/null +++ b/kogito-ansible/playbook_crc.yaml @@ -0,0 +1,55 @@ +--- +- name: Install CRC + hosts: localhost + gather_facts: true + + vars: + crc_version: "1.10.0" + + tasks: + + - name: Create .local/bin/ + file: + path: /home/{{ansible_user_id}}/.local/bin/ + state: directory + + - name: Check if crc exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/crc" + register: stat_result + + - name: Check if crc-linux-{{crc_version}}-amd64/crc exists in /tmp/ + stat: + path: "/tmp/crc-linux-{{crc_version}}-amd64/crc" + register: stat_result + when: stat_result.stat.exists == False + + - name: "Download crc {{crc_version}} ~2GB, this takes time and depends on your connection speed" + get_url: + url: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" + dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" + when: stat_result.stat.exists == False + + - name: Extract crc-linux-{{crc_version}}-amd64.tar.xz into tmp + unarchive: + src: /tmp/crc-linux-{{crc_version}}-amd64.tar.xz + dest: /tmp + when: stat_result.stat.exists == False + + - name: Check if crc-linux-{{crc_version}}-amd64/crc exists in /tmp/ + stat: + path: "/tmp/crc-linux-{{crc_version}}-amd64/crc" + register: stat_result + + - name: Check if crc exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/crc" + register: stat_result + when: stat_result.stat.exists == True + + - name: Move crc from /tmp/crc-linux-{{crc_version}}-amd64 to /home/{{ansible_user_id}}/.local/bin + command: "mv /tmp/crc-linux-{{crc_version}}-amd64/crc /home/{{ansible_user_id}}/.local/bin/" + when: stat_result.stat.exists == False + + - name: crc libvirt group + shell: "crc config set skip-check-user-in-libvirt-group true" \ No newline at end of file diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml new file mode 100644 index 0000000000..218db98691 --- /dev/null +++ b/kogito-ansible/playbook_create.yaml @@ -0,0 +1,131 @@ +--- + - name: Start CRC 1.10.0 and deploy Kogito Operator and CLI + hosts: localhost + gather_facts: true + + vars: + kogito_tag: "0.10.0" + ram: "16384" #MB + libvirt_version: "4.4.3" + ip_on_etc_hosts: 192.168.130.11 + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" + + vars_prompt: + - name: "nameSpace" + default: "my-kogito-project" + prompt: "Insert your Project Name/ NameSpace" + private: "no" + - name: "PullSecret" + prompt: "Insert your Pull secret" + + tasks: + - debug: msg="Project Name {{ nameSpace }}" + + - name: Copy Kogito cli + get_url: + url: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" + dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" + + - name: Extract Kogito cli archive + unarchive: + src: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" + dest: "/tmp/" + + - name: Check that oc exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/kogito" + register: stat_result + + - name: Creates user home kogito dir + file: + path: "/home/{{ ansible_user_id}}/.local/bin/" + state: directory + when: stat_result.stat.exists == False + + - name: Move kogito from /tmp to /home/{{ansible_user_id}}/.local/bin + command: "mv /tmp/kogito /home/{{ansible_user_id}}/.local/bin/" + when: stat_result.stat.exists == False + + - name: CRC setup + shell: "crc setup" + register: crc_result + + - debug: msg="{{ crc_result }}" + + - name: Write pull secret + copy: + content: "{{ PullSecret }}" + dest: "~/.crc/crc-pull-secret" + + - name: Download Kogito Examples pom + get_url: + url: "https://raw.githubusercontent.com/kiegroup/kogito-examples/stable/pom.xml" + dest: "/tmp/examples_pom.xml" + + - name: "Get Kogito Examples " + shell: xmllint --xpath '/*[local-name()="project"]/*[local-name()="modules"]' /tmp/examples_pom.xml > ~/.crc/quarkus_examples.txt + + - name: Replace modules tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '' + + - name: Replace module tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '- ' + + - name: Replace end module tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '' + + - name: Replace end modules tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '\n' + + - name: Start CRC with {{ ram }}MB (~ 10 minutes) + shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" + + - name: Login crc + shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" + + - name: Create {{ nameSpace }} + shell: "oc new-project {{ nameSpace }}" + + - name: Use {{ nameSpace }} proect + shell: "oc project {{ nameSpace }}" + + - name: Kogito use {{ nameSpace }} + shell: "kogito use-project {{ nameSpace }}" + register: kogito_use_project_result + ignore_errors: yes + + - debug: msg="{{ kogito_use_project_result }}" + + - name: Kogito install operator on {{ nameSpace }} + shell: "kogito install operator -p {{ nameSpace }}" + register: kogito_install_operator_result + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result_one + + - debug: msg="{{ result_one }}" + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} wait for up to 120 sec, poll every 10 sec, 12 times + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result + until: result.stdout.find("Running") != -1 + async: 120 + poll: 10 + retries: 12 + + - debug: msg="Project Name {{ nameSpace }}" + + - debug: msg="Your Kube Password is {{ kube_password }}" \ No newline at end of file diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml new file mode 100644 index 0000000000..6867af2934 --- /dev/null +++ b/kogito-ansible/playbook_deploy.yaml @@ -0,0 +1,55 @@ +--- + - name: Start CRC 1.10.0 and deploy kogito examples + hosts: localhost + gather_facts: true + + vars: + libvirt_version: "4.4.3" + ram: "16384" #MB + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" + examples: "{{ lookup('file', '~/.crc/quarkus_examples.txt') }}" + + vars_prompt: + - name: "nameSpace" + prompt: "Insert your Project Name/ NameSpace" + default: "my-kogito-project" + private: "no" + + - name: "example" + prompt: "Choose the example to deploy" + default: "\n{{ examples }}" + private: "no" + + tasks: + + - debug: msg="Project Name {{ nameSpace }}" + + - name: Start CRC with {{ ram }}MB (~ 10 minutes) + shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" + + - name: Login crc + shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" + ignore_errors: yes + + - name: Kogito use {{ nameSpace }} + shell: "kogito use-project {{ nameSpace }}" + register: kogito_use_project_result + ignore_errors: yes + + - debug: msg="{{ kogito_use_project_result }}" + + - name: Deploy {{ example }} + shell: "kogito deploy-service {{ example }} https://github.com/kiegroup/kogito-examples/ --context-dir={{ example }}" + register: install_drools_quarkus_example + ignore_errors: yes + + - debug: msg="{{ install_drools_quarkus_example }}" + + - debug: msg="Project Name {{ nameSpace }}" + + - debug: msg="Your Kube Password is {{ kube_password }}" + + - name: Open browser + shell: "crc console" + + diff --git a/kogito-ansible/playbook_etc_hosts.yaml b/kogito-ansible/playbook_etc_hosts.yaml new file mode 100644 index 0000000000..1aab83941f --- /dev/null +++ b/kogito-ansible/playbook_etc_hosts.yaml @@ -0,0 +1,28 @@ +--- +- name: Checks etc/hosts config + hosts: localhost + + vars: + kafka_cluster_name: "my-cluster-kafka" + app_namespace: "my-kogito-project" + ip_on_etc_hosts: 192.168.130.11 + + tasks: + + - name: Check api in hosts + lineinfile: + path: /etc/hosts + line: "{{ip_on_etc_hosts}} api.crc.testing" + create: yes + + - name: Check oauth in hosts + lineinfile: + path: /etc/hosts + line: "{{ip_on_etc_hosts}} oauth-openshift.apps-crc.testing" + create: yes + + - name: Check console in hosts + lineinfile: + path: /etc/hosts + line: "{{ip_on_etc_hosts}} console-openshift-console.apps-crc.testing" + create: yes \ No newline at end of file diff --git a/kogito-ansible/playbook_libs.yaml b/kogito-ansible/playbook_libs.yaml new file mode 100644 index 0000000000..fdae422dae --- /dev/null +++ b/kogito-ansible/playbook_libs.yaml @@ -0,0 +1,11 @@ +--- +- name: Install libs on Debian/Ubuntu + hosts: localhost + gather_facts: true + + tasks: + + - name: install + shell: "sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system network-manager -y" + become: yes + when: ansible_os_family == 'Debian' \ No newline at end of file From f3971c0cdf7339ea20927b90e8d7b82341c5ab8d Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 18 May 2020 19:33:25 +0200 Subject: [PATCH 03/37] changes requested by reviewer --- kogito-ansible/README.md | 67 +++++++++++++++++++++++------ kogito-ansible/playbook_crc.yaml | 25 +++++------ kogito-ansible/playbook_create.yaml | 29 +++++++------ kogito-ansible/playbook_deploy.yaml | 4 +- kogito-ansible/playbook_libs.yaml | 24 ++++++++--- 5 files changed, 105 insertions(+), 44 deletions(-) diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index 352cbdebda..d6925b3c1f 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -1,25 +1,64 @@ # Openshift (CRC) Kogito ansible automation +Tested on Fedora 31/32 and Ubuntu 19.10 + Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. -CRC 1.10.0, and Ansible must be installed. -No previous CRC setup (no /home/{user}/.crc folder), otherwise the create script will fail, delete .crc if you want run more than once the create playbook +Ansible must be installed. + ### Create an account on cloud.redhat.com -https://cloud.redhat.com/openshift/install and download or copy your Pull secret from the the laptop installation https://cloud.redhat.com/openshift/install/crc/installer-provisioned +https://cloud.redhat.com/openshift/install and download or copy your Pull secret from the laptop installation https://cloud.redhat.com/openshift/install/crc/installer-provisioned + + +## Fedora +### Install LibVirt libs +```sh +sudo ansible-playbook ./playbook_libs.yaml +``` ### Install CRC (If you haven't already installed) -Pre requisite on Debian/Ubuntu: +Download and copy CRC in the user's path (2GB), +change the app_name (my-kafka-project) in the file if you want different name +```sh +ansible-playbook ./playbook_crc.yaml +``` -Install libvirt libs on Debian/Ubuntu only: +Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") ```sh -sudo ansible-playbook ./playbook_libs.yaml +sudo ansible-playbook ./playbook_etc_hosts.yaml +``` + +### Install Kogito on CRC +The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. +The name of the Project to create and the Pull secret will be asked in the beginning of the run. +To use the default project name (my-kogito-project) just press enter. +```sh +ansible-playbook ./playbook_create.yaml +``` + +### Deploy Kogito Examples +To deploy one of the kogito examples, enter the name of one of the example, +at the end the browser show you the login page, the output of the deploy with the instructions to see +the logs from cli will be on the ansible output. +```sh +ansible-playbook ./playbook_deploy.yaml ``` + +## Ubuntu + +### Install LibVirt libs +```sh +sudo ansible-playbook ./playbook_libs.yaml +``` + +### Install CRC +(If you haven't already installed) Download and copy CRC in the user's path (2GB), change the app_name (my-kafka-project) in the file if you want different name ```sh @@ -41,17 +80,21 @@ To use the default project name (my-kogito-project) just press enter. ```sh ansible-playbook ./playbook_create.yaml ``` -Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording - -Video Duration: 1:39 min. -[![asciicast](https://asciinema.org/a/313700.png)](https://asciinema.org/a/313700) - - +### Deploy Kogito Examples To deploy one of the kogito examples, enter the name of one of the example, at the end the browser show you the login page, the output of the deploy with the instructions to see the logs from cli will be on the ansible output. ```sh ansible-playbook ./playbook_deploy.yaml ``` + +## Videos +Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording + +### Setup CRC +Video Duration: 1:39 min. +[![asciicast](https://asciinema.org/a/313700.png)](https://asciinema.org/a/313700) + +### Deploy Kpgotp Examples Video Duration 27:sec [![asciicast](https://asciinema.org/a/313703.png)](https://asciinema.org/a/313703) diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml index cbe90aa237..e977f83eb8 100644 --- a/kogito-ansible/playbook_crc.yaml +++ b/kogito-ansible/playbook_crc.yaml @@ -1,10 +1,12 @@ --- - name: Install CRC hosts: localhost - gather_facts: true vars: crc_version: "1.10.0" + crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" + crc_tmp_dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" + crc_package_name: "crc-linux-{{crc_version}}-amd64" tasks: @@ -18,27 +20,26 @@ path: "/home/{{ ansible_user_id }}/.local/bin/crc" register: stat_result - - name: Check if crc-linux-{{crc_version}}-amd64/crc exists in /tmp/ + - name: Check if {{ crc_package_name }}/crc exists in /tmp/ stat: - path: "/tmp/crc-linux-{{crc_version}}-amd64/crc" + path: "/tmp/{{ crc_package_name }}/crc" register: stat_result - when: stat_result.stat.exists == False - - name: "Download crc {{crc_version}} ~2GB, this takes time and depends on your connection speed" + - name: "Download crc {{ crc_version }} ~2GB, this takes time and depends on your connection speed" get_url: - url: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" - dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" + url: "{{ crc_url_file }}" + dest: "{{ crc_tmp_dest }}" when: stat_result.stat.exists == False - - name: Extract crc-linux-{{crc_version}}-amd64.tar.xz into tmp + - name: Extract {{ crc_package_name }}.tar.xz into tmp unarchive: - src: /tmp/crc-linux-{{crc_version}}-amd64.tar.xz + src: "{{ crc_tmp_dest }}" dest: /tmp when: stat_result.stat.exists == False - - name: Check if crc-linux-{{crc_version}}-amd64/crc exists in /tmp/ + - name: Check if {{ crc_package_name }}/crc exists in /tmp/ stat: - path: "/tmp/crc-linux-{{crc_version}}-amd64/crc" + path: "/tmp/{{ crc_package_name }}/crc" register: stat_result - name: Check if crc exists in /home/{{ansible_user_id}}/.local/bin/ @@ -48,7 +49,7 @@ when: stat_result.stat.exists == True - name: Move crc from /tmp/crc-linux-{{crc_version}}-amd64 to /home/{{ansible_user_id}}/.local/bin - command: "mv /tmp/crc-linux-{{crc_version}}-amd64/crc /home/{{ansible_user_id}}/.local/bin/" + command: "mv /tmp/{{ crc_package_name }}/crc /home/{{ansible_user_id}}/.local/bin/" when: stat_result.stat.exists == False - name: crc libvirt group diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index 218db98691..1855e66bdc 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -1,7 +1,6 @@ --- - - name: Start CRC 1.10.0 and deploy Kogito Operator and CLI + - name: Start CRC and deploy Kogito Operator and CLI hosts: localhost - gather_facts: true vars: kogito_tag: "0.10.0" @@ -9,6 +8,8 @@ libvirt_version: "4.4.3" ip_on_etc_hosts: 192.168.130.11 kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" + kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" + kogito_tmp_dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" vars_prompt: - name: "nameSpace" @@ -21,20 +22,22 @@ tasks: - debug: msg="Project Name {{ nameSpace }}" + - name: Check that kogito cli exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/kogito" + register: stat_result + - name: Copy Kogito cli get_url: - url: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" - dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" + url: "{{kogito_url_file}}" + dest: "{{ kogito_tmp_dest }}" + when: stat_result.stat.exists == False - name: Extract Kogito cli archive unarchive: - src: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" + src: "{{ kogito_tmp_dest }}" dest: "/tmp/" - - - name: Check that oc exists in /home/{{ansible_user_id}}/.local/bin/ - stat: - path: "/home/{{ ansible_user_id }}/.local/bin/kogito" - register: stat_result + when: stat_result.stat.exists == False - name: Creates user home kogito dir file: @@ -57,9 +60,9 @@ content: "{{ PullSecret }}" dest: "~/.crc/crc-pull-secret" - - name: Download Kogito Examples pom - get_url: - url: "https://raw.githubusercontent.com/kiegroup/kogito-examples/stable/pom.xml" + - name: Copy Kogito Examples pom + copy: + src: "./../pom.xml" dest: "/tmp/examples_pom.xml" - name: "Get Kogito Examples " diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml index 6867af2934..24f8697b17 100644 --- a/kogito-ansible/playbook_deploy.yaml +++ b/kogito-ansible/playbook_deploy.yaml @@ -1,13 +1,13 @@ --- - name: Start CRC 1.10.0 and deploy kogito examples hosts: localhost - gather_facts: true vars: libvirt_version: "4.4.3" ram: "16384" #MB kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" examples: "{{ lookup('file', '~/.crc/quarkus_examples.txt') }}" + examples_repo: "https://github.com/kiegroup/kogito-examples/" vars_prompt: - name: "nameSpace" @@ -39,7 +39,7 @@ - debug: msg="{{ kogito_use_project_result }}" - name: Deploy {{ example }} - shell: "kogito deploy-service {{ example }} https://github.com/kiegroup/kogito-examples/ --context-dir={{ example }}" + shell: "kogito deploy-service {{ example }} {{ examples_repo }} --context-dir={{ example }}" register: install_drools_quarkus_example ignore_errors: yes diff --git a/kogito-ansible/playbook_libs.yaml b/kogito-ansible/playbook_libs.yaml index fdae422dae..2ed99a4884 100644 --- a/kogito-ansible/playbook_libs.yaml +++ b/kogito-ansible/playbook_libs.yaml @@ -1,11 +1,25 @@ --- -- name: Install libs on Debian/Ubuntu +- name: Install libs on Fedora/Ubuntu hosts: localhost - gather_facts: true tasks: - - name: install - shell: "sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system network-manager -y" + - name: CheckOS + assert: + that: + - "ansible_os_family == 'Debian' or ansible_os_family == 'RedHat'" + + - name: Install Virtualization on Ubuntu + apt: + pkg: + - qemu-kvm + - libvirt-daemon + - libvirt-daemon-system + - network-manager + become: yes + when: ansible_os_family == 'Debian' + + - name: Install Virtualization on Fedora + shell: "sudo dnf install @virtualization -y" become: yes - when: ansible_os_family == 'Debian' \ No newline at end of file + when: ansible_os_family == 'RedHat' \ No newline at end of file From 4dee7f97463830648adce35d3afb8f3aeb13b455 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 18 May 2020 20:37:21 +0200 Subject: [PATCH 04/37] changes requested by reviewer --- kogito-ansible/README.md | 14 ++----------- kogito-ansible/playbook_etc_hosts.yaml | 28 -------------------------- 2 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 kogito-ansible/playbook_etc_hosts.yaml diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index d6925b3c1f..cd79ee2551 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -27,11 +27,6 @@ change the app_name (my-kafka-project) in the file if you want different name ansible-playbook ./playbook_crc.yaml ``` -Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") -```sh -sudo ansible-playbook ./playbook_etc_hosts.yaml -``` - ### Install Kogito on CRC The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. The name of the Project to create and the Pull secret will be asked in the beginning of the run. @@ -65,13 +60,6 @@ change the app_name (my-kafka-project) in the file if you want different name ansible-playbook ./playbook_crc.yaml ``` -Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") -```sh -sudo ansible-playbook ./playbook_etc_hosts.yaml -``` - - - ### Install Kogito on CRC The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. @@ -88,6 +76,8 @@ the logs from cli will be on the ansible output. ansible-playbook ./playbook_deploy.yaml ``` + + ## Videos Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording diff --git a/kogito-ansible/playbook_etc_hosts.yaml b/kogito-ansible/playbook_etc_hosts.yaml deleted file mode 100644 index 1aab83941f..0000000000 --- a/kogito-ansible/playbook_etc_hosts.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- name: Checks etc/hosts config - hosts: localhost - - vars: - kafka_cluster_name: "my-cluster-kafka" - app_namespace: "my-kogito-project" - ip_on_etc_hosts: 192.168.130.11 - - tasks: - - - name: Check api in hosts - lineinfile: - path: /etc/hosts - line: "{{ip_on_etc_hosts}} api.crc.testing" - create: yes - - - name: Check oauth in hosts - lineinfile: - path: /etc/hosts - line: "{{ip_on_etc_hosts}} oauth-openshift.apps-crc.testing" - create: yes - - - name: Check console in hosts - lineinfile: - path: /etc/hosts - line: "{{ip_on_etc_hosts}} console-openshift-console.apps-crc.testing" - create: yes \ No newline at end of file From 7c027cd2f852c63a461045d7412f27842fda4be1 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 25 May 2020 12:24:05 +0200 Subject: [PATCH 05/37] changes requested by reviewer --- README.md | 2 +- kogito-ansible/README.md | 8 +++++--- kogito-ansible/playbook_libs.yaml | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d8582dd3df..acd40a4249 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ Every example has a directory named `operator` including the YAML files to deplo Please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift) of how to install the operator to your environment in order to try it there. -## Deploying the Kogito example applications on OpenShift CRC using Ansible playbooks +## Deploying the Kogito example applications locally with OpenShift CRC using Ansible playbooks In the [Kogito Ansible folder](kogito-ansible/README.md) you find the documentation plus some external videos about how to setup Openshift locally (CRC) and deploy the kogito examples using ansible, with few commands \ No newline at end of file diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index cd79ee2551..927d5a9f9e 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -1,10 +1,12 @@ # Openshift (CRC) Kogito ansible automation -Tested on Fedora 31/32 and Ubuntu 19.10 +### Prerequisite +Tested on Fedora 31/32 and Ubuntu 19/20 +Default values are 9GB of ram and 22GB of diskspace. Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. - -Ansible must be installed. +[Ansible must be installed](https://docs.ansible.com/ansible/latest/installation_guide/index.html) +. ### Create an account on cloud.redhat.com diff --git a/kogito-ansible/playbook_libs.yaml b/kogito-ansible/playbook_libs.yaml index 2ed99a4884..a9bcd48da8 100644 --- a/kogito-ansible/playbook_libs.yaml +++ b/kogito-ansible/playbook_libs.yaml @@ -20,6 +20,8 @@ when: ansible_os_family == 'Debian' - name: Install Virtualization on Fedora - shell: "sudo dnf install @virtualization -y" + dnf: + name: + - "@virtualization" become: yes when: ansible_os_family == 'RedHat' \ No newline at end of file From 73d1f781b71dc12043eab07a189be1c7bb746b47 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 25 May 2020 17:41:18 +0200 Subject: [PATCH 06/37] changes requested by reviewer --- kogito-ansible/playbook_crc.yaml | 47 ++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml index e977f83eb8..a9ebbc3191 100644 --- a/kogito-ansible/playbook_crc.yaml +++ b/kogito-ansible/playbook_crc.yaml @@ -3,13 +3,44 @@ hosts: localhost vars: - crc_version: "1.10.0" - crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" - crc_tmp_dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" - crc_package_name: "crc-linux-{{crc_version}}-amd64" + release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" + crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz" - tasks: + pre_tasks: + - name: Download latest version file + get_url: + url: "{{ release_file }}" + dest: "/tmp/release-info.json" + + - name : read json + uri: + url: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json + return_content: yes + register: jsoncontent + + - set_fact: + crcVersion: "{{ jsoncontent.json.version.crcVersion }}" + register: crcVersion + + - debug: msg="Crc version {{ crcVersion }}" + + - set_fact: + openshiftVersion: "{{ jsoncontent.json.version.openshiftVersion }}" + register: openshiftVersion + - debug: msg="Openshift version {{ openshiftVersion }}" + + + - set_fact: + crc_tmp_dest: "/tmp/crc-linux-{{ crcVersion }}-amd64.tar.xz" + register: crc_tmp_dest + + - set_fact: + crc_package_name: "crc-linux-{{ crcVersion }}-amd64" + register: crc_package_name + + tasks: + - - name: Create .local/bin/ file: path: /home/{{ansible_user_id}}/.local/bin/ @@ -20,12 +51,12 @@ path: "/home/{{ ansible_user_id }}/.local/bin/crc" register: stat_result - - name: Check if {{ crc_package_name }}/crc exists in /tmp/ + - name: Check if crc-linux-{{ crcVersion }}-amd64 /crc exists in /tmp/ stat: path: "/tmp/{{ crc_package_name }}/crc" register: stat_result - - name: "Download crc {{ crc_version }} ~2GB, this takes time and depends on your connection speed" + - name: "Download crc ~2GB into {{ crc_tmp_dest }}, this takes time and depends on your connection speed" get_url: url: "{{ crc_url_file }}" dest: "{{ crc_tmp_dest }}" @@ -48,7 +79,7 @@ register: stat_result when: stat_result.stat.exists == True - - name: Move crc from /tmp/crc-linux-{{crc_version}}-amd64 to /home/{{ansible_user_id}}/.local/bin + - name: Move crc from /tmp/crc-linux-{{crcVersion}}-amd64 to /home/{{ansible_user_id}}/.local/bin command: "mv /tmp/{{ crc_package_name }}/crc /home/{{ansible_user_id}}/.local/bin/" when: stat_result.stat.exists == False From 5eb0cda3d0c7ed0e61229499c16b39c504e78f3b Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 May 2020 09:36:33 +0200 Subject: [PATCH 07/37] versions come from release/tag files --- kogito-ansible/playbook_create.yaml | 309 ++++++++++++++++------------ 1 file changed, 176 insertions(+), 133 deletions(-) diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index 1855e66bdc..9f3d6024aa 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -1,134 +1,177 @@ --- - - name: Start CRC and deploy Kogito Operator and CLI - hosts: localhost - - vars: - kogito_tag: "0.10.0" - ram: "16384" #MB - libvirt_version: "4.4.3" - ip_on_etc_hosts: 192.168.130.11 - kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" - kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" - kogito_tmp_dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" - - vars_prompt: - - name: "nameSpace" - default: "my-kogito-project" - prompt: "Insert your Project Name/ NameSpace" - private: "no" - - name: "PullSecret" - prompt: "Insert your Pull secret" - - tasks: - - debug: msg="Project Name {{ nameSpace }}" - - - name: Check that kogito cli exists in /home/{{ansible_user_id}}/.local/bin/ - stat: - path: "/home/{{ ansible_user_id }}/.local/bin/kogito" - register: stat_result - - - name: Copy Kogito cli - get_url: - url: "{{kogito_url_file}}" - dest: "{{ kogito_tmp_dest }}" - when: stat_result.stat.exists == False - - - name: Extract Kogito cli archive - unarchive: - src: "{{ kogito_tmp_dest }}" - dest: "/tmp/" - when: stat_result.stat.exists == False - - - name: Creates user home kogito dir - file: - path: "/home/{{ ansible_user_id}}/.local/bin/" - state: directory - when: stat_result.stat.exists == False - - - name: Move kogito from /tmp to /home/{{ansible_user_id}}/.local/bin - command: "mv /tmp/kogito /home/{{ansible_user_id}}/.local/bin/" - when: stat_result.stat.exists == False - - - name: CRC setup - shell: "crc setup" - register: crc_result - - - debug: msg="{{ crc_result }}" - - - name: Write pull secret - copy: - content: "{{ PullSecret }}" - dest: "~/.crc/crc-pull-secret" - - - name: Copy Kogito Examples pom - copy: - src: "./../pom.xml" - dest: "/tmp/examples_pom.xml" - - - name: "Get Kogito Examples " - shell: xmllint --xpath '/*[local-name()="project"]/*[local-name()="modules"]' /tmp/examples_pom.xml > ~/.crc/quarkus_examples.txt - - - name: Replace modules tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '' - - - name: Replace module tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '- ' - - - name: Replace end module tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '' - - - name: Replace end modules tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '\n' - - - name: Start CRC with {{ ram }}MB (~ 10 minutes) - shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" - - - name: Login crc - shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" - - - name: Create {{ nameSpace }} - shell: "oc new-project {{ nameSpace }}" - - - name: Use {{ nameSpace }} proect - shell: "oc project {{ nameSpace }}" - - - name: Kogito use {{ nameSpace }} - shell: "kogito use-project {{ nameSpace }}" - register: kogito_use_project_result - ignore_errors: yes - - - debug: msg="{{ kogito_use_project_result }}" - - - name: Kogito install operator on {{ nameSpace }} - shell: "kogito install operator -p {{ nameSpace }}" - register: kogito_install_operator_result - - - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} - shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" - register: result_one - - - debug: msg="{{ result_one }}" - - - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} wait for up to 120 sec, poll every 10 sec, 12 times - shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" - register: result - until: result.stdout.find("Running") != -1 - async: 120 - poll: 10 - retries: 12 - - - debug: msg="Project Name {{ nameSpace }}" - - - debug: msg="Your Kube Password is {{ kube_password }}" \ No newline at end of file +- name: Start CRC and deploy Kogito Operator and CLI + hosts: localhost + + vars: + release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" + ram: "16384" #MB + + vars_prompt: + - name: "nameSpace" + default: "my-kogito-project" + prompt: "Insert your Project Name/ NameSpace" + private: "no" + - name: "PullSecret" + prompt: "Insert your Pull secret" + + pre_tasks: + + - name: Download latest version file + get_url: + url: "{{ release_file }}" + dest: "/tmp/release-info.json" + + - name: read json + uri: + url: "{{ release_file }}" + return_content: yes + register: jsoncontent + + - set_fact: + crcVersion: "{{ jsoncontent.json.version.crcVersion }}" + register: crcVersion + + - debug: msg="Crc version {{ crcVersion }}" + + - set_fact: + openshiftVersion: "{{ jsoncontent.json.version.openshiftVersion }}" + register: openshiftVersion + + - debug: msg="Openshift version {{ openshiftVersion }}" + + + - name: Kogito latest tag + uri: + url: https://api.github.com/repos/kiegroup/kogito-runtimes/tags + register: json_response + + - set_fact: + kogitoTag: "0.10.0" + #kogitoTag: "{{ json_response.json[0]['name'] }}" uncomment when kogito operator will be released + register: kogitoTag + + - debug: msg="Kogito latest tag:{{ kogitoTag }}" + + - set_fact: + kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogitoTag }}/kogito-cli-{{ kogitoTag }}-linux-amd64.tar.gz" + + - set_fact: + kogito_tmp_dest: "/tmp/kogito-{{ kogitoTag }}-linux-amd64.tar.gz" + + + tasks: + - debug: msg="Project Name {{ nameSpace }}" + + - name: Check that kogito cli exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/kogito" + register: stat_result + + - name: Copy Kogito cli + get_url: + url: "{{kogito_url_file}}" + dest: "{{ kogito_tmp_dest }}" + when: stat_result.stat.exists == False + + - name: Extract Kogito cli archive + unarchive: + src: "{{ kogito_tmp_dest }}" + dest: "/tmp/" + when: stat_result.stat.exists == False + + - name: Creates user home kogito dir + file: + path: "/home/{{ ansible_user_id}}/.local/bin/" + state: directory + when: stat_result.stat.exists == False + + - name: Move kogito from /tmp to /home/{{ansible_user_id}}/.local/bin + command: "mv /tmp/kogito /home/{{ansible_user_id}}/.local/bin/" + when: stat_result.stat.exists == False + + - name: CRC setup + shell: "crc setup" + register: crc_result + + - debug: msg="{{ crc_result }}" + + - name: Write pull secret + copy: + content: "{{ PullSecret }}" + dest: "~/.crc/crc-pull-secret" + + - name: Copy Kogito Examples pom + copy: + src: "./../pom.xml" + dest: "/tmp/examples_pom.xml" + + - name: "Get Kogito Examples " + shell: xmllint --xpath '/*[local-name()="project"]/*[local-name()="modules"]' /tmp/examples_pom.xml > ~/.crc/kogito-examples.txt + + - name: Replace modules tags + replace: + path: ~/.crc/kogito-examples.txt + regexp: '' + replace: '' + + - name: Replace module tags + replace: + path: ~/.crc/kogito-examples.txt + regexp: '' + replace: '- ' + + - name: Replace end module tags + replace: + path: ~/.crc/kogito-examples.txt + regexp: '' + replace: '' + + - name: Replace end modules tags + replace: + path: ~/.crc/kogito-examples.txt + regexp: '' + replace: '\n' + + - name: Start CRC with {{ ram }}MB (~ 10 minutes) + shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" + + - set_fact: + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ openshiftVersion }}/kubeadmin-password') }}" + + - name: Login crc + shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" + + - name: Create {{ nameSpace }} + shell: "oc new-project {{ nameSpace }}" + + - name: Use {{ nameSpace }} proect + shell: "oc project {{ nameSpace }}" + + - name: Kogito use {{ nameSpace }} + shell: "kogito use-project {{ nameSpace }}" + register: kogito_use_project_result + ignore_errors: yes + + - debug: msg="{{ kogito_use_project_result }}" + + - name: Kogito install operator on {{ nameSpace }} + shell: "kogito install operator -p {{ nameSpace }}" + register: kogito_install_operator_result + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result_one + + - debug: msg="{{ result_one }}" + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} wait for up to 120 sec, poll every 10 sec, 12 times + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result + until: result.stdout.find("Running") != -1 + async: 120 + poll: 10 + retries: 12 + + - debug: msg="Project Name {{ nameSpace }}" + + - debug: msg="Your Kube Password is {{ kube_password }}" \ No newline at end of file From 48847f864b75cccc7e3d18e227cd0c91c8fb08cd Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 May 2020 11:35:29 +0200 Subject: [PATCH 08/37] specified exact amount of ram and added pretask to remove hardcoded versions --- kogito-ansible/README.md | 2 +- kogito-ansible/playbook_crc.yaml | 7 ++----- kogito-ansible/playbook_create.yaml | 8 ++------ kogito-ansible/playbook_deploy.yaml | 32 +++++++++++++++++++++-------- 4 files changed, 29 insertions(+), 20 deletions(-) diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index 927d5a9f9e..69f5e5af8a 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -2,7 +2,7 @@ ### Prerequisite Tested on Fedora 31/32 and Ubuntu 19/20 -Default values are 9GB of ram and 22GB of diskspace. +Default values for the installation are 13GB of ram and 22GB of diskspace. Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. [Ansible must be installed](https://docs.ansible.com/ansible/latest/installation_guide/index.html) diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml index a9ebbc3191..434a3048d2 100644 --- a/kogito-ansible/playbook_crc.yaml +++ b/kogito-ansible/playbook_crc.yaml @@ -7,15 +7,12 @@ crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz" pre_tasks: - - name: Download latest version file - get_url: - url: "{{ release_file }}" - dest: "/tmp/release-info.json" - name : read json uri: - url: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json + url: "{{ release_file }}" return_content: yes + timeout: 60 register: jsoncontent - set_fact: diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index 9f3d6024aa..ca740dae3d 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -4,7 +4,7 @@ vars: release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" - ram: "16384" #MB + ram: "13312" #MB vars_prompt: - name: "nameSpace" @@ -16,14 +16,10 @@ pre_tasks: - - name: Download latest version file - get_url: - url: "{{ release_file }}" - dest: "/tmp/release-info.json" - - name: read json uri: url: "{{ release_file }}" + timeout: 60 return_content: yes register: jsoncontent diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml index 24f8697b17..4bb0bd82c5 100644 --- a/kogito-ansible/playbook_deploy.yaml +++ b/kogito-ansible/playbook_deploy.yaml @@ -1,15 +1,16 @@ --- - - name: Start CRC 1.10.0 and deploy kogito examples + - name: Start CRC and deploy kogito examples hosts: localhost vars: - libvirt_version: "4.4.3" - ram: "16384" #MB - kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" - examples: "{{ lookup('file', '~/.crc/quarkus_examples.txt') }}" + + release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" + ram: "13312" #MB + examples: "{{ lookup('file', '~/.crc/kogito-examples.txt') }}" examples_repo: "https://github.com/kiegroup/kogito-examples/" vars_prompt: + - name: "nameSpace" prompt: "Insert your Project Name/ NameSpace" default: "my-kogito-project" @@ -20,6 +21,20 @@ default: "\n{{ examples }}" private: "no" + pre_tasks: + + - name: read json + uri: + url: "{{ release_file }}" + return_content: yes + register: jsoncontent + + - set_fact: + openshiftVersion: "{{ jsoncontent.json.version.openshiftVersion }}" + register: openshiftVersion + + - debug: msg="Openshift version {{ openshiftVersion }}" + tasks: - debug: msg="Project Name {{ nameSpace }}" @@ -47,9 +62,10 @@ - debug: msg="Project Name {{ nameSpace }}" + - set_fact: + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ openshiftVersion }}/kubeadmin-password') }}" + - debug: msg="Your Kube Password is {{ kube_password }}" - name: Open browser - shell: "crc console" - - + shell: "crc console" \ No newline at end of file From 85b42afe24a276e1ca23f3e1ef8249ff18278e5a Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 May 2020 14:12:24 +0200 Subject: [PATCH 09/37] enabled the tag and ram input --- kogito-ansible/playbook_create.yaml | 22 +++++++++------------- kogito-ansible/playbook_deploy.yaml | 6 ++++-- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index ca740dae3d..5f02a3ce4a 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -4,7 +4,6 @@ vars: release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" - ram: "13312" #MB vars_prompt: - name: "nameSpace" @@ -13,6 +12,14 @@ private: "no" - name: "PullSecret" prompt: "Insert your Pull secret" + - name: "ram" + default: "13312" + prompt: "Ram used in #MB" + private: "no" + - name: "kogitoTag" + default: "0.10.0" + prompt: "Kogito CLI and Operator tag" + private: "no" pre_tasks: @@ -35,18 +42,7 @@ - debug: msg="Openshift version {{ openshiftVersion }}" - - - name: Kogito latest tag - uri: - url: https://api.github.com/repos/kiegroup/kogito-runtimes/tags - register: json_response - - - set_fact: - kogitoTag: "0.10.0" - #kogitoTag: "{{ json_response.json[0]['name'] }}" uncomment when kogito operator will be released - register: kogitoTag - - - debug: msg="Kogito latest tag:{{ kogitoTag }}" + - debug: msg="Kogito CLI tag:{{ kogitoTag }}" - set_fact: kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogitoTag }}/kogito-cli-{{ kogitoTag }}-linux-amd64.tar.gz" diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml index 4bb0bd82c5..d04fb97828 100644 --- a/kogito-ansible/playbook_deploy.yaml +++ b/kogito-ansible/playbook_deploy.yaml @@ -3,13 +3,15 @@ hosts: localhost vars: - release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" - ram: "13312" #MB examples: "{{ lookup('file', '~/.crc/kogito-examples.txt') }}" examples_repo: "https://github.com/kiegroup/kogito-examples/" vars_prompt: + - name: "ram" + default: "13312" + prompt: "Ram used in MB, 13312 ->13GB" + private: "no" - name: "nameSpace" prompt: "Insert your Project Name/ NameSpace" From a0cc19abf163008ee145baa32f8e71dada6fb338 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 15 May 2020 17:01:25 +0200 Subject: [PATCH 10/37] Kogito examples with ansible automation --- README.md | 5 + kogito-ansible/README.md | 57 +++++++++++ kogito-ansible/playbook_crc.yaml | 55 +++++++++++ kogito-ansible/playbook_create.yaml | 131 +++++++++++++++++++++++++ kogito-ansible/playbook_deploy.yaml | 55 +++++++++++ kogito-ansible/playbook_etc_hosts.yaml | 28 ++++++ kogito-ansible/playbook_libs.yaml | 11 +++ 7 files changed, 342 insertions(+) create mode 100644 kogito-ansible/README.md create mode 100644 kogito-ansible/playbook_crc.yaml create mode 100644 kogito-ansible/playbook_create.yaml create mode 100644 kogito-ansible/playbook_deploy.yaml create mode 100644 kogito-ansible/playbook_etc_hosts.yaml create mode 100644 kogito-ansible/playbook_libs.yaml diff --git a/README.md b/README.md index 70cd61d8d2..d8582dd3df 100644 --- a/README.md +++ b/README.md @@ -108,3 +108,8 @@ shows timers (intermediate and boundary) that allows to introduce delays in proc Every example has a directory named `operator` including the YAML files to deploy it using the Kogito Operator in an OpenShift cluster. Please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift) of how to install the operator to your environment in order to try it there. + +## Deploying the Kogito example applications on OpenShift CRC using Ansible playbooks + +In the [Kogito Ansible folder](kogito-ansible/README.md) you find the documentation plus some external videos about how to +setup Openshift locally (CRC) and deploy the kogito examples using ansible, with few commands \ No newline at end of file diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md new file mode 100644 index 0000000000..352cbdebda --- /dev/null +++ b/kogito-ansible/README.md @@ -0,0 +1,57 @@ +# Openshift (CRC) Kogito ansible automation + +Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. + +CRC 1.10.0, and Ansible must be installed. +No previous CRC setup (no /home/{user}/.crc folder), otherwise the create script will fail, delete .crc if you want run more than once the create playbook + +### Create an account on cloud.redhat.com +https://cloud.redhat.com/openshift/install and download or copy your Pull secret from the the laptop installation https://cloud.redhat.com/openshift/install/crc/installer-provisioned + + +### Install CRC +(If you haven't already installed) + +Pre requisite on Debian/Ubuntu: + +Install libvirt libs on Debian/Ubuntu only: +```sh +sudo ansible-playbook ./playbook_libs.yaml +``` + + +Download and copy CRC in the user's path (2GB), +change the app_name (my-kafka-project) in the file if you want different name +```sh +ansible-playbook ./playbook_crc.yaml +``` + +Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") +```sh +sudo ansible-playbook ./playbook_etc_hosts.yaml +``` + + + +### Install Kogito on CRC + +The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. +The name of the Project to create and the Pull secret will be asked in the beginning of the run. +To use the default project name (my-kogito-project) just press enter. +```sh +ansible-playbook ./playbook_create.yaml +``` +Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording + +Video Duration: 1:39 min. +[![asciicast](https://asciinema.org/a/313700.png)](https://asciinema.org/a/313700) + + +To deploy one of the kogito examples, enter the name of one of the example, +at the end the browser show you the login page, the output of the deploy with the instructions to see +the logs from cli will be on the ansible output. +```sh +ansible-playbook ./playbook_deploy.yaml +``` +Video Duration 27:sec +[![asciicast](https://asciinema.org/a/313703.png)](https://asciinema.org/a/313703) diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml new file mode 100644 index 0000000000..cbe90aa237 --- /dev/null +++ b/kogito-ansible/playbook_crc.yaml @@ -0,0 +1,55 @@ +--- +- name: Install CRC + hosts: localhost + gather_facts: true + + vars: + crc_version: "1.10.0" + + tasks: + + - name: Create .local/bin/ + file: + path: /home/{{ansible_user_id}}/.local/bin/ + state: directory + + - name: Check if crc exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/crc" + register: stat_result + + - name: Check if crc-linux-{{crc_version}}-amd64/crc exists in /tmp/ + stat: + path: "/tmp/crc-linux-{{crc_version}}-amd64/crc" + register: stat_result + when: stat_result.stat.exists == False + + - name: "Download crc {{crc_version}} ~2GB, this takes time and depends on your connection speed" + get_url: + url: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" + dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" + when: stat_result.stat.exists == False + + - name: Extract crc-linux-{{crc_version}}-amd64.tar.xz into tmp + unarchive: + src: /tmp/crc-linux-{{crc_version}}-amd64.tar.xz + dest: /tmp + when: stat_result.stat.exists == False + + - name: Check if crc-linux-{{crc_version}}-amd64/crc exists in /tmp/ + stat: + path: "/tmp/crc-linux-{{crc_version}}-amd64/crc" + register: stat_result + + - name: Check if crc exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/crc" + register: stat_result + when: stat_result.stat.exists == True + + - name: Move crc from /tmp/crc-linux-{{crc_version}}-amd64 to /home/{{ansible_user_id}}/.local/bin + command: "mv /tmp/crc-linux-{{crc_version}}-amd64/crc /home/{{ansible_user_id}}/.local/bin/" + when: stat_result.stat.exists == False + + - name: crc libvirt group + shell: "crc config set skip-check-user-in-libvirt-group true" \ No newline at end of file diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml new file mode 100644 index 0000000000..218db98691 --- /dev/null +++ b/kogito-ansible/playbook_create.yaml @@ -0,0 +1,131 @@ +--- + - name: Start CRC 1.10.0 and deploy Kogito Operator and CLI + hosts: localhost + gather_facts: true + + vars: + kogito_tag: "0.10.0" + ram: "16384" #MB + libvirt_version: "4.4.3" + ip_on_etc_hosts: 192.168.130.11 + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" + + vars_prompt: + - name: "nameSpace" + default: "my-kogito-project" + prompt: "Insert your Project Name/ NameSpace" + private: "no" + - name: "PullSecret" + prompt: "Insert your Pull secret" + + tasks: + - debug: msg="Project Name {{ nameSpace }}" + + - name: Copy Kogito cli + get_url: + url: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" + dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" + + - name: Extract Kogito cli archive + unarchive: + src: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" + dest: "/tmp/" + + - name: Check that oc exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/kogito" + register: stat_result + + - name: Creates user home kogito dir + file: + path: "/home/{{ ansible_user_id}}/.local/bin/" + state: directory + when: stat_result.stat.exists == False + + - name: Move kogito from /tmp to /home/{{ansible_user_id}}/.local/bin + command: "mv /tmp/kogito /home/{{ansible_user_id}}/.local/bin/" + when: stat_result.stat.exists == False + + - name: CRC setup + shell: "crc setup" + register: crc_result + + - debug: msg="{{ crc_result }}" + + - name: Write pull secret + copy: + content: "{{ PullSecret }}" + dest: "~/.crc/crc-pull-secret" + + - name: Download Kogito Examples pom + get_url: + url: "https://raw.githubusercontent.com/kiegroup/kogito-examples/stable/pom.xml" + dest: "/tmp/examples_pom.xml" + + - name: "Get Kogito Examples " + shell: xmllint --xpath '/*[local-name()="project"]/*[local-name()="modules"]' /tmp/examples_pom.xml > ~/.crc/quarkus_examples.txt + + - name: Replace modules tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '' + + - name: Replace module tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '- ' + + - name: Replace end module tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '' + + - name: Replace end modules tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '\n' + + - name: Start CRC with {{ ram }}MB (~ 10 minutes) + shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" + + - name: Login crc + shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" + + - name: Create {{ nameSpace }} + shell: "oc new-project {{ nameSpace }}" + + - name: Use {{ nameSpace }} proect + shell: "oc project {{ nameSpace }}" + + - name: Kogito use {{ nameSpace }} + shell: "kogito use-project {{ nameSpace }}" + register: kogito_use_project_result + ignore_errors: yes + + - debug: msg="{{ kogito_use_project_result }}" + + - name: Kogito install operator on {{ nameSpace }} + shell: "kogito install operator -p {{ nameSpace }}" + register: kogito_install_operator_result + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result_one + + - debug: msg="{{ result_one }}" + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} wait for up to 120 sec, poll every 10 sec, 12 times + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result + until: result.stdout.find("Running") != -1 + async: 120 + poll: 10 + retries: 12 + + - debug: msg="Project Name {{ nameSpace }}" + + - debug: msg="Your Kube Password is {{ kube_password }}" \ No newline at end of file diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml new file mode 100644 index 0000000000..6867af2934 --- /dev/null +++ b/kogito-ansible/playbook_deploy.yaml @@ -0,0 +1,55 @@ +--- + - name: Start CRC 1.10.0 and deploy kogito examples + hosts: localhost + gather_facts: true + + vars: + libvirt_version: "4.4.3" + ram: "16384" #MB + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" + examples: "{{ lookup('file', '~/.crc/quarkus_examples.txt') }}" + + vars_prompt: + - name: "nameSpace" + prompt: "Insert your Project Name/ NameSpace" + default: "my-kogito-project" + private: "no" + + - name: "example" + prompt: "Choose the example to deploy" + default: "\n{{ examples }}" + private: "no" + + tasks: + + - debug: msg="Project Name {{ nameSpace }}" + + - name: Start CRC with {{ ram }}MB (~ 10 minutes) + shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" + + - name: Login crc + shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" + ignore_errors: yes + + - name: Kogito use {{ nameSpace }} + shell: "kogito use-project {{ nameSpace }}" + register: kogito_use_project_result + ignore_errors: yes + + - debug: msg="{{ kogito_use_project_result }}" + + - name: Deploy {{ example }} + shell: "kogito deploy-service {{ example }} https://github.com/kiegroup/kogito-examples/ --context-dir={{ example }}" + register: install_drools_quarkus_example + ignore_errors: yes + + - debug: msg="{{ install_drools_quarkus_example }}" + + - debug: msg="Project Name {{ nameSpace }}" + + - debug: msg="Your Kube Password is {{ kube_password }}" + + - name: Open browser + shell: "crc console" + + diff --git a/kogito-ansible/playbook_etc_hosts.yaml b/kogito-ansible/playbook_etc_hosts.yaml new file mode 100644 index 0000000000..1aab83941f --- /dev/null +++ b/kogito-ansible/playbook_etc_hosts.yaml @@ -0,0 +1,28 @@ +--- +- name: Checks etc/hosts config + hosts: localhost + + vars: + kafka_cluster_name: "my-cluster-kafka" + app_namespace: "my-kogito-project" + ip_on_etc_hosts: 192.168.130.11 + + tasks: + + - name: Check api in hosts + lineinfile: + path: /etc/hosts + line: "{{ip_on_etc_hosts}} api.crc.testing" + create: yes + + - name: Check oauth in hosts + lineinfile: + path: /etc/hosts + line: "{{ip_on_etc_hosts}} oauth-openshift.apps-crc.testing" + create: yes + + - name: Check console in hosts + lineinfile: + path: /etc/hosts + line: "{{ip_on_etc_hosts}} console-openshift-console.apps-crc.testing" + create: yes \ No newline at end of file diff --git a/kogito-ansible/playbook_libs.yaml b/kogito-ansible/playbook_libs.yaml new file mode 100644 index 0000000000..fdae422dae --- /dev/null +++ b/kogito-ansible/playbook_libs.yaml @@ -0,0 +1,11 @@ +--- +- name: Install libs on Debian/Ubuntu + hosts: localhost + gather_facts: true + + tasks: + + - name: install + shell: "sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system network-manager -y" + become: yes + when: ansible_os_family == 'Debian' \ No newline at end of file From d78b1790c89b9e1e1864c85c02690fea5ce88ddd Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 18 May 2020 19:33:25 +0200 Subject: [PATCH 11/37] changes requested by reviewer --- kogito-ansible/README.md | 67 +++++++++++++++++++++++------ kogito-ansible/playbook_crc.yaml | 25 +++++------ kogito-ansible/playbook_create.yaml | 29 +++++++------ kogito-ansible/playbook_deploy.yaml | 4 +- kogito-ansible/playbook_libs.yaml | 24 ++++++++--- 5 files changed, 105 insertions(+), 44 deletions(-) diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index 352cbdebda..d6925b3c1f 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -1,25 +1,64 @@ # Openshift (CRC) Kogito ansible automation +Tested on Fedora 31/32 and Ubuntu 19.10 + Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. -CRC 1.10.0, and Ansible must be installed. -No previous CRC setup (no /home/{user}/.crc folder), otherwise the create script will fail, delete .crc if you want run more than once the create playbook +Ansible must be installed. + ### Create an account on cloud.redhat.com -https://cloud.redhat.com/openshift/install and download or copy your Pull secret from the the laptop installation https://cloud.redhat.com/openshift/install/crc/installer-provisioned +https://cloud.redhat.com/openshift/install and download or copy your Pull secret from the laptop installation https://cloud.redhat.com/openshift/install/crc/installer-provisioned + + +## Fedora +### Install LibVirt libs +```sh +sudo ansible-playbook ./playbook_libs.yaml +``` ### Install CRC (If you haven't already installed) -Pre requisite on Debian/Ubuntu: +Download and copy CRC in the user's path (2GB), +change the app_name (my-kafka-project) in the file if you want different name +```sh +ansible-playbook ./playbook_crc.yaml +``` -Install libvirt libs on Debian/Ubuntu only: +Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") ```sh -sudo ansible-playbook ./playbook_libs.yaml +sudo ansible-playbook ./playbook_etc_hosts.yaml +``` + +### Install Kogito on CRC +The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. +The name of the Project to create and the Pull secret will be asked in the beginning of the run. +To use the default project name (my-kogito-project) just press enter. +```sh +ansible-playbook ./playbook_create.yaml +``` + +### Deploy Kogito Examples +To deploy one of the kogito examples, enter the name of one of the example, +at the end the browser show you the login page, the output of the deploy with the instructions to see +the logs from cli will be on the ansible output. +```sh +ansible-playbook ./playbook_deploy.yaml ``` + +## Ubuntu + +### Install LibVirt libs +```sh +sudo ansible-playbook ./playbook_libs.yaml +``` + +### Install CRC +(If you haven't already installed) Download and copy CRC in the user's path (2GB), change the app_name (my-kafka-project) in the file if you want different name ```sh @@ -41,17 +80,21 @@ To use the default project name (my-kogito-project) just press enter. ```sh ansible-playbook ./playbook_create.yaml ``` -Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording - -Video Duration: 1:39 min. -[![asciicast](https://asciinema.org/a/313700.png)](https://asciinema.org/a/313700) - - +### Deploy Kogito Examples To deploy one of the kogito examples, enter the name of one of the example, at the end the browser show you the login page, the output of the deploy with the instructions to see the logs from cli will be on the ansible output. ```sh ansible-playbook ./playbook_deploy.yaml ``` + +## Videos +Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording + +### Setup CRC +Video Duration: 1:39 min. +[![asciicast](https://asciinema.org/a/313700.png)](https://asciinema.org/a/313700) + +### Deploy Kpgotp Examples Video Duration 27:sec [![asciicast](https://asciinema.org/a/313703.png)](https://asciinema.org/a/313703) diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml index cbe90aa237..e977f83eb8 100644 --- a/kogito-ansible/playbook_crc.yaml +++ b/kogito-ansible/playbook_crc.yaml @@ -1,10 +1,12 @@ --- - name: Install CRC hosts: localhost - gather_facts: true vars: crc_version: "1.10.0" + crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" + crc_tmp_dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" + crc_package_name: "crc-linux-{{crc_version}}-amd64" tasks: @@ -18,27 +20,26 @@ path: "/home/{{ ansible_user_id }}/.local/bin/crc" register: stat_result - - name: Check if crc-linux-{{crc_version}}-amd64/crc exists in /tmp/ + - name: Check if {{ crc_package_name }}/crc exists in /tmp/ stat: - path: "/tmp/crc-linux-{{crc_version}}-amd64/crc" + path: "/tmp/{{ crc_package_name }}/crc" register: stat_result - when: stat_result.stat.exists == False - - name: "Download crc {{crc_version}} ~2GB, this takes time and depends on your connection speed" + - name: "Download crc {{ crc_version }} ~2GB, this takes time and depends on your connection speed" get_url: - url: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" - dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" + url: "{{ crc_url_file }}" + dest: "{{ crc_tmp_dest }}" when: stat_result.stat.exists == False - - name: Extract crc-linux-{{crc_version}}-amd64.tar.xz into tmp + - name: Extract {{ crc_package_name }}.tar.xz into tmp unarchive: - src: /tmp/crc-linux-{{crc_version}}-amd64.tar.xz + src: "{{ crc_tmp_dest }}" dest: /tmp when: stat_result.stat.exists == False - - name: Check if crc-linux-{{crc_version}}-amd64/crc exists in /tmp/ + - name: Check if {{ crc_package_name }}/crc exists in /tmp/ stat: - path: "/tmp/crc-linux-{{crc_version}}-amd64/crc" + path: "/tmp/{{ crc_package_name }}/crc" register: stat_result - name: Check if crc exists in /home/{{ansible_user_id}}/.local/bin/ @@ -48,7 +49,7 @@ when: stat_result.stat.exists == True - name: Move crc from /tmp/crc-linux-{{crc_version}}-amd64 to /home/{{ansible_user_id}}/.local/bin - command: "mv /tmp/crc-linux-{{crc_version}}-amd64/crc /home/{{ansible_user_id}}/.local/bin/" + command: "mv /tmp/{{ crc_package_name }}/crc /home/{{ansible_user_id}}/.local/bin/" when: stat_result.stat.exists == False - name: crc libvirt group diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index 218db98691..1855e66bdc 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -1,7 +1,6 @@ --- - - name: Start CRC 1.10.0 and deploy Kogito Operator and CLI + - name: Start CRC and deploy Kogito Operator and CLI hosts: localhost - gather_facts: true vars: kogito_tag: "0.10.0" @@ -9,6 +8,8 @@ libvirt_version: "4.4.3" ip_on_etc_hosts: 192.168.130.11 kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" + kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" + kogito_tmp_dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" vars_prompt: - name: "nameSpace" @@ -21,20 +22,22 @@ tasks: - debug: msg="Project Name {{ nameSpace }}" + - name: Check that kogito cli exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/kogito" + register: stat_result + - name: Copy Kogito cli get_url: - url: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" - dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" + url: "{{kogito_url_file}}" + dest: "{{ kogito_tmp_dest }}" + when: stat_result.stat.exists == False - name: Extract Kogito cli archive unarchive: - src: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" + src: "{{ kogito_tmp_dest }}" dest: "/tmp/" - - - name: Check that oc exists in /home/{{ansible_user_id}}/.local/bin/ - stat: - path: "/home/{{ ansible_user_id }}/.local/bin/kogito" - register: stat_result + when: stat_result.stat.exists == False - name: Creates user home kogito dir file: @@ -57,9 +60,9 @@ content: "{{ PullSecret }}" dest: "~/.crc/crc-pull-secret" - - name: Download Kogito Examples pom - get_url: - url: "https://raw.githubusercontent.com/kiegroup/kogito-examples/stable/pom.xml" + - name: Copy Kogito Examples pom + copy: + src: "./../pom.xml" dest: "/tmp/examples_pom.xml" - name: "Get Kogito Examples " diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml index 6867af2934..24f8697b17 100644 --- a/kogito-ansible/playbook_deploy.yaml +++ b/kogito-ansible/playbook_deploy.yaml @@ -1,13 +1,13 @@ --- - name: Start CRC 1.10.0 and deploy kogito examples hosts: localhost - gather_facts: true vars: libvirt_version: "4.4.3" ram: "16384" #MB kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" examples: "{{ lookup('file', '~/.crc/quarkus_examples.txt') }}" + examples_repo: "https://github.com/kiegroup/kogito-examples/" vars_prompt: - name: "nameSpace" @@ -39,7 +39,7 @@ - debug: msg="{{ kogito_use_project_result }}" - name: Deploy {{ example }} - shell: "kogito deploy-service {{ example }} https://github.com/kiegroup/kogito-examples/ --context-dir={{ example }}" + shell: "kogito deploy-service {{ example }} {{ examples_repo }} --context-dir={{ example }}" register: install_drools_quarkus_example ignore_errors: yes diff --git a/kogito-ansible/playbook_libs.yaml b/kogito-ansible/playbook_libs.yaml index fdae422dae..2ed99a4884 100644 --- a/kogito-ansible/playbook_libs.yaml +++ b/kogito-ansible/playbook_libs.yaml @@ -1,11 +1,25 @@ --- -- name: Install libs on Debian/Ubuntu +- name: Install libs on Fedora/Ubuntu hosts: localhost - gather_facts: true tasks: - - name: install - shell: "sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system network-manager -y" + - name: CheckOS + assert: + that: + - "ansible_os_family == 'Debian' or ansible_os_family == 'RedHat'" + + - name: Install Virtualization on Ubuntu + apt: + pkg: + - qemu-kvm + - libvirt-daemon + - libvirt-daemon-system + - network-manager + become: yes + when: ansible_os_family == 'Debian' + + - name: Install Virtualization on Fedora + shell: "sudo dnf install @virtualization -y" become: yes - when: ansible_os_family == 'Debian' \ No newline at end of file + when: ansible_os_family == 'RedHat' \ No newline at end of file From b188a3047e77f765c70c872ff4f1552c66f9aa01 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 18 May 2020 20:37:21 +0200 Subject: [PATCH 12/37] changes requested by reviewer --- kogito-ansible/README.md | 14 ++----------- kogito-ansible/playbook_etc_hosts.yaml | 28 -------------------------- 2 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 kogito-ansible/playbook_etc_hosts.yaml diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index d6925b3c1f..cd79ee2551 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -27,11 +27,6 @@ change the app_name (my-kafka-project) in the file if you want different name ansible-playbook ./playbook_crc.yaml ``` -Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") -```sh -sudo ansible-playbook ./playbook_etc_hosts.yaml -``` - ### Install Kogito on CRC The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. The name of the Project to create and the Pull secret will be asked in the beginning of the run. @@ -65,13 +60,6 @@ change the app_name (my-kafka-project) in the file if you want different name ansible-playbook ./playbook_crc.yaml ``` -Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") -```sh -sudo ansible-playbook ./playbook_etc_hosts.yaml -``` - - - ### Install Kogito on CRC The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. @@ -88,6 +76,8 @@ the logs from cli will be on the ansible output. ansible-playbook ./playbook_deploy.yaml ``` + + ## Videos Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording diff --git a/kogito-ansible/playbook_etc_hosts.yaml b/kogito-ansible/playbook_etc_hosts.yaml deleted file mode 100644 index 1aab83941f..0000000000 --- a/kogito-ansible/playbook_etc_hosts.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- name: Checks etc/hosts config - hosts: localhost - - vars: - kafka_cluster_name: "my-cluster-kafka" - app_namespace: "my-kogito-project" - ip_on_etc_hosts: 192.168.130.11 - - tasks: - - - name: Check api in hosts - lineinfile: - path: /etc/hosts - line: "{{ip_on_etc_hosts}} api.crc.testing" - create: yes - - - name: Check oauth in hosts - lineinfile: - path: /etc/hosts - line: "{{ip_on_etc_hosts}} oauth-openshift.apps-crc.testing" - create: yes - - - name: Check console in hosts - lineinfile: - path: /etc/hosts - line: "{{ip_on_etc_hosts}} console-openshift-console.apps-crc.testing" - create: yes \ No newline at end of file From d157a974682c713ed648e7f85ed81b092285cbbe Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 25 May 2020 12:24:05 +0200 Subject: [PATCH 13/37] changes requested by reviewer --- README.md | 2 +- kogito-ansible/README.md | 8 +++++--- kogito-ansible/playbook_libs.yaml | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d8582dd3df..acd40a4249 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ Every example has a directory named `operator` including the YAML files to deplo Please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift) of how to install the operator to your environment in order to try it there. -## Deploying the Kogito example applications on OpenShift CRC using Ansible playbooks +## Deploying the Kogito example applications locally with OpenShift CRC using Ansible playbooks In the [Kogito Ansible folder](kogito-ansible/README.md) you find the documentation plus some external videos about how to setup Openshift locally (CRC) and deploy the kogito examples using ansible, with few commands \ No newline at end of file diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index cd79ee2551..927d5a9f9e 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -1,10 +1,12 @@ # Openshift (CRC) Kogito ansible automation -Tested on Fedora 31/32 and Ubuntu 19.10 +### Prerequisite +Tested on Fedora 31/32 and Ubuntu 19/20 +Default values are 9GB of ram and 22GB of diskspace. Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. - -Ansible must be installed. +[Ansible must be installed](https://docs.ansible.com/ansible/latest/installation_guide/index.html) +. ### Create an account on cloud.redhat.com diff --git a/kogito-ansible/playbook_libs.yaml b/kogito-ansible/playbook_libs.yaml index 2ed99a4884..a9bcd48da8 100644 --- a/kogito-ansible/playbook_libs.yaml +++ b/kogito-ansible/playbook_libs.yaml @@ -20,6 +20,8 @@ when: ansible_os_family == 'Debian' - name: Install Virtualization on Fedora - shell: "sudo dnf install @virtualization -y" + dnf: + name: + - "@virtualization" become: yes when: ansible_os_family == 'RedHat' \ No newline at end of file From 8eb988ae672cd9527006579df6f29628dba8d3b8 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 25 May 2020 17:41:18 +0200 Subject: [PATCH 14/37] changes requested by reviewer --- kogito-ansible/playbook_crc.yaml | 47 ++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml index e977f83eb8..a9ebbc3191 100644 --- a/kogito-ansible/playbook_crc.yaml +++ b/kogito-ansible/playbook_crc.yaml @@ -3,13 +3,44 @@ hosts: localhost vars: - crc_version: "1.10.0" - crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" - crc_tmp_dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" - crc_package_name: "crc-linux-{{crc_version}}-amd64" + release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" + crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz" - tasks: + pre_tasks: + - name: Download latest version file + get_url: + url: "{{ release_file }}" + dest: "/tmp/release-info.json" + + - name : read json + uri: + url: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json + return_content: yes + register: jsoncontent + + - set_fact: + crcVersion: "{{ jsoncontent.json.version.crcVersion }}" + register: crcVersion + + - debug: msg="Crc version {{ crcVersion }}" + + - set_fact: + openshiftVersion: "{{ jsoncontent.json.version.openshiftVersion }}" + register: openshiftVersion + - debug: msg="Openshift version {{ openshiftVersion }}" + + + - set_fact: + crc_tmp_dest: "/tmp/crc-linux-{{ crcVersion }}-amd64.tar.xz" + register: crc_tmp_dest + + - set_fact: + crc_package_name: "crc-linux-{{ crcVersion }}-amd64" + register: crc_package_name + + tasks: + - - name: Create .local/bin/ file: path: /home/{{ansible_user_id}}/.local/bin/ @@ -20,12 +51,12 @@ path: "/home/{{ ansible_user_id }}/.local/bin/crc" register: stat_result - - name: Check if {{ crc_package_name }}/crc exists in /tmp/ + - name: Check if crc-linux-{{ crcVersion }}-amd64 /crc exists in /tmp/ stat: path: "/tmp/{{ crc_package_name }}/crc" register: stat_result - - name: "Download crc {{ crc_version }} ~2GB, this takes time and depends on your connection speed" + - name: "Download crc ~2GB into {{ crc_tmp_dest }}, this takes time and depends on your connection speed" get_url: url: "{{ crc_url_file }}" dest: "{{ crc_tmp_dest }}" @@ -48,7 +79,7 @@ register: stat_result when: stat_result.stat.exists == True - - name: Move crc from /tmp/crc-linux-{{crc_version}}-amd64 to /home/{{ansible_user_id}}/.local/bin + - name: Move crc from /tmp/crc-linux-{{crcVersion}}-amd64 to /home/{{ansible_user_id}}/.local/bin command: "mv /tmp/{{ crc_package_name }}/crc /home/{{ansible_user_id}}/.local/bin/" when: stat_result.stat.exists == False From 2df88665cce7e61a7206e4e51be04014b23ac182 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 May 2020 09:36:33 +0200 Subject: [PATCH 15/37] versions come from release/tag files --- kogito-ansible/playbook_create.yaml | 309 ++++++++++++++++------------ 1 file changed, 176 insertions(+), 133 deletions(-) diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index 1855e66bdc..9f3d6024aa 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -1,134 +1,177 @@ --- - - name: Start CRC and deploy Kogito Operator and CLI - hosts: localhost - - vars: - kogito_tag: "0.10.0" - ram: "16384" #MB - libvirt_version: "4.4.3" - ip_on_etc_hosts: 192.168.130.11 - kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" - kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" - kogito_tmp_dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" - - vars_prompt: - - name: "nameSpace" - default: "my-kogito-project" - prompt: "Insert your Project Name/ NameSpace" - private: "no" - - name: "PullSecret" - prompt: "Insert your Pull secret" - - tasks: - - debug: msg="Project Name {{ nameSpace }}" - - - name: Check that kogito cli exists in /home/{{ansible_user_id}}/.local/bin/ - stat: - path: "/home/{{ ansible_user_id }}/.local/bin/kogito" - register: stat_result - - - name: Copy Kogito cli - get_url: - url: "{{kogito_url_file}}" - dest: "{{ kogito_tmp_dest }}" - when: stat_result.stat.exists == False - - - name: Extract Kogito cli archive - unarchive: - src: "{{ kogito_tmp_dest }}" - dest: "/tmp/" - when: stat_result.stat.exists == False - - - name: Creates user home kogito dir - file: - path: "/home/{{ ansible_user_id}}/.local/bin/" - state: directory - when: stat_result.stat.exists == False - - - name: Move kogito from /tmp to /home/{{ansible_user_id}}/.local/bin - command: "mv /tmp/kogito /home/{{ansible_user_id}}/.local/bin/" - when: stat_result.stat.exists == False - - - name: CRC setup - shell: "crc setup" - register: crc_result - - - debug: msg="{{ crc_result }}" - - - name: Write pull secret - copy: - content: "{{ PullSecret }}" - dest: "~/.crc/crc-pull-secret" - - - name: Copy Kogito Examples pom - copy: - src: "./../pom.xml" - dest: "/tmp/examples_pom.xml" - - - name: "Get Kogito Examples " - shell: xmllint --xpath '/*[local-name()="project"]/*[local-name()="modules"]' /tmp/examples_pom.xml > ~/.crc/quarkus_examples.txt - - - name: Replace modules tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '' - - - name: Replace module tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '- ' - - - name: Replace end module tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '' - - - name: Replace end modules tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '\n' - - - name: Start CRC with {{ ram }}MB (~ 10 minutes) - shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" - - - name: Login crc - shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" - - - name: Create {{ nameSpace }} - shell: "oc new-project {{ nameSpace }}" - - - name: Use {{ nameSpace }} proect - shell: "oc project {{ nameSpace }}" - - - name: Kogito use {{ nameSpace }} - shell: "kogito use-project {{ nameSpace }}" - register: kogito_use_project_result - ignore_errors: yes - - - debug: msg="{{ kogito_use_project_result }}" - - - name: Kogito install operator on {{ nameSpace }} - shell: "kogito install operator -p {{ nameSpace }}" - register: kogito_install_operator_result - - - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} - shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" - register: result_one - - - debug: msg="{{ result_one }}" - - - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} wait for up to 120 sec, poll every 10 sec, 12 times - shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" - register: result - until: result.stdout.find("Running") != -1 - async: 120 - poll: 10 - retries: 12 - - - debug: msg="Project Name {{ nameSpace }}" - - - debug: msg="Your Kube Password is {{ kube_password }}" \ No newline at end of file +- name: Start CRC and deploy Kogito Operator and CLI + hosts: localhost + + vars: + release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" + ram: "16384" #MB + + vars_prompt: + - name: "nameSpace" + default: "my-kogito-project" + prompt: "Insert your Project Name/ NameSpace" + private: "no" + - name: "PullSecret" + prompt: "Insert your Pull secret" + + pre_tasks: + + - name: Download latest version file + get_url: + url: "{{ release_file }}" + dest: "/tmp/release-info.json" + + - name: read json + uri: + url: "{{ release_file }}" + return_content: yes + register: jsoncontent + + - set_fact: + crcVersion: "{{ jsoncontent.json.version.crcVersion }}" + register: crcVersion + + - debug: msg="Crc version {{ crcVersion }}" + + - set_fact: + openshiftVersion: "{{ jsoncontent.json.version.openshiftVersion }}" + register: openshiftVersion + + - debug: msg="Openshift version {{ openshiftVersion }}" + + + - name: Kogito latest tag + uri: + url: https://api.github.com/repos/kiegroup/kogito-runtimes/tags + register: json_response + + - set_fact: + kogitoTag: "0.10.0" + #kogitoTag: "{{ json_response.json[0]['name'] }}" uncomment when kogito operator will be released + register: kogitoTag + + - debug: msg="Kogito latest tag:{{ kogitoTag }}" + + - set_fact: + kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogitoTag }}/kogito-cli-{{ kogitoTag }}-linux-amd64.tar.gz" + + - set_fact: + kogito_tmp_dest: "/tmp/kogito-{{ kogitoTag }}-linux-amd64.tar.gz" + + + tasks: + - debug: msg="Project Name {{ nameSpace }}" + + - name: Check that kogito cli exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/kogito" + register: stat_result + + - name: Copy Kogito cli + get_url: + url: "{{kogito_url_file}}" + dest: "{{ kogito_tmp_dest }}" + when: stat_result.stat.exists == False + + - name: Extract Kogito cli archive + unarchive: + src: "{{ kogito_tmp_dest }}" + dest: "/tmp/" + when: stat_result.stat.exists == False + + - name: Creates user home kogito dir + file: + path: "/home/{{ ansible_user_id}}/.local/bin/" + state: directory + when: stat_result.stat.exists == False + + - name: Move kogito from /tmp to /home/{{ansible_user_id}}/.local/bin + command: "mv /tmp/kogito /home/{{ansible_user_id}}/.local/bin/" + when: stat_result.stat.exists == False + + - name: CRC setup + shell: "crc setup" + register: crc_result + + - debug: msg="{{ crc_result }}" + + - name: Write pull secret + copy: + content: "{{ PullSecret }}" + dest: "~/.crc/crc-pull-secret" + + - name: Copy Kogito Examples pom + copy: + src: "./../pom.xml" + dest: "/tmp/examples_pom.xml" + + - name: "Get Kogito Examples " + shell: xmllint --xpath '/*[local-name()="project"]/*[local-name()="modules"]' /tmp/examples_pom.xml > ~/.crc/kogito-examples.txt + + - name: Replace modules tags + replace: + path: ~/.crc/kogito-examples.txt + regexp: '' + replace: '' + + - name: Replace module tags + replace: + path: ~/.crc/kogito-examples.txt + regexp: '' + replace: '- ' + + - name: Replace end module tags + replace: + path: ~/.crc/kogito-examples.txt + regexp: '' + replace: '' + + - name: Replace end modules tags + replace: + path: ~/.crc/kogito-examples.txt + regexp: '' + replace: '\n' + + - name: Start CRC with {{ ram }}MB (~ 10 minutes) + shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" + + - set_fact: + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ openshiftVersion }}/kubeadmin-password') }}" + + - name: Login crc + shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" + + - name: Create {{ nameSpace }} + shell: "oc new-project {{ nameSpace }}" + + - name: Use {{ nameSpace }} proect + shell: "oc project {{ nameSpace }}" + + - name: Kogito use {{ nameSpace }} + shell: "kogito use-project {{ nameSpace }}" + register: kogito_use_project_result + ignore_errors: yes + + - debug: msg="{{ kogito_use_project_result }}" + + - name: Kogito install operator on {{ nameSpace }} + shell: "kogito install operator -p {{ nameSpace }}" + register: kogito_install_operator_result + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result_one + + - debug: msg="{{ result_one }}" + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} wait for up to 120 sec, poll every 10 sec, 12 times + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result + until: result.stdout.find("Running") != -1 + async: 120 + poll: 10 + retries: 12 + + - debug: msg="Project Name {{ nameSpace }}" + + - debug: msg="Your Kube Password is {{ kube_password }}" \ No newline at end of file From baba5730bed1a6fbaf83ee2dade30e4e6fc5dc3d Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 May 2020 11:35:29 +0200 Subject: [PATCH 16/37] specified exact amount of ram and added pretask to remove hardcoded versions --- kogito-ansible/README.md | 2 +- kogito-ansible/playbook_crc.yaml | 7 ++----- kogito-ansible/playbook_create.yaml | 8 ++------ kogito-ansible/playbook_deploy.yaml | 32 +++++++++++++++++++++-------- 4 files changed, 29 insertions(+), 20 deletions(-) diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index 927d5a9f9e..69f5e5af8a 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -2,7 +2,7 @@ ### Prerequisite Tested on Fedora 31/32 and Ubuntu 19/20 -Default values are 9GB of ram and 22GB of diskspace. +Default values for the installation are 13GB of ram and 22GB of diskspace. Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. [Ansible must be installed](https://docs.ansible.com/ansible/latest/installation_guide/index.html) diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml index a9ebbc3191..434a3048d2 100644 --- a/kogito-ansible/playbook_crc.yaml +++ b/kogito-ansible/playbook_crc.yaml @@ -7,15 +7,12 @@ crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz" pre_tasks: - - name: Download latest version file - get_url: - url: "{{ release_file }}" - dest: "/tmp/release-info.json" - name : read json uri: - url: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json + url: "{{ release_file }}" return_content: yes + timeout: 60 register: jsoncontent - set_fact: diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index 9f3d6024aa..ca740dae3d 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -4,7 +4,7 @@ vars: release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" - ram: "16384" #MB + ram: "13312" #MB vars_prompt: - name: "nameSpace" @@ -16,14 +16,10 @@ pre_tasks: - - name: Download latest version file - get_url: - url: "{{ release_file }}" - dest: "/tmp/release-info.json" - - name: read json uri: url: "{{ release_file }}" + timeout: 60 return_content: yes register: jsoncontent diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml index 24f8697b17..4bb0bd82c5 100644 --- a/kogito-ansible/playbook_deploy.yaml +++ b/kogito-ansible/playbook_deploy.yaml @@ -1,15 +1,16 @@ --- - - name: Start CRC 1.10.0 and deploy kogito examples + - name: Start CRC and deploy kogito examples hosts: localhost vars: - libvirt_version: "4.4.3" - ram: "16384" #MB - kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" - examples: "{{ lookup('file', '~/.crc/quarkus_examples.txt') }}" + + release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" + ram: "13312" #MB + examples: "{{ lookup('file', '~/.crc/kogito-examples.txt') }}" examples_repo: "https://github.com/kiegroup/kogito-examples/" vars_prompt: + - name: "nameSpace" prompt: "Insert your Project Name/ NameSpace" default: "my-kogito-project" @@ -20,6 +21,20 @@ default: "\n{{ examples }}" private: "no" + pre_tasks: + + - name: read json + uri: + url: "{{ release_file }}" + return_content: yes + register: jsoncontent + + - set_fact: + openshiftVersion: "{{ jsoncontent.json.version.openshiftVersion }}" + register: openshiftVersion + + - debug: msg="Openshift version {{ openshiftVersion }}" + tasks: - debug: msg="Project Name {{ nameSpace }}" @@ -47,9 +62,10 @@ - debug: msg="Project Name {{ nameSpace }}" + - set_fact: + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ openshiftVersion }}/kubeadmin-password') }}" + - debug: msg="Your Kube Password is {{ kube_password }}" - name: Open browser - shell: "crc console" - - + shell: "crc console" \ No newline at end of file From b77023dd298dcd03b4c3148e3580a5d9fd9aabc1 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 May 2020 14:12:24 +0200 Subject: [PATCH 17/37] enabled the tag and ram input --- kogito-ansible/playbook_create.yaml | 22 +++++++++------------- kogito-ansible/playbook_deploy.yaml | 6 ++++-- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index ca740dae3d..5f02a3ce4a 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -4,7 +4,6 @@ vars: release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" - ram: "13312" #MB vars_prompt: - name: "nameSpace" @@ -13,6 +12,14 @@ private: "no" - name: "PullSecret" prompt: "Insert your Pull secret" + - name: "ram" + default: "13312" + prompt: "Ram used in #MB" + private: "no" + - name: "kogitoTag" + default: "0.10.0" + prompt: "Kogito CLI and Operator tag" + private: "no" pre_tasks: @@ -35,18 +42,7 @@ - debug: msg="Openshift version {{ openshiftVersion }}" - - - name: Kogito latest tag - uri: - url: https://api.github.com/repos/kiegroup/kogito-runtimes/tags - register: json_response - - - set_fact: - kogitoTag: "0.10.0" - #kogitoTag: "{{ json_response.json[0]['name'] }}" uncomment when kogito operator will be released - register: kogitoTag - - - debug: msg="Kogito latest tag:{{ kogitoTag }}" + - debug: msg="Kogito CLI tag:{{ kogitoTag }}" - set_fact: kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogitoTag }}/kogito-cli-{{ kogitoTag }}-linux-amd64.tar.gz" diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml index 4bb0bd82c5..d04fb97828 100644 --- a/kogito-ansible/playbook_deploy.yaml +++ b/kogito-ansible/playbook_deploy.yaml @@ -3,13 +3,15 @@ hosts: localhost vars: - release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" - ram: "13312" #MB examples: "{{ lookup('file', '~/.crc/kogito-examples.txt') }}" examples_repo: "https://github.com/kiegroup/kogito-examples/" vars_prompt: + - name: "ram" + default: "13312" + prompt: "Ram used in MB, 13312 ->13GB" + private: "no" - name: "nameSpace" prompt: "Insert your Project Name/ NameSpace" From cd77312bd6b074ad650bb206088f1e25b859ec1b Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 9 Jun 2020 15:18:12 +0200 Subject: [PATCH 18/37] removed ubuntu support until we found a workaround to the loal user folder removed in the 20.04 --- kogito-ansible/README.md | 37 +------------------------------ kogito-ansible/playbook_libs.yaml | 13 ++--------- 2 files changed, 3 insertions(+), 47 deletions(-) diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index 69f5e5af8a..405f3c3d44 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -1,7 +1,7 @@ # Openshift (CRC) Kogito ansible automation ### Prerequisite -Tested on Fedora 31/32 and Ubuntu 19/20 +Tested on Fedora 31/32 Default values for the installation are 13GB of ram and 22GB of diskspace. Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. @@ -45,41 +45,6 @@ the logs from cli will be on the ansible output. ansible-playbook ./playbook_deploy.yaml ``` - - -## Ubuntu - -### Install LibVirt libs -```sh -sudo ansible-playbook ./playbook_libs.yaml -``` - -### Install CRC -(If you haven't already installed) -Download and copy CRC in the user's path (2GB), -change the app_name (my-kafka-project) in the file if you want different name -```sh -ansible-playbook ./playbook_crc.yaml -``` - -### Install Kogito on CRC - -The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. -The name of the Project to create and the Pull secret will be asked in the beginning of the run. -To use the default project name (my-kogito-project) just press enter. -```sh -ansible-playbook ./playbook_create.yaml -``` -### Deploy Kogito Examples -To deploy one of the kogito examples, enter the name of one of the example, -at the end the browser show you the login page, the output of the deploy with the instructions to see -the logs from cli will be on the ansible output. -```sh -ansible-playbook ./playbook_deploy.yaml -``` - - - ## Videos Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording diff --git a/kogito-ansible/playbook_libs.yaml b/kogito-ansible/playbook_libs.yaml index a9bcd48da8..3ad4243916 100644 --- a/kogito-ansible/playbook_libs.yaml +++ b/kogito-ansible/playbook_libs.yaml @@ -1,5 +1,5 @@ --- -- name: Install libs on Fedora/Ubuntu +- name: Install libs on Fedora hosts: localhost tasks: @@ -7,17 +7,8 @@ - name: CheckOS assert: that: - - "ansible_os_family == 'Debian' or ansible_os_family == 'RedHat'" + - "ansible_os_family == 'RedHat'" - - name: Install Virtualization on Ubuntu - apt: - pkg: - - qemu-kvm - - libvirt-daemon - - libvirt-daemon-system - - network-manager - become: yes - when: ansible_os_family == 'Debian' - name: Install Virtualization on Fedora dnf: From fa521121080463a673fe07df16fcee1fd968e2cc Mon Sep 17 00:00:00 2001 From: max Date: Tue, 16 Jun 2020 06:32:17 -0400 Subject: [PATCH 19/37] update --- decisiontable-quarkus-example/pom.xml | 2 +- decisiontable-springboot-example/pom.xml | 2 +- dmn-quarkus-example/pom.xml | 2 +- dmn-springboot-example/pom.xml | 2 +- kogito-travel-agency/extended/travels/pom.xml | 15 ++++++++++++--- kogito-travel-agency/extended/visas/pom.xml | 3 +-- onboarding-example/hr/pom.xml | 2 +- onboarding-example/onboarding-quarkus/pom.xml | 2 +- onboarding-example/payroll/pom.xml | 2 +- onboarding-example/pom.xml | 2 +- pom.xml | 2 +- process-business-rules-quarkus/pom.xml | 2 +- process-business-rules-springboot/pom.xml | 2 +- process-infinispan-persistence-quarkus/pom.xml | 2 +- process-infinispan-persistence-springboot/pom.xml | 2 +- process-kafka-quickstart-quarkus/pom.xml | 2 +- process-kafka-quickstart-springboot/pom.xml | 2 +- process-optaplanner-springboot/pom.xml | 2 +- process-quarkus-example/pom.xml | 2 +- process-scripts-quarkus/pom.xml | 2 +- process-scripts-springboot/pom.xml | 2 +- process-service-calls-quarkus/pom.xml | 2 +- process-service-calls-springboot/pom.xml | 2 +- process-service-rest-call-quarkus/pom.xml | 2 +- process-service-rest-call-springboot/pom.xml | 2 +- process-springboot-example/pom.xml | 2 +- process-timer-quarkus/pom.xml | 2 +- process-timer-springboot/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- process-usertasks-quarkus/pom.xml | 2 +- process-usertasks-springboot/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- process-usertasks-with-security-quarkus/pom.xml | 2 +- .../pom.xml | 2 +- rules-quarkus-helloworld/pom.xml | 2 +- ruleunit-quarkus-example/pom.xml | 2 +- ruleunit-springboot-example/pom.xml | 2 +- serverless-workflow-greeting-quarkus/pom.xml | 2 +- serverless-workflow-greeting-springboot/pom.xml | 2 +- serverless-workflow-service-calls-quarkus/pom.xml | 2 +- .../pom.xml | 2 +- 43 files changed, 54 insertions(+), 46 deletions(-) diff --git a/decisiontable-quarkus-example/pom.xml b/decisiontable-quarkus-example/pom.xml index 1c389bb695..83b49b884c 100644 --- a/decisiontable-quarkus-example/pom.xml +++ b/decisiontable-quarkus-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples decisiontable-quarkus-example diff --git a/decisiontable-springboot-example/pom.xml b/decisiontable-springboot-example/pom.xml index 0da391c29e..2132ca7dd1 100644 --- a/decisiontable-springboot-example/pom.xml +++ b/decisiontable-springboot-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples decisiontable-springboot-example diff --git a/dmn-quarkus-example/pom.xml b/dmn-quarkus-example/pom.xml index ddb04a84d4..e88b234b7a 100644 --- a/dmn-quarkus-example/pom.xml +++ b/dmn-quarkus-example/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 dmn-quarkus-example Kogito Example :: DMN diff --git a/dmn-springboot-example/pom.xml b/dmn-springboot-example/pom.xml index ee99d6108c..669804b150 100644 --- a/dmn-springboot-example/pom.xml +++ b/dmn-springboot-example/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 dmn-springboot-example Kogito Example :: DMN - Spring Boot diff --git a/kogito-travel-agency/extended/travels/pom.xml b/kogito-travel-agency/extended/travels/pom.xml index cfe630fe2b..42ef60ca31 100644 --- a/kogito-travel-agency/extended/travels/pom.xml +++ b/kogito-travel-agency/extended/travels/pom.xml @@ -64,8 +64,18 @@ process-management-addon - org.kie.kogito + org.drools drools-decisiontables + + + drools-core + org.drools + + + drools-compiler + org.drools + + @@ -136,8 +146,7 @@ true - - -H:ReflectionConfigurationFiles=../../reflection.json,--allow-incomplete-classpath + --allow-incomplete-classpath diff --git a/kogito-travel-agency/extended/visas/pom.xml b/kogito-travel-agency/extended/visas/pom.xml index 9bdebd8589..f7f923fb59 100644 --- a/kogito-travel-agency/extended/visas/pom.xml +++ b/kogito-travel-agency/extended/visas/pom.xml @@ -115,8 +115,7 @@ true - - -H:ReflectionConfigurationFiles=../../reflection.json,--allow-incomplete-classpath + --allow-incomplete-classpath diff --git a/onboarding-example/hr/pom.xml b/onboarding-example/hr/pom.xml index 1bb1917d2e..0088c408ee 100644 --- a/onboarding-example/hr/pom.xml +++ b/onboarding-example/hr/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito onboarding-example - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples hr diff --git a/onboarding-example/onboarding-quarkus/pom.xml b/onboarding-example/onboarding-quarkus/pom.xml index ded44ddc67..4cc3c9168d 100644 --- a/onboarding-example/onboarding-quarkus/pom.xml +++ b/onboarding-example/onboarding-quarkus/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito onboarding-example - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples onboarding-quarkus diff --git a/onboarding-example/payroll/pom.xml b/onboarding-example/payroll/pom.xml index 564e33761d..3f6f27dcca 100644 --- a/onboarding-example/payroll/pom.xml +++ b/onboarding-example/payroll/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito onboarding-example - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples payroll diff --git a/onboarding-example/pom.xml b/onboarding-example/pom.xml index 127860bf08..01862be7e0 100644 --- a/onboarding-example/pom.xml +++ b/onboarding-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 onboarding-example pom diff --git a/pom.xml b/pom.xml index 4aca0e7790..ef1f60b4fd 100755 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 pom Kogito Example diff --git a/process-business-rules-quarkus/pom.xml b/process-business-rules-quarkus/pom.xml index 12344e6153..11aa74d141 100644 --- a/process-business-rules-quarkus/pom.xml +++ b/process-business-rules-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-business-rules-quarkus diff --git a/process-business-rules-springboot/pom.xml b/process-business-rules-springboot/pom.xml index 4290b0444e..0de13674f5 100644 --- a/process-business-rules-springboot/pom.xml +++ b/process-business-rules-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 Kogito Examples :: Process Business Rules Spring Boot diff --git a/process-infinispan-persistence-quarkus/pom.xml b/process-infinispan-persistence-quarkus/pom.xml index e5d3859b68..fdbd3fd8eb 100644 --- a/process-infinispan-persistence-quarkus/pom.xml +++ b/process-infinispan-persistence-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-infinispan-persistence-quarkus diff --git a/process-infinispan-persistence-springboot/pom.xml b/process-infinispan-persistence-springboot/pom.xml index 8db093177d..a50c1980ee 100644 --- a/process-infinispan-persistence-springboot/pom.xml +++ b/process-infinispan-persistence-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-infinispan-persistence-springboot diff --git a/process-kafka-quickstart-quarkus/pom.xml b/process-kafka-quickstart-quarkus/pom.xml index 56bdc832dd..3a7b501d9f 100644 --- a/process-kafka-quickstart-quarkus/pom.xml +++ b/process-kafka-quickstart-quarkus/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-kafka-quickstart-quarkus diff --git a/process-kafka-quickstart-springboot/pom.xml b/process-kafka-quickstart-springboot/pom.xml index 869c2e6447..d293ffdc0f 100644 --- a/process-kafka-quickstart-springboot/pom.xml +++ b/process-kafka-quickstart-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-kafka-quickstart-springboot diff --git a/process-optaplanner-springboot/pom.xml b/process-optaplanner-springboot/pom.xml index 5672b33233..dee3b08697 100644 --- a/process-optaplanner-springboot/pom.xml +++ b/process-optaplanner-springboot/pom.xml @@ -4,7 +4,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples process-optaplanner-springboot diff --git a/process-quarkus-example/pom.xml b/process-quarkus-example/pom.xml index 6bfe67375f..ee5f60197b 100755 --- a/process-quarkus-example/pom.xml +++ b/process-quarkus-example/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples process-quarkus-example diff --git a/process-scripts-quarkus/pom.xml b/process-scripts-quarkus/pom.xml index 605d2894f8..dd318091e2 100644 --- a/process-scripts-quarkus/pom.xml +++ b/process-scripts-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-scripts-quarkus diff --git a/process-scripts-springboot/pom.xml b/process-scripts-springboot/pom.xml index 0cb24e9fe4..18e133e2f1 100644 --- a/process-scripts-springboot/pom.xml +++ b/process-scripts-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-scripts-springboot diff --git a/process-service-calls-quarkus/pom.xml b/process-service-calls-quarkus/pom.xml index ac67ecd892..6c809f5677 100644 --- a/process-service-calls-quarkus/pom.xml +++ b/process-service-calls-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-service-calls-quarkus diff --git a/process-service-calls-springboot/pom.xml b/process-service-calls-springboot/pom.xml index 1aa7d00533..1e31d909e3 100644 --- a/process-service-calls-springboot/pom.xml +++ b/process-service-calls-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-service-calls-springboot diff --git a/process-service-rest-call-quarkus/pom.xml b/process-service-rest-call-quarkus/pom.xml index 9b8f6c0e29..45bd2f0400 100644 --- a/process-service-rest-call-quarkus/pom.xml +++ b/process-service-rest-call-quarkus/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-service-rest-call-quarkus Kogito Examples :: Process Service Rest Cal with Quarkus diff --git a/process-service-rest-call-springboot/pom.xml b/process-service-rest-call-springboot/pom.xml index 1f0673174b..10bc1d67ca 100644 --- a/process-service-rest-call-springboot/pom.xml +++ b/process-service-rest-call-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-service-rest-call-springboot diff --git a/process-springboot-example/pom.xml b/process-springboot-example/pom.xml index 640cebad35..7ae2579428 100644 --- a/process-springboot-example/pom.xml +++ b/process-springboot-example/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples process-springboot-example diff --git a/process-timer-quarkus/pom.xml b/process-timer-quarkus/pom.xml index 1ef3d84bad..ce8d12c6e9 100644 --- a/process-timer-quarkus/pom.xml +++ b/process-timer-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-timer-quarkus diff --git a/process-timer-springboot/pom.xml b/process-timer-springboot/pom.xml index 7bf6e530af..139ff2a953 100644 --- a/process-timer-springboot/pom.xml +++ b/process-timer-springboot/pom.xml @@ -4,7 +4,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 Kogito Examples :: Process Timer With Spring Boot diff --git a/process-usertasks-custom-lifecycle-quarkus/pom.xml b/process-usertasks-custom-lifecycle-quarkus/pom.xml index 4d87c2d5d2..876676f3c2 100644 --- a/process-usertasks-custom-lifecycle-quarkus/pom.xml +++ b/process-usertasks-custom-lifecycle-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-custom-lifecycle-quarkus diff --git a/process-usertasks-custom-lifecycle-springboot/pom.xml b/process-usertasks-custom-lifecycle-springboot/pom.xml index d0326a71dc..3e4f63a7d4 100644 --- a/process-usertasks-custom-lifecycle-springboot/pom.xml +++ b/process-usertasks-custom-lifecycle-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-custom-lifecycle-springboot diff --git a/process-usertasks-quarkus/pom.xml b/process-usertasks-quarkus/pom.xml index 9b34cfdb87..fecdbe4f43 100644 --- a/process-usertasks-quarkus/pom.xml +++ b/process-usertasks-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-quarkus diff --git a/process-usertasks-springboot/pom.xml b/process-usertasks-springboot/pom.xml index dec0bb7a71..f6f2776091 100644 --- a/process-usertasks-springboot/pom.xml +++ b/process-usertasks-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-springboot diff --git a/process-usertasks-with-security-oidc-quarkus/pom.xml b/process-usertasks-with-security-oidc-quarkus/pom.xml index 2e58704154..7d0dac471d 100644 --- a/process-usertasks-with-security-oidc-quarkus/pom.xml +++ b/process-usertasks-with-security-oidc-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-with-security-oidc-quarkus diff --git a/process-usertasks-with-security-oidc-springboot/pom.xml b/process-usertasks-with-security-oidc-springboot/pom.xml index d8906f0aac..dbfeca690b 100644 --- a/process-usertasks-with-security-oidc-springboot/pom.xml +++ b/process-usertasks-with-security-oidc-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-with-security-oidc-springboot diff --git a/process-usertasks-with-security-quarkus/pom.xml b/process-usertasks-with-security-quarkus/pom.xml index bcdba7346c..c612760d7d 100644 --- a/process-usertasks-with-security-quarkus/pom.xml +++ b/process-usertasks-with-security-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-with-security-quarkus diff --git a/process-usertasks-with-security-springboot/pom.xml b/process-usertasks-with-security-springboot/pom.xml index b4ba6fe9e4..704162273c 100644 --- a/process-usertasks-with-security-springboot/pom.xml +++ b/process-usertasks-with-security-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 process-usertasks-with-security-springboot diff --git a/rules-quarkus-helloworld/pom.xml b/rules-quarkus-helloworld/pom.xml index f7cfa1c06f..734d0792d1 100755 --- a/rules-quarkus-helloworld/pom.xml +++ b/rules-quarkus-helloworld/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples rules-quarkus-helloworld diff --git a/ruleunit-quarkus-example/pom.xml b/ruleunit-quarkus-example/pom.xml index 069938ad13..30d9e36453 100644 --- a/ruleunit-quarkus-example/pom.xml +++ b/ruleunit-quarkus-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples ruleunit-quarkus-example diff --git a/ruleunit-springboot-example/pom.xml b/ruleunit-springboot-example/pom.xml index 8bf240d4f6..bdc48da13d 100644 --- a/ruleunit-springboot-example/pom.xml +++ b/ruleunit-springboot-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 org.kie.kogito.examples ruleunit-springboot-example diff --git a/serverless-workflow-greeting-quarkus/pom.xml b/serverless-workflow-greeting-quarkus/pom.xml index d59e6bc85b..6ae26c6912 100644 --- a/serverless-workflow-greeting-quarkus/pom.xml +++ b/serverless-workflow-greeting-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 serverless-workflow-greeting-quarkus diff --git a/serverless-workflow-greeting-springboot/pom.xml b/serverless-workflow-greeting-springboot/pom.xml index b154ebb879..c24b3a443d 100644 --- a/serverless-workflow-greeting-springboot/pom.xml +++ b/serverless-workflow-greeting-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 serverless-workflow-greeting-springboot diff --git a/serverless-workflow-service-calls-quarkus/pom.xml b/serverless-workflow-service-calls-quarkus/pom.xml index fc2141b76a..a0bb273db1 100644 --- a/serverless-workflow-service-calls-quarkus/pom.xml +++ b/serverless-workflow-service-calls-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 serverless-workflow-service-calls-quarkus diff --git a/serverless-workflow-service-calls-springboot/pom.xml b/serverless-workflow-service-calls-springboot/pom.xml index cb8b1d87ca..550fd3fede 100644 --- a/serverless-workflow-service-calls-springboot/pom.xml +++ b/serverless-workflow-service-calls-springboot/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 0.10.0 serverless-workflow-service-calls-springboot From be88c2541776ec43276fefc6a893d5131cd2bbf6 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 15 May 2020 17:01:25 +0200 Subject: [PATCH 20/37] Kogito examples with ansible automation --- README.md | 5 + kogito-ansible/README.md | 57 +++++++++++ kogito-ansible/playbook_crc.yaml | 55 +++++++++++ kogito-ansible/playbook_create.yaml | 131 +++++++++++++++++++++++++ kogito-ansible/playbook_deploy.yaml | 55 +++++++++++ kogito-ansible/playbook_etc_hosts.yaml | 28 ++++++ kogito-ansible/playbook_libs.yaml | 11 +++ 7 files changed, 342 insertions(+) create mode 100644 kogito-ansible/README.md create mode 100644 kogito-ansible/playbook_crc.yaml create mode 100644 kogito-ansible/playbook_create.yaml create mode 100644 kogito-ansible/playbook_deploy.yaml create mode 100644 kogito-ansible/playbook_etc_hosts.yaml create mode 100644 kogito-ansible/playbook_libs.yaml diff --git a/README.md b/README.md index 70cd61d8d2..d8582dd3df 100644 --- a/README.md +++ b/README.md @@ -108,3 +108,8 @@ shows timers (intermediate and boundary) that allows to introduce delays in proc Every example has a directory named `operator` including the YAML files to deploy it using the Kogito Operator in an OpenShift cluster. Please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift) of how to install the operator to your environment in order to try it there. + +## Deploying the Kogito example applications on OpenShift CRC using Ansible playbooks + +In the [Kogito Ansible folder](kogito-ansible/README.md) you find the documentation plus some external videos about how to +setup Openshift locally (CRC) and deploy the kogito examples using ansible, with few commands \ No newline at end of file diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md new file mode 100644 index 0000000000..352cbdebda --- /dev/null +++ b/kogito-ansible/README.md @@ -0,0 +1,57 @@ +# Openshift (CRC) Kogito ansible automation + +Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. + +CRC 1.10.0, and Ansible must be installed. +No previous CRC setup (no /home/{user}/.crc folder), otherwise the create script will fail, delete .crc if you want run more than once the create playbook + +### Create an account on cloud.redhat.com +https://cloud.redhat.com/openshift/install and download or copy your Pull secret from the the laptop installation https://cloud.redhat.com/openshift/install/crc/installer-provisioned + + +### Install CRC +(If you haven't already installed) + +Pre requisite on Debian/Ubuntu: + +Install libvirt libs on Debian/Ubuntu only: +```sh +sudo ansible-playbook ./playbook_libs.yaml +``` + + +Download and copy CRC in the user's path (2GB), +change the app_name (my-kafka-project) in the file if you want different name +```sh +ansible-playbook ./playbook_crc.yaml +``` + +Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") +```sh +sudo ansible-playbook ./playbook_etc_hosts.yaml +``` + + + +### Install Kogito on CRC + +The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. +The name of the Project to create and the Pull secret will be asked in the beginning of the run. +To use the default project name (my-kogito-project) just press enter. +```sh +ansible-playbook ./playbook_create.yaml +``` +Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording + +Video Duration: 1:39 min. +[![asciicast](https://asciinema.org/a/313700.png)](https://asciinema.org/a/313700) + + +To deploy one of the kogito examples, enter the name of one of the example, +at the end the browser show you the login page, the output of the deploy with the instructions to see +the logs from cli will be on the ansible output. +```sh +ansible-playbook ./playbook_deploy.yaml +``` +Video Duration 27:sec +[![asciicast](https://asciinema.org/a/313703.png)](https://asciinema.org/a/313703) diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml new file mode 100644 index 0000000000..cbe90aa237 --- /dev/null +++ b/kogito-ansible/playbook_crc.yaml @@ -0,0 +1,55 @@ +--- +- name: Install CRC + hosts: localhost + gather_facts: true + + vars: + crc_version: "1.10.0" + + tasks: + + - name: Create .local/bin/ + file: + path: /home/{{ansible_user_id}}/.local/bin/ + state: directory + + - name: Check if crc exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/crc" + register: stat_result + + - name: Check if crc-linux-{{crc_version}}-amd64/crc exists in /tmp/ + stat: + path: "/tmp/crc-linux-{{crc_version}}-amd64/crc" + register: stat_result + when: stat_result.stat.exists == False + + - name: "Download crc {{crc_version}} ~2GB, this takes time and depends on your connection speed" + get_url: + url: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" + dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" + when: stat_result.stat.exists == False + + - name: Extract crc-linux-{{crc_version}}-amd64.tar.xz into tmp + unarchive: + src: /tmp/crc-linux-{{crc_version}}-amd64.tar.xz + dest: /tmp + when: stat_result.stat.exists == False + + - name: Check if crc-linux-{{crc_version}}-amd64/crc exists in /tmp/ + stat: + path: "/tmp/crc-linux-{{crc_version}}-amd64/crc" + register: stat_result + + - name: Check if crc exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/crc" + register: stat_result + when: stat_result.stat.exists == True + + - name: Move crc from /tmp/crc-linux-{{crc_version}}-amd64 to /home/{{ansible_user_id}}/.local/bin + command: "mv /tmp/crc-linux-{{crc_version}}-amd64/crc /home/{{ansible_user_id}}/.local/bin/" + when: stat_result.stat.exists == False + + - name: crc libvirt group + shell: "crc config set skip-check-user-in-libvirt-group true" \ No newline at end of file diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml new file mode 100644 index 0000000000..218db98691 --- /dev/null +++ b/kogito-ansible/playbook_create.yaml @@ -0,0 +1,131 @@ +--- + - name: Start CRC 1.10.0 and deploy Kogito Operator and CLI + hosts: localhost + gather_facts: true + + vars: + kogito_tag: "0.10.0" + ram: "16384" #MB + libvirt_version: "4.4.3" + ip_on_etc_hosts: 192.168.130.11 + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" + + vars_prompt: + - name: "nameSpace" + default: "my-kogito-project" + prompt: "Insert your Project Name/ NameSpace" + private: "no" + - name: "PullSecret" + prompt: "Insert your Pull secret" + + tasks: + - debug: msg="Project Name {{ nameSpace }}" + + - name: Copy Kogito cli + get_url: + url: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" + dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" + + - name: Extract Kogito cli archive + unarchive: + src: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" + dest: "/tmp/" + + - name: Check that oc exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/kogito" + register: stat_result + + - name: Creates user home kogito dir + file: + path: "/home/{{ ansible_user_id}}/.local/bin/" + state: directory + when: stat_result.stat.exists == False + + - name: Move kogito from /tmp to /home/{{ansible_user_id}}/.local/bin + command: "mv /tmp/kogito /home/{{ansible_user_id}}/.local/bin/" + when: stat_result.stat.exists == False + + - name: CRC setup + shell: "crc setup" + register: crc_result + + - debug: msg="{{ crc_result }}" + + - name: Write pull secret + copy: + content: "{{ PullSecret }}" + dest: "~/.crc/crc-pull-secret" + + - name: Download Kogito Examples pom + get_url: + url: "https://raw.githubusercontent.com/kiegroup/kogito-examples/stable/pom.xml" + dest: "/tmp/examples_pom.xml" + + - name: "Get Kogito Examples " + shell: xmllint --xpath '/*[local-name()="project"]/*[local-name()="modules"]' /tmp/examples_pom.xml > ~/.crc/quarkus_examples.txt + + - name: Replace modules tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '' + + - name: Replace module tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '- ' + + - name: Replace end module tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '' + + - name: Replace end modules tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '\n' + + - name: Start CRC with {{ ram }}MB (~ 10 minutes) + shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" + + - name: Login crc + shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" + + - name: Create {{ nameSpace }} + shell: "oc new-project {{ nameSpace }}" + + - name: Use {{ nameSpace }} proect + shell: "oc project {{ nameSpace }}" + + - name: Kogito use {{ nameSpace }} + shell: "kogito use-project {{ nameSpace }}" + register: kogito_use_project_result + ignore_errors: yes + + - debug: msg="{{ kogito_use_project_result }}" + + - name: Kogito install operator on {{ nameSpace }} + shell: "kogito install operator -p {{ nameSpace }}" + register: kogito_install_operator_result + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result_one + + - debug: msg="{{ result_one }}" + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} wait for up to 120 sec, poll every 10 sec, 12 times + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result + until: result.stdout.find("Running") != -1 + async: 120 + poll: 10 + retries: 12 + + - debug: msg="Project Name {{ nameSpace }}" + + - debug: msg="Your Kube Password is {{ kube_password }}" \ No newline at end of file diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml new file mode 100644 index 0000000000..6867af2934 --- /dev/null +++ b/kogito-ansible/playbook_deploy.yaml @@ -0,0 +1,55 @@ +--- + - name: Start CRC 1.10.0 and deploy kogito examples + hosts: localhost + gather_facts: true + + vars: + libvirt_version: "4.4.3" + ram: "16384" #MB + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" + examples: "{{ lookup('file', '~/.crc/quarkus_examples.txt') }}" + + vars_prompt: + - name: "nameSpace" + prompt: "Insert your Project Name/ NameSpace" + default: "my-kogito-project" + private: "no" + + - name: "example" + prompt: "Choose the example to deploy" + default: "\n{{ examples }}" + private: "no" + + tasks: + + - debug: msg="Project Name {{ nameSpace }}" + + - name: Start CRC with {{ ram }}MB (~ 10 minutes) + shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" + + - name: Login crc + shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" + ignore_errors: yes + + - name: Kogito use {{ nameSpace }} + shell: "kogito use-project {{ nameSpace }}" + register: kogito_use_project_result + ignore_errors: yes + + - debug: msg="{{ kogito_use_project_result }}" + + - name: Deploy {{ example }} + shell: "kogito deploy-service {{ example }} https://github.com/kiegroup/kogito-examples/ --context-dir={{ example }}" + register: install_drools_quarkus_example + ignore_errors: yes + + - debug: msg="{{ install_drools_quarkus_example }}" + + - debug: msg="Project Name {{ nameSpace }}" + + - debug: msg="Your Kube Password is {{ kube_password }}" + + - name: Open browser + shell: "crc console" + + diff --git a/kogito-ansible/playbook_etc_hosts.yaml b/kogito-ansible/playbook_etc_hosts.yaml new file mode 100644 index 0000000000..1aab83941f --- /dev/null +++ b/kogito-ansible/playbook_etc_hosts.yaml @@ -0,0 +1,28 @@ +--- +- name: Checks etc/hosts config + hosts: localhost + + vars: + kafka_cluster_name: "my-cluster-kafka" + app_namespace: "my-kogito-project" + ip_on_etc_hosts: 192.168.130.11 + + tasks: + + - name: Check api in hosts + lineinfile: + path: /etc/hosts + line: "{{ip_on_etc_hosts}} api.crc.testing" + create: yes + + - name: Check oauth in hosts + lineinfile: + path: /etc/hosts + line: "{{ip_on_etc_hosts}} oauth-openshift.apps-crc.testing" + create: yes + + - name: Check console in hosts + lineinfile: + path: /etc/hosts + line: "{{ip_on_etc_hosts}} console-openshift-console.apps-crc.testing" + create: yes \ No newline at end of file diff --git a/kogito-ansible/playbook_libs.yaml b/kogito-ansible/playbook_libs.yaml new file mode 100644 index 0000000000..fdae422dae --- /dev/null +++ b/kogito-ansible/playbook_libs.yaml @@ -0,0 +1,11 @@ +--- +- name: Install libs on Debian/Ubuntu + hosts: localhost + gather_facts: true + + tasks: + + - name: install + shell: "sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system network-manager -y" + become: yes + when: ansible_os_family == 'Debian' \ No newline at end of file From 35f6e3a568be637fcd8f8b4d7f6167cc74cecffa Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 18 May 2020 19:33:25 +0200 Subject: [PATCH 21/37] changes requested by reviewer --- kogito-ansible/README.md | 67 +++++++++++++++++++++++------ kogito-ansible/playbook_crc.yaml | 25 +++++------ kogito-ansible/playbook_create.yaml | 29 +++++++------ kogito-ansible/playbook_deploy.yaml | 4 +- kogito-ansible/playbook_libs.yaml | 24 ++++++++--- 5 files changed, 105 insertions(+), 44 deletions(-) diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index 352cbdebda..d6925b3c1f 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -1,25 +1,64 @@ # Openshift (CRC) Kogito ansible automation +Tested on Fedora 31/32 and Ubuntu 19.10 + Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. -CRC 1.10.0, and Ansible must be installed. -No previous CRC setup (no /home/{user}/.crc folder), otherwise the create script will fail, delete .crc if you want run more than once the create playbook +Ansible must be installed. + ### Create an account on cloud.redhat.com -https://cloud.redhat.com/openshift/install and download or copy your Pull secret from the the laptop installation https://cloud.redhat.com/openshift/install/crc/installer-provisioned +https://cloud.redhat.com/openshift/install and download or copy your Pull secret from the laptop installation https://cloud.redhat.com/openshift/install/crc/installer-provisioned + + +## Fedora +### Install LibVirt libs +```sh +sudo ansible-playbook ./playbook_libs.yaml +``` ### Install CRC (If you haven't already installed) -Pre requisite on Debian/Ubuntu: +Download and copy CRC in the user's path (2GB), +change the app_name (my-kafka-project) in the file if you want different name +```sh +ansible-playbook ./playbook_crc.yaml +``` -Install libvirt libs on Debian/Ubuntu only: +Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") ```sh -sudo ansible-playbook ./playbook_libs.yaml +sudo ansible-playbook ./playbook_etc_hosts.yaml +``` + +### Install Kogito on CRC +The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. +The name of the Project to create and the Pull secret will be asked in the beginning of the run. +To use the default project name (my-kogito-project) just press enter. +```sh +ansible-playbook ./playbook_create.yaml +``` + +### Deploy Kogito Examples +To deploy one of the kogito examples, enter the name of one of the example, +at the end the browser show you the login page, the output of the deploy with the instructions to see +the logs from cli will be on the ansible output. +```sh +ansible-playbook ./playbook_deploy.yaml ``` + +## Ubuntu + +### Install LibVirt libs +```sh +sudo ansible-playbook ./playbook_libs.yaml +``` + +### Install CRC +(If you haven't already installed) Download and copy CRC in the user's path (2GB), change the app_name (my-kafka-project) in the file if you want different name ```sh @@ -41,17 +80,21 @@ To use the default project name (my-kogito-project) just press enter. ```sh ansible-playbook ./playbook_create.yaml ``` -Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording - -Video Duration: 1:39 min. -[![asciicast](https://asciinema.org/a/313700.png)](https://asciinema.org/a/313700) - - +### Deploy Kogito Examples To deploy one of the kogito examples, enter the name of one of the example, at the end the browser show you the login page, the output of the deploy with the instructions to see the logs from cli will be on the ansible output. ```sh ansible-playbook ./playbook_deploy.yaml ``` + +## Videos +Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording + +### Setup CRC +Video Duration: 1:39 min. +[![asciicast](https://asciinema.org/a/313700.png)](https://asciinema.org/a/313700) + +### Deploy Kpgotp Examples Video Duration 27:sec [![asciicast](https://asciinema.org/a/313703.png)](https://asciinema.org/a/313703) diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml index cbe90aa237..e977f83eb8 100644 --- a/kogito-ansible/playbook_crc.yaml +++ b/kogito-ansible/playbook_crc.yaml @@ -1,10 +1,12 @@ --- - name: Install CRC hosts: localhost - gather_facts: true vars: crc_version: "1.10.0" + crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" + crc_tmp_dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" + crc_package_name: "crc-linux-{{crc_version}}-amd64" tasks: @@ -18,27 +20,26 @@ path: "/home/{{ ansible_user_id }}/.local/bin/crc" register: stat_result - - name: Check if crc-linux-{{crc_version}}-amd64/crc exists in /tmp/ + - name: Check if {{ crc_package_name }}/crc exists in /tmp/ stat: - path: "/tmp/crc-linux-{{crc_version}}-amd64/crc" + path: "/tmp/{{ crc_package_name }}/crc" register: stat_result - when: stat_result.stat.exists == False - - name: "Download crc {{crc_version}} ~2GB, this takes time and depends on your connection speed" + - name: "Download crc {{ crc_version }} ~2GB, this takes time and depends on your connection speed" get_url: - url: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" - dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" + url: "{{ crc_url_file }}" + dest: "{{ crc_tmp_dest }}" when: stat_result.stat.exists == False - - name: Extract crc-linux-{{crc_version}}-amd64.tar.xz into tmp + - name: Extract {{ crc_package_name }}.tar.xz into tmp unarchive: - src: /tmp/crc-linux-{{crc_version}}-amd64.tar.xz + src: "{{ crc_tmp_dest }}" dest: /tmp when: stat_result.stat.exists == False - - name: Check if crc-linux-{{crc_version}}-amd64/crc exists in /tmp/ + - name: Check if {{ crc_package_name }}/crc exists in /tmp/ stat: - path: "/tmp/crc-linux-{{crc_version}}-amd64/crc" + path: "/tmp/{{ crc_package_name }}/crc" register: stat_result - name: Check if crc exists in /home/{{ansible_user_id}}/.local/bin/ @@ -48,7 +49,7 @@ when: stat_result.stat.exists == True - name: Move crc from /tmp/crc-linux-{{crc_version}}-amd64 to /home/{{ansible_user_id}}/.local/bin - command: "mv /tmp/crc-linux-{{crc_version}}-amd64/crc /home/{{ansible_user_id}}/.local/bin/" + command: "mv /tmp/{{ crc_package_name }}/crc /home/{{ansible_user_id}}/.local/bin/" when: stat_result.stat.exists == False - name: crc libvirt group diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index 218db98691..1855e66bdc 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -1,7 +1,6 @@ --- - - name: Start CRC 1.10.0 and deploy Kogito Operator and CLI + - name: Start CRC and deploy Kogito Operator and CLI hosts: localhost - gather_facts: true vars: kogito_tag: "0.10.0" @@ -9,6 +8,8 @@ libvirt_version: "4.4.3" ip_on_etc_hosts: 192.168.130.11 kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" + kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" + kogito_tmp_dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" vars_prompt: - name: "nameSpace" @@ -21,20 +22,22 @@ tasks: - debug: msg="Project Name {{ nameSpace }}" + - name: Check that kogito cli exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/kogito" + register: stat_result + - name: Copy Kogito cli get_url: - url: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" - dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" + url: "{{kogito_url_file}}" + dest: "{{ kogito_tmp_dest }}" + when: stat_result.stat.exists == False - name: Extract Kogito cli archive unarchive: - src: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" + src: "{{ kogito_tmp_dest }}" dest: "/tmp/" - - - name: Check that oc exists in /home/{{ansible_user_id}}/.local/bin/ - stat: - path: "/home/{{ ansible_user_id }}/.local/bin/kogito" - register: stat_result + when: stat_result.stat.exists == False - name: Creates user home kogito dir file: @@ -57,9 +60,9 @@ content: "{{ PullSecret }}" dest: "~/.crc/crc-pull-secret" - - name: Download Kogito Examples pom - get_url: - url: "https://raw.githubusercontent.com/kiegroup/kogito-examples/stable/pom.xml" + - name: Copy Kogito Examples pom + copy: + src: "./../pom.xml" dest: "/tmp/examples_pom.xml" - name: "Get Kogito Examples " diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml index 6867af2934..24f8697b17 100644 --- a/kogito-ansible/playbook_deploy.yaml +++ b/kogito-ansible/playbook_deploy.yaml @@ -1,13 +1,13 @@ --- - name: Start CRC 1.10.0 and deploy kogito examples hosts: localhost - gather_facts: true vars: libvirt_version: "4.4.3" ram: "16384" #MB kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" examples: "{{ lookup('file', '~/.crc/quarkus_examples.txt') }}" + examples_repo: "https://github.com/kiegroup/kogito-examples/" vars_prompt: - name: "nameSpace" @@ -39,7 +39,7 @@ - debug: msg="{{ kogito_use_project_result }}" - name: Deploy {{ example }} - shell: "kogito deploy-service {{ example }} https://github.com/kiegroup/kogito-examples/ --context-dir={{ example }}" + shell: "kogito deploy-service {{ example }} {{ examples_repo }} --context-dir={{ example }}" register: install_drools_quarkus_example ignore_errors: yes diff --git a/kogito-ansible/playbook_libs.yaml b/kogito-ansible/playbook_libs.yaml index fdae422dae..2ed99a4884 100644 --- a/kogito-ansible/playbook_libs.yaml +++ b/kogito-ansible/playbook_libs.yaml @@ -1,11 +1,25 @@ --- -- name: Install libs on Debian/Ubuntu +- name: Install libs on Fedora/Ubuntu hosts: localhost - gather_facts: true tasks: - - name: install - shell: "sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system network-manager -y" + - name: CheckOS + assert: + that: + - "ansible_os_family == 'Debian' or ansible_os_family == 'RedHat'" + + - name: Install Virtualization on Ubuntu + apt: + pkg: + - qemu-kvm + - libvirt-daemon + - libvirt-daemon-system + - network-manager + become: yes + when: ansible_os_family == 'Debian' + + - name: Install Virtualization on Fedora + shell: "sudo dnf install @virtualization -y" become: yes - when: ansible_os_family == 'Debian' \ No newline at end of file + when: ansible_os_family == 'RedHat' \ No newline at end of file From da2fcb654687e716241b2b11b99e3437d4f50f15 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 18 May 2020 20:37:21 +0200 Subject: [PATCH 22/37] changes requested by reviewer --- kogito-ansible/README.md | 14 ++----------- kogito-ansible/playbook_etc_hosts.yaml | 28 -------------------------- 2 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 kogito-ansible/playbook_etc_hosts.yaml diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index d6925b3c1f..cd79ee2551 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -27,11 +27,6 @@ change the app_name (my-kafka-project) in the file if you want different name ansible-playbook ./playbook_crc.yaml ``` -Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") -```sh -sudo ansible-playbook ./playbook_etc_hosts.yaml -``` - ### Install Kogito on CRC The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. The name of the Project to create and the Pull secret will be asked in the beginning of the run. @@ -65,13 +60,6 @@ change the app_name (my-kafka-project) in the file if you want different name ansible-playbook ./playbook_crc.yaml ``` -Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") -```sh -sudo ansible-playbook ./playbook_etc_hosts.yaml -``` - - - ### Install Kogito on CRC The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. @@ -88,6 +76,8 @@ the logs from cli will be on the ansible output. ansible-playbook ./playbook_deploy.yaml ``` + + ## Videos Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording diff --git a/kogito-ansible/playbook_etc_hosts.yaml b/kogito-ansible/playbook_etc_hosts.yaml deleted file mode 100644 index 1aab83941f..0000000000 --- a/kogito-ansible/playbook_etc_hosts.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- name: Checks etc/hosts config - hosts: localhost - - vars: - kafka_cluster_name: "my-cluster-kafka" - app_namespace: "my-kogito-project" - ip_on_etc_hosts: 192.168.130.11 - - tasks: - - - name: Check api in hosts - lineinfile: - path: /etc/hosts - line: "{{ip_on_etc_hosts}} api.crc.testing" - create: yes - - - name: Check oauth in hosts - lineinfile: - path: /etc/hosts - line: "{{ip_on_etc_hosts}} oauth-openshift.apps-crc.testing" - create: yes - - - name: Check console in hosts - lineinfile: - path: /etc/hosts - line: "{{ip_on_etc_hosts}} console-openshift-console.apps-crc.testing" - create: yes \ No newline at end of file From e76eb8ecbbdc2c081f28b54a3bb08c926862b336 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 25 May 2020 12:24:05 +0200 Subject: [PATCH 23/37] changes requested by reviewer --- README.md | 2 +- kogito-ansible/README.md | 8 +++++--- kogito-ansible/playbook_libs.yaml | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d8582dd3df..acd40a4249 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ Every example has a directory named `operator` including the YAML files to deplo Please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift) of how to install the operator to your environment in order to try it there. -## Deploying the Kogito example applications on OpenShift CRC using Ansible playbooks +## Deploying the Kogito example applications locally with OpenShift CRC using Ansible playbooks In the [Kogito Ansible folder](kogito-ansible/README.md) you find the documentation plus some external videos about how to setup Openshift locally (CRC) and deploy the kogito examples using ansible, with few commands \ No newline at end of file diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index cd79ee2551..927d5a9f9e 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -1,10 +1,12 @@ # Openshift (CRC) Kogito ansible automation -Tested on Fedora 31/32 and Ubuntu 19.10 +### Prerequisite +Tested on Fedora 31/32 and Ubuntu 19/20 +Default values are 9GB of ram and 22GB of diskspace. Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. - -Ansible must be installed. +[Ansible must be installed](https://docs.ansible.com/ansible/latest/installation_guide/index.html) +. ### Create an account on cloud.redhat.com diff --git a/kogito-ansible/playbook_libs.yaml b/kogito-ansible/playbook_libs.yaml index 2ed99a4884..a9bcd48da8 100644 --- a/kogito-ansible/playbook_libs.yaml +++ b/kogito-ansible/playbook_libs.yaml @@ -20,6 +20,8 @@ when: ansible_os_family == 'Debian' - name: Install Virtualization on Fedora - shell: "sudo dnf install @virtualization -y" + dnf: + name: + - "@virtualization" become: yes when: ansible_os_family == 'RedHat' \ No newline at end of file From 260aa186834b6e33e0c4148a86c52fdd0516252d Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 25 May 2020 17:41:18 +0200 Subject: [PATCH 24/37] changes requested by reviewer --- kogito-ansible/playbook_crc.yaml | 47 ++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml index e977f83eb8..a9ebbc3191 100644 --- a/kogito-ansible/playbook_crc.yaml +++ b/kogito-ansible/playbook_crc.yaml @@ -3,13 +3,44 @@ hosts: localhost vars: - crc_version: "1.10.0" - crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" - crc_tmp_dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" - crc_package_name: "crc-linux-{{crc_version}}-amd64" + release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" + crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz" - tasks: + pre_tasks: + - name: Download latest version file + get_url: + url: "{{ release_file }}" + dest: "/tmp/release-info.json" + + - name : read json + uri: + url: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json + return_content: yes + register: jsoncontent + + - set_fact: + crcVersion: "{{ jsoncontent.json.version.crcVersion }}" + register: crcVersion + + - debug: msg="Crc version {{ crcVersion }}" + + - set_fact: + openshiftVersion: "{{ jsoncontent.json.version.openshiftVersion }}" + register: openshiftVersion + - debug: msg="Openshift version {{ openshiftVersion }}" + + + - set_fact: + crc_tmp_dest: "/tmp/crc-linux-{{ crcVersion }}-amd64.tar.xz" + register: crc_tmp_dest + + - set_fact: + crc_package_name: "crc-linux-{{ crcVersion }}-amd64" + register: crc_package_name + + tasks: + - - name: Create .local/bin/ file: path: /home/{{ansible_user_id}}/.local/bin/ @@ -20,12 +51,12 @@ path: "/home/{{ ansible_user_id }}/.local/bin/crc" register: stat_result - - name: Check if {{ crc_package_name }}/crc exists in /tmp/ + - name: Check if crc-linux-{{ crcVersion }}-amd64 /crc exists in /tmp/ stat: path: "/tmp/{{ crc_package_name }}/crc" register: stat_result - - name: "Download crc {{ crc_version }} ~2GB, this takes time and depends on your connection speed" + - name: "Download crc ~2GB into {{ crc_tmp_dest }}, this takes time and depends on your connection speed" get_url: url: "{{ crc_url_file }}" dest: "{{ crc_tmp_dest }}" @@ -48,7 +79,7 @@ register: stat_result when: stat_result.stat.exists == True - - name: Move crc from /tmp/crc-linux-{{crc_version}}-amd64 to /home/{{ansible_user_id}}/.local/bin + - name: Move crc from /tmp/crc-linux-{{crcVersion}}-amd64 to /home/{{ansible_user_id}}/.local/bin command: "mv /tmp/{{ crc_package_name }}/crc /home/{{ansible_user_id}}/.local/bin/" when: stat_result.stat.exists == False From 5489c7b19c0650a19d05025d16a6e33e41ab45a7 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 May 2020 09:36:33 +0200 Subject: [PATCH 25/37] versions come from release/tag files --- kogito-ansible/playbook_create.yaml | 309 ++++++++++++++++------------ 1 file changed, 176 insertions(+), 133 deletions(-) diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index 1855e66bdc..9f3d6024aa 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -1,134 +1,177 @@ --- - - name: Start CRC and deploy Kogito Operator and CLI - hosts: localhost - - vars: - kogito_tag: "0.10.0" - ram: "16384" #MB - libvirt_version: "4.4.3" - ip_on_etc_hosts: 192.168.130.11 - kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" - kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" - kogito_tmp_dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" - - vars_prompt: - - name: "nameSpace" - default: "my-kogito-project" - prompt: "Insert your Project Name/ NameSpace" - private: "no" - - name: "PullSecret" - prompt: "Insert your Pull secret" - - tasks: - - debug: msg="Project Name {{ nameSpace }}" - - - name: Check that kogito cli exists in /home/{{ansible_user_id}}/.local/bin/ - stat: - path: "/home/{{ ansible_user_id }}/.local/bin/kogito" - register: stat_result - - - name: Copy Kogito cli - get_url: - url: "{{kogito_url_file}}" - dest: "{{ kogito_tmp_dest }}" - when: stat_result.stat.exists == False - - - name: Extract Kogito cli archive - unarchive: - src: "{{ kogito_tmp_dest }}" - dest: "/tmp/" - when: stat_result.stat.exists == False - - - name: Creates user home kogito dir - file: - path: "/home/{{ ansible_user_id}}/.local/bin/" - state: directory - when: stat_result.stat.exists == False - - - name: Move kogito from /tmp to /home/{{ansible_user_id}}/.local/bin - command: "mv /tmp/kogito /home/{{ansible_user_id}}/.local/bin/" - when: stat_result.stat.exists == False - - - name: CRC setup - shell: "crc setup" - register: crc_result - - - debug: msg="{{ crc_result }}" - - - name: Write pull secret - copy: - content: "{{ PullSecret }}" - dest: "~/.crc/crc-pull-secret" - - - name: Copy Kogito Examples pom - copy: - src: "./../pom.xml" - dest: "/tmp/examples_pom.xml" - - - name: "Get Kogito Examples " - shell: xmllint --xpath '/*[local-name()="project"]/*[local-name()="modules"]' /tmp/examples_pom.xml > ~/.crc/quarkus_examples.txt - - - name: Replace modules tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '' - - - name: Replace module tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '- ' - - - name: Replace end module tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '' - - - name: Replace end modules tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '\n' - - - name: Start CRC with {{ ram }}MB (~ 10 minutes) - shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" - - - name: Login crc - shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" - - - name: Create {{ nameSpace }} - shell: "oc new-project {{ nameSpace }}" - - - name: Use {{ nameSpace }} proect - shell: "oc project {{ nameSpace }}" - - - name: Kogito use {{ nameSpace }} - shell: "kogito use-project {{ nameSpace }}" - register: kogito_use_project_result - ignore_errors: yes - - - debug: msg="{{ kogito_use_project_result }}" - - - name: Kogito install operator on {{ nameSpace }} - shell: "kogito install operator -p {{ nameSpace }}" - register: kogito_install_operator_result - - - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} - shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" - register: result_one - - - debug: msg="{{ result_one }}" - - - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} wait for up to 120 sec, poll every 10 sec, 12 times - shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" - register: result - until: result.stdout.find("Running") != -1 - async: 120 - poll: 10 - retries: 12 - - - debug: msg="Project Name {{ nameSpace }}" - - - debug: msg="Your Kube Password is {{ kube_password }}" \ No newline at end of file +- name: Start CRC and deploy Kogito Operator and CLI + hosts: localhost + + vars: + release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" + ram: "16384" #MB + + vars_prompt: + - name: "nameSpace" + default: "my-kogito-project" + prompt: "Insert your Project Name/ NameSpace" + private: "no" + - name: "PullSecret" + prompt: "Insert your Pull secret" + + pre_tasks: + + - name: Download latest version file + get_url: + url: "{{ release_file }}" + dest: "/tmp/release-info.json" + + - name: read json + uri: + url: "{{ release_file }}" + return_content: yes + register: jsoncontent + + - set_fact: + crcVersion: "{{ jsoncontent.json.version.crcVersion }}" + register: crcVersion + + - debug: msg="Crc version {{ crcVersion }}" + + - set_fact: + openshiftVersion: "{{ jsoncontent.json.version.openshiftVersion }}" + register: openshiftVersion + + - debug: msg="Openshift version {{ openshiftVersion }}" + + + - name: Kogito latest tag + uri: + url: https://api.github.com/repos/kiegroup/kogito-runtimes/tags + register: json_response + + - set_fact: + kogitoTag: "0.10.0" + #kogitoTag: "{{ json_response.json[0]['name'] }}" uncomment when kogito operator will be released + register: kogitoTag + + - debug: msg="Kogito latest tag:{{ kogitoTag }}" + + - set_fact: + kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogitoTag }}/kogito-cli-{{ kogitoTag }}-linux-amd64.tar.gz" + + - set_fact: + kogito_tmp_dest: "/tmp/kogito-{{ kogitoTag }}-linux-amd64.tar.gz" + + + tasks: + - debug: msg="Project Name {{ nameSpace }}" + + - name: Check that kogito cli exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/kogito" + register: stat_result + + - name: Copy Kogito cli + get_url: + url: "{{kogito_url_file}}" + dest: "{{ kogito_tmp_dest }}" + when: stat_result.stat.exists == False + + - name: Extract Kogito cli archive + unarchive: + src: "{{ kogito_tmp_dest }}" + dest: "/tmp/" + when: stat_result.stat.exists == False + + - name: Creates user home kogito dir + file: + path: "/home/{{ ansible_user_id}}/.local/bin/" + state: directory + when: stat_result.stat.exists == False + + - name: Move kogito from /tmp to /home/{{ansible_user_id}}/.local/bin + command: "mv /tmp/kogito /home/{{ansible_user_id}}/.local/bin/" + when: stat_result.stat.exists == False + + - name: CRC setup + shell: "crc setup" + register: crc_result + + - debug: msg="{{ crc_result }}" + + - name: Write pull secret + copy: + content: "{{ PullSecret }}" + dest: "~/.crc/crc-pull-secret" + + - name: Copy Kogito Examples pom + copy: + src: "./../pom.xml" + dest: "/tmp/examples_pom.xml" + + - name: "Get Kogito Examples " + shell: xmllint --xpath '/*[local-name()="project"]/*[local-name()="modules"]' /tmp/examples_pom.xml > ~/.crc/kogito-examples.txt + + - name: Replace modules tags + replace: + path: ~/.crc/kogito-examples.txt + regexp: '' + replace: '' + + - name: Replace module tags + replace: + path: ~/.crc/kogito-examples.txt + regexp: '' + replace: '- ' + + - name: Replace end module tags + replace: + path: ~/.crc/kogito-examples.txt + regexp: '' + replace: '' + + - name: Replace end modules tags + replace: + path: ~/.crc/kogito-examples.txt + regexp: '' + replace: '\n' + + - name: Start CRC with {{ ram }}MB (~ 10 minutes) + shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" + + - set_fact: + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ openshiftVersion }}/kubeadmin-password') }}" + + - name: Login crc + shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" + + - name: Create {{ nameSpace }} + shell: "oc new-project {{ nameSpace }}" + + - name: Use {{ nameSpace }} proect + shell: "oc project {{ nameSpace }}" + + - name: Kogito use {{ nameSpace }} + shell: "kogito use-project {{ nameSpace }}" + register: kogito_use_project_result + ignore_errors: yes + + - debug: msg="{{ kogito_use_project_result }}" + + - name: Kogito install operator on {{ nameSpace }} + shell: "kogito install operator -p {{ nameSpace }}" + register: kogito_install_operator_result + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result_one + + - debug: msg="{{ result_one }}" + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} wait for up to 120 sec, poll every 10 sec, 12 times + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result + until: result.stdout.find("Running") != -1 + async: 120 + poll: 10 + retries: 12 + + - debug: msg="Project Name {{ nameSpace }}" + + - debug: msg="Your Kube Password is {{ kube_password }}" \ No newline at end of file From 1fae85748f775a03728bab46856a0660f58e815c Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 May 2020 11:35:29 +0200 Subject: [PATCH 26/37] specified exact amount of ram and added pretask to remove hardcoded versions --- kogito-ansible/README.md | 2 +- kogito-ansible/playbook_crc.yaml | 7 ++----- kogito-ansible/playbook_create.yaml | 8 ++------ kogito-ansible/playbook_deploy.yaml | 32 +++++++++++++++++++++-------- 4 files changed, 29 insertions(+), 20 deletions(-) diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index 927d5a9f9e..69f5e5af8a 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -2,7 +2,7 @@ ### Prerequisite Tested on Fedora 31/32 and Ubuntu 19/20 -Default values are 9GB of ram and 22GB of diskspace. +Default values for the installation are 13GB of ram and 22GB of diskspace. Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. [Ansible must be installed](https://docs.ansible.com/ansible/latest/installation_guide/index.html) diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml index a9ebbc3191..434a3048d2 100644 --- a/kogito-ansible/playbook_crc.yaml +++ b/kogito-ansible/playbook_crc.yaml @@ -7,15 +7,12 @@ crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz" pre_tasks: - - name: Download latest version file - get_url: - url: "{{ release_file }}" - dest: "/tmp/release-info.json" - name : read json uri: - url: https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json + url: "{{ release_file }}" return_content: yes + timeout: 60 register: jsoncontent - set_fact: diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index 9f3d6024aa..ca740dae3d 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -4,7 +4,7 @@ vars: release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" - ram: "16384" #MB + ram: "13312" #MB vars_prompt: - name: "nameSpace" @@ -16,14 +16,10 @@ pre_tasks: - - name: Download latest version file - get_url: - url: "{{ release_file }}" - dest: "/tmp/release-info.json" - - name: read json uri: url: "{{ release_file }}" + timeout: 60 return_content: yes register: jsoncontent diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml index 24f8697b17..4bb0bd82c5 100644 --- a/kogito-ansible/playbook_deploy.yaml +++ b/kogito-ansible/playbook_deploy.yaml @@ -1,15 +1,16 @@ --- - - name: Start CRC 1.10.0 and deploy kogito examples + - name: Start CRC and deploy kogito examples hosts: localhost vars: - libvirt_version: "4.4.3" - ram: "16384" #MB - kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" - examples: "{{ lookup('file', '~/.crc/quarkus_examples.txt') }}" + + release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" + ram: "13312" #MB + examples: "{{ lookup('file', '~/.crc/kogito-examples.txt') }}" examples_repo: "https://github.com/kiegroup/kogito-examples/" vars_prompt: + - name: "nameSpace" prompt: "Insert your Project Name/ NameSpace" default: "my-kogito-project" @@ -20,6 +21,20 @@ default: "\n{{ examples }}" private: "no" + pre_tasks: + + - name: read json + uri: + url: "{{ release_file }}" + return_content: yes + register: jsoncontent + + - set_fact: + openshiftVersion: "{{ jsoncontent.json.version.openshiftVersion }}" + register: openshiftVersion + + - debug: msg="Openshift version {{ openshiftVersion }}" + tasks: - debug: msg="Project Name {{ nameSpace }}" @@ -47,9 +62,10 @@ - debug: msg="Project Name {{ nameSpace }}" + - set_fact: + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ openshiftVersion }}/kubeadmin-password') }}" + - debug: msg="Your Kube Password is {{ kube_password }}" - name: Open browser - shell: "crc console" - - + shell: "crc console" \ No newline at end of file From 78f40187ca76d1603d786061eda5add0c5860dbc Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 May 2020 14:12:24 +0200 Subject: [PATCH 27/37] enabled the tag and ram input --- kogito-ansible/playbook_create.yaml | 22 +++++++++------------- kogito-ansible/playbook_deploy.yaml | 6 ++++-- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index ca740dae3d..5f02a3ce4a 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -4,7 +4,6 @@ vars: release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" - ram: "13312" #MB vars_prompt: - name: "nameSpace" @@ -13,6 +12,14 @@ private: "no" - name: "PullSecret" prompt: "Insert your Pull secret" + - name: "ram" + default: "13312" + prompt: "Ram used in #MB" + private: "no" + - name: "kogitoTag" + default: "0.10.0" + prompt: "Kogito CLI and Operator tag" + private: "no" pre_tasks: @@ -35,18 +42,7 @@ - debug: msg="Openshift version {{ openshiftVersion }}" - - - name: Kogito latest tag - uri: - url: https://api.github.com/repos/kiegroup/kogito-runtimes/tags - register: json_response - - - set_fact: - kogitoTag: "0.10.0" - #kogitoTag: "{{ json_response.json[0]['name'] }}" uncomment when kogito operator will be released - register: kogitoTag - - - debug: msg="Kogito latest tag:{{ kogitoTag }}" + - debug: msg="Kogito CLI tag:{{ kogitoTag }}" - set_fact: kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogitoTag }}/kogito-cli-{{ kogitoTag }}-linux-amd64.tar.gz" diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml index 4bb0bd82c5..d04fb97828 100644 --- a/kogito-ansible/playbook_deploy.yaml +++ b/kogito-ansible/playbook_deploy.yaml @@ -3,13 +3,15 @@ hosts: localhost vars: - release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" - ram: "13312" #MB examples: "{{ lookup('file', '~/.crc/kogito-examples.txt') }}" examples_repo: "https://github.com/kiegroup/kogito-examples/" vars_prompt: + - name: "ram" + default: "13312" + prompt: "Ram used in MB, 13312 ->13GB" + private: "no" - name: "nameSpace" prompt: "Insert your Project Name/ NameSpace" From 18c5e10cfce6fddffc6180c4dcae7a8299060a5d Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 15 May 2020 17:01:25 +0200 Subject: [PATCH 28/37] Kogito examples with ansible automation --- kogito-ansible/README.md | 37 +------------------------------ kogito-ansible/playbook_libs.yaml | 13 ++--------- 2 files changed, 3 insertions(+), 47 deletions(-) diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index 69f5e5af8a..405f3c3d44 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -1,7 +1,7 @@ # Openshift (CRC) Kogito ansible automation ### Prerequisite -Tested on Fedora 31/32 and Ubuntu 19/20 +Tested on Fedora 31/32 Default values for the installation are 13GB of ram and 22GB of diskspace. Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. @@ -45,41 +45,6 @@ the logs from cli will be on the ansible output. ansible-playbook ./playbook_deploy.yaml ``` - - -## Ubuntu - -### Install LibVirt libs -```sh -sudo ansible-playbook ./playbook_libs.yaml -``` - -### Install CRC -(If you haven't already installed) -Download and copy CRC in the user's path (2GB), -change the app_name (my-kafka-project) in the file if you want different name -```sh -ansible-playbook ./playbook_crc.yaml -``` - -### Install Kogito on CRC - -The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. -The name of the Project to create and the Pull secret will be asked in the beginning of the run. -To use the default project name (my-kogito-project) just press enter. -```sh -ansible-playbook ./playbook_create.yaml -``` -### Deploy Kogito Examples -To deploy one of the kogito examples, enter the name of one of the example, -at the end the browser show you the login page, the output of the deploy with the instructions to see -the logs from cli will be on the ansible output. -```sh -ansible-playbook ./playbook_deploy.yaml -``` - - - ## Videos Note: The CRC start spent 10 minute on a laptop, cut to few seconds in the video recording diff --git a/kogito-ansible/playbook_libs.yaml b/kogito-ansible/playbook_libs.yaml index a9bcd48da8..3ad4243916 100644 --- a/kogito-ansible/playbook_libs.yaml +++ b/kogito-ansible/playbook_libs.yaml @@ -1,5 +1,5 @@ --- -- name: Install libs on Fedora/Ubuntu +- name: Install libs on Fedora hosts: localhost tasks: @@ -7,17 +7,8 @@ - name: CheckOS assert: that: - - "ansible_os_family == 'Debian' or ansible_os_family == 'RedHat'" + - "ansible_os_family == 'RedHat'" - - name: Install Virtualization on Ubuntu - apt: - pkg: - - qemu-kvm - - libvirt-daemon - - libvirt-daemon-system - - network-manager - become: yes - when: ansible_os_family == 'Debian' - name: Install Virtualization on Fedora dnf: From da06eff9aedb61b6d6e99d117e5f77544a822fc5 Mon Sep 17 00:00:00 2001 From: max Date: Tue, 16 Jun 2020 06:40:06 -0400 Subject: [PATCH 29/37] update --- kogito-ansible/README.md | 59 ++++++++++++ kogito-ansible/playbook_crc.yaml | 19 ++++ kogito-ansible/playbook_create.yaml | 138 +++++++++++++++++++++++++++- kogito-ansible/playbook_deploy.yaml | 7 ++ kogito-ansible/playbook_libs.yaml | 21 +++++ 5 files changed, 243 insertions(+), 1 deletion(-) diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index 405f3c3d44..99c12003bf 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -1,13 +1,24 @@ # Openshift (CRC) Kogito ansible automation +<<<<<<< HEAD ### Prerequisite Tested on Fedora 31/32 Default values for the installation are 13GB of ram and 22GB of diskspace. +======= +Tested on Fedora 31/32 and Ubuntu 19.10 +>>>>>>> f3971c0... changes requested by reviewer Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. [Ansible must be installed](https://docs.ansible.com/ansible/latest/installation_guide/index.html) . +<<<<<<< HEAD + +### Create an account on cloud.redhat.com +https://cloud.redhat.com/openshift/install and download or copy your Pull secret from the laptop installation https://cloud.redhat.com/openshift/install/crc/installer-provisioned +======= +Ansible must be installed. + ### Create an account on cloud.redhat.com https://cloud.redhat.com/openshift/install and download or copy your Pull secret from the laptop installation https://cloud.redhat.com/openshift/install/crc/installer-provisioned @@ -19,10 +30,55 @@ https://cloud.redhat.com/openshift/install and download or copy your Pull secret ```sh sudo ansible-playbook ./playbook_libs.yaml ``` +>>>>>>> f3971c0... changes requested by reviewer + + +<<<<<<< HEAD +## Fedora + +### Install LibVirt libs +======= +Download and copy CRC in the user's path (2GB), +change the app_name (my-kafka-project) in the file if you want different name +```sh +ansible-playbook ./playbook_crc.yaml +``` + +Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") +>>>>>>> f3971c0... changes requested by reviewer +```sh +sudo ansible-playbook ./playbook_etc_hosts.yaml +``` + +### Install Kogito on CRC +The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. +The name of the Project to create and the Pull secret will be asked in the beginning of the run. +To use the default project name (my-kogito-project) just press enter. +```sh +ansible-playbook ./playbook_create.yaml +``` + +### Deploy Kogito Examples +To deploy one of the kogito examples, enter the name of one of the example, +at the end the browser show you the login page, the output of the deploy with the instructions to see +the logs from cli will be on the ansible output. +```sh +ansible-playbook ./playbook_deploy.yaml +``` ### Install CRC (If you haven't already installed) + +## Ubuntu + +### Install LibVirt libs +```sh +sudo ansible-playbook ./playbook_libs.yaml +``` + +### Install CRC +(If you haven't already installed) Download and copy CRC in the user's path (2GB), change the app_name (my-kafka-project) in the file if you want different name ```sh @@ -36,7 +92,10 @@ To use the default project name (my-kogito-project) just press enter. ```sh ansible-playbook ./playbook_create.yaml ``` +<<<<<<< HEAD +======= +>>>>>>> f3971c0... changes requested by reviewer ### Deploy Kogito Examples To deploy one of the kogito examples, enter the name of one of the example, at the end the browser show you the login page, the output of the deploy with the instructions to see diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml index 434a3048d2..b4b927334b 100644 --- a/kogito-ansible/playbook_crc.yaml +++ b/kogito-ansible/playbook_crc.yaml @@ -3,8 +3,15 @@ hosts: localhost vars: +<<<<<<< HEAD release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz" +======= + crc_version: "1.10.0" + crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" + crc_tmp_dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" + crc_package_name: "crc-linux-{{crc_version}}-amd64" +>>>>>>> f3971c0... changes requested by reviewer pre_tasks: @@ -48,12 +55,20 @@ path: "/home/{{ ansible_user_id }}/.local/bin/crc" register: stat_result +<<<<<<< HEAD - name: Check if crc-linux-{{ crcVersion }}-amd64 /crc exists in /tmp/ +======= + - name: Check if {{ crc_package_name }}/crc exists in /tmp/ +>>>>>>> f3971c0... changes requested by reviewer stat: path: "/tmp/{{ crc_package_name }}/crc" register: stat_result +<<<<<<< HEAD - name: "Download crc ~2GB into {{ crc_tmp_dest }}, this takes time and depends on your connection speed" +======= + - name: "Download crc {{ crc_version }} ~2GB, this takes time and depends on your connection speed" +>>>>>>> f3971c0... changes requested by reviewer get_url: url: "{{ crc_url_file }}" dest: "{{ crc_tmp_dest }}" @@ -76,7 +91,11 @@ register: stat_result when: stat_result.stat.exists == True +<<<<<<< HEAD - name: Move crc from /tmp/crc-linux-{{crcVersion}}-amd64 to /home/{{ansible_user_id}}/.local/bin +======= + - name: Move crc from /tmp/crc-linux-{{crc_version}}-amd64 to /home/{{ansible_user_id}}/.local/bin +>>>>>>> f3971c0... changes requested by reviewer command: "mv /tmp/{{ crc_package_name }}/crc /home/{{ansible_user_id}}/.local/bin/" when: stat_result.stat.exists == False diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index 5f02a3ce4a..959edbcd6b 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -1,4 +1,5 @@ --- +<<<<<<< HEAD - name: Start CRC and deploy Kogito Operator and CLI hosts: localhost @@ -166,4 +167,139 @@ - debug: msg="Project Name {{ nameSpace }}" - - debug: msg="Your Kube Password is {{ kube_password }}" \ No newline at end of file + - debug: msg="Your Kube Password is {{ kube_password }}" +======= + - name: Start CRC and deploy Kogito Operator and CLI + hosts: localhost + + vars: + kogito_tag: "0.10.0" + ram: "16384" #MB + libvirt_version: "4.4.3" + ip_on_etc_hosts: 192.168.130.11 + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" + kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" + kogito_tmp_dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" + + vars_prompt: + - name: "nameSpace" + default: "my-kogito-project" + prompt: "Insert your Project Name/ NameSpace" + private: "no" + - name: "PullSecret" + prompt: "Insert your Pull secret" + + tasks: + - debug: msg="Project Name {{ nameSpace }}" + + - name: Check that kogito cli exists in /home/{{ansible_user_id}}/.local/bin/ + stat: + path: "/home/{{ ansible_user_id }}/.local/bin/kogito" + register: stat_result + + - name: Copy Kogito cli + get_url: + url: "{{kogito_url_file}}" + dest: "{{ kogito_tmp_dest }}" + when: stat_result.stat.exists == False + + - name: Extract Kogito cli archive + unarchive: + src: "{{ kogito_tmp_dest }}" + dest: "/tmp/" + when: stat_result.stat.exists == False + + - name: Creates user home kogito dir + file: + path: "/home/{{ ansible_user_id}}/.local/bin/" + state: directory + when: stat_result.stat.exists == False + + - name: Move kogito from /tmp to /home/{{ansible_user_id}}/.local/bin + command: "mv /tmp/kogito /home/{{ansible_user_id}}/.local/bin/" + when: stat_result.stat.exists == False + + - name: CRC setup + shell: "crc setup" + register: crc_result + + - debug: msg="{{ crc_result }}" + + - name: Write pull secret + copy: + content: "{{ PullSecret }}" + dest: "~/.crc/crc-pull-secret" + + - name: Copy Kogito Examples pom + copy: + src: "./../pom.xml" + dest: "/tmp/examples_pom.xml" + + - name: "Get Kogito Examples " + shell: xmllint --xpath '/*[local-name()="project"]/*[local-name()="modules"]' /tmp/examples_pom.xml > ~/.crc/quarkus_examples.txt + + - name: Replace modules tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '' + + - name: Replace module tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '- ' + + - name: Replace end module tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '' + + - name: Replace end modules tags + replace: + path: ~/.crc/quarkus_examples.txt + regexp: '' + replace: '\n' + + - name: Start CRC with {{ ram }}MB (~ 10 minutes) + shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" + + - name: Login crc + shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" + + - name: Create {{ nameSpace }} + shell: "oc new-project {{ nameSpace }}" + + - name: Use {{ nameSpace }} proect + shell: "oc project {{ nameSpace }}" + + - name: Kogito use {{ nameSpace }} + shell: "kogito use-project {{ nameSpace }}" + register: kogito_use_project_result + ignore_errors: yes + + - debug: msg="{{ kogito_use_project_result }}" + + - name: Kogito install operator on {{ nameSpace }} + shell: "kogito install operator -p {{ nameSpace }}" + register: kogito_install_operator_result + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result_one + + - debug: msg="{{ result_one }}" + + - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} wait for up to 120 sec, poll every 10 sec, 12 times + shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" + register: result + until: result.stdout.find("Running") != -1 + async: 120 + poll: 10 + retries: 12 + + - debug: msg="Project Name {{ nameSpace }}" + + - debug: msg="Your Kube Password is {{ kube_password }}" +>>>>>>> f3971c0... changes requested by reviewer diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml index d04fb97828..854b4e824c 100644 --- a/kogito-ansible/playbook_deploy.yaml +++ b/kogito-ansible/playbook_deploy.yaml @@ -3,8 +3,15 @@ hosts: localhost vars: +<<<<<<< HEAD release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" examples: "{{ lookup('file', '~/.crc/kogito-examples.txt') }}" +======= + libvirt_version: "4.4.3" + ram: "16384" #MB + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" + examples: "{{ lookup('file', '~/.crc/quarkus_examples.txt') }}" +>>>>>>> f3971c0... changes requested by reviewer examples_repo: "https://github.com/kiegroup/kogito-examples/" vars_prompt: diff --git a/kogito-ansible/playbook_libs.yaml b/kogito-ansible/playbook_libs.yaml index 3ad4243916..1187e2fd86 100644 --- a/kogito-ansible/playbook_libs.yaml +++ b/kogito-ansible/playbook_libs.yaml @@ -1,5 +1,9 @@ --- +<<<<<<< HEAD - name: Install libs on Fedora +======= +- name: Install libs on Fedora/Ubuntu +>>>>>>> f3971c0... changes requested by reviewer hosts: localhost tasks: @@ -7,6 +11,7 @@ - name: CheckOS assert: that: +<<<<<<< HEAD - "ansible_os_family == 'RedHat'" @@ -14,5 +19,21 @@ dnf: name: - "@virtualization" +======= + - "ansible_os_family == 'Debian' or ansible_os_family == 'RedHat'" + + - name: Install Virtualization on Ubuntu + apt: + pkg: + - qemu-kvm + - libvirt-daemon + - libvirt-daemon-system + - network-manager + become: yes + when: ansible_os_family == 'Debian' + + - name: Install Virtualization on Fedora + shell: "sudo dnf install @virtualization -y" +>>>>>>> f3971c0... changes requested by reviewer become: yes when: ansible_os_family == 'RedHat' \ No newline at end of file From bb7c9063d059452f2fc67d98160e64edb7379ccc Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 18 May 2020 20:37:21 +0200 Subject: [PATCH 30/37] changes requested by reviewer --- kogito-ansible/README.md | 59 ---------------------------------------- 1 file changed, 59 deletions(-) diff --git a/kogito-ansible/README.md b/kogito-ansible/README.md index 99c12003bf..405f3c3d44 100644 --- a/kogito-ansible/README.md +++ b/kogito-ansible/README.md @@ -1,24 +1,13 @@ # Openshift (CRC) Kogito ansible automation -<<<<<<< HEAD ### Prerequisite Tested on Fedora 31/32 Default values for the installation are 13GB of ram and 22GB of diskspace. -======= -Tested on Fedora 31/32 and Ubuntu 19.10 ->>>>>>> f3971c0... changes requested by reviewer Ansible scripts to automate creation of CRC cluster and the deploy of one of the Kogito examples with just one command line. [Ansible must be installed](https://docs.ansible.com/ansible/latest/installation_guide/index.html) . -<<<<<<< HEAD - -### Create an account on cloud.redhat.com -https://cloud.redhat.com/openshift/install and download or copy your Pull secret from the laptop installation https://cloud.redhat.com/openshift/install/crc/installer-provisioned -======= -Ansible must be installed. - ### Create an account on cloud.redhat.com https://cloud.redhat.com/openshift/install and download or copy your Pull secret from the laptop installation https://cloud.redhat.com/openshift/install/crc/installer-provisioned @@ -30,55 +19,10 @@ https://cloud.redhat.com/openshift/install and download or copy your Pull secret ```sh sudo ansible-playbook ./playbook_libs.yaml ``` ->>>>>>> f3971c0... changes requested by reviewer - - -<<<<<<< HEAD -## Fedora - -### Install LibVirt libs -======= -Download and copy CRC in the user's path (2GB), -change the app_name (my-kafka-project) in the file if you want different name -```sh -ansible-playbook ./playbook_crc.yaml -``` - -Configure etc/hosts (default is kafka_cluster_name: "my-cluster-kafka" and app_namespace: "my-kafka-project") ->>>>>>> f3971c0... changes requested by reviewer -```sh -sudo ansible-playbook ./playbook_etc_hosts.yaml -``` - -### Install Kogito on CRC -The create playbook will create from scratch the crc setup, the project namespace, then download and install Kogito Operator and Kogito CLI. -The name of the Project to create and the Pull secret will be asked in the beginning of the run. -To use the default project name (my-kogito-project) just press enter. -```sh -ansible-playbook ./playbook_create.yaml -``` - -### Deploy Kogito Examples -To deploy one of the kogito examples, enter the name of one of the example, -at the end the browser show you the login page, the output of the deploy with the instructions to see -the logs from cli will be on the ansible output. -```sh -ansible-playbook ./playbook_deploy.yaml -``` ### Install CRC (If you haven't already installed) - -## Ubuntu - -### Install LibVirt libs -```sh -sudo ansible-playbook ./playbook_libs.yaml -``` - -### Install CRC -(If you haven't already installed) Download and copy CRC in the user's path (2GB), change the app_name (my-kafka-project) in the file if you want different name ```sh @@ -92,10 +36,7 @@ To use the default project name (my-kogito-project) just press enter. ```sh ansible-playbook ./playbook_create.yaml ``` -<<<<<<< HEAD -======= ->>>>>>> f3971c0... changes requested by reviewer ### Deploy Kogito Examples To deploy one of the kogito examples, enter the name of one of the example, at the end the browser show you the login page, the output of the deploy with the instructions to see From 4df8df3c150538491c91fa40926c70f8fdb6b031 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 25 May 2020 12:24:05 +0200 Subject: [PATCH 31/37] changes requested by reviewer --- kogito-ansible/playbook_libs.yaml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/kogito-ansible/playbook_libs.yaml b/kogito-ansible/playbook_libs.yaml index 1187e2fd86..3ad4243916 100644 --- a/kogito-ansible/playbook_libs.yaml +++ b/kogito-ansible/playbook_libs.yaml @@ -1,9 +1,5 @@ --- -<<<<<<< HEAD - name: Install libs on Fedora -======= -- name: Install libs on Fedora/Ubuntu ->>>>>>> f3971c0... changes requested by reviewer hosts: localhost tasks: @@ -11,7 +7,6 @@ - name: CheckOS assert: that: -<<<<<<< HEAD - "ansible_os_family == 'RedHat'" @@ -19,21 +14,5 @@ dnf: name: - "@virtualization" -======= - - "ansible_os_family == 'Debian' or ansible_os_family == 'RedHat'" - - - name: Install Virtualization on Ubuntu - apt: - pkg: - - qemu-kvm - - libvirt-daemon - - libvirt-daemon-system - - network-manager - become: yes - when: ansible_os_family == 'Debian' - - - name: Install Virtualization on Fedora - shell: "sudo dnf install @virtualization -y" ->>>>>>> f3971c0... changes requested by reviewer become: yes when: ansible_os_family == 'RedHat' \ No newline at end of file From f904f2c46a4bad1c7d7a08ee3dc3840137393505 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 25 May 2020 17:41:18 +0200 Subject: [PATCH 32/37] changes requested by reviewer --- kogito-ansible/playbook_crc.yaml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/kogito-ansible/playbook_crc.yaml b/kogito-ansible/playbook_crc.yaml index b4b927334b..434a3048d2 100644 --- a/kogito-ansible/playbook_crc.yaml +++ b/kogito-ansible/playbook_crc.yaml @@ -3,15 +3,8 @@ hosts: localhost vars: -<<<<<<< HEAD release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz" -======= - crc_version: "1.10.0" - crc_url_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/{{crc_version}}/crc-linux-amd64.tar.xz" - crc_tmp_dest: "/tmp/crc-linux-{{crc_version}}-amd64.tar.xz" - crc_package_name: "crc-linux-{{crc_version}}-amd64" ->>>>>>> f3971c0... changes requested by reviewer pre_tasks: @@ -55,20 +48,12 @@ path: "/home/{{ ansible_user_id }}/.local/bin/crc" register: stat_result -<<<<<<< HEAD - name: Check if crc-linux-{{ crcVersion }}-amd64 /crc exists in /tmp/ -======= - - name: Check if {{ crc_package_name }}/crc exists in /tmp/ ->>>>>>> f3971c0... changes requested by reviewer stat: path: "/tmp/{{ crc_package_name }}/crc" register: stat_result -<<<<<<< HEAD - name: "Download crc ~2GB into {{ crc_tmp_dest }}, this takes time and depends on your connection speed" -======= - - name: "Download crc {{ crc_version }} ~2GB, this takes time and depends on your connection speed" ->>>>>>> f3971c0... changes requested by reviewer get_url: url: "{{ crc_url_file }}" dest: "{{ crc_tmp_dest }}" @@ -91,11 +76,7 @@ register: stat_result when: stat_result.stat.exists == True -<<<<<<< HEAD - name: Move crc from /tmp/crc-linux-{{crcVersion}}-amd64 to /home/{{ansible_user_id}}/.local/bin -======= - - name: Move crc from /tmp/crc-linux-{{crc_version}}-amd64 to /home/{{ansible_user_id}}/.local/bin ->>>>>>> f3971c0... changes requested by reviewer command: "mv /tmp/{{ crc_package_name }}/crc /home/{{ansible_user_id}}/.local/bin/" when: stat_result.stat.exists == False From 0f04340e410b385dfa7d1dace2611f2783221791 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 May 2020 09:36:33 +0200 Subject: [PATCH 33/37] versions come from release/tag files --- kogito-ansible/playbook_create.yaml | 138 +--------------------------- 1 file changed, 1 insertion(+), 137 deletions(-) diff --git a/kogito-ansible/playbook_create.yaml b/kogito-ansible/playbook_create.yaml index 959edbcd6b..5f02a3ce4a 100644 --- a/kogito-ansible/playbook_create.yaml +++ b/kogito-ansible/playbook_create.yaml @@ -1,5 +1,4 @@ --- -<<<<<<< HEAD - name: Start CRC and deploy Kogito Operator and CLI hosts: localhost @@ -167,139 +166,4 @@ - debug: msg="Project Name {{ nameSpace }}" - - debug: msg="Your Kube Password is {{ kube_password }}" -======= - - name: Start CRC and deploy Kogito Operator and CLI - hosts: localhost - - vars: - kogito_tag: "0.10.0" - ram: "16384" #MB - libvirt_version: "4.4.3" - ip_on_etc_hosts: 192.168.130.11 - kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" - kogito_url_file: "https://github.com/kiegroup/kogito-cloud-operator/releases/download/{{ kogito_tag }}/kogito-cli-{{ kogito_tag }}-linux-amd64.tar.gz" - kogito_tmp_dest: "/tmp/kogito-{{ kogito_tag }}-linux-amd64.tar.gz" - - vars_prompt: - - name: "nameSpace" - default: "my-kogito-project" - prompt: "Insert your Project Name/ NameSpace" - private: "no" - - name: "PullSecret" - prompt: "Insert your Pull secret" - - tasks: - - debug: msg="Project Name {{ nameSpace }}" - - - name: Check that kogito cli exists in /home/{{ansible_user_id}}/.local/bin/ - stat: - path: "/home/{{ ansible_user_id }}/.local/bin/kogito" - register: stat_result - - - name: Copy Kogito cli - get_url: - url: "{{kogito_url_file}}" - dest: "{{ kogito_tmp_dest }}" - when: stat_result.stat.exists == False - - - name: Extract Kogito cli archive - unarchive: - src: "{{ kogito_tmp_dest }}" - dest: "/tmp/" - when: stat_result.stat.exists == False - - - name: Creates user home kogito dir - file: - path: "/home/{{ ansible_user_id}}/.local/bin/" - state: directory - when: stat_result.stat.exists == False - - - name: Move kogito from /tmp to /home/{{ansible_user_id}}/.local/bin - command: "mv /tmp/kogito /home/{{ansible_user_id}}/.local/bin/" - when: stat_result.stat.exists == False - - - name: CRC setup - shell: "crc setup" - register: crc_result - - - debug: msg="{{ crc_result }}" - - - name: Write pull secret - copy: - content: "{{ PullSecret }}" - dest: "~/.crc/crc-pull-secret" - - - name: Copy Kogito Examples pom - copy: - src: "./../pom.xml" - dest: "/tmp/examples_pom.xml" - - - name: "Get Kogito Examples " - shell: xmllint --xpath '/*[local-name()="project"]/*[local-name()="modules"]' /tmp/examples_pom.xml > ~/.crc/quarkus_examples.txt - - - name: Replace modules tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '' - - - name: Replace module tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '- ' - - - name: Replace end module tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '' - - - name: Replace end modules tags - replace: - path: ~/.crc/quarkus_examples.txt - regexp: '' - replace: '\n' - - - name: Start CRC with {{ ram }}MB (~ 10 minutes) - shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" - - - name: Login crc - shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" - - - name: Create {{ nameSpace }} - shell: "oc new-project {{ nameSpace }}" - - - name: Use {{ nameSpace }} proect - shell: "oc project {{ nameSpace }}" - - - name: Kogito use {{ nameSpace }} - shell: "kogito use-project {{ nameSpace }}" - register: kogito_use_project_result - ignore_errors: yes - - - debug: msg="{{ kogito_use_project_result }}" - - - name: Kogito install operator on {{ nameSpace }} - shell: "kogito install operator -p {{ nameSpace }}" - register: kogito_install_operator_result - - - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} - shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" - register: result_one - - - debug: msg="{{ result_one }}" - - - name: Check AvailableReplica on Kogito operator first on {{ nameSpace }} wait for up to 120 sec, poll every 10 sec, 12 times - shell: "kubectl get pods --selector=name=kogito-operator -o jsonpath='{.items[*].status.phase}'" - register: result - until: result.stdout.find("Running") != -1 - async: 120 - poll: 10 - retries: 12 - - - debug: msg="Project Name {{ nameSpace }}" - - - debug: msg="Your Kube Password is {{ kube_password }}" ->>>>>>> f3971c0... changes requested by reviewer + - debug: msg="Your Kube Password is {{ kube_password }}" \ No newline at end of file From ebd0d1005f023b1a4003310c3826512756f3361b Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 26 May 2020 11:35:29 +0200 Subject: [PATCH 34/37] specified exact amount of ram and added pretask to remove hardcoded versions --- kogito-ansible/playbook_deploy.yaml | 111 +++++++++++++--------------- 1 file changed, 52 insertions(+), 59 deletions(-) diff --git a/kogito-ansible/playbook_deploy.yaml b/kogito-ansible/playbook_deploy.yaml index 854b4e824c..268c165bd3 100644 --- a/kogito-ansible/playbook_deploy.yaml +++ b/kogito-ansible/playbook_deploy.yaml @@ -1,80 +1,73 @@ --- - - name: Start CRC and deploy kogito examples - hosts: localhost +- name: Start CRC and deploy kogito examples + hosts: localhost - vars: -<<<<<<< HEAD - release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" - examples: "{{ lookup('file', '~/.crc/kogito-examples.txt') }}" -======= - libvirt_version: "4.4.3" - ram: "16384" #MB - kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ libvirt_version }}/kubeadmin-password') }}" - examples: "{{ lookup('file', '~/.crc/quarkus_examples.txt') }}" ->>>>>>> f3971c0... changes requested by reviewer - examples_repo: "https://github.com/kiegroup/kogito-examples/" + vars: + release_file: "https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json" + examples: "{{ lookup('file', '~/.crc/kogito-examples.txt') }}" + examples_repo: "https://github.com/kiegroup/kogito-examples/" - vars_prompt: - - name: "ram" - default: "13312" - prompt: "Ram used in MB, 13312 ->13GB" - private: "no" + vars_prompt: + - name: "ram" + default: "13312" + prompt: "Ram used in MB, 13312 ->13GB" + private: "no" - - name: "nameSpace" - prompt: "Insert your Project Name/ NameSpace" - default: "my-kogito-project" - private: "no" + - name: "nameSpace" + prompt: "Insert your Project Name/ NameSpace" + default: "my-kogito-project" + private: "no" - - name: "example" - prompt: "Choose the example to deploy" - default: "\n{{ examples }}" - private: "no" + - name: "example" + prompt: "Choose the example to deploy" + default: "\n{{ examples }}" + private: "no" - pre_tasks: + pre_tasks: - - name: read json - uri: - url: "{{ release_file }}" - return_content: yes - register: jsoncontent + - name: read json + uri: + url: "{{ release_file }}" + return_content: yes + register: jsoncontent - - set_fact: - openshiftVersion: "{{ jsoncontent.json.version.openshiftVersion }}" - register: openshiftVersion + - set_fact: + openshiftVersion: "{{ jsoncontent.json.version.openshiftVersion }}" + register: openshiftVersion - - debug: msg="Openshift version {{ openshiftVersion }}" + - debug: msg="Openshift version {{ openshiftVersion }}" - tasks: + tasks: - - debug: msg="Project Name {{ nameSpace }}" + - debug: msg="Project Name {{ nameSpace }}" - - name: Start CRC with {{ ram }}MB (~ 10 minutes) - shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" + - name: Start CRC with {{ ram }}MB (~ 10 minutes) + shell: "crc start -m {{ ram }} -p ~/.crc/crc-pull-secret" - - name: Login crc - shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" - ignore_errors: yes + - name: Login crc + shell: "oc login -u kubeadmin -p {{ kube_password }} https://api.crc.testing:6443" + ignore_errors: yes - - name: Kogito use {{ nameSpace }} - shell: "kogito use-project {{ nameSpace }}" - register: kogito_use_project_result - ignore_errors: yes + - name: Kogito use {{ nameSpace }} + shell: "kogito use-project {{ nameSpace }}" + register: kogito_use_project_result + ignore_errors: yes - - debug: msg="{{ kogito_use_project_result }}" + - debug: msg="{{ kogito_use_project_result }}" - - name: Deploy {{ example }} - shell: "kogito deploy-service {{ example }} {{ examples_repo }} --context-dir={{ example }}" - register: install_drools_quarkus_example - ignore_errors: yes + - name: Deploy {{ example }} + shell: "kogito deploy-service {{ example }} {{ examples_repo }} --context-dir={{ example }}" + register: install_drools_quarkus_example + ignore_errors: yes - - debug: msg="{{ install_drools_quarkus_example }}" + - debug: msg="{{ install_drools_quarkus_example }}" - - debug: msg="Project Name {{ nameSpace }}" + - debug: msg="Project Name {{ nameSpace }}" - - set_fact: - kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ openshiftVersion }}/kubeadmin-password') }}" + - set_fact: + kube_password: "{{ lookup('file', '/home/{{ ansible_user_id }}/.crc/cache/crc_libvirt_{{ openshiftVersion }}/kubeadmin-password') }}" - - debug: msg="Your Kube Password is {{ kube_password }}" + - debug: msg="Your Kube Password is {{ kube_password }}" - - name: Open browser - shell: "crc console" \ No newline at end of file + - name: Open browser + shell: "crc console" \ No newline at end of file From 7762734ccdfb42ba6045121c0ede82107461d3d0 Mon Sep 17 00:00:00 2001 From: desmax74 Date: Tue, 16 Jun 2020 07:10:34 -0400 Subject: [PATCH 35/37] fix versions --- decisiontable-quarkus-example/pom.xml | 2 +- decisiontable-springboot-example/pom.xml | 2 +- dmn-quarkus-example/pom.xml | 2 +- dmn-springboot-example/pom.xml | 2 +- kogito-travel-agency/extended/visas/pom.xml | 2 +- kogito-travel-agency/pom.xml | 2 +- onboarding-example/hr/pom.xml | 2 +- onboarding-example/onboarding-quarkus/pom.xml | 2 +- onboarding-example/payroll/pom.xml | 2 +- onboarding-example/pom.xml | 2 +- pom.xml | 2 +- process-business-rules-quarkus/pom.xml | 2 +- process-business-rules-springboot/pom.xml | 2 +- process-infinispan-persistence-quarkus/pom.xml | 2 +- process-infinispan-persistence-springboot/pom.xml | 2 +- process-kafka-quickstart-quarkus/pom.xml | 2 +- process-kafka-quickstart-springboot/pom.xml | 2 +- process-optaplanner-springboot/pom.xml | 2 +- process-quarkus-example/pom.xml | 2 +- process-scripts-quarkus/pom.xml | 2 +- process-scripts-springboot/pom.xml | 2 +- process-service-calls-quarkus/pom.xml | 2 +- process-service-calls-springboot/pom.xml | 2 +- process-service-rest-call-quarkus/pom.xml | 2 +- process-service-rest-call-springboot/pom.xml | 2 +- process-springboot-example/pom.xml | 2 +- process-timer-quarkus/pom.xml | 2 +- process-timer-springboot/pom.xml | 2 +- process-usertasks-custom-lifecycle-quarkus/pom.xml | 2 +- process-usertasks-custom-lifecycle-springboot/pom.xml | 2 +- process-usertasks-quarkus/pom.xml | 2 +- process-usertasks-springboot/pom.xml | 2 +- process-usertasks-with-security-oidc-quarkus/pom.xml | 2 +- process-usertasks-with-security-oidc-springboot/pom.xml | 2 +- process-usertasks-with-security-quarkus/pom.xml | 2 +- process-usertasks-with-security-springboot/pom.xml | 2 +- rules-quarkus-helloworld/pom.xml | 2 +- ruleunit-quarkus-example/pom.xml | 2 +- ruleunit-springboot-example/pom.xml | 2 +- serverless-workflow-greeting-quarkus/pom.xml | 2 +- serverless-workflow-greeting-springboot/pom.xml | 2 +- serverless-workflow-service-calls-quarkus/pom.xml | 2 +- serverless-workflow-service-calls-springboot/pom.xml | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) diff --git a/decisiontable-quarkus-example/pom.xml b/decisiontable-quarkus-example/pom.xml index 83b49b884c..fec2d3677b 100644 --- a/decisiontable-quarkus-example/pom.xml +++ b/decisiontable-quarkus-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT org.kie.kogito.examples decisiontable-quarkus-example diff --git a/decisiontable-springboot-example/pom.xml b/decisiontable-springboot-example/pom.xml index 2132ca7dd1..005caf0abd 100644 --- a/decisiontable-springboot-example/pom.xml +++ b/decisiontable-springboot-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT org.kie.kogito.examples decisiontable-springboot-example diff --git a/dmn-quarkus-example/pom.xml b/dmn-quarkus-example/pom.xml index e88b234b7a..e7133d4101 100644 --- a/dmn-quarkus-example/pom.xml +++ b/dmn-quarkus-example/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT dmn-quarkus-example Kogito Example :: DMN diff --git a/dmn-springboot-example/pom.xml b/dmn-springboot-example/pom.xml index 669804b150..30a82c06e3 100644 --- a/dmn-springboot-example/pom.xml +++ b/dmn-springboot-example/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT dmn-springboot-example Kogito Example :: DMN - Spring Boot diff --git a/kogito-travel-agency/extended/visas/pom.xml b/kogito-travel-agency/extended/visas/pom.xml index cef44230e8..2f0c60dcc1 100644 --- a/kogito-travel-agency/extended/visas/pom.xml +++ b/kogito-travel-agency/extended/visas/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito <<<<<<< HEAD:kogito-travel-agency/visas/pom.xml kogito-travel-agency-example - 0.10.0 + 8.0.0-SNAPSHOT ======= kogito-travel-agency-example-extended 8.0.0-SNAPSHOT diff --git a/kogito-travel-agency/pom.xml b/kogito-travel-agency/pom.xml index 4479622454..d4ea0ffb3b 100644 --- a/kogito-travel-agency/pom.xml +++ b/kogito-travel-agency/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT kogito-travel-agency-example diff --git a/onboarding-example/hr/pom.xml b/onboarding-example/hr/pom.xml index 0088c408ee..89d3feaee7 100644 --- a/onboarding-example/hr/pom.xml +++ b/onboarding-example/hr/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito onboarding-example - 0.10.0 + 8.0.0-SNAPSHOT org.kie.kogito.examples hr diff --git a/onboarding-example/onboarding-quarkus/pom.xml b/onboarding-example/onboarding-quarkus/pom.xml index 4cc3c9168d..6b874a1fe4 100644 --- a/onboarding-example/onboarding-quarkus/pom.xml +++ b/onboarding-example/onboarding-quarkus/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito onboarding-example - 0.10.0 + 8.0.0-SNAPSHOT org.kie.kogito.examples onboarding-quarkus diff --git a/onboarding-example/payroll/pom.xml b/onboarding-example/payroll/pom.xml index 3f6f27dcca..2c370e5914 100644 --- a/onboarding-example/payroll/pom.xml +++ b/onboarding-example/payroll/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito onboarding-example - 0.10.0 + 8.0.0-SNAPSHOT org.kie.kogito.examples payroll diff --git a/onboarding-example/pom.xml b/onboarding-example/pom.xml index 01862be7e0..5a6281dccc 100644 --- a/onboarding-example/pom.xml +++ b/onboarding-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT onboarding-example pom diff --git a/pom.xml b/pom.xml index ef1f60b4fd..f20317d1cb 100755 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT pom Kogito Example diff --git a/process-business-rules-quarkus/pom.xml b/process-business-rules-quarkus/pom.xml index 11aa74d141..e67182a7d2 100644 --- a/process-business-rules-quarkus/pom.xml +++ b/process-business-rules-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-business-rules-quarkus diff --git a/process-business-rules-springboot/pom.xml b/process-business-rules-springboot/pom.xml index 0de13674f5..bd71f521b1 100644 --- a/process-business-rules-springboot/pom.xml +++ b/process-business-rules-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT Kogito Examples :: Process Business Rules Spring Boot diff --git a/process-infinispan-persistence-quarkus/pom.xml b/process-infinispan-persistence-quarkus/pom.xml index fdbd3fd8eb..6014ba7989 100644 --- a/process-infinispan-persistence-quarkus/pom.xml +++ b/process-infinispan-persistence-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-infinispan-persistence-quarkus diff --git a/process-infinispan-persistence-springboot/pom.xml b/process-infinispan-persistence-springboot/pom.xml index a50c1980ee..1889bd7658 100644 --- a/process-infinispan-persistence-springboot/pom.xml +++ b/process-infinispan-persistence-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-infinispan-persistence-springboot diff --git a/process-kafka-quickstart-quarkus/pom.xml b/process-kafka-quickstart-quarkus/pom.xml index 3a7b501d9f..90410a9b09 100644 --- a/process-kafka-quickstart-quarkus/pom.xml +++ b/process-kafka-quickstart-quarkus/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-kafka-quickstart-quarkus diff --git a/process-kafka-quickstart-springboot/pom.xml b/process-kafka-quickstart-springboot/pom.xml index d293ffdc0f..476cefe840 100644 --- a/process-kafka-quickstart-springboot/pom.xml +++ b/process-kafka-quickstart-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-kafka-quickstart-springboot diff --git a/process-optaplanner-springboot/pom.xml b/process-optaplanner-springboot/pom.xml index dee3b08697..d1672fb08f 100644 --- a/process-optaplanner-springboot/pom.xml +++ b/process-optaplanner-springboot/pom.xml @@ -4,7 +4,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT org.kie.kogito.examples process-optaplanner-springboot diff --git a/process-quarkus-example/pom.xml b/process-quarkus-example/pom.xml index ee5f60197b..8d6be03095 100755 --- a/process-quarkus-example/pom.xml +++ b/process-quarkus-example/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT org.kie.kogito.examples process-quarkus-example diff --git a/process-scripts-quarkus/pom.xml b/process-scripts-quarkus/pom.xml index dd318091e2..cd8963175c 100644 --- a/process-scripts-quarkus/pom.xml +++ b/process-scripts-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-scripts-quarkus diff --git a/process-scripts-springboot/pom.xml b/process-scripts-springboot/pom.xml index 18e133e2f1..bb8832be6d 100644 --- a/process-scripts-springboot/pom.xml +++ b/process-scripts-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-scripts-springboot diff --git a/process-service-calls-quarkus/pom.xml b/process-service-calls-quarkus/pom.xml index 6c809f5677..0a3e21cc16 100644 --- a/process-service-calls-quarkus/pom.xml +++ b/process-service-calls-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-service-calls-quarkus diff --git a/process-service-calls-springboot/pom.xml b/process-service-calls-springboot/pom.xml index 1e31d909e3..799a852150 100644 --- a/process-service-calls-springboot/pom.xml +++ b/process-service-calls-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-service-calls-springboot diff --git a/process-service-rest-call-quarkus/pom.xml b/process-service-rest-call-quarkus/pom.xml index 45bd2f0400..0d30b2d20c 100644 --- a/process-service-rest-call-quarkus/pom.xml +++ b/process-service-rest-call-quarkus/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-service-rest-call-quarkus Kogito Examples :: Process Service Rest Cal with Quarkus diff --git a/process-service-rest-call-springboot/pom.xml b/process-service-rest-call-springboot/pom.xml index 10bc1d67ca..0d1314791e 100644 --- a/process-service-rest-call-springboot/pom.xml +++ b/process-service-rest-call-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-service-rest-call-springboot diff --git a/process-springboot-example/pom.xml b/process-springboot-example/pom.xml index 7ae2579428..c4022895c9 100644 --- a/process-springboot-example/pom.xml +++ b/process-springboot-example/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT org.kie.kogito.examples process-springboot-example diff --git a/process-timer-quarkus/pom.xml b/process-timer-quarkus/pom.xml index ce8d12c6e9..5f8498b358 100644 --- a/process-timer-quarkus/pom.xml +++ b/process-timer-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-timer-quarkus diff --git a/process-timer-springboot/pom.xml b/process-timer-springboot/pom.xml index 139ff2a953..1e33c10968 100644 --- a/process-timer-springboot/pom.xml +++ b/process-timer-springboot/pom.xml @@ -4,7 +4,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT Kogito Examples :: Process Timer With Spring Boot diff --git a/process-usertasks-custom-lifecycle-quarkus/pom.xml b/process-usertasks-custom-lifecycle-quarkus/pom.xml index 876676f3c2..e639a8a135 100644 --- a/process-usertasks-custom-lifecycle-quarkus/pom.xml +++ b/process-usertasks-custom-lifecycle-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-usertasks-custom-lifecycle-quarkus diff --git a/process-usertasks-custom-lifecycle-springboot/pom.xml b/process-usertasks-custom-lifecycle-springboot/pom.xml index 3e4f63a7d4..068b559207 100644 --- a/process-usertasks-custom-lifecycle-springboot/pom.xml +++ b/process-usertasks-custom-lifecycle-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-usertasks-custom-lifecycle-springboot diff --git a/process-usertasks-quarkus/pom.xml b/process-usertasks-quarkus/pom.xml index fecdbe4f43..a13fc2478b 100644 --- a/process-usertasks-quarkus/pom.xml +++ b/process-usertasks-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-usertasks-quarkus diff --git a/process-usertasks-springboot/pom.xml b/process-usertasks-springboot/pom.xml index f6f2776091..e1e30934d4 100644 --- a/process-usertasks-springboot/pom.xml +++ b/process-usertasks-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-usertasks-springboot diff --git a/process-usertasks-with-security-oidc-quarkus/pom.xml b/process-usertasks-with-security-oidc-quarkus/pom.xml index 7d0dac471d..9d25f97039 100644 --- a/process-usertasks-with-security-oidc-quarkus/pom.xml +++ b/process-usertasks-with-security-oidc-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-usertasks-with-security-oidc-quarkus diff --git a/process-usertasks-with-security-oidc-springboot/pom.xml b/process-usertasks-with-security-oidc-springboot/pom.xml index dbfeca690b..05cc1ea88d 100644 --- a/process-usertasks-with-security-oidc-springboot/pom.xml +++ b/process-usertasks-with-security-oidc-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-usertasks-with-security-oidc-springboot diff --git a/process-usertasks-with-security-quarkus/pom.xml b/process-usertasks-with-security-quarkus/pom.xml index c612760d7d..df731c128a 100644 --- a/process-usertasks-with-security-quarkus/pom.xml +++ b/process-usertasks-with-security-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-usertasks-with-security-quarkus diff --git a/process-usertasks-with-security-springboot/pom.xml b/process-usertasks-with-security-springboot/pom.xml index 704162273c..7af9f92ba9 100644 --- a/process-usertasks-with-security-springboot/pom.xml +++ b/process-usertasks-with-security-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT process-usertasks-with-security-springboot diff --git a/rules-quarkus-helloworld/pom.xml b/rules-quarkus-helloworld/pom.xml index 734d0792d1..ab7f71ca7a 100755 --- a/rules-quarkus-helloworld/pom.xml +++ b/rules-quarkus-helloworld/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT org.kie.kogito.examples rules-quarkus-helloworld diff --git a/ruleunit-quarkus-example/pom.xml b/ruleunit-quarkus-example/pom.xml index 30d9e36453..f89d0f0d1d 100644 --- a/ruleunit-quarkus-example/pom.xml +++ b/ruleunit-quarkus-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT org.kie.kogito.examples ruleunit-quarkus-example diff --git a/ruleunit-springboot-example/pom.xml b/ruleunit-springboot-example/pom.xml index bdc48da13d..54354d5d51 100644 --- a/ruleunit-springboot-example/pom.xml +++ b/ruleunit-springboot-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT org.kie.kogito.examples ruleunit-springboot-example diff --git a/serverless-workflow-greeting-quarkus/pom.xml b/serverless-workflow-greeting-quarkus/pom.xml index 6ae26c6912..0d2e7737c0 100644 --- a/serverless-workflow-greeting-quarkus/pom.xml +++ b/serverless-workflow-greeting-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT serverless-workflow-greeting-quarkus diff --git a/serverless-workflow-greeting-springboot/pom.xml b/serverless-workflow-greeting-springboot/pom.xml index c24b3a443d..01ac2ef353 100644 --- a/serverless-workflow-greeting-springboot/pom.xml +++ b/serverless-workflow-greeting-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT serverless-workflow-greeting-springboot diff --git a/serverless-workflow-service-calls-quarkus/pom.xml b/serverless-workflow-service-calls-quarkus/pom.xml index a0bb273db1..fcf55b83d1 100644 --- a/serverless-workflow-service-calls-quarkus/pom.xml +++ b/serverless-workflow-service-calls-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT serverless-workflow-service-calls-quarkus diff --git a/serverless-workflow-service-calls-springboot/pom.xml b/serverless-workflow-service-calls-springboot/pom.xml index 550fd3fede..9c5798ef1b 100644 --- a/serverless-workflow-service-calls-springboot/pom.xml +++ b/serverless-workflow-service-calls-springboot/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 0.10.0 + 8.0.0-SNAPSHOT serverless-workflow-service-calls-springboot From fc05cff6a61a23e53fc8c74ef9753b4c7e43f4e3 Mon Sep 17 00:00:00 2001 From: desmax74 Date: Tue, 16 Jun 2020 07:12:28 -0400 Subject: [PATCH 36/37] fix versions --- decisiontable-quarkus-example/pom.xml | 2 +- decisiontable-springboot-example/pom.xml | 2 +- dmn-quarkus-example/pom.xml | 2 +- dmn-springboot-example/pom.xml | 2 +- kogito-travel-agency/extended/visas/pom.xml | 2 +- kogito-travel-agency/pom.xml | 2 +- onboarding-example/hr/pom.xml | 2 +- onboarding-example/onboarding-quarkus/pom.xml | 2 +- onboarding-example/payroll/pom.xml | 2 +- onboarding-example/pom.xml | 2 +- pom.xml | 2 +- process-business-rules-quarkus/pom.xml | 2 +- process-business-rules-springboot/pom.xml | 2 +- process-infinispan-persistence-quarkus/pom.xml | 2 +- process-infinispan-persistence-springboot/pom.xml | 2 +- process-kafka-quickstart-quarkus/pom.xml | 2 +- process-kafka-quickstart-springboot/pom.xml | 2 +- process-optaplanner-springboot/pom.xml | 2 +- process-quarkus-example/pom.xml | 2 +- process-scripts-quarkus/pom.xml | 2 +- process-scripts-springboot/pom.xml | 2 +- process-service-calls-quarkus/pom.xml | 2 +- process-service-calls-springboot/pom.xml | 2 +- process-service-rest-call-quarkus/pom.xml | 2 +- process-service-rest-call-springboot/pom.xml | 2 +- process-springboot-example/pom.xml | 2 +- process-timer-quarkus/pom.xml | 2 +- process-timer-springboot/pom.xml | 2 +- process-usertasks-custom-lifecycle-quarkus/pom.xml | 2 +- process-usertasks-custom-lifecycle-springboot/pom.xml | 2 +- process-usertasks-quarkus/pom.xml | 2 +- process-usertasks-springboot/pom.xml | 2 +- process-usertasks-with-security-oidc-quarkus/pom.xml | 2 +- process-usertasks-with-security-oidc-springboot/pom.xml | 2 +- process-usertasks-with-security-quarkus/pom.xml | 2 +- process-usertasks-with-security-springboot/pom.xml | 2 +- rules-quarkus-helloworld/pom.xml | 2 +- ruleunit-quarkus-example/pom.xml | 2 +- ruleunit-springboot-example/pom.xml | 2 +- serverless-workflow-greeting-quarkus/pom.xml | 2 +- serverless-workflow-greeting-springboot/pom.xml | 2 +- serverless-workflow-service-calls-quarkus/pom.xml | 2 +- serverless-workflow-service-calls-springboot/pom.xml | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) diff --git a/decisiontable-quarkus-example/pom.xml b/decisiontable-quarkus-example/pom.xml index fec2d3677b..1c389bb695 100644 --- a/decisiontable-quarkus-example/pom.xml +++ b/decisiontable-quarkus-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT org.kie.kogito.examples decisiontable-quarkus-example diff --git a/decisiontable-springboot-example/pom.xml b/decisiontable-springboot-example/pom.xml index 005caf0abd..0da391c29e 100644 --- a/decisiontable-springboot-example/pom.xml +++ b/decisiontable-springboot-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT org.kie.kogito.examples decisiontable-springboot-example diff --git a/dmn-quarkus-example/pom.xml b/dmn-quarkus-example/pom.xml index e7133d4101..ddb04a84d4 100644 --- a/dmn-quarkus-example/pom.xml +++ b/dmn-quarkus-example/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT dmn-quarkus-example Kogito Example :: DMN diff --git a/dmn-springboot-example/pom.xml b/dmn-springboot-example/pom.xml index 30a82c06e3..ee99d6108c 100644 --- a/dmn-springboot-example/pom.xml +++ b/dmn-springboot-example/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT dmn-springboot-example Kogito Example :: DMN - Spring Boot diff --git a/kogito-travel-agency/extended/visas/pom.xml b/kogito-travel-agency/extended/visas/pom.xml index 2f0c60dcc1..469d92a2a3 100644 --- a/kogito-travel-agency/extended/visas/pom.xml +++ b/kogito-travel-agency/extended/visas/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito <<<<<<< HEAD:kogito-travel-agency/visas/pom.xml kogito-travel-agency-example - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT ======= kogito-travel-agency-example-extended 8.0.0-SNAPSHOT diff --git a/kogito-travel-agency/pom.xml b/kogito-travel-agency/pom.xml index d4ea0ffb3b..2f1fe93601 100644 --- a/kogito-travel-agency/pom.xml +++ b/kogito-travel-agency/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT kogito-travel-agency-example diff --git a/onboarding-example/hr/pom.xml b/onboarding-example/hr/pom.xml index 89d3feaee7..1bb1917d2e 100644 --- a/onboarding-example/hr/pom.xml +++ b/onboarding-example/hr/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito onboarding-example - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT org.kie.kogito.examples hr diff --git a/onboarding-example/onboarding-quarkus/pom.xml b/onboarding-example/onboarding-quarkus/pom.xml index 6b874a1fe4..ded44ddc67 100644 --- a/onboarding-example/onboarding-quarkus/pom.xml +++ b/onboarding-example/onboarding-quarkus/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito onboarding-example - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT org.kie.kogito.examples onboarding-quarkus diff --git a/onboarding-example/payroll/pom.xml b/onboarding-example/payroll/pom.xml index 2c370e5914..564e33761d 100644 --- a/onboarding-example/payroll/pom.xml +++ b/onboarding-example/payroll/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito onboarding-example - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT org.kie.kogito.examples payroll diff --git a/onboarding-example/pom.xml b/onboarding-example/pom.xml index 5a6281dccc..127860bf08 100644 --- a/onboarding-example/pom.xml +++ b/onboarding-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT onboarding-example pom diff --git a/pom.xml b/pom.xml index f20317d1cb..4aca0e7790 100755 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT pom Kogito Example diff --git a/process-business-rules-quarkus/pom.xml b/process-business-rules-quarkus/pom.xml index e67182a7d2..12344e6153 100644 --- a/process-business-rules-quarkus/pom.xml +++ b/process-business-rules-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-business-rules-quarkus diff --git a/process-business-rules-springboot/pom.xml b/process-business-rules-springboot/pom.xml index bd71f521b1..4290b0444e 100644 --- a/process-business-rules-springboot/pom.xml +++ b/process-business-rules-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT Kogito Examples :: Process Business Rules Spring Boot diff --git a/process-infinispan-persistence-quarkus/pom.xml b/process-infinispan-persistence-quarkus/pom.xml index 6014ba7989..e5d3859b68 100644 --- a/process-infinispan-persistence-quarkus/pom.xml +++ b/process-infinispan-persistence-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-infinispan-persistence-quarkus diff --git a/process-infinispan-persistence-springboot/pom.xml b/process-infinispan-persistence-springboot/pom.xml index 1889bd7658..8db093177d 100644 --- a/process-infinispan-persistence-springboot/pom.xml +++ b/process-infinispan-persistence-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-infinispan-persistence-springboot diff --git a/process-kafka-quickstart-quarkus/pom.xml b/process-kafka-quickstart-quarkus/pom.xml index 90410a9b09..56bdc832dd 100644 --- a/process-kafka-quickstart-quarkus/pom.xml +++ b/process-kafka-quickstart-quarkus/pom.xml @@ -7,7 +7,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-kafka-quickstart-quarkus diff --git a/process-kafka-quickstart-springboot/pom.xml b/process-kafka-quickstart-springboot/pom.xml index 476cefe840..869c2e6447 100644 --- a/process-kafka-quickstart-springboot/pom.xml +++ b/process-kafka-quickstart-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-kafka-quickstart-springboot diff --git a/process-optaplanner-springboot/pom.xml b/process-optaplanner-springboot/pom.xml index d1672fb08f..5672b33233 100644 --- a/process-optaplanner-springboot/pom.xml +++ b/process-optaplanner-springboot/pom.xml @@ -4,7 +4,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT org.kie.kogito.examples process-optaplanner-springboot diff --git a/process-quarkus-example/pom.xml b/process-quarkus-example/pom.xml index 8d6be03095..6bfe67375f 100755 --- a/process-quarkus-example/pom.xml +++ b/process-quarkus-example/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT org.kie.kogito.examples process-quarkus-example diff --git a/process-scripts-quarkus/pom.xml b/process-scripts-quarkus/pom.xml index cd8963175c..605d2894f8 100644 --- a/process-scripts-quarkus/pom.xml +++ b/process-scripts-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-scripts-quarkus diff --git a/process-scripts-springboot/pom.xml b/process-scripts-springboot/pom.xml index bb8832be6d..0cb24e9fe4 100644 --- a/process-scripts-springboot/pom.xml +++ b/process-scripts-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-scripts-springboot diff --git a/process-service-calls-quarkus/pom.xml b/process-service-calls-quarkus/pom.xml index 0a3e21cc16..ac67ecd892 100644 --- a/process-service-calls-quarkus/pom.xml +++ b/process-service-calls-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-service-calls-quarkus diff --git a/process-service-calls-springboot/pom.xml b/process-service-calls-springboot/pom.xml index 799a852150..1aa7d00533 100644 --- a/process-service-calls-springboot/pom.xml +++ b/process-service-calls-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-service-calls-springboot diff --git a/process-service-rest-call-quarkus/pom.xml b/process-service-rest-call-quarkus/pom.xml index 0d30b2d20c..9b8f6c0e29 100644 --- a/process-service-rest-call-quarkus/pom.xml +++ b/process-service-rest-call-quarkus/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-service-rest-call-quarkus Kogito Examples :: Process Service Rest Cal with Quarkus diff --git a/process-service-rest-call-springboot/pom.xml b/process-service-rest-call-springboot/pom.xml index 0d1314791e..1f0673174b 100644 --- a/process-service-rest-call-springboot/pom.xml +++ b/process-service-rest-call-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-service-rest-call-springboot diff --git a/process-springboot-example/pom.xml b/process-springboot-example/pom.xml index c4022895c9..640cebad35 100644 --- a/process-springboot-example/pom.xml +++ b/process-springboot-example/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT org.kie.kogito.examples process-springboot-example diff --git a/process-timer-quarkus/pom.xml b/process-timer-quarkus/pom.xml index 5f8498b358..1ef3d84bad 100644 --- a/process-timer-quarkus/pom.xml +++ b/process-timer-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-timer-quarkus diff --git a/process-timer-springboot/pom.xml b/process-timer-springboot/pom.xml index 1e33c10968..7bf6e530af 100644 --- a/process-timer-springboot/pom.xml +++ b/process-timer-springboot/pom.xml @@ -4,7 +4,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT Kogito Examples :: Process Timer With Spring Boot diff --git a/process-usertasks-custom-lifecycle-quarkus/pom.xml b/process-usertasks-custom-lifecycle-quarkus/pom.xml index e639a8a135..4d87c2d5d2 100644 --- a/process-usertasks-custom-lifecycle-quarkus/pom.xml +++ b/process-usertasks-custom-lifecycle-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-usertasks-custom-lifecycle-quarkus diff --git a/process-usertasks-custom-lifecycle-springboot/pom.xml b/process-usertasks-custom-lifecycle-springboot/pom.xml index 068b559207..d0326a71dc 100644 --- a/process-usertasks-custom-lifecycle-springboot/pom.xml +++ b/process-usertasks-custom-lifecycle-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-usertasks-custom-lifecycle-springboot diff --git a/process-usertasks-quarkus/pom.xml b/process-usertasks-quarkus/pom.xml index a13fc2478b..9b34cfdb87 100644 --- a/process-usertasks-quarkus/pom.xml +++ b/process-usertasks-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-usertasks-quarkus diff --git a/process-usertasks-springboot/pom.xml b/process-usertasks-springboot/pom.xml index e1e30934d4..dec0bb7a71 100644 --- a/process-usertasks-springboot/pom.xml +++ b/process-usertasks-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-usertasks-springboot diff --git a/process-usertasks-with-security-oidc-quarkus/pom.xml b/process-usertasks-with-security-oidc-quarkus/pom.xml index 9d25f97039..2e58704154 100644 --- a/process-usertasks-with-security-oidc-quarkus/pom.xml +++ b/process-usertasks-with-security-oidc-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-usertasks-with-security-oidc-quarkus diff --git a/process-usertasks-with-security-oidc-springboot/pom.xml b/process-usertasks-with-security-oidc-springboot/pom.xml index 05cc1ea88d..d8906f0aac 100644 --- a/process-usertasks-with-security-oidc-springboot/pom.xml +++ b/process-usertasks-with-security-oidc-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-usertasks-with-security-oidc-springboot diff --git a/process-usertasks-with-security-quarkus/pom.xml b/process-usertasks-with-security-quarkus/pom.xml index df731c128a..bcdba7346c 100644 --- a/process-usertasks-with-security-quarkus/pom.xml +++ b/process-usertasks-with-security-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-usertasks-with-security-quarkus diff --git a/process-usertasks-with-security-springboot/pom.xml b/process-usertasks-with-security-springboot/pom.xml index 7af9f92ba9..b4ba6fe9e4 100644 --- a/process-usertasks-with-security-springboot/pom.xml +++ b/process-usertasks-with-security-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT process-usertasks-with-security-springboot diff --git a/rules-quarkus-helloworld/pom.xml b/rules-quarkus-helloworld/pom.xml index ab7f71ca7a..f7cfa1c06f 100755 --- a/rules-quarkus-helloworld/pom.xml +++ b/rules-quarkus-helloworld/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT org.kie.kogito.examples rules-quarkus-helloworld diff --git a/ruleunit-quarkus-example/pom.xml b/ruleunit-quarkus-example/pom.xml index f89d0f0d1d..069938ad13 100644 --- a/ruleunit-quarkus-example/pom.xml +++ b/ruleunit-quarkus-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT org.kie.kogito.examples ruleunit-quarkus-example diff --git a/ruleunit-springboot-example/pom.xml b/ruleunit-springboot-example/pom.xml index 54354d5d51..8bf240d4f6 100644 --- a/ruleunit-springboot-example/pom.xml +++ b/ruleunit-springboot-example/pom.xml @@ -5,7 +5,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT org.kie.kogito.examples ruleunit-springboot-example diff --git a/serverless-workflow-greeting-quarkus/pom.xml b/serverless-workflow-greeting-quarkus/pom.xml index 0d2e7737c0..d59e6bc85b 100644 --- a/serverless-workflow-greeting-quarkus/pom.xml +++ b/serverless-workflow-greeting-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT serverless-workflow-greeting-quarkus diff --git a/serverless-workflow-greeting-springboot/pom.xml b/serverless-workflow-greeting-springboot/pom.xml index 01ac2ef353..b154ebb879 100644 --- a/serverless-workflow-greeting-springboot/pom.xml +++ b/serverless-workflow-greeting-springboot/pom.xml @@ -6,7 +6,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT serverless-workflow-greeting-springboot diff --git a/serverless-workflow-service-calls-quarkus/pom.xml b/serverless-workflow-service-calls-quarkus/pom.xml index fcf55b83d1..fc2141b76a 100644 --- a/serverless-workflow-service-calls-quarkus/pom.xml +++ b/serverless-workflow-service-calls-quarkus/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT serverless-workflow-service-calls-quarkus diff --git a/serverless-workflow-service-calls-springboot/pom.xml b/serverless-workflow-service-calls-springboot/pom.xml index 9c5798ef1b..cb8b1d87ca 100644 --- a/serverless-workflow-service-calls-springboot/pom.xml +++ b/serverless-workflow-service-calls-springboot/pom.xml @@ -8,7 +8,7 @@ org.kie.kogito kogito-examples - 8.0.0-SNAPSHOT + 8.0.0-SNAPSHOT serverless-workflow-service-calls-springboot From 7138182c2f636dc6ce9cec413caa75fc67588650 Mon Sep 17 00:00:00 2001 From: desmax74 Date: Tue, 16 Jun 2020 07:16:38 -0400 Subject: [PATCH 37/37] fix poms --- kogito-travel-agency/extended/travels/pom.xml | 15 +++------------ kogito-travel-agency/extended/visas/pom.xml | 8 ++------ 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/kogito-travel-agency/extended/travels/pom.xml b/kogito-travel-agency/extended/travels/pom.xml index 42ef60ca31..cfe630fe2b 100644 --- a/kogito-travel-agency/extended/travels/pom.xml +++ b/kogito-travel-agency/extended/travels/pom.xml @@ -64,18 +64,8 @@ process-management-addon - org.drools + org.kie.kogito drools-decisiontables - - - drools-core - org.drools - - - drools-compiler - org.drools - - @@ -146,7 +136,8 @@ true - --allow-incomplete-classpath + + -H:ReflectionConfigurationFiles=../../reflection.json,--allow-incomplete-classpath diff --git a/kogito-travel-agency/extended/visas/pom.xml b/kogito-travel-agency/extended/visas/pom.xml index 469d92a2a3..9bdebd8589 100644 --- a/kogito-travel-agency/extended/visas/pom.xml +++ b/kogito-travel-agency/extended/visas/pom.xml @@ -5,13 +5,8 @@ org.kie.kogito -<<<<<<< HEAD:kogito-travel-agency/visas/pom.xml - kogito-travel-agency-example - 8.0.0-SNAPSHOT -======= kogito-travel-agency-example-extended 8.0.0-SNAPSHOT ->>>>>>> upstream/master:kogito-travel-agency/extended/visas/pom.xml visas @@ -120,7 +115,8 @@ true - --allow-incomplete-classpath + + -H:ReflectionConfigurationFiles=../../reflection.json,--allow-incomplete-classpath