Coder Social home page Coder Social logo

debck / node-disk-manager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openebs-archive/node-disk-manager

0.0 2.0 0.0 28.71 MB

node-disk-manager(ndm) runs as a DaemonSet in Kubernetes and helps with Disk Inventory Management

License: Apache License 2.0

Makefile 0.65% Go 98.37% Shell 0.97%

node-disk-manager's Introduction

node-disk-manager

Build Status Go Report codecov BCH compliance License FOSSA Status

node-disk-manager aims to make it easy to manage the disks attached to the node. It treats disks as resources that need to be monitored and managed just like other resources like CPU, Memory and Network. It is a daemon which runs on each node, detects attached disks and loads them as Disk objects (custom resource) into Kubernetes.

While PVs are well suited for stateful workloads, the Disk objects are aimed towards helping hyper-converged Storage Operators by providing abilities like:

  • Easy to access inventory of Disks available across the Kubernetes Cluster
  • Predict failures on the Disks, to help with taking preventive actions
  • Allow for dynamically attaching/detaching Disks to a Storage Pod, without requiring a restart

The design and implementation are currently in progress. The design is covered under this design proposal

Usage

A detailed usage documentation is maintained in the wiki

Start Node Disk Manager DaemonSet

  • Edit ndm-operator.yaml to fit your environment: Set the namespace, serviceAccount, configure filters in the node-disk-manager-config-map.
  • Switch to Cluster Admin context and create the DaemonSet with kubectl create -f ndm-operator.yaml

Using kubectl to fetch Disk Information

  • kubectl get disks --show-labels displays the disks across the cluster, with kubernetes.io/hostname showing the node to which disk is attached.
  • kubectl get disks -l "kubernetes.io/hostname=<hostname>" displays the disks attached to node with the provided hostname.
  • kubectl get disk <disk-cr-name> -o yaml displays all the details of the disk captured by ndm for given disk resource

Build Image

  • go get or git clone node-disk-manager repo into $GOPATH/src/github.com/openebs/ with one of the below directions:

    • cd $GOPATH/src/github.com/openebs && git clone [email protected]:openebs/node-disk-manager.git
    • cd $GOPATH/src/github.com/openebs && go get github.com/openebs/node-disk-manager
  • Setup build tools:

    • By default node-disk-manager enables fetching disk attributes using udev. This requires udev develop files. For Ubuntu, libudev-dev package should be installed.
    • make bootstrap installs the required Go tools
  • run make in the top directory. It will:

    • Build the binary.
    • Build the docker image with the binary.
  • Test your changes

    • sudo -E env "PATH=$PATH" make test execute the unit tests
    • make integration-test will launch minikube to run the tests. Make sure that minikube can be executed via sudo -E minikube start --vm-driver=none

Push Image

By default travis pushes the docker image to openebs/node-disk-manager-amd64, with ci as well as commit tags. You can push to your custom registry and modify the ndm-operator.yaml file for your testing.

License

FOSSA Status

Inspiration

node-disk-manager's People

Contributors

a4abhishek avatar fossabot avatar kmova avatar pawanpraka1 avatar prateekpandey14 avatar sagarkrsd avatar shovanmaity avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.