Fluid 使用 Lustre Runtime 以及性能测试
· ☕ 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