Skip to content

Commit

Permalink
Update docs (run minio in v1.9.4+ cluster and add example yaml files …
Browse files Browse the repository at this point in the history
…in respective backends) (#473)

This PR fixes #467 

Change log:
- [x] Update minio doc to run minio server in v1.9.4 and later cluster
- [x]  Add  example yaml files in respective backends
- [x] Update docs with respective file yaml locations
  • Loading branch information
Md. Emruz Hossain authored and tamalsaha committed May 5, 2018
1 parent 6510947 commit c448e13
Show file tree
Hide file tree
Showing 20 changed files with 329 additions and 36 deletions.
12 changes: 12 additions & 0 deletions docs/examples/backends/gcs/gcs-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: stash-recovered
labels:
app: stash-demo
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
13 changes: 13 additions & 0 deletions docs/examples/backends/gcs/gcs-recovery-to-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: stash.appscode.com/v1alpha1
kind: Recovery
metadata:
name: gcs-recovery
namespace: default
spec:
repository: deployment.stash-demo
paths:
- /source/data
recoveredVolumes:
- mountPath: /source/data
persistentVolumeClaim:
claimName: stash-recovered
14 changes: 14 additions & 0 deletions docs/examples/backends/gcs/gcs-recovery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: stash.appscode.com/v1alpha1
kind: Recovery
metadata:
name: gcs-recovery
namespace: default
spec:
repository: deployment.stash-demo
paths:
- /source/data
recoveredVolumes:
- mountPath: /source/data
gcePersistentDisk:
pdName: stash-recovered
fsType: ext4
6 changes: 3 additions & 3 deletions docs/examples/backends/gcs/gcs-restic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ metadata:
spec:
selector:
matchLabels:
app: gcs-restic
app: stash-demo
fileGroups:
- path: /source/data
retentionPolicyName: 'keep-last-5'
backend:
gcs:
bucket: stash-qa
bucket: stash-backup-repo
prefix: demo
storageSecretName: gcs-secret
schedule: '@every 1m'
Expand All @@ -22,4 +22,4 @@ spec:
retentionPolicies:
- name: 'keep-last-5'
keepLast: 5
prune: true
prune: true
31 changes: 31 additions & 0 deletions docs/examples/backends/gcs/restored-deployment-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: apps/v1beta1
kind: Deployment
metadata:
labels:
app: stash-demo
name: stash-demo
namespace: default
spec:
replicas: 1
template:
metadata:
labels:
app: stash-demo
name: busybox
spec:
containers:
- args:
- sleep
- "3600"
image: busybox
imagePullPolicy: IfNotPresent
name: busybox
volumeMounts:
- mountPath: /source/data
name: source-data
restartPolicy: Always
volumes:
- name: source-data
gcePersistentDisk:
pdName: stash-recovered
fsType: ext4
30 changes: 30 additions & 0 deletions docs/examples/backends/gcs/restored-deployment-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: apps/v1beta1
kind: Deployment
metadata:
labels:
app: stash-demo
name: stash-demo
namespace: default
spec:
replicas: 1
template:
metadata:
labels:
app: stash-demo
name: busybox
spec:
containers:
- args:
- sleep
- "3600"
image: busybox
imagePullPolicy: IfNotPresent
name: busybox
volumeMounts:
- mountPath: /source/data
name: source-data
restartPolicy: Always
volumes:
- name: source-data
persistentVolumeClaim:
claimName: stash-recovered
57 changes: 57 additions & 0 deletions docs/examples/backends/minio/minio-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
# This name uniquely identifies the Deployment
name: minio-deployment
labels:
app: minio
spec:
strategy:
type: Recreate # If pod fail, we want to recreate pod rather than restarting it.
template:
metadata:
labels:
# Label is used as a selector in the service.
app: minio-server
spec:
volumes:
# Refer to the PVC have created earlier
- name: storage
persistentVolumeClaim:
# Name of the PVC created earlier
claimName: minio-pvc
- name: minio-certs
secret:
secretName: minio-server-secret
items:
- key: public.crt
path: public.crt
- key: private.key
path: private.key
- key: public.crt
path: CAs/public.crt # mark self signed certificate as trusted
containers:
- name: minio
# Pulls the default Minio image from Docker Hub
image: minio/minio
args:
- server
- --address
- ":443"
- /storage
env:
# Minio access key and secret key
- name: MINIO_ACCESS_KEY
value: "<your minio access key(any string)>"
- name: MINIO_SECRET_KEY
value: "<your minio secret key(any string)>"
ports:
- containerPort: 443
# This ensures containers are allocated on separate hosts. Remove hostPort to allow multiple Minio containers on one host
hostPort: 443
# Mount the volumes into the pod
volumeMounts:
- name: storage # must match the volume name, above
mountPath: "/storage"
- name: minio-certs
mountPath: "/root/.minio/certs"
15 changes: 15 additions & 0 deletions docs/examples/backends/minio/minio-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
# This name uniquely identifies the PVC. Will be used in minio deployment.
name: minio-pvc
labels:
app: minio
spec:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
# This is the request for storage. Should be available in the cluster.
requests:
storage: 2Gi
10 changes: 5 additions & 5 deletions docs/examples/backends/minio/minio-restic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ metadata:
spec:
selector:
matchLabels:
app: stash-demo
app: stash-demo # Must match with the label of busybox pod we have created before.
fileGroups:
- path: /source/data
retentionPolicyName: 'keep-last-5'
backend:
s3:
endpoint: '<your Minio server address>'
bucket: stash-qa
prefix: demo
endpoint: 'https://minio-service.default.svc' # Use your own Minio server address.
bucket: stash-qa # Give a name of the bucket where you want to backup.
prefix: demo # . Path prefix into bucket where repository will be created.(optional).
storageSecretName: minio-restic-secret
schedule: '@every 1m'
volumeMounts:
Expand All @@ -23,4 +23,4 @@ spec:
retentionPolicies:
- name: 'keep-last-5'
keepLast: 5
prune: true
prune: true
14 changes: 14 additions & 0 deletions docs/examples/backends/minio/minio-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: minio-service
labels:
app: minio
spec:
type: LoadBalancer
ports:
- port: 443
targetPort: 443
protocol: TCP
selector:
app: minio-server # must match with the label used in the deployment
30 changes: 30 additions & 0 deletions docs/examples/backends/rook/restored-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: apps/v1beta1
kind: Deployment
metadata:
labels:
app: stash-demo
name: stash-demo
namespace: default
spec:
replicas: 1
template:
metadata:
labels:
app: stash-demo
name: busybox
spec:
containers:
- args:
- sleep
- "3600"
image: busybox
imagePullPolicy: IfNotPresent
name: busybox
volumeMounts:
- mountPath: /source/data
name: source-data
restartPolicy: Always
volumes:
- name: source-data
persistentVolumeClaim:
claimName: stash-recovered
13 changes: 13 additions & 0 deletions docs/examples/backends/rook/rook-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: stash-recovered
labels:
app: stash-demo
spec:
storageClassName: rook-block
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
13 changes: 13 additions & 0 deletions docs/examples/backends/rook/rook-recovery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: stash.appscode.com/v1alpha1
kind: Recovery
metadata:
name: rook-recovery
namespace: default
spec:
repository: deployment.stash-demo
paths:
- /source/data
recoveredVolumes:
- mountPath: /source/data
persistentVolumeClaim:
claimName: stash-recovered
26 changes: 26 additions & 0 deletions docs/examples/backends/rook/rook-restic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: stash.appscode.com/v1alpha1
kind: Restic
metadata:
name: rook-restic
namespace: default
spec:
selector:
matchLabels:
app: stash-demo # Must match with the label of busybox pod we have created before.
fileGroups:
- path: /source/data
retentionPolicyName: 'keep-last-5'
backend:
s3:
endpoint: 'http://rook-ceph-rgw-my-store.rook' # Use your own rook object storage end point.
bucket: stash-backup # Give a name of the bucket where you want to backup.
prefix: demo # . Path prefix into bucket where repository will be created.(optional).
storageSecretName: rook-restic-secret
schedule: '@every 1m'
volumeMounts:
- mountPath: /source/data
name: source-data
retentionPolicies:
- name: 'keep-last-5'
keepLast: 5
prune: true
14 changes: 14 additions & 0 deletions docs/examples/tutorial/recovery-specific-snapshot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: stash.appscode.com/v1alpha1
kind: Recovery
metadata:
name: stash-demo
namespace: default
spec:
repository: deployment.stash-demo
snapshot: deployment.stash-demo-d3050010
paths:
- /source/data
recoveredVolumes:
- mountPath: /source/data
hostPath:
path: /data/stash-test/restic-restored
1 change: 0 additions & 1 deletion docs/examples/tutorial/recovery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metadata:
namespace: default
spec:
repository: deployment.stash-demo
snapshot: deployment.stash-demo-e0e9c272 # skip this field to recover latest snapshot
paths:
- /source/data
recoveredVolumes:
Expand Down
Loading

0 comments on commit c448e13

Please sign in to comment.