Kubernetes
Fluid 挂载 S3 为 PVC 以及性能测试
· ☕ 1 分钟
1. 创建 Dataset 1 2 3 4 5 6 7 8 9 10 kubectl apply -f - <<EOF apiVersion: v1 kind: Secret metadata: name: my-s3 type: Opaque stringData: aws.accessKeyId: xxx aws.secretKey: xxx EOF 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 kubectl apply -f - <<EOF apiVersion: data.fluid.io/v1alpha1 kind: Dataset metadata: name: my-s3 spec: mounts: - mountPoint: s3://BUCKET/ name: s3 options: alluxio.underfs.s3.endpoint: ks3-cn-beijing-internal.ksyun.com alluxio.underfs.s3.disable.dns.buckets: "false" encryptOptions: - name: aws.accessKeyId valueFrom: secretKeyRef: name: my-s3 key: aws.accessKeyId - name: aws.secretKey valueFrom: secretKeyRef: name: my-s3 key: aws.secretKey accessModes: - ReadWriteMany EOF 2. 创建 Runtime 1 2 3 4 5 6 7 8 9

Fluid 直接挂载 S3 以及性能测试
· ☕ 3 分钟
1. 打包 Fluid Runtime 镜像 创建 fluid_config_init.py 脚本 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 #!/usr/bin/env python import json rawStr = "" with open("/etc/fluid/config.json", "r") as f: rawStr = f.readlines() rawStr = rawStr[0] script = """ #!/bin/sh set -ex MNT_FROM=$mountPoint MNT_TO=$targetPath trap "umount ${MNT_TO}" SIGTERM mkdir -p ${MNT_TO} mount -t lustre -o relatime,flock ${MNT_FROM} ${MNT_TO} sleep inf """ obj = json.loads(rawStr) with open("mount-lustre.sh", "w") as f: f.write('mountPoint="%s"\n' % obj["mounts"][0]["mountPoint"]) f.write('targetPath="%s"\n' % obj["targetPath"]) f.write(script) 只需调整一下 mount 命令即可。 创建启动脚本 entrypoint.sh 1 2 3

Fluid 使用 NFS Runtime 以及性能测试
· ☕ 3 分钟
1. 创建 Dataset 1 2 3 4 5 6 7 8 9 10 kubectl apply -f - <<EOF apiVersion: data.fluid.io/v1alpha1 kind: Dataset metadata: name: nfs-demo spec: mounts: - mountPoint: x.x.x.x:/x-x/ name: nfs-demo EOF 2. 创建 Runtime 1 2 3 4 5 6 7 8 9 10 11 12 13 14 kubectl apply -f - <<EOF apiVersion: data.fluid.io/v1alpha1 kind: ThinRuntimeProfile metadata: name: nfs spec: fileSystemType: nfs fuse: image: fluidcloudnative/nfs imageTag: v0.1 imagePullPolicy: IfNotPresent command: - "/usr/local/bin/entrypoint.sh" EOF 1 2 3 4 5 6 7 8 kubectl apply -f - <<EOF apiVersion: data.fluid.io/v1alpha1 kind: ThinRuntime metadata: name: nfs-demo spec: profileName: nfs EOF 3. 创建测试 Pod 1 2 3 4 5 6 7 8 9 10 11 12

Argo Events 事件驱动工作流
· ☕ 5 分钟
1. Argo Events 工作原理 上面是 Argo Events 官方网站上的架构图,对于事件处理系统,有三个重要的组成 事件源的接入,对应于 Event Source 事件的分发,对应于 Event Sensor 事件的消费,对应于 Event Trigger 事件消息存储在 EventBus 中,默认使用的 NATS。 2. 创建 ServiceAccount 给 Sensor 和 Workflow 创建 operate-workflow-sa operate-workflow-sa 用来授权 Sensor 操作 Workflow 。 1 2 3 4 5 6

Volcano 使用基础
· ☕ 5 分钟
1. Volcano 简介 Volcano 是华为开源的一个基于 Kubernetes 的资源调度系统,相较于原生的调度器,具有的显著特点有: 支持 gang scheduling 对于批量作业的调度,容易碰到死锁的问题,比如两个作业都需要同时运行 10 个 Pod 才能启动,当两个作业同时提交时,可能都只有部分 Pod 被调度,两个作业都无法正常