Deploy Mayastor

Overview

Before deploying and using Mayastor please consult the Known Issues section of this guide.
In this Quickstart guide we demonstrate deploying Mayastor by using the Kubernetes manifest files provided within the project's repositories (control plane components, data plane components). These repositories are configured for the GitFlow release model, wherein the master branch contains official releases. By extension, the head of the master branch represents the latest official release. Previous releases are identifiable by their annotated git tags.
The steps and commands which follow are intended only for use with, and tested against, the latest release. Earlier releases or development versions may require a modified or different installation process.

Create Mayastor Application Resources

Namespace

Command (GitHub Latest)
1
kubectl create namespace mayastor
Copied!

RBAC Resources

Command (GitHub Latest)
Expected Output
1
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/operator-rbac.yaml
Copied!
1
serviceaccount/mayastor-service-account created
2
clusterrole.rbac.authorization.k8s.io/mayastor-cluster-role created
3
clusterrolebinding.rbac.authorization.k8s.io/mayastor-cluster-role-binding created
Copied!

Custom Resource Definitions

Command (GitHub Latest)
1
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/mayastorpoolcrd.yaml
Copied!

Deploy Mayastor Dependencies

NATS

Mayastor uses NATS, an Open Source messaging system, as an event bus for some aspects of control plane operations.
Command (GitHub Latest)
1
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor/master/deploy/nats-deployment.yaml
Copied!
Verify that the deployment of the NATS application to the cluster was successful. Within the mayastor namespace ensure that there are 3 replicas with the name "nats-x", and with a reported status of "Running".
Command
Example Output
1
kubectl -n mayastor get pods --selector=app=nats
Copied!
1
NAME READY STATUS RESTARTS AGE
2
nats-0 2/2 Running 0 50s
3
nats-1 2/2 Running 0 30s
4
nats-2 2/2 Running 0 10s
Copied!

etcd

Mayastor uses etcd, a distributed, reliable key-value store, to persist configuration. The steps described below deploy a dedicated, clustered etcd instance for Mayastor's own use. This is the only configuration supported by this release.
To deploy the PersistentVolumes that will be used by the etcd in the next step, execute:
Command (GitHub Latest)
1
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor/master/deploy/etcd/storage/localpv.yaml
Copied!
Command (GitHub Latest)
1
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor/master/deploy/etcd/statefulset.yaml
2
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor/master/deploy/etcd/svc.yaml
3
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor/master/deploy/etcd/svc-headless.yaml
Copied!
Verify that the deployment of etcd to the cluster was successful. Within the mayastor namespace there should be 3 replicas with a name of the form "mayastor-etcd-" and with a reported status of "Running".
Command
Example Output
1
kubectl -n mayastor get pods --selector=app.kubernetes.io/name=etcd
Copied!
1
NAME READY STATUS RESTARTS AGE
2
mayastor-etcd-0 1/1 Running 0 70m
3
mayastor-etcd-1 1/1 Running 0 70m
4
mayastor-etcd-2 1/1 Running 0 70m
Copied!

Deploy Mayastor Components

CSI Node Plugin

Command (GitHub Latest)
1
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor/master/deploy/csi-daemonset.yaml
Copied!
Verify that the CSI Node Plugin DaemonSet has been correctly deployed to all worker nodes in the cluster.
Command
Example Output
1
kubectl -n mayastor get daemonset mayastor-csi
Copied!
1
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
2
mayastor-csi 3 3 3 3 3 kubernetes.io/arch=amd64 26m
Copied!

Control Plane

Core Agents

Command (GitHub Latest)
1
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/core-agents-deployment.yaml
Copied!
Verify that the core agent pod is running.
Command
Example Output
1
kubectl get pods -n mayastor --selector=app=core-agents
Copied!
1
NAME READY STATUS RESTARTS AGE
2
core-agents-5f4d9f786b-6vvxc 1/1 Running 0 117s
Copied!

REST

Command (GitHub Latest)
Example Output
1
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/rest-deployment.yaml
2
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/rest-service.yaml
Copied!
1
deployment.apps/rest created
2
service/rest created
Copied!
Verify that the REST pod is running.
Command
Example Output
1
kubectl get pods -n mayastor --selector=app=rest
Copied!
1
NAME READY STATUS RESTARTS AGE
2
rest-5cd9665499-cdgmm 1/1 Running 0 2m35s
Copied!

CSI Controller

Command (GitHub Latest)
1
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/csi-deployment.yaml
Copied!
Verify that the CSI-controller pod is running.
Command
Example Output
1
kubectl get pods -n mayastor --selector=app=csi-controller
Copied!
1
NAME READY STATUS RESTARTS AGE
2
csi-controller-579f77f64-7dq7g 3/3 Running 0 39m
Copied!

MSP Operator

Command (GitHub Latest)
1
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor-control-plane/master/deploy/msp-deployment.yaml
Copied!
Verify that the pool operator pod is running.
Command
Example Output
1
kubectl get pods -n mayastor --selector=app=msp-operator
Copied!
1
NAME READY STATUS RESTARTS AGE
2
msp-operator-7849d59fcd-mcw5b 1/1 Running 0 21s
Copied!

Data Plane

Command (GitHub Latest)
1
kubectl apply -f https://raw.githubusercontent.com/openebs/mayastor/master/deploy/mayastor-daemonset.yaml
Copied!
Verify that the Mayastor DaemonSet has been correctly deployed. The reported Desired, Ready and Available instance counts should be equal, and should match the count of worker nodes which carry the label openebs.io/engine=mayastor (as performed earlier in the "Preparing the Cluster" stage).
Command
Example Output
1
kubectl -n mayastor get daemonset mayastor
Copied!
1
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
2
mayastor 3 3 3 3 3 kubernetes.io/arch=amd64,openebs.io/engine=mayastor 108s
Copied!
The number and status of mayastor pods can be observed by using the Mayastor kubectl plugin. Check that the expected number of nodes are reporting their State as online
Command
Example Output
1
kubectl mayastor get nodes
Copied!
1
NAME STATE AGE
2
aks-agentpool-12194210-0 online 8m18s
3
aks-agentpool-12194210-1 online 8m19s
4
aks-agentpool-12194210-2 online 8m15s
Copied!