文档
概念
概念这篇文档介绍Pelicon内部使用或创造的概念,及其解释.
软件架构
软件架构这篇文档简单介绍Pelicon的软件架构.
安装
- Clone repo
git clone https://gitlab.daocloud.cn/ndx/engineering/storage/uds.git && cd uds
- 安装
kubectl apply -f deploy/crds
kubectl apply -f deploy
- 创建[StorageProvider](/cn/docs/concept#StorageProvider CRD)接入支持的存储系统(支持列表)
ls deploy/sp
kubectl apply -f xxx.yaml
使用
自动扩容
- 创建自动扩容Policy
apiVersion: uds.dce.daocloud.io/v1alpha1
kind: ResizePolicy
metadata:
name: resize-when-reach-50percent
namespace: default
spec:
expansionCapacityBytes: 1073741824
resizePolicyName: resize1
threshold: 50
- PVC绑定Policy
kubectl annotate pvc <your-pvc-name> uds.dce.daocloud.io/policy-pvc='{"resizePolicies":{"resize-when-reach-50percens":null}}'
定时快照
- 创建快照Policy
apiVersion: uds.dce.daocloud.io/v1alpha1
kind: SnapshotPolicy
metadata:
name: scheduled-snap-01
namespace: default
spec:
retain: 10
schedule: 0 42 14 * * 6
- PVC绑定Policy
kubectl annotate pvc <your-pvc-name> uds.dce.daocloud.io/policy-pvc='{"snapshotPolicies":{"scheduled-snap-01":null}}'
备份
备份端配置
- 备份到NFS
apiVersion: v1
kind: ConfigMap
metadata:
labels:
backend-storage-type: NFS
name: nfs-target
namespace: default
data:
nfs.config: '{"nfsServer":"10.6.234.2","nfsExportPath":"/nfs","nfsBackupRootDir":"/backup"}'
- 备份到S3
apiVersion: v1
kind: ConfigMap
metadata:
annotations:
uds.dce.daocloud.io/backup-target-config: '{"s3ConfName":"dce-uds-backup-remote-s3","s3BackupBucket":"uds-backup"}'
name: s3-target
namespace: default
data:
rclone.conf: |-
[dce-uds-backup-remote-s3]
type = s3
provider = Minio
env_auth = false
access_key_id = Access KEY
secret_access_key = Secret KEY
endpoint = 10.7.209.49:9000
location-constraint = us-east-1
acl = private
创建自动备份policy
apiVersion: uds.dce.daocloud.io/v1alpha1
kind: BackupPolicy
metadata:
name: backup01
namespace: default
spec:
backupTargetType: S3
backupType: full
configMapName: s3-target
configMapNamespace: default
retain: 10
schedule: 0 36 14 * * 5
status:
phase: Running
PVC绑定Policy
kubectl annotate pvc <your-pvc-name> uds.dce.daocloud.io/policy-pvc='{"backupPolicies":{"backup01":null}}'