Live workshop notes and flow are below. Use this as a reference day of the workshop to make sure you hit all the main points.
Explain application here
- Setup Developer Workspace (30min)
- Fork my repo
network.websocket.allowInsecureFromHTTPS
and toggle it on#!/bin/bash | |
# standard api | |
quarkus create app --verbose --refresh --maven --java=11 --package-name=io.keam \ | |
--extensions=resteasy-reactive,resteasy-reactive-jackson,hibernate-orm-rest-data-panache,jdbc-postgresql,smallrye-jwt,smallrye-jwt-build \ | |
--app-config=quarkus.datasource.db-kind=postgresql,quarkus.datasource.username=root,quarkus.datasource.password=root,quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/todo_app,quarkus.hibernate-orm.database.generation=drop-and-create \ | |
io.keam:quarkus-todo:1.0.0-SNAPSHOT | |
# reactive api | |
# quarkus create app --verbose --refresh --maven --java=11 --package-name=io.keam \ |
import org.springframework.web.filter.ForwardedHeaderFilter; | |
import org.springframework.context.annotation.Bean; | |
@Bean | |
public ForwardedHeaderFilter disabledForwardedHeaderFilter() { | |
ForwardedHeaderFilter filter = new ForwardedHeaderFilter(); | |
filter.setRemoveOnly(true); | |
return filter; | |
} |
FROM docker.io/redhat/ubi8-micro | |
USER nobody | |
ENTRYPOINT ["tail", "-f", "/dev/null"] |
# Get odo for linux | |
$ curl -OL https://mirror.openshift.com/pub/openshift-v4/clients/odo/v2.0.0/odo-linux-amd64 && mv odo-linux-amd64 odo && chmod u+x odo | |
$ export PATH=$PATH:$(pwd) | |
$ odo version | |
# Use git to check out the .NET Core application | |
$ git clone https://github.com/redhat-developer/s2i-dotnetcore-ex | |
$ cd s2i-dotnetcore-ex/app | |
$ git checkout dotnetcore-3.1 |
apiVersion: kafka.strimzi.io/v1beta2 | |
kind: Kafka | |
metadata: | |
name: my-cluster | |
labels: | |
app: my-app | |
namespace: openshift-operators | |
spec: | |
kafka: | |
config: |
insert into facts(id, fact) values (nextval('hibernate_sequence'), 'The penalty for killing a cat, 4,000 years ago in Egypt, was death.'); | |
insert into facts(id, fact) values (nextval('hibernate_sequence'), '95% of all cat owners admit they talk to their cats.'); | |
insert into facts(id, fact) values (nextval('hibernate_sequence'), 'More cats are left-pawed than right-pawed. Out of 100 cats approximately 40 are left-pawed, 20 are right-pawed, and 40 are ambidextrous.'); | |
insert into facts(id, fact) values (nextval('hibernate_sequence'), 'A cat can jump as much as seven times its height.'); | |
insert into facts(id, fact) values (nextval('hibernate_sequence'), 'A cat cannot see directly under its nose. This is why the cat cannot seem to find tidbits on the floor.'); | |
insert into facts(id, fact) values (nextval('hibernate_sequence'), 'A cat has 230 bones in its body. A human only has 206 bones.'); | |
insert into facts(id, fact) values (nextval('hibernate_sequence'), 'A cat has four rows of whiskers.'); | |
insert into facts(id, |
package io.keam.models; | |
import io.quarkus.hibernate.orm.panache.PanacheEntity; | |
import javax.persistence.*; | |
@Entity | |
@Table(name = "facts") | |
public class Fact extends PanacheEntity { | |
@Column | |
public String fact; |
quarkus create app --java=11 --package-name=io.keam \
--extensions=resteasy-reactive,resteasy-reactive-jackson,hibernate-orm-rest-data-panache,jdbc-postgresql \
--app-config=quarkus.hibernate-orm.database.generation=drop-and-create,quarkus.hibernate-orm.sql-load-script=import-dev.sql \
io.keam:catfacts:1.0.0-SNAPSHOT