Skip to content

Commit 11fdc38

Browse files
authored
Merge branch 'main' into main
2 parents 7a736c0 + 10c96f9 commit 11fdc38

File tree

133 files changed

+6227
-3
lines changed

Some content is hidden

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

133 files changed

+6227
-3
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
.idea
3+
.iml
4+
target/

README.md

+32-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# devops-tools-for-java-developers
2-
DevOps Tools for Java Developers resources
1+
# code-snippets
2+
DevOps Tools for Java Developers resources and examples
3+
4+
Code snippets are organized by book chapter.
35

46
---
57

@@ -10,5 +12,32 @@ Add your own visitor comment below. Detailed exercise in Chapter 4.
1012

1113
Stephen Chin ([@steveonjava](https://twitter.com/steveonjava)): Every developer should learn how to do DevOps!
1214

13-
---
15+
Overmellow (@notwitter): Seconded!
16+
17+
Vishal Agrawal ([@vishalcool88](https://twitter.com/vishalagrawal_)): Learning DevOps tools for Java Developers
18+
19+
Joseph TAMO ([@TamalJoseph](https://twitter.com/tamaljoseph)) : I'm learning how to do DevOps!
20+
21+
Svippa: DevOps and beyond!
22+
23+
Ahmed Aziz ([@AA_ziz](https://twitter.com/AA_ziz)): DevOps is just a fancy term for ownership
24+
25+
Yuxh:(@no_twitter):My Visitor comment
26+
27+
Alexander Frolov: I have managed to reach Chpater 2 out. Not every book can bring me so far. Thanks guys. Very appreciate your effort.
28+
29+
Joseph : Every developer should learn how to do DevOps!
30+
31+
MovieGoer (@SWETwitter) : Completed this exercise
32+
33+
Etienne: Java certified since 2001, just checking out what the cool kids are up to ;)
34+
35+
Super Zen: Great book!
36+
37+
Lagom Peter: Many Devops tools for java developers!
38+
1439
Aaron MAJAMBO (@majambo) : Added my own comments
40+
41+
Exercise done!
42+
43+
---
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Code Snippets and Examples for Chapter
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Code Snippets and Examples for Chapter
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Code Snippets and Examples for Chapter
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Code Snippets and Examples for Chapter
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.gradle/
2+
*.iml
3+
*.ipr
4+
*.iws
5+
.idea/
6+
build/
7+
out/
8+
target/
9+
.classpath
10+
.project
11+
tmp/
12+
.DS_Store
13+
.tmp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>io.helidon.applications</groupId>
8+
<artifactId>helidon-mp</artifactId>
9+
<version>2.3.0</version>
10+
</parent>
11+
<groupId>com.example</groupId>
12+
<artifactId>demo</artifactId>
13+
<version>1.0-SNAPSHOT</version>
14+
15+
<dependencies>
16+
<dependency>
17+
<groupId>io.helidon.microprofile.bundles</groupId>
18+
<artifactId>helidon-microprofile</artifactId>
19+
</dependency>
20+
<dependency>
21+
<groupId>org.jboss</groupId>
22+
<artifactId>jandex</artifactId>
23+
<scope>runtime</scope>
24+
<optional>true</optional>
25+
</dependency>
26+
<dependency>
27+
<groupId>jakarta.activation</groupId>
28+
<artifactId>jakarta.activation-api</artifactId>
29+
<scope>runtime</scope>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.junit.jupiter</groupId>
33+
<artifactId>junit-jupiter-api</artifactId>
34+
<scope>test</scope>
35+
</dependency>
36+
</dependencies>
37+
38+
<build>
39+
<plugins>
40+
<plugin>
41+
<groupId>org.apache.maven.plugins</groupId>
42+
<artifactId>maven-dependency-plugin</artifactId>
43+
<executions>
44+
<execution>
45+
<id>copy-libs</id>
46+
</execution>
47+
</executions>
48+
</plugin>
49+
<plugin>
50+
<groupId>org.jboss.jandex</groupId>
51+
<artifactId>jandex-maven-plugin</artifactId>
52+
<executions>
53+
<execution>
54+
<id>make-index</id>
55+
</execution>
56+
</executions>
57+
</plugin>
58+
<plugin>
59+
<groupId>io.helidon.build-tools</groupId>
60+
<artifactId>helidon-maven-plugin</artifactId>
61+
<executions>
62+
<execution>
63+
<id>third-party-license-report</id>
64+
</execution>
65+
</executions>
66+
</plugin>
67+
</plugins>
68+
</build>
69+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# MicroProfile generated Application
2+
3+
## Introduction
4+
5+
MicroProfile Starter has generated this MicroProfile application for you.
6+
7+
The generation of the executable jar file can be performed by issuing the following command
8+
9+
mvn clean package
10+
11+
This will create an executable jar file **demo.jar** within the _target_ maven folder. This can be started by executing the following command
12+
13+
java -jar target/demo.jar
14+
15+
16+
17+
To launch the test page, open your browser at the following URL
18+
19+
http://localhost:8080/index.html
20+
21+
22+
23+
## Specification examples
24+
25+
By default, there is always the creation of a JAX-RS application class to define the path on which the JAX-RS endpoints are available.
26+
27+
Also, a simple Hello world endpoint is created, have a look at the class **HelloController**.
28+
29+
More information on MicroProfile can be found [here](https://microprofile.io/)
30+
31+
32+
33+
34+
35+
36+
37+
38+
39+
40+
41+
42+
43+
44+
45+
46+
47+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.example.demo;
2+
3+
import io.helidon.common.Reflected;
4+
5+
@Reflected
6+
public class Greeting {
7+
private final String content;
8+
9+
public Greeting(String content) {
10+
this.content = content;
11+
}
12+
13+
public String getContent() {
14+
return content;
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.example.demo;
2+
3+
import javax.ws.rs.DefaultValue;
4+
import javax.ws.rs.GET;
5+
import javax.ws.rs.Path;
6+
import javax.ws.rs.QueryParam;
7+
8+
@Path("/greeting")
9+
public class GreetingResource {
10+
private static final String template = "Hello, %s!";
11+
12+
@GET
13+
public Greeting greeting(@QueryParam("name") @DefaultValue("World") String name) {
14+
return new Greeting(String.format(template, name));
15+
}
16+
}

chapter04-dissecting-the-monolith/helidon-demo/src/main/resources/.gitkeep

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
5+
bean-discovery-mode="all">
6+
</beans>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
# Microprofile server properties
3+
server.port=8080
4+
server.host=0.0.0.0
5+
6+
# src/main/resources/WEB in your source tree
7+
server.static.classpath.location=/WEB
8+
# default is index.html
9+
#server.static.classpath.welcome=index.html
10+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Eclipse MicroProfile demo</title>
6+
</head>
7+
<body>
8+
9+
<h2>MicroProfile</h2>
10+
11+
<a href="data/hello" target="_blank" >Hello JAX-RS endpoint</a> <br/>
12+
13+
14+
15+
16+
17+
18+
19+
20+
21+
22+
23+
24+
25+
26+
27+
28+
29+
30+
31+
</body>
32+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Example Logging Configuration File
2+
# For more information see $JAVA_HOME/jre/lib/logging.properties
3+
4+
# Send messages to the console
5+
handlers=java.util.logging.ConsoleHandler
6+
7+
# Global default logging level. Can be overriden by specific handlers and loggers
8+
.level=INFO
9+
10+
# Helidon Web Server has a custom log formatter that extends SimpleFormatter.
11+
# It replaces "!thread!" with the current thread name
12+
java.util.logging.ConsoleHandler.level=INFO
13+
java.util.logging.ConsoleHandler.formatter=io.helidon.webserver.WebServerLogFormatter
14+
java.util.logging.SimpleFormatter.format=%1$tY.%1$tm.%1$td %1$tH:%1$tM:%1$tS %4$s %3$s !thread!: %5$s%6$s%n
15+
16+
#Component specific log levels
17+
#io.helidon.webserver.level=INFO
18+
#io.helidon.config.level=INFO
19+
#io.helidon.security.level=INFO
20+
#io.helidon.microprofile.level=INFO
21+
#io.helidon.common.level=INFO
22+
#io.netty.level=INFO
23+
#org.glassfish.jersey.level=INFO
24+
#org.jboss.weld=INFO
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
-----BEGIN PRIVATE KEY-----
2+
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDPAO3J/p486N/+
3+
gQslxfsC4Vct7cAVMi7v3I6mTXDizw+JrpMTRNVUcnVf0ymKIxGHktbnqtFJBfkf
4+
lIdLIxM5PwPB23J0ehklONNq8zGqjFZQI9TU1H3e12Jt7AUn4TKQaPXtBQalybb6
5+
ayT7RhiNNrUGGNzH+wL1ak8jVAEFpLuFcfojJwshF3myNfXInAqRIGCEeQBFyZrh
6+
8RK+PxoGOiYmXJJgxDxtfr0cMVa7y0gdPuSqEDQND+vt8kVQk47cK8eGH1ypoPfk
7+
emeNOpjjDRaJIuoDgXEOCQxHVT1qN4OjWOfAYRZXtfvy6xrP+rS5o0gqg/1tZbF7
8+
XUmrm46vAgMBAAECggEBAMehqrFKF4rAPvzvsDN+ikPN08icZ8lJO1DhUMT7HCnv
9+
7JkoPfiwQlgNhjqip4XrqgUoTI7hArK8yvN0x0FkEy77IYF8RBYmhkeKVQHohXZn
10+
nvnshF24i6cz6l395z79hEkWoE0zsqSCMy+v0tttT1Iod03o/kryPXk2TBnS8qVf
11+
6nv/ohuu2S5KI0b4skxGSM60kA96h6ngCcq4pkwHEtnwJmF2xz4EO+zb558yOF5A
12+
OznjKxTbNH3RsCGG1bMWSvy4qIihdJRDUAeKKdtAZOeLgUrSFHUDxKwCLFIESde0
13+
JP9uXuUlAb8WOnsL4z0jbgx1+ctI0UOIKTJc8sErXrECgYEA+S8cSpgED416ydrt
14+
WWmETeW2sPUJsmDfQhQxUoxhSypDTDBGHGBZzvLSoWCxJBnuY8teiDzDAXh7nHMs
15+
SZA1vT9hZu+qWzgdU+0SK6r0FyY5RFBIHB468fO6S5mJm0wqmy1J94Voaeofij1q
16+
1pE8/tniLKciP2BnkX7lu2F1E4cCgYEA1Kp0Kz0WwUcu2UnmKOOzqIsA9mwucKAF
17+
zmGA1c8q+Cx2dIgeHQjWtl3SWs0qVps74YEZUYbxmG/M9MHHGbRq7w8hwaSpeFt+
18+
DswiscELag4PuEHn6yGdJyPnXBoERnOvVPlkdDts6NPvLtfcBBkgPqhpvhObf9vf
19+
Cv+trWWExZkCgYAlmY86Tj/mnOGXTdqcsEhPfMcZYpApA2cM0IE0xIv1zJXFDE+3
20+
/m3uxUM1KKLyIJuRIWHNSuXd9fEpBVP8ca86NDMdVjKtewUp4c7pGe2lBJaFkVug
21+
KouYcL9+otdZwJ95NNdBazb7LGG/+U6Cu/2pMvVm6X1IdOKL2MsPgEArRwKBgQDA
22+
midfyZHENg2t6Qmz2pUpfcq/YrakdakMgq3F9jw6Szp0y5pKPWkH/Oy4I7vGeAzB
23+
bMRbW9WOcyKyQJVrKET4gUHXOKPrRyFhkWuShP0rbdS60aWTA/xqKFAuz7kzfS47
24+
zSo3QmKecuLaD9FJPOBBHxG1fdiE8cKNGYZX1etrcQKBgHhnkwmCTxXdimQTswE1
25+
nytAbdXEUSqLU2sZT3sQq497j6uOjcBlZekPtibOuyQLFmeKIMZMI1j0AARbu+ZJ
26+
T7SwLL4cjsws838VujJzXPGxvbp3twvWpZHsUvp2eX/8LiWexL5TPj4jkHkkholH
27+
H675T5VXIbt4N8LR1fHThOJB
28+
-----END PRIVATE KEY-----
237 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"Role": {
3+
"Path": "/",
4+
"RoleName": "lambda-ex",
5+
"RoleId": "AROAZEJV7ZLPCZ7CNYW6U",
6+
"Arn": "arn:aws:iam::627715328734:role/lambda-ex",
7+
"CreateDate": "2021-06-13T15:22:56+00:00",
8+
"AssumeRolePolicyDocument": {
9+
"Version": "2012-10-17",
10+
"Statement": [
11+
{
12+
"Effect": "Allow",
13+
"Principal": {
14+
"Service": "lambda.amazonaws.com"
15+
},
16+
"Action": "sts:AssumeRole"
17+
}
18+
]
19+
}
20+
}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "Bill",
3+
"greeting": "hello"
4+
}

0 commit comments

Comments
 (0)