Skip to main content

Documentation

Concept

Concept introduces the concepts used or created within Pelicon, and their explanations.

Software Architecture

Software Architecture briefly introduces the software architecture of Pelicon.

Install

  1. Clone repo
git clone https://gitlab.daocloud.cn/ndx/engineering/storage/uds.git && cd uds
  1. Install
kubectl apply -f deploy/crds
kubectl apply -f deploy
  1. Create [StorageProvider](/docs/concept#StorageProvider CRD) to access the supported storage system (supported storage)
ls deploy/sp

kubectl apply -f xxx.yaml

or Access unknown storage

Usage

  1. [Automatic expansion](#Automatic expansion)

  2. [Schduled snapshot](#Scheduled snapshot)

  3. Backup

Automatic expansion

  1. Create an automatic expansion policy
apiVersion: uds.dce.daocloud.io/v1alpha1
kind: ResizePolicy
metadata:
name: resize-when-reach-50percent
namespace: default
spec:
expansionCapacityBytes: 1073741824
resizePolicyName: resize1
threshold: 50
  1. PVC binding Policy
kubectl annotate pvc <your-pvc-name> uds.dce.daocloud.io/policy-pvc='{"resizePolicies":{"resize-when-reach-50percens":null}}'

Scheduled snapshot

  1. Create a snapshot policy
apiVersion: uds.dce.daocloud.io/v1alpha1
kind: SnapshotPolicy
metadata:
name: scheduled-snap-01
namespace: default
spec:
retain: 10
schedule: 0 42 14 * * 6
  1. PVC binding Policy
kubectl annotate pvc <your-pvc-name> uds.dce.daocloud.io/policy-pvc='{"snapshotPolicies":{"scheduled-snap-01":null}}'

Backup

Backup configuration

  1. Backup to 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"}'
  1. Backup to 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

Create automatic backup 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 binding Policy

kubectl annotate pvc <your-pvc-name> uds.dce.daocloud.io/policy-pvc='{"backupPolicies":{"backup01":null}}'