Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update examples #1715

Merged
merged 5 commits into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions examples/config/basics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ containing config in HOCON (Human-Optimized Config Object Notation) format

## Build and run

With JDK8+
```bash
mvn package
java -jar target/helidon-examples-config-basics.jar
```
```
3 changes: 1 addition & 2 deletions examples/config/changes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ the most up-to-date value. Sometimes that is all you need.

## Build and run

With JDK8+
```bash
mvn package
java -jar target/helidon-examples-config-changes.jar
```
```
1 change: 0 additions & 1 deletion examples/config/git/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ checks to make sure the value is the expected `hello`.

## Build and run

With JDK8+
```bash
mvn package
export ENVIRONMENT_NAME=test
Expand Down
3 changes: 1 addition & 2 deletions examples/config/mapping/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ system how to construct a POJO instance.

## Build and run

With JDK8+
```bash
mvn package
java -jar target/helidon-examples-config-mapping.jar
```
```
3 changes: 1 addition & 2 deletions examples/config/overrides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ take precedence over the settings in the original config sources.

## Build and run

With JDK8+
```bash
mvn package
java -jar target/helidon-examples-config-overrides.jar
```
```
1 change: 0 additions & 1 deletion examples/config/sources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ filter.

## Build and run

With JDK8+
```bash
mvn package
java -jar target/helidon-examples-config-sources.jar
Expand Down
1 change: 0 additions & 1 deletion examples/employee-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ The service uses Helidon DB Client that provides reactive and non-blocking acces

## Build and run

With JDK8+
```bash
mvn package
java -jar target/employee-app.jar
Expand Down
7 changes: 5 additions & 2 deletions examples/grpc/basics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ A basic example gRPC server.

## Build and run

With JDK8+
```bash
mvn package
java -jar target/helidon-examples-grpc-basics.jar
Expand All @@ -14,4 +13,8 @@ Exercise the example:
```bash
java -cp target/helidon-examples-grpc-basics.jar \
io.helidon.grpc.examples.basics.HealthClient
```
```

The HealthClient will report a SERVING status for the
first check, and a NOT_FOUND status for a non-existent
service.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2020 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -75,8 +75,8 @@ public static void main(String[] args) throws Exception {

// add support for standard and gRPC health checks
HealthSupport health = HealthSupport.builder()
.add(HealthChecks.healthChecks())
.add(grpcServer.healthChecks())
.addLiveness(HealthChecks.healthChecks())
.addLiveness(grpcServer.healthChecks())
.build();

// start web server with health endpoint
Expand Down
3 changes: 1 addition & 2 deletions examples/grpc/metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ A basic example using metrics with gRPC server.

## Build and run

With JDK8+
```bash
mvn package
java -jar target/helidon-examples-grpc-metrics.jar
Expand All @@ -13,4 +12,4 @@ java -jar target/helidon-examples-grpc-metrics.jar
Try the metrics:
```bash
curl http://localhost:8080/metrics
```
```
3 changes: 1 addition & 2 deletions examples/grpc/security-abac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ An example gRPC server for attribute based access control.

## Build and run

With JDK8+
```bash
mvn -f ../pom.xml -pl common/security-abac package
java -jar target/helidon-examples-grpc-security-abac.jar
Expand All @@ -13,4 +12,4 @@ java -jar target/helidon-examples-grpc-security-abac.jar
Take a look at the metrics:
```bash
curl http://localhost:8080/metrics
```
```
3 changes: 1 addition & 2 deletions examples/grpc/security-outbound/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ An example gRPC outbound security

## Build and run

With JDK8+
```bash
mvn -f ../pom.xml -pl common/security-outbound package
java -jar target/helidon-examples-grpc-security-outbound.jar
Expand All @@ -14,4 +13,4 @@ Exercise the example:
```bash
java -cp target/helidon-examples-grpc-security-outbound.jar \
io.helidon.grpc.examples.security.outbound.SecureGreetClient
```
```
3 changes: 1 addition & 2 deletions examples/grpc/security/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ An example gRPC server using basic auth security.

## Build and run

With JDK8+
```bash
mvn -f ../pom.xml -pl common/security package
java -jar target/helidon-examples-grpc-security.jar
Expand All @@ -16,4 +15,4 @@ java -cp target/helidon-examples-grpc-security.jar \
io.helidon.grpc.examples.security.SecureGreetClient
java -cp target/helidon-examples-grpc-security.jar \
io.helidon.grpc.examples.security.SecureStringClient
```
```
12 changes: 11 additions & 1 deletion examples/health/basics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,18 @@ custom health check.

## Build and run

With JDK8+
Start the application:

```bash
mvn package
java -jar target/helidon-examples-health-basics.jar
```

Note the port number reported by the application.

Probe the health endpoints:

```bash
curl -X GET http://localhost:PORT/health/
curl -X GET http://localhost:PORT/health/ready

15 changes: 15 additions & 0 deletions examples/health/basics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,19 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-libs</id>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2020 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,8 +39,8 @@ private Main() {
*/
public static void main(String[] args) {
HealthSupport health = HealthSupport.builder()
.add(HealthChecks.healthChecks())
.add((HealthCheck) () -> HealthCheckResponse.named("exampleHealthCheck")
.addLiveness(HealthChecks.healthChecks())
.addReadiness((HealthCheck) () -> HealthCheckResponse.named("exampleHealthCheck")
.up()
.withData("time", System.currentTimeMillis())
.build())
Expand Down
1 change: 0 additions & 1 deletion examples/integrations/cdi/datasource-hikaricp-h2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ database.

## Build and run

With JDK8+
```bash
mvn package
java -jar target/helidon-integrations-examples-datasource-hikaricp-h2.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ javax.sql.DataSource.example.dataSource.password = tiger

## Build and run

With JDK8+
```bash
mvn package
java -jar target/helidon-integrations-examples-datasource-hikaricp-mysql.jar
Expand Down
3 changes: 1 addition & 2 deletions examples/integrations/cdi/datasource-hikaricp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ docker run --rm -d \
-p 8080:8080 helidon-examples-integrations-datasource-hikaricp:latest
```

With JDK8+
```bash
mvn package
java -jar target/helidon-examples-integrations-datasource-hikaricp.jar
Expand All @@ -81,4 +80,4 @@ curl http://localhost:8080/tables
Stop the docker containers:
```bash
docker stop oracle helidon-examples-integrations-datasource-hikaricp
```
```
4 changes: 2 additions & 2 deletions examples/integrations/cdi/jedis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ docker run --rm -d \
-p 8080:8080 helidon-examples-integrations-cdi-jedis:latest
```

With Java 8+:
With Java:
```bash
mvn package
java -jar target/helidon-examples-integrations-cdi-jedis.jar
Expand Down Expand Up @@ -50,4 +50,4 @@ docker stop redis helidon-examples-integrations-cdi-jedis
Delete the Kubernetes resources:
```bash
kubectl delete -f ../../k8s/ingress.yaml -f app.yaml
```
```

This file was deleted.

2 changes: 1 addition & 1 deletion examples/integrations/cdi/jpa/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# JPA Integration Example

With Java 8+:
With Java:
```bash
mvn package
java -jar target/helidon-integrations-examples-jpa.jar
Expand Down
4 changes: 2 additions & 2 deletions examples/integrations/cdi/oci-objectstorage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ docker run --rm -d -p 8080:8080 \
helidon-examples-integrations-cdi-oci-objectstorage:latest
```

With Java 8+:
With Java:
```bash
mvn package
java -Doci.auth.fingerprint="${OCI_AUTH_FINGERPRINT}" \
Expand Down Expand Up @@ -70,4 +70,4 @@ docker stop helidon-examples-integrations-cdi-oci-objectstorage
Delete the Kubernetes resources:
```bash
kubectl delete -f ../../../k8s/ingress.yaml -f app.yaml
```
```
Loading