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

Rename helidon-3rdparty to helidon-dependencies. #1031

Merged
Merged
Show file tree
Hide file tree
Changes from 3 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
5 changes: 2 additions & 3 deletions applications/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.helidon</groupId>
<artifactId>helidon-3rdparty</artifactId>
<artifactId>helidon-dependencies</artifactId>
<version>1.3.1-SNAPSHOT</version>
<relativePath>../3rdparty/pom.xml</relativePath>
<relativePath>../dependencies/pom.xml</relativePath>
</parent>
<groupId>io.helidon.applications</groupId>
<artifactId>helidon-applications-project</artifactId>
Expand Down Expand Up @@ -151,7 +151,6 @@
<addClasspath>true</addClasspath>
<classpathPrefix>libs</classpathPrefix>
<mainClass>${mainClass}</mainClass>
<useUniqueVersions>true</useUniqueVersions>
</manifest>
</archive>
</configuration>
Expand Down
6 changes: 3 additions & 3 deletions 3rdparty/pom.xml → dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
<version>1.3.1-SNAPSHOT</version>
<relativePath>../bom/pom.xml</relativePath>
</parent>
<artifactId>helidon-3rdparty</artifactId>
<artifactId>helidon-dependencies</artifactId>
<packaging>pom</packaging>

<name>Helidon 3rd Party Management</name>
<description>Distributed 3party dependency management</description>
<name>Helidon World</name>
romain-grecourt marked this conversation as resolved.
Show resolved Hide resolved
<description>Maven dependency management for Helidon applications</description>

<properties>
<!--
Expand Down
6 changes: 2 additions & 4 deletions examples/quickstarts/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@

# Helidon Quickstart Examples

These are the examples used by the Helidon Getting Started guide, and
the quickstart Maven archetypes. Both quickstarts implement the same
simple greeting service, one usine Helidon MP and one using Helidon SE.
the quickstart Maven archetypes. All examples implement the same
simple greeting service, one using Helidon MP and one using Helidon SE.

The `archetypes` directory contains scripts for building the Maven
archetypes from these examples.

2 changes: 1 addition & 1 deletion examples/quickstarts/helidon-quickstart-mp/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Helidon Quickstart MP Example

This example implements a simple Hello World REST service using MicroProfile
This example implements a simple Hello World REST service using MicroProfile.

## Build and run

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/*
16 changes: 16 additions & 0 deletions examples/quickstarts/helidon-standalone-quickstart-mp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
hs_err_pid*
target/
.DS_Store
.idea/
*.iws
*.ipr
*.iml
atlassian-ide-plugin.xml
nbactions.xml
nb-configuration.xml
.settings
.settings/
.project
.classpath
*.swp
*~
44 changes: 44 additions & 0 deletions examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# Copyright (c) 2018, 2019 Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# 1st stage, build the app
FROM maven:3.5.4-jdk-9 as build

WORKDIR /helidon

# Create a first layer to cache the "Maven World" in the local repository.
# Incremental docker builds will always resume after that, unless you update
# the pom
ADD pom.xml .
RUN mvn package -DskipTests

# Do the Maven build!
# Incremental docker builds will resume here when you change sources
ADD src src
RUN mvn package -DskipTests
RUN echo "done!"

# 2nd stage, build the runtime image
FROM openjdk:8-jre-slim
WORKDIR /helidon

# Copy the binary built in the 1st stage
COPY --from=build /helidon/target/helidon-standalone-quickstart-mp.jar ./
COPY --from=build /helidon/target/libs ./libs

CMD ["java", "-jar", "helidon-standalone-quickstart-mp.jar"]

EXPOSE 8080
69 changes: 69 additions & 0 deletions examples/quickstarts/helidon-standalone-quickstart-mp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Helidon Standalone Quickstart MP Example

This example implements a simple Hello World REST service using MicroProfile
with a standalone Maven pom.

## Build and run

With JDK8+
```bash
mvn package
java -jar target/helidon-standalone-quickstart-mp.jar
```

## Exercise the application

```
curl -X GET http://localhost:8080/greet
{"message":"Hello World!"}

curl -X GET http://localhost:8080/greet/Joe
{"message":"Hello Joe!"}

curl -X PUT -H "Content-Type: application/json" -d '{"greeting" : "Hola"}' http://localhost:8080/greet/greeting

curl -X GET http://localhost:8080/greet/Jose
{"message":"Hola Jose!"}
```

## Try health and metrics

```
curl -s -X GET http://localhost:8080/health
{"outcome":"UP",...
. . .

# Prometheus Format
curl -s -X GET http://localhost:8080/metrics
# TYPE base:gc_g1_young_generation_count gauge
. . .

# JSON Format
curl -H 'Accept: application/json' -X GET http://localhost:8080/metrics
{"base":...
. . .

```

## Build the Docker Image

```
docker build -t helidon-standalone-quickstart-mp .
```

## Start the application with Docker

```
docker run --rm -p 8080:8080 helidon-standalone-quickstart-mp:latest
```

Exercise the application as described above

## Deploy the application to Kubernetes

```
kubectl cluster-info # Verify which cluster
kubectl get pods # Verify connectivity to cluster
kubectl create -f app.yaml # Deploy application
kubectl get service helidon-standalone-quickstart-mp # Verify deployed service
```
50 changes: 50 additions & 0 deletions examples/quickstarts/helidon-standalone-quickstart-mp/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#
# Copyright (c) 2018, 2019 Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

kind: Service
apiVersion: v1
metadata:
name: helidon-standalone-quickstart-mp
labels:
app: helidon-standalone-quickstart-mp
spec:
type: NodePort
selector:
app: helidon-standalone-quickstart-mp
ports:
- port: 8080
targetPort: 8080
name: http
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: helidon-standalone-quickstart-mp
spec:
replicas: 1
template:
metadata:
labels:
app: helidon-standalone-quickstart-mp
version: v1
spec:
containers:
- name: helidon-standalone-quickstart-mp
image: helidon-standalone-quickstart-mp
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
---
Loading