接上一篇,搭建好glusterfs集群后,我们接下来创建单独的卷给jenkins使用,脚本已写好,直接运行即可:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#!/bin/sh if [ $# -lt 2 ]; then echo "please input at least 2 param" exit 0 fi glusterfs_volume_name=$1 glusterfs_volume_path=$2 #dbSize=$3 gluster volume create $glusterfs_volume_name replica 2 gluster1:/data//brick1/$glusterfs_volume_path gluster2:/data//brick1/$glusterfs_volume_path force gluster volume list gluster volume start $glusterfs_volume_name |
1 |
sh cg.sh k8s-volume-jenkins-master jenkins-master |
编写endpoints.yaml文件,内容如下:[……]