Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.
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
5 changes: 5 additions & 0 deletions docs/ecosystem/Kubernetes-with-Dragonfly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## supernode.yaml
supernode的yaml文件,nodeport端口映射
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should update english docs first.


## node-dfclient.yaml
dfclient的daemonset模式yaml文件
42 changes: 42 additions & 0 deletions docs/ecosystem/node-dfclient.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
kind: DaemonSet
apiVersion: apps/v1beta2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The apps/v1beta2/DaemonSet apiVersion is deprecated. Please update.

metadata:
labels:
app: node-dfclient
name: node-dfclient
namespace: kube-system
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a new namespace "dragonfly-system" is better

spec:
revisionHistoryLimit: 1
selector:
matchLabels:
app: node-dfclient
template:
metadata:
labels:
app: node-dfclient
spec:
containers:
- name: node-dfclient
image: 10.1.1.5/kube-system/dfclient:1.0.6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to docker hub image for public.

command:
- /opt/dragonfly/df-client/dfdaemon
- --registry
- http://10.1.1.5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment here for custom image registry

- --node
- 10.1.1.25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use supernode service instead.

ports:
- containerPort: 65001
hostPort: 65001
name: node-dfclient
volumeMounts:
- mountPath: /root/.small-dragonfly
name: dfclient
volumes:
- name: dfclient
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment here for explain why use hostPath.

hostPath:
path: /data/small-dragonfly
hostNetwork: true
hostPID: true
tolerations:
- effect: NoSchedule
operator: Exists
85 changes: 85 additions & 0 deletions docs/ecosystem/supernode.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: supernode
namespace: kube-system
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

namespace "dragonfly-system"

labels:
app: supernode
annotations:
deployment.kubernetes.io/revision: "1"
spec:
replicas: 1
selector:
matchLabels:
app: supernode
template:
metadata:
labels:
app: supernode
spec:
affinity:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove affinity

nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- ai-node-25
containers:
- name: supernode
image: 10.1.1.5/kube-system/supernode:1.0.6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change like node-dfclient

imagePullPolicy: IfNotPresent
command:
- /root/start.sh
- --download-port=8001
ports:
- containerPort: 8001
hostPort: 8001
name: download-port
- containerPort: 8002
hostPort: 8002
name: harbor-port
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

harbor port ? it should be nginx port

volumeMounts:
- mountPath: /home/admin/supernode
name: supernode-data
resources:
limits:
cpu: 4000m
memory: 4096Mi
requests:
cpu: 1000m
memory: 1024Mi
readinessProbe:
tcpSocket:
port: 8001
initialDelaySeconds: 2
timeoutSeconds: 3
periodSeconds: 40
successThreshold: 1
failureThreshold: 3
volumes:
- name: supernode-data
hostPath:
path: /data/dragonfly/supernode
hostNetwork: true
hostPID: true
tolerations:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment should not tolerate all taints.

- effect: NoSchedule
operator: Exists
---
kind: Service
apiVersion: v1
metadata:
labels:
app: supernode
name: supernode-svc
namespace: kube-system
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

namespace "dragonfly-system"

spec:
ports:
- name: download
port: 8001
protocol: TCP
type: ClusterIP
selector:
app: supernode