Deploy by Helm Charts
The entire HwameiStor stack can be easily deployed by Helm Charts.
Steps
1. Prepare helm tools
To install Helm commandline tool, please refer to Helm's Documentation.
2. Download hwameistor
repo
Download and extract repo files to a local directory.
$ helm repo add hwameistor http://hwameistor.io/hwameistor
$ helm repo update hwameistor
$ helm pull hwameistor/hwameistor --untar
3. Deploy HwameiStor
$ helm install hwameistor ./hwameistor \
-n hwameistor --create-namespace
That's it!
To verify the deployment, please refer to Post Deployment.
Use image repository
The default image repositories are registry.k8s.io
and ghcr.io
.
In case any network problem, you can try to use the images provided by DaoCloud
at m.daocloud.io/registry.k8s.io
and ghcr.m.daocloud.io
.
To switch images, use --set
to change the value of parameters:
global.k8sImageRegistry
and global.hwameistorImageRegistry
.
$ helm install hwameistor ./hwameistor \
-n hwameistor --create-namespace \
--set global.k8sImageRegistry=m.daocloud.io/registry.k8s.io \
--set global.hwameistorImageRegistry=ghcr.m.daocloud.io
Customize kubelet root directory
The default kubelet
directory is /var/lib/kubelet
.
If your Kubernetes distribution uses a different kubelet
directory,
you shall set the parameter kubeletRootDir
.
For example, on Canonical's MicroK8s which uses
/var/snap/microk8s/common/var/lib/kubelet/
as kubelet
directory, HwameiStor needs to be deployed as:
$ helm install hwameistor ./hwameistor \
-n hwameistor --create-namespace \
--set kubeletRootDir=/var/snap/microk8s/common/var/lib/kubelet/
Production setup
A production environment would require to:
- specify resource configuration
- avoid deploying on master nodes
- implement quick failover of controllers
HwameiStor provides some recommended values in values.extra.prod.yaml
.
You can use it by:
$ helm install hwameistor ./hwameistor \
-n hwameistor --create-namespace \
-f ./hwameistor/values.yaml \
-f ./hwameistor/values.extra.prod.yaml
In a resource-strained test environment, setting the above-mentioned values would cause pods unable to start!
[Optional] Install DRBD
To enable provisioning HA volumes, it is required to install DRBD:
Please refer to Prerequisites for environmental requirements.
$ helm pull hwameistor/drbd-adapter --untar
$ helm install drbd-adapter ./drbd-adapter \
-n hwameistor --create-namespace
Users in China can try to use the image daocloud.io/daocloud
.
$ helm install drbd-adapter ./drbd-adapter \
-n hwameistor --create-namespace \
--set registry=daocloud.io/daocloud