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

支持与AIOS集成部署功能 #77

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
13 changes: 9 additions & 4 deletions application.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
debug: true
server:
port: 8888

servlet:
context-path: /openmldb-featinsight
openmldb:
zk_cluster: openmldb-zk:2181
zk_cluster: 172.27.231.51:2181
zk_path: /openmldb
apiserver: openmldb-zk:9080
apiserver: 172.27.231.51:9080
skip_index_check: false
username: root
password: 123456
password:
prophet:
token_auth_enabled: true
pdms_uri: http://172.27.128.190:40121
130 changes: 130 additions & 0 deletions cicd/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
---
apiVersion: v1
kind: Service
metadata:
name: openmldb-featinsight
namespace: prophet
labels:
app: openmldb-featinsight
enable-on-api-gw: "true"
annotations:
api-gw-conf: '{"gw-api-confs":[{"listen-paths":"/openmldb-featinsight","enable-auth":false}]}'
spec:
type: ClusterIP
selector:
app: openmldb-featinsight
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: openmldb-featinsight
name: openmldb-featinsight
namespace: prophet
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: openmldb-featinsight
release: aios
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: openmldb-featinsight
prophet.4paradigm.com/deployment: openmldb-featinsight
release: aios
name: openmldb-featinsight
spec:
imagePullSecrets:
- name: docker-secret
nodeSelector:
prophet.4paradigm.com/system: "true"
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
name: openmldb-featinsight-configmap
name: openmldb-featinsight-configmap
containers:
- env:
- name: MY_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: MY_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: MY_POD_SERVICE_ACCOUNT
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.serviceAccountName
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: MY_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: TZ
value: Asia/Shanghai
image: harbor.4pd.io/studio/openmldb-featinsight:v0.1.1
imagePullPolicy: IfNotPresent
livenessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 60
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 1
failureThreshold: 3
name: app
ports:
- containerPort: 80
protocol: TCP
resources: {}
volumeMounts:
- mountPath: /app/application.yml
name: openmldb-featinsight-configmap
subPath: application.yml
---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: openmldb-featinsight
name: openmldb-featinsight-configmap
namespace: prophet
data:
application.yml: |-
server:
port: 80
openmldb:
zk_cluster: 172.27.231.51:2181
zk_path: /openmldb
apiserver: 172.27.231.51:9080
skip_index_check: false
username: root
password:
prophet:
token_auth_enabled: true
pdms_uri: http://172.27.128.190:40121/telamon
Binary file added cicd/openmldb-featinsight-1.0.0.tgz
Binary file not shown.
23 changes: 23 additions & 0 deletions cicd/openmldb-featinsight/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions cicd/openmldb-featinsight/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: openmldb-featinsight
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.0.0"
21 changes: 21 additions & 0 deletions cicd/openmldb-featinsight/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: openmldb-featinsight
name: openmldb-featinsight-configmap
namespace: prophet
data:
application.yml: |-
server:
port: 80
openmldb:
zk_cluster: {{ .Values.openmldb.zk_cluster }}
zk_path: {{ .Values.openmldb.zk_path }}
apiserver: {{ .Values.openmldb.apiserver }}
skip_index_check: {{ .Values.openmldb.skip_index_check }}
username: {{ .Values.openmldb.username }}
password: {{ .Values.openmldb.password }}
prophet:
token_auth_enabled: {{ .Values.prophet.token_auth_enabled }}
pdms_uri: {{ .Values.prophet.pdms_uri }}
87 changes: 87 additions & 0 deletions cicd/openmldb-featinsight/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: openmldb-featinsight
name: openmldb-featinsight
namespace: prophet
spec:
progressDeadlineSeconds: 600
replicas: {{ .Values.replicaCount }}
revisionHistoryLimit: 10
selector:
matchLabels:
app: openmldb-featinsight
release: aios
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: openmldb-featinsight
prophet.4paradigm.com/deployment: openmldb-featinsight
release: aios
name: openmldb-featinsight
spec:
imagePullSecrets:
- name: docker-secret
nodeSelector:
prophet.4paradigm.com/system: "true"
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
name: openmldb-featinsight-configmap
name: openmldb-featinsight-configmap
containers:
- env:
- name: MY_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: MY_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: MY_POD_SERVICE_ACCOUNT
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.serviceAccountName
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: MY_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: TZ
value: Asia/Shanghai
image: "{{ .Values.image.repository }}"
imagePullPolicy: IfNotPresent
livenessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 60
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 1
failureThreshold: 3
name: app
ports:
- containerPort: 80
protocol: TCP
resources: {}
volumeMounts:
- mountPath: /app/application.yml
name: openmldb-featinsight-configmap
subPath: application.yml
19 changes: 19 additions & 0 deletions cicd/openmldb-featinsight/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: openmldb-featinsight
namespace: prophet
labels:
app: openmldb-featinsight
enable-on-api-gw: "true"
annotations:
api-gw-conf: '{"gw-api-confs":[{"listen-paths":"/openmldb-featinsight","enable-auth":false}]}'
spec:
type: ClusterIP
selector:
app: openmldb-featinsight
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
19 changes: 19 additions & 0 deletions cicd/openmldb-featinsight/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Default values for openmldb-featinsight.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1

image:
repository: harbor.4pd.io/studio/openmldb-featinsight:v0.1.1

openmldb:
zk_cluster: 172.27.231.51:2181
zk_path: /openmldb
apiserver: 172.27.231.51:9080
skip_index_check: false
username: root
password:
prophet:
token_auth_enabled: true
pdms_uri: http://telamon
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM openjdk:17-oracle
FROM harbor.4pd.io/inf/base-jdk8-ubuntu:1.0.0

WORKDIR /app

ADD featinsight-0.1.0-SNAPSHOT.jar /app/
ADD featinsight-0.1.1-SNAPSHOT.jar /app/

EXPOSE 8888

CMD ["java", "-jar", "/app/featinsight-0.1.0-SNAPSHOT.jar"]
CMD ["java", "-jar", "/app/featinsight-0.1.1-SNAPSHOT.jar"]

2 changes: 1 addition & 1 deletion docker/build_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -ex

docker build -t registry.cn-shenzhen.aliyuncs.com/tobe43/featinsight .
docker build -t harbor.4pd.io/studio/openmldb-featinsight:v0.1.1 .
6 changes: 2 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,12 @@
<dependency>
<groupId>com.4paradigm.openmldb</groupId>
<artifactId>openmldb-native</artifactId>
<version>0.8.5-allinone</version>
<!-- <version>0.8.4-SNAPSHOT</version> -->
<version>0.9.1-allinone-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.4paradigm.openmldb</groupId>
<artifactId>openmldb-jdbc</artifactId>
<version>0.8.5</version>
<!-- <version>0.8.4-SNAPSHOT</version> -->
<version>0.9.1-SNAPSHOT</version>
</dependency>

</dependencies>
Expand Down
Loading