Skip to content

Commit 6fc1f3a

Browse files
authored
Merge pull request #179 from wgy035/master
Add Arms Demo for Java
2 parents c259b67 + 64f524e commit 6fc1f3a

File tree

181 files changed

+9648
-0
lines changed

Some content is hidden

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

181 files changed

+9648
-0
lines changed

arms-demo/README.md

Whitespace-only changes.

arms-demo/docker/ClientDockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM registry.cn-zhangjiakou.aliyuncs.com/arms-docker-repo/arms-j2sdk-image:b89
2+
RUN yum install coreutils && usermod -u 1000 admin && groupmod -g 1000 admin
3+
COPY --chown=admin:admin ../mock-client/target/sanmu-aiops-demo-client /home/admin/sanmu-aiops-demo-client
4+
COPY --chown=admin:admin ../ArmsAgent /home/admin/ArmsAgent/
5+
COPY --chown=admin:admin ../arthas /home/admin/arthas/
6+
WORKDIR /home/admin/sanmu-aiops-demo-client
7+
USER admin:admin
8+
# official exp
9+
ENTRYPOINT ["./bin/app.sh", "start"]

arms-demo/docker/ServerDockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM registry.cn-zhangjiakou.aliyuncs.com/arms-docker-repo/arms-j2sdk-image:b89
2+
RUN yum install coreutils && usermod -u 1000 admin && groupmod -g 1000 admin
3+
WORKDIR /home/admin/sanmu-aiops-demo-server
4+
USER admin:admin
5+
COPY --chown=admin:admin ../arthas /home/admin/arthas/
6+
COPY --chown=admin:admin ../mock-server/target/sanmu-aiops-demo-server /home/admin/sanmu-aiops-demo-server
7+
ARG ENV=prod
8+
COPY --chown=admin:admin ../ArmsAgent/prod-cn-hangzhou /home/admin/ArmsAgent/
9+
# official exp
10+
ENV CURRENT_ENV ${ENV}
11+
ENTRYPOINT ["sh","./bin/bootstrap.sh"]
12+
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM registry.cn-zhangjiakou.aliyuncs.com/arms-docker-repo/arms-j2sdk-image:b89
2+
COPY --from=https://paq60666.live.dynatrace.com/linux/oneagent-codemodules:java / /
3+
ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so
4+
RUN yum install coreutils && usermod -u 1000 admin && groupmod -g 1000 admin
5+
COPY --chown=admin:admin ../mock-server/target/sanmu-aiops-demo-server /home/admin/sanmu-aiops-demo-server
6+
COPY --chown=admin:admin ../ArmsAgent /home/admin/ArmsAgent/
7+
COPY --chown=admin:admin ../arthas /home/admin/arthas/
8+
WORKDIR /home/admin/sanmu-aiops-demo-server
9+
USER admin:admin
10+
# official exp
11+
ENTRYPOINT ["./bin/app.sh", "start"]

arms-demo/insights-helm/.helmignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

arms-demo/insights-helm/Chart.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: v2
2+
name: insights-helm
3+
description: A Helm chart for Kubernetes
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18+
version: 1.0.0
19+
20+
# This is the version number of the application being deployed. This version number should be
21+
# incremented each time you make changes to the application. Versions are not expected to
22+
# follow Semantic Versioning. They should reflect the version the application is using.
23+
# It is recommended to use it with quotes.
24+
appVersion: "1.16.0"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
annotations:
5+
service.beta.kubernetes.io/alibaba-cloud-loadbalancer-spec: slb.s1.small
6+
name: continuous-profiling-slb
7+
namespace: {{ .Values.common.namespace}}
8+
spec:
9+
ports:
10+
- name: slb
11+
port: 80
12+
protocol: TCP
13+
targetPort: 8080
14+
selector:
15+
app: continuous-profiling
16+
sessionAffinity: None
17+
type: LoadBalancer
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
labels:
5+
app: continuous-profiling
6+
name: continuous-profiling
7+
namespace: {{ .Values.common.namespace}}
8+
spec:
9+
replicas: 1
10+
selector:
11+
matchLabels:
12+
app: continuous-profiling
13+
strategy:
14+
rollingUpdate:
15+
maxSurge: 25%
16+
maxUnavailable: 25%
17+
type: RollingUpdate
18+
template:
19+
metadata:
20+
annotations:
21+
armsPilotAutoEnable: 'on'
22+
armsPilotCreateAppName: continuous-profiling
23+
labels:
24+
app: continuous-profiling
25+
armsPilotAutoEnable: 'on'
26+
armsPilotCreateAppName: continuous-profiling
27+
spec:
28+
containers:
29+
- image: {{ .Values.profiling.image}}
30+
imagePullPolicy: Always
31+
name: continuous-profiling
32+
resources:
33+
requests:
34+
cpu: 250m
35+
memory: 512Mi
36+
restartPolicy: Always
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
labels:
5+
app: insights-client
6+
name: insights-client
7+
namespace: {{ .Values.common.namespace}}
8+
spec:
9+
replicas: 1
10+
selector:
11+
matchLabels:
12+
app: insights-client
13+
strategy:
14+
rollingUpdate:
15+
maxSurge: 25%
16+
maxUnavailable: 25%
17+
type: RollingUpdate
18+
template:
19+
metadata:
20+
labels:
21+
app: insights-client
22+
spec:
23+
containers:
24+
- image: {{ .Values.client.image}}
25+
imagePullPolicy: Always
26+
name: insights-client
27+
resources:
28+
requests:
29+
cpu: 250m
30+
memory: 512Mi
31+
restartPolicy: Always
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
labels:
5+
app: insights-http-server-0
6+
name: insights-http-server-0
7+
namespace: {{ .Values.common.namespace}}
8+
spec:
9+
replicas: 1
10+
selector:
11+
matchLabels:
12+
app: insights-http-server-0
13+
strategy:
14+
rollingUpdate:
15+
maxSurge: 25%
16+
maxUnavailable: 25%
17+
type: RollingUpdate
18+
template:
19+
metadata:
20+
labels:
21+
app: insights-http-server-0
22+
spec:
23+
containers:
24+
- env:
25+
- name: SERVICE_NAME
26+
value: insights-http-server-0
27+
- name: MOCK_SERVER_ID
28+
value: '0'
29+
- name: spring.redis.host
30+
value: "{{ .Values.redis.host }}"
31+
- name: spring.redis.password
32+
value: "{{ .Values.redis.password }}"
33+
- name: spring.datasource.url
34+
value: "jdbc:mysql://{{ .Values.mysql.host }}:{{ .Values.mysql.port }}/arms_mock?characterEncoding=utf-8&useSSL=false"
35+
- name: spring.datasource.username
36+
value: "{{ .Values.mysql.username }}"
37+
- name: spring.datasource.password
38+
value: {{ .Values.mysql.password }}
39+
image: {{ .Values.server.image}}
40+
imagePullPolicy: Always
41+
name: insights-http-server-0
42+
resources:
43+
requests:
44+
cpu: 250m
45+
memory: 256Mi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
labels:
5+
app: insights-http-server-1
6+
name: insights-http-server-1
7+
namespace: {{ .Values.common.namespace}}
8+
spec:
9+
replicas: 1
10+
selector:
11+
matchLabels:
12+
app: insights-http-server-1
13+
strategy:
14+
rollingUpdate:
15+
maxSurge: 25%
16+
maxUnavailable: 25%
17+
type: RollingUpdate
18+
template:
19+
metadata:
20+
labels:
21+
app: insights-http-server-1
22+
spec:
23+
containers:
24+
- env:
25+
- name: SERVICE_NAME
26+
value: insights-http-server-1
27+
- name: MOCK_SERVER_ID
28+
value: '0'
29+
- name: spring.redis.host
30+
value: "{{ .Values.redis.host }}"
31+
- name: spring.redis.password
32+
value: "{{ .Values.redis.password }}"
33+
- name: spring.datasource.url
34+
value: "jdbc:mysql://{{ .Values.mysql.host }}:{{ .Values.mysql.port }}/arms_mock?characterEncoding=utf-8&useSSL=false"
35+
- name: spring.datasource.username
36+
value: "{{ .Values.mysql.username }}"
37+
- name: spring.datasource.password
38+
value: {{ .Values.mysql.password }}
39+
image: {{ .Values.server.image}}
40+
imagePullPolicy: Always
41+
name: insights-http-server-1
42+
resources:
43+
requests:
44+
cpu: 250m
45+
memory: 256Mi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: insights-http-service-0
5+
namespace: {{ .Values.common.namespace}}
6+
spec:
7+
ports:
8+
- name: insights-http-service-0
9+
port: 9190
10+
protocol: TCP
11+
targetPort: 9190
12+
type: ClusterIP
13+
selector:
14+
app: insights-http-server-0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: insights-http-service-1
5+
namespace: {{ .Values.common.namespace}}
6+
spec:
7+
ports:
8+
- name: insights-http-service-1
9+
port: 9190
10+
protocol: TCP
11+
targetPort: 9190
12+
type: ClusterIP
13+
selector:
14+
app: insights-http-server-1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: insights-mysql-connection-service
5+
namespace: {{ .Values.common.namespace}}
6+
spec:
7+
ports:
8+
- name: insights-mysql-connection-service
9+
port: 9190
10+
protocol: TCP
11+
targetPort: 9190
12+
type: ClusterIP
13+
selector:
14+
app: insights-mysql-connection
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
labels:
5+
app: insights-mysql-connection
6+
name: insights-mysql-connection
7+
namespace: {{ .Values.common.namespace}}
8+
spec:
9+
replicas: 1
10+
selector:
11+
matchLabels:
12+
app: insights-mysql-connection
13+
strategy:
14+
rollingUpdate:
15+
maxSurge: 25%
16+
maxUnavailable: 25%
17+
type: RollingUpdate
18+
template:
19+
metadata:
20+
annotations:
21+
armsPilotAutoEnable: 'on'
22+
armsPilotCreateAppName: insights-mysql-connection
23+
labels:
24+
app: insights-mysql-connection
25+
armsPilotAutoEnable: 'on'
26+
armsPilotCreateAppName: insights-mysql-connection
27+
spec:
28+
containers:
29+
- env:
30+
- name: SERVICE_NAME
31+
value: insights-mysql-connection
32+
- name: MOCK_SERVER_ID
33+
value: '0'
34+
- name: spring.redis.host
35+
value: "{{ .Values.redis.host }}"
36+
- name: spring.redis.password
37+
value: "{{ .Values.redis.password }}"
38+
- name: spring.datasource.url
39+
value: "jdbc:mysql://{{ .Values.mysql.host }}:{{ .Values.mysql.port }}/arms_mock?characterEncoding=utf-8&useSSL=false"
40+
- name: spring.datasource.username
41+
value: "{{ .Values.mysql.username }}"
42+
- name: spring.datasource.password
43+
value: {{ .Values.mysql.password }}
44+
image: {{ .Values.server.image}}
45+
imagePullPolicy: Always
46+
name: insights-mysql-connection
47+
resources:
48+
requests:
49+
cpu: 250m
50+
memory: 256Mi

0 commit comments

Comments
 (0)