Skip to content

Commit 0bb388e

Browse files
V2 (#2)
- Response Pagination - Worker Charts - improved UI - Reactive Frontend API
1 parent 9e46d87 commit 0bb388e

File tree

174 files changed

+13883
-1008
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+13883
-1008
lines changed

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ k8s/*
22
!target/quarkus-app
33
!target/*-runner
44
!target/*-runner.jar
5-
!target/lib/*
5+
!target/lib/*
6+
ui/node_modules
7+
ui/build

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = false
8+
insert_final_newline = false

.factorypath

Lines changed: 155 additions & 0 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.classpath
44
.settings/
55
bin/
6+
**/node_modules
67

78
# IntelliJ
89
.idea
@@ -32,4 +33,30 @@ target/
3233
pom.xml.tag
3334
pom.xml.releaseBackup
3435
pom.xml.versionsBackup
35-
release.properties
36+
release.properties
37+
38+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
39+
40+
# dependencies
41+
/node_modules
42+
/.pnp
43+
.pnp.js
44+
45+
# testing
46+
/coverage
47+
48+
# production
49+
/build
50+
51+
# misc
52+
.DS_Store
53+
.env.local
54+
.env.development.local
55+
.env.test.local
56+
.env.production.local
57+
58+
npm-debug.log*
59+
yarn-debug.log*
60+
yarn-error.log*
61+
build
62+
old

Dockerfile.native

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1
2+
WORKDIR /work/
3+
COPY target/*-runner /work/application
4+
5+
# set up permissions for user `1001`
6+
RUN chmod 775 /work /work/application \
7+
&& chown -R 1001 /work \
8+
&& chmod -R "g+rwX" /work \
9+
&& chown -R 1001:root /work
10+
11+
EXPOSE 8080
12+
USER 1001
13+
14+
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]

Dockerfile.push

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1-
FROM docker.io/maven:3.6.3-openjdk-11-slim as builder
1+
# TODO #1 make this build work to build the ui and java app together
2+
# FROM docker.io/nodeshift/ubi8-s2i-web-app:latest as ui-builder
3+
4+
# ENV YARN_ENABLED=true
5+
6+
# Add ui/ /tmp/src
7+
8+
# RUN ${STI_SCRIPTS_PATH}/assemble
9+
10+
FROM docker.io/maven:3.6.3-openjdk-11-slim as java-builder
211

312
ADD . .
413

14+
# COPY --from=ui-builder /opt/app-root/output/ src/main/resources/META-INF/resources/
15+
516
RUN mvn -DskipTests clean package
617

718
FROM registry.access.redhat.com/ubi8/openjdk-11
819

9-
COPY --from=builder target/quarkus-app /deployments/
20+
COPY --from=java-builder target/quarkus-app /deployments/

build-ui.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
rm -rf src/main/resources/META-INF/resources/*
6+
7+
cd ui
8+
npm run build

k8s/knative/deployment.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ apiVersion: apps/v1
33
kind: Deployment
44
metadata:
55
name: hybrid-cloud-frontend
6+
annotations:
7+
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"hybrid-cloud-frontend:v2"},"fieldPath":"spec.template.spec.containers[?(@.name==\"hybrid-cloud-frontend\")].image"}]'
68
spec:
79
replicas: 1
810
selector:
@@ -15,11 +17,11 @@ spec:
1517
spec:
1618
serviceAccountName: hybrid-cloud-demo-sa
1719
containers:
18-
- image: quay.io/rhdevelopers/hybrid-cloud-demo-frontend
20+
- name: hybrid-cloud-frontend
21+
image: hybrid-cloud-demo-frontend
1922
imagePullPolicy: Always
20-
name: hybrid-cloud-frontend
2123
env:
22-
- name: IO_OPENSHIFT_BOOSTER_MESSAGING_BACKENDSERVICE_MP_REST_URL
24+
- name: COM_REDHAT_DEVELOPERS_DEMO_SERVICE_BACKENDSERVICECLIENT_MP_REST_URL
2325
value: http://hybrid-cloud-backend-skupper
2426
- name: KNATIVE_BURST
2527
value: "true"

k8s/vanilla/deployment.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ apiVersion: apps/v1
33
kind: Deployment
44
metadata:
55
name: hybrid-cloud-frontend
6+
annotations:
7+
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"hybrid-cloud-frontend:v2"},"fieldPath":"spec.template.spec.containers[?(@.name==\"hybrid-cloud-frontend\")].image"}]'
68
spec:
79
replicas: 1
810
selector:
@@ -15,11 +17,11 @@ spec:
1517
spec:
1618
serviceAccountName: hybrid-cloud-demo-sa
1719
containers:
18-
- image: quay.io/rhdevelopers/hybrid-cloud-demo-frontend
19-
imagePullPolicy: IfNotPresent
20-
name: hybrid-cloud-frontend
20+
- name: hybrid-cloud-frontend
21+
image: hybrid-cloud-demo-frontend
22+
imagePullPolicy: Always
2123
env:
22-
- name: IO_OPENSHIFT_BOOSTER_MESSAGING_BACKENDSERVICE_MP_REST_URL
24+
- name: COM_REDHAT_DEVELOPERS_DEMO_SERVICE_BACKENDSERVICECLIENT_MP_REST_URL
2325
value: http://hybrid-cloud-backend:8080
2426
ports:
2527
- containerPort: 8080

pom.xml

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
2-
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
34
<modelVersion>4.0.0</modelVersion>
45
<groupId>com.redhat.developer.demos</groupId>
56
<artifactId>hybrid-cloud-app-frontend</artifactId>
@@ -12,11 +13,12 @@
1213
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1314
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1415
<quarkus-plugin.version>1.7.0.Final</quarkus-plugin.version>
16+
<quarkus.package.type>fast-jar</quarkus.package.type>
1517
<quarkus.platform.artifact-id>quarkus-universe-bom</quarkus.platform.artifact-id>
1618
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
1719
<quarkus.platform.version>1.7.0.Final</quarkus.platform.version>
20+
<skipTests>true</skipTests>
1821
<surefire-plugin.version>2.22.1</surefire-plugin.version>
19-
<quarkus.package.type>fast-jar</quarkus.package.type>
2022
</properties>
2123
<dependencyManagement>
2224
<dependencies>
@@ -32,33 +34,45 @@
3234
<dependencies>
3335
<dependency>
3436
<groupId>io.quarkus</groupId>
35-
<artifactId>quarkus-resteasy</artifactId>
37+
<artifactId>quarkus-resteasy-jsonb</artifactId>
3638
</dependency>
3739
<dependency>
3840
<groupId>io.quarkus</groupId>
39-
<artifactId>quarkus-junit5</artifactId>
40-
<scope>test</scope>
41+
<artifactId>quarkus-vertx</artifactId>
4142
</dependency>
4243
<dependency>
43-
<groupId>io.rest-assured</groupId>
44-
<artifactId>rest-assured</artifactId>
45-
<scope>test</scope>
44+
<groupId>io.quarkus</groupId>
45+
<artifactId>quarkus-resteasy-mutiny</artifactId>
4646
</dependency>
4747
<dependency>
4848
<groupId>io.quarkus</groupId>
49-
<artifactId>quarkus-resteasy-jsonb</artifactId>
49+
<artifactId>quarkus-rest-client</artifactId>
5050
</dependency>
5151
<dependency>
5252
<groupId>io.quarkus</groupId>
53-
<artifactId>quarkus-resteasy-mutiny</artifactId>
53+
<artifactId>quarkus-smallrye-health</artifactId>
5454
</dependency>
5555
<dependency>
5656
<groupId>io.quarkus</groupId>
57-
<artifactId>quarkus-rest-client</artifactId>
57+
<artifactId>quarkus-resteasy</artifactId>
5858
</dependency>
5959
<dependency>
6060
<groupId>io.quarkus</groupId>
61-
<artifactId>quarkus-smallrye-health</artifactId>
61+
<artifactId>quarkus-junit5</artifactId>
62+
<scope>test</scope>
63+
</dependency>
64+
<dependency>
65+
<groupId>io.rest-assured</groupId>
66+
<artifactId>rest-assured</artifactId>
67+
<scope>test</scope>
68+
</dependency>
69+
<dependency>
70+
<groupId>io.quarkus</groupId>
71+
<artifactId>quarkus-jdbc-h2</artifactId>
72+
</dependency>
73+
<dependency>
74+
<groupId>io.quarkus</groupId>
75+
<artifactId>quarkus-hibernate-orm-panache</artifactId>
6276
</dependency>
6377
</dependencies>
6478
<build>
@@ -124,4 +138,4 @@
124138
</properties>
125139
</profile>
126140
</profiles>
127-
</project>
141+
</project>

0 commit comments

Comments
 (0)