Skip to content

Commit 0ad7a77

Browse files
committed
updated w/ debugger/profiler
1 parent c0f71f5 commit 0ad7a77

File tree

8 files changed

+69
-5
lines changed

8 files changed

+69
-5
lines changed

examples-bootiful-gcp/guestbook-service/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@
7676
<groupId>pl.project13.maven</groupId>
7777
<artifactId>git-commit-id-plugin</artifactId>
7878
</plugin>
79+
<plugin>
80+
<groupId>com.googlecode.maven-download-plugin</groupId>
81+
<artifactId>download-maven-plugin</artifactId>
82+
</plugin>
7983
</plugins>
8084
</build>
8185

examples-bootiful-gcp/guestbook-service/src/main/resources/application.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ spring:
1212
test-on-borrow: true
1313
validation-query: SELECT 1
1414
jpa:
15-
database-platform: org.hibernate.dialect.MySQLDialect
1615
hibernate:
1716
generate-ddl: true
1817
ddl-auto: update

examples-bootiful-gcp/helloworld-service/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@
6868
<groupId>pl.project13.maven</groupId>
6969
<artifactId>git-commit-id-plugin</artifactId>
7070
</plugin>
71+
<plugin>
72+
<groupId>com.googlecode.maven-download-plugin</groupId>
73+
<artifactId>download-maven-plugin</artifactId>
74+
</plugin>
7175
</plugins>
7276
</build>
7377

examples-bootiful-gcp/helloworld-ui/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@
8080
<groupId>pl.project13.maven</groupId>
8181
<artifactId>git-commit-id-plugin</artifactId>
8282
</plugin>
83+
<plugin>
84+
<groupId>com.googlecode.maven-download-plugin</groupId>
85+
<artifactId>download-maven-plugin</artifactId>
86+
</plugin>
8387
</plugins>
8488
</build>
8589

examples-bootiful-gcp/kubernetes/mysql-deployment.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ spec:
1818
spec:
1919
containers:
2020
- name: mysql
21-
image: mysql:5.6
21+
image: mysql:8.0.13
2222
resources:
2323
limits :
24-
cpu: 0.5
24+
cpu: 1.0
2525
env:
2626
- name: MYSQL_ROOT_PASSWORD
2727
# change this
@@ -36,6 +36,7 @@ spec:
3636
- name: mysql-persistent-storage
3737
# mount path within the container
3838
mountPath: /var/lib/mysql
39+
subPath: mysql
3940
volumes:
4041
- name: mysql-persistent-storage
4142
persistentVolumeClaim:

examples-bootiful-gcp/kubernetes/ui-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ spec:
5151
value: redis
5252
readinessProbe:
5353
httpGet:
54-
path: /health
54+
path: /actuator/health
5555
port: 8080
5656
ports:
5757
- name: http

examples-bootiful-gcp/kubernetes/ui-service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
type: LoadBalancer
2626
ports:
2727
- port: 80
28-
targetPort: http
28+
targetPort: 8080
2929
name: http
3030
selector:
3131
app: helloworld-ui

examples-bootiful-gcp/pom.xml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2424
<java.version>1.8</java.version>
2525
<spring-cloud.version>Greenwich.M3</spring-cloud.version>
26+
<download-maven-plugin.version>1.4.1</download-maven-plugin.version>
27+
28+
<!-- Stackdriver Agent -->
29+
<jib.agent.directory>${project.build.directory}/jib-agents</jib.agent.directory>
30+
<stackdriver.debugger.url>https://storage.googleapis.com/cloud-debugger/compute-java/debian-wheezy/cdbg_java_agent_gce.tar.gz</stackdriver.debugger.url>
31+
<stackdriver.debugger.directory>/opt/debugger</stackdriver.debugger.directory>
32+
<stackdriver.profiler.url>https://storage.googleapis.com/cloud-profiler/java/latest/profiler_java_agent.tar.gz</stackdriver.profiler.url>
33+
<stackdriver.profiler.directory>/opt/profiler</stackdriver.profiler.directory>
2634

2735
<!-- TODO change the following to your Docker registry prefix -->
2836
<docker.image.prefix>gcr.io/wise-coyote-827</docker.image.prefix>
@@ -36,9 +44,22 @@
3644
<artifactId>jib-maven-plugin</artifactId>
3745
<version>0.10.1</version>
3846
<configuration>
47+
<from>
48+
<image>adoptopenjdk/openjdk8-openj9:x86_64-ubuntu-jdk8u192-b12_openj9-0.11.0-slim</image>
49+
</from>
3950
<to>
4051
<image>${docker.image.prefix}/bootiful-${project.artifactId}</image>
4152
</to>
53+
<extraDirectory>${jib.agent.directory}</extraDirectory>
54+
<container>
55+
<jvmFlags>
56+
<jvmFlag>-XX:+ContainerSupport</jvmFlag>
57+
<jvmFlag>-agentpath:/opt/profiler/profiler_java_agent.so=-cprof_service=${project.artifactId},-cprof_service_version=${project.version}</jvmFlag>
58+
<jvmFlag>-agentpath:${stackdriver.debugger.directory}/cdbg_java_agent.so=--logtostderr=1</jvmFlag>
59+
<jvmFlag>-Dcom.google.cdbg.module=${project.artifactId}</jvmFlag>
60+
<jvmFlag>-Dcom.google.cdbg.version=${project.version}</jvmFlag>
61+
</jvmFlags>
62+
</container>
4263
</configuration>
4364
</plugin>
4465
<plugin>
@@ -56,6 +77,37 @@
5677
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
5778
</configuration>
5879
</plugin>
80+
<plugin>
81+
<groupId>com.googlecode.maven-download-plugin</groupId>
82+
<artifactId>download-maven-plugin</artifactId>
83+
<version>${download-maven-plugin.version}</version>
84+
<executions>
85+
<execution>
86+
<id>install-stackdriver-debugger</id>
87+
<phase>prepare-package</phase>
88+
<goals>
89+
<goal>wget</goal>
90+
</goals>
91+
<configuration>
92+
<url>${stackdriver.debugger.url}</url>
93+
<unpack>true</unpack>
94+
<outputDirectory>${jib.agent.directory}/${stackdriver.debugger.directory}</outputDirectory>
95+
</configuration>
96+
</execution>
97+
<execution>
98+
<id>install-stackdriver-profiler</id>
99+
<phase>prepare-package</phase>
100+
<goals>
101+
<goal>wget</goal>
102+
</goals>
103+
<configuration>
104+
<url>${stackdriver.profiler.url}</url>
105+
<unpack>true</unpack>
106+
<outputDirectory>${jib.agent.directory}/${stackdriver.profiler.directory}</outputDirectory>
107+
</configuration>
108+
</execution>
109+
</executions>
110+
</plugin>
59111
</plugins>
60112
</pluginManagement>
61113
</build>

0 commit comments

Comments
 (0)