Code Monkey home page Code Monkey logo

cloud-native-workshop-v2m1-guides's Introduction

The CCN Roadshow(Dev Track) Module 1 Guide 2023

This module guides developers how to get started the cloud-native journey such as monolith application migration, deployment with Kubernetes/OpenShift cluster, and modernizing applications using Red Hat Application Runtimes (i.e. Quarkus, Spring Boot) with OpenShift and more.

Agenda

  • Getting Started with Cloud-Native Apps
  • Decide which Application Server to use in OpenShift
  • Migrate your application to JBoss EAP
  • Breaking the monolith apart - I
  • Breaking the monolith apart - II

cloud-native-workshop-v2m1-guides's People

Contributors

bttnns avatar danieloh30 avatar duncandoyle avatar edeandrea avatar gbengataylor avatar hatmarch avatar jamesfalkner avatar sshaaf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloud-native-workshop-v2m1-guides's Issues

Migrate to JBoss EAP - issue opening MTA file report from CRW

Attempted to follow this instruction

MTA also provides helpful links to understand the issue deeper and offer guidance for the migration when you click on Open Report:

image

However, CRW takes you to a non-existent page
<ocp_url>/home/theia/output/0p45rc4r0-khveteorx/reports/StartupListener_java.html

image

The right link is
<ocp_url>/0p45rc4r0-khveteorx/reports/StartupListener_java.html

This is more of a CRW bug than with the Workshop bug but maybe we can update the instructions so that the Attendees don't run into this problem

Fallback wording is confusing

I'm running through the second breaking the monolith section and I'm finding the wording confusing.

At the end of step 8, you add the following hoverfly rule:

    @ClassRule
    public static HoverflyRule hoverflyRule = HoverflyRule.inSimulationMode(dsl(
            service("inventory:8080")
    //                    .andDelay(2500, TimeUnit.MILLISECONDS).forMethod("GET")
                    .get(startsWith("/services/inventory"))
    //                    .willReturn(serverError())
                    .willReturn(success("[{\"itemId\":\"329199\",\"quantity\":9999}]", "application/json"))
    ));

When you get to step 11, the original fall backrule that it shows is actually the same as what it shows as the original. Specifically, this line:

.willReturn(success(json(new Inventory("9999",9999))))

is shown instead of the line from step 8:

.willReturn(success("[{\"itemId\":\"329199\",\"quantity\":9999}]", "application/json"))

The 9999 change fails with an error about converting an ARRAY to JSON, also I assume the ID should 329199 instead, i,e.

.willReturn(success(json(new Inventory("329199",9999))))

Anyway I think the intent is for the original line to stay the same thoughout but wanted to check instead of submitting a PR directly.

Step 6: Test the build - image is wrong

the image in step 6 is the same as step 4, this could be confusing - it would be better if this was the image for the actual step.

####6. Test the build

Build and package the app using Maven to make sure you code still compiles via CodeReady Workspaces BUILD window:

![rhamt_project_issues]({% image_path codeready-workspace-build.png %})

Update Step 14 and 16 instructions in Break Monolith Apart - I

Hi,

When executing step 14 "mvn compile quarkus:dev" of Chapter 5 (Break Monolith Apart - I) in module 1 following error is encountered

ERROR [io.qua.dev.DevModeMain] Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#build threw an exception: io.quarkus.deployment.configuration.ConfigurationError: Hibernate extension cannot guess the dialect as no JDBC driver is specified by 'quarkus.datasource.driver' at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.guessDialect(HibernateOrmProcessor.java:509)

I guess the issue is because of application.properties pointing to prod settings as below at step 14

%prod.quarkus.datasource.url=jdbc:postgresql://inventory-database:5432/inventory
%prod.quarkus.datasource.driver=org.postgresql.Driver
%prod.quarkus.datasource.username=inventory
%prod.quarkus.datasource.password=mysecretpassword
%prod.quarkus.datasource.max-size=8
%prod.quarkus.datasource.min-size=2
%prod.quarkus.hibernate-orm.database.generation=drop-and-create
%prod.quarkus.hibernate-orm.sql-load-script=import.sql
%prod.quarkus.hibernate-orm.log.sql=true

Step 14 instructions must include to modify application.properties with following and then run "Build and Run Locally"

quarkus.datasource.url=jdbc:h2:file://projects/database.db
quarkus.datasource.driver=org.h2.Driver
quarkus.datasource.username=inventory
quarkus.datasource.password=mysecretpassword
quarkus.datasource.max-size=8
quarkus.datasource.min-size=2
quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.hibernate-orm.log.sql=false

Step 16 instructions must note to update application.properties to
%prod.quarkus.datasource.url=jdbc:postgresql://inventory-database:5432/inventory
%prod.quarkus.datasource.driver=org.postgresql.Driver
%prod.quarkus.datasource.username=inventory
%prod.quarkus.datasource.password=mysecretpassword
%prod.quarkus.datasource.max-size=8
%prod.quarkus.datasource.min-size=2
%prod.quarkus.hibernate-orm.database.generation=drop-and-create
%prod.quarkus.hibernate-orm.sql-load-script=import.sql
%prod.quarkus.hibernate-orm.log.sql=true

and then redeploy

Maven repositories for Spring Boot already present

After building the app in step 3 in Break Monolith Apart - II, I get

ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM /projects/cloud-native-workshop-v2m1-labs/catalog/pom.xml: Duplicated tag: 'repositories' (position: START_TAG seen ...\n ... @236:17) @ line 236, column 17
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project (/projects/cloud-native-workshop-v2m1-labs/catalog/pom.xml) has 1 error
[ERROR] Non-parseable POM /projects/cloud-native-workshop-v2m1-labs/catalog/pom.xml: Duplicated tag: 'repositories' (position: START_TAG seen ...\n ... @236:17) @ line 236, column 17 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException

This is because the repository definitions are already provided as part of the source code, injected at the bottom of the POM file.

Either remove the instructions to add the repositories from the guide or from the supplied pom.xml file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.