<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by openebs on Medium]]></title>
        <description><![CDATA[Stories by openebs on Medium]]></description>
        <link>https://medium.com/@openebs?source=rss-487395ff1add------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vw0quFymSDkh0EQX23z8gg.png</url>
            <title>Stories by openebs on Medium</title>
            <link>https://medium.com/@openebs?source=rss-487395ff1add------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 13:28:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@openebs/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Recover from Volume Multi Attach Error in On-Prem Kubernetes Clusters]]></title>
            <link>https://medium.com/openebs/recover-from-volume-multi-attach-error-in-on-prem-kubernetes-clusters-2448a89e0124?source=rss-487395ff1add------2</link>
            <guid isPermaLink="false">https://medium.com/p/2448a89e0124</guid>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[openebs]]></dc:creator>
            <pubDate>Thu, 27 Aug 2020 11:02:29 GMT</pubDate>
            <atom:updated>2020-08-27T12:16:46.960Z</atom:updated>
            <content:encoded><![CDATA[<p>If you have an unmanaged Kubernetes Cluster that you have deployed on-prem or on cloud, you would have noticed that your Stateful Application pods error out with Multi-attach error whenever the node running the stateful application is abruptly shut down.</p><p>This has been a long outstanding issue in Kubernetes and is being actively worked on. Please refer to the following Kubernetes issues:</p><ul><li><a href="https://github.com/kubernetes/enhancements/pull/1116">https://github.com/kubernetes/enhancements/pull/1116</a></li><li><a href="https://github.com/kubernetes/kubernetes/issues/86281">https://github.com/kubernetes/kubernetes/issues/86281</a></li><li><a href="https://github.com/kubernetes/kubernetes/issues/53059#issuecomment-619428689">https://github.com/kubernetes/kubernetes/issues/53059#issuecomment-619428689</a></li></ul><p>The main reason for this issue being hard to resolve is that there is no right way to determine if the node is really shut down or if it is due to a network/split-brain condition to the master nodes. And it gets a little harder with Stateful applications as we need to really determine that data is written down from older nodes to the disks, before forcibly remounting onto the new node.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2sYpETBe70mqs4h3.png" /></figure><p>In this blog, I will provide an alternate approach that can be used to work around this issue and bring your applications back online. The solution is loosely based on the same approach that Managed Kubernetes clusters like GKE/EKS perform to handle this scenario. The managed clusters use out-of-band communication to determine if the node is shut down and delete the node resources.</p><p>I will demonstrate the approach of removing the node resource as a safe way to recover volumes using the following example.</p><h3>Problem</h3><h3>1. Start with a Stateful application:</h3><p>I have a three node cluster with k8s version 1.15.3, to reproduce the<br>Volume multi-attach error scenario. Deployed OpenEBS version 1.3, using cstor csi based volume and mounted to Percona pod scheduled in node csi-node2.mayalabs.io.</p><pre>$ kubectl <strong>get</strong> nodes<br><strong>NAME</strong>                     STATUS     ROLES    AGE   <strong>VERSION</strong><br>csi-master.mayalabs.io   Ready      master   39d   v1.15.3<br>csi-node1.mayalabs.io    Ready      <strong>none</strong>   39d   v1.15.3<br>csi-node2.mayalabs.io    Ready      <strong>none</strong>   39d   v1.15.3<br>csi-node3.mayalabs.io    Ready      <strong>none</strong>   39d   v1.15.3</pre><pre>$ kubectl <strong>get</strong> pvc<br><strong>NAME</strong>                     STATUS   VOLUME                                     CAPACITY   <strong>ACCESS</strong> MODES   STORAGECLASS               AGE<br>demo-csi-vol-claim   Bound    pvc-b39248ab-5a99-439b-ad6f-780aae30626c   10Gi       RWO            openebs-csi-cstor-sparse   72m</pre><pre>$ kubectl <strong>get</strong> pods -owide<br><strong>NAME</strong>                       READY   STATUS    RESTARTS   AGE    NODE<br>percona-6795d6fb68-pqvqh   1/1     Running   0          66m    csi-node2.mayalabs.io</pre><p>VolumeAttachment resource created only for volume attached to Node2 in case of CSI based persistent volumes</p><pre>$ kubectl <strong>get</strong> volumeattachment<br><strong>NAME</strong>                                                                   ATTACHER                 PV                                         NODE                    ATTACHED   AGE<br>csi-9f7704015b456f146ce8c6c3bd80a5ec6cc55f4f5bfb90c61c250d0b050a283c   openebs-csi.openebs.io   pvc-b39248ab-5a99-439b-ad6f-780aae30626c   csi-node2.mayalabs.io   <strong>true</strong>       66m</pre><h3>2. Node ShutDown:</h3><p>Shutting down kubelet service in Node2 as Percona application pod has been scheduled here, to make node `NotReady` state in the Kubernetes cluster.</p><pre>$ kubectl <strong>get</strong> nodes<br><strong>NAME</strong>                     STATUS     ROLES    AGE   <strong>VERSION</strong><br>csi-master.mayalabs.io   Ready      master   39d   v1.15.3<br>csi-node1.mayalabs.io    Ready      <strong>none</strong>   39d   v1.15.3<br>csi-node2.mayalabs.io    NotReady   <strong>none</strong>    5m   v1.15.3<br>csi-node3.mayalabs.io    Ready      <strong>none</strong>   37d   v1.15.3</pre><p>In this case, the Percona pod will get stuck in a container creating a state with a multi-attach error.</p><h3>Solution:</h3><p>Although these solutions are generic to recover the volume from the multi attach error. Based on some extra steps, I have divided them into two different sanctions based on the type of Kubernetes volumes. One is dynamic in-tree or external Kubernetes volumes, an older way of provisioning Kubernetes volumes, and the other one is CSI based Kubernetes volumes.</p><h3>Dynamic/Static Provisioner Based Volumes:</h3><h4>Deleting Node Resource:</h4><p>Here After deleting the Node resource below node related events will be generated which will trigger the force deletion of the pods, and they apparently will be scheduled to other available nodes:</p><pre>$ kubectl <strong>delete</strong> nodes csi-node2.mayalabs.io<br>node &quot;csi-node2.mayalabs.io&quot; deleted</pre><pre>$ kubectl <strong>get</strong> nodes<br><strong>NAME</strong>                     STATUS     ROLES    AGE   <strong>VERSION</strong><br>csi-master.mayalabs.io   Ready      master   39d   v1.15.3<br>csi-node1.mayalabs.io    Ready      <strong>none</strong>   39d   v1.15.3<br>csi-node3.mayalabs.io    Ready      <strong>none</strong>   37d   v1.15.3</pre><p>Check the kube-controller logs for events:</p><pre>```<br>I1021 10:37:44.336523       1 attach_detach_controller.go:573] error removing node &quot;csi-node2.mayalabs.io&quot; from desired-state-of-world: failed to <strong>delete</strong> node &quot;csi-node2.mayalabs.io&quot; <strong>from</strong> <strong>list</strong> <strong>of</strong> nodes <strong>managed</strong> <strong>by</strong> attach/detach controller--the node still contains 1 volumes in its list of volumes to attach<br>I1021 10:37:45.003243       1 event.go:258] <strong>Event</strong>(v1.ObjectReference{Kind:&quot;Node&quot;, Namespace:&quot;&quot;, <strong>Name</strong>:&quot;csi-node2.mayalabs.io&quot;, UID:&quot;30ca0f5e-3a8f-4d0f-99fc-776d7051fd3d&quot;, APIVersion:&quot;&quot;, ResourceVersion:&quot;&quot;, FieldPath:&quot;&quot;}): <strong>type</strong>: &#39;Normal&#39; reason: &#39;RemovingNode&#39; Node csi-node2.mayalabs.io <strong>event</strong>: Removing Node csi-node2.mayalabs.io <strong>from</strong> Controller<br></pre><pre>I1021 10:37:55.273070       1 gc_controller.go:62] PodGC <strong>is</strong> <strong>force</strong> deleting Pod: kube-<strong>system</strong>/openebs-csi-node-cjzlz<br>I1021 10:37:55.318908       1 gc_controller.go:166] Forced deletion <strong>of</strong> orphaned Pod kube-<strong>system</strong>/openebs-csi-node-cjzlz succeeded<br>I1021 10:37:55.318979       1 gc_controller.go:62] PodGC <strong>is</strong> <strong>force</strong> deleting Pod: openebs/openebs-ndm-8ntsv<br>I1021 10:37:55.352796       1 gc_controller.go:166] Forced deletion <strong>of</strong> orphaned Pod openebs/openebs-ndm-8ntsv succeeded<br>I1021 10:37:55.354071       1 gc_controller.go:62] PodGC <strong>is</strong> <strong>force</strong> deleting Pod: openebs/cspc-<strong>sparse</strong>-disk-pool-gg82-d9b4bff4d-9fmbn<br>I1021 10:37:55.420779       1 event.go:258] <strong>Event</strong>(v1.ObjectReference{Kind:&quot;Pod&quot;, Namespace:&quot;openebs&quot;, <strong>Name</strong>:&quot;cspc-sparse-disk-pool-gg82-d9b4bff4d-9fmbn&quot;, UID:&quot;&quot;, APIVersion:&quot;&quot;, ResourceVersion:&quot;&quot;, FieldPath:&quot;&quot;}): <strong>type</strong>: &#39;Normal&#39; reason: &#39;TaintManagerEviction&#39; Cancelling deletion <strong>of</strong> Pod openebs/cspc-<strong>sparse</strong>-disk-pool-gg82-d9b4bff4d-9fmbn<br>I1021 10:37:55.442403       1 gc_controller.go:166] Forced deletion <strong>of</strong> orphaned Pod openebs/cspc-<strong>sparse</strong>-disk-pool-gg82-d9b4bff4d-9fmbn succeeded<br>I1021 10:37:55.442568       1 gc_controller.go:62] PodGC <strong>is</strong> <strong>force</strong> deleting Pod: <strong>default</strong>/percona-6795d6fb68-b7dvl<br>I1021 10:37:55.446368       1 event.go:258] <strong>Event</strong>(v1.ObjectReference{Kind:&quot;ReplicaSet&quot;, Namespace:&quot;openebs&quot;, <strong>Name</strong>:&quot;cspc-sparse-disk-pool-gg82-d9b4bff4d&quot;, UID:&quot;04f87ed3-c401-4688-8691-0716dc4693fe&quot;, APIVersion:&quot;apps/v1&quot;, ResourceVersion:&quot;7063677&quot;, FieldPath:&quot;&quot;}): <strong>type</strong>: &#39;Normal&#39; reason: &#39;SuccessfulCreate&#39; Created pod: cspc-<strong>sparse</strong>-disk-pool-gg82-d9b4bff4d-q2l2b<br>I1021 10:37:55.541929       1 event.go:258] <strong>Event</strong>(v1.ObjectReference{Kind:&quot;Pod&quot;, Namespace:&quot;default&quot;, <strong>Name</strong>:&quot;percona-6795d6fb68-b7dvl&quot;, UID:&quot;&quot;, APIVersion:&quot;&quot;, ResourceVersion:&quot;&quot;, FieldPath:&quot;&quot;}): <strong>type</strong>: &#39;Normal&#39; reason: &#39;TaintManagerEviction&#39; Cancelling deletion <strong>of</strong> Pod <strong>default</strong>/percona-6795d6fb68-b7dvl<br>I1021 10:37:55.599155       1 gc_controller.go:166] Forced deletion <strong>of</strong> orphaned Pod <strong>default</strong>/percona-6795d6fb68-b7dvl succeeded<br>I1021 10:37:55.599224       1 gc_controller.go:62] PodGC <strong>is</strong> <strong>force</strong> deleting Pod: kube-<strong>system</strong>/kube-proxy-b9q25<br>I1021 10:37:55.613517       1 event.go:258] <strong>Event</strong>(v1.ObjectReference{Kind:&quot;ReplicaSet&quot;, Namespace:&quot;default&quot;, <strong>Name</strong>:&quot;percona-6795d6fb68&quot;, UID:&quot;50b82272-9874-4688-8362-7c759ae63aef&quot;, APIVersion:&quot;apps/v1&quot;, ResourceVersion:&quot;7063669&quot;, FieldPath:&quot;&quot;}): <strong>type</strong>: &#39;Normal&#39; reason: &#39;SuccessfulCreate&#39; Created pod: percona-6795d6fb68-pqvqh<br>W1021 10:37:55.621461       1 reconciler.go:328] Multi-Attach <strong>error</strong> <strong>for</strong> volume &quot;pvc-b39248ab-5a99-439b-ad6f-780aae30626c&quot; (UniqueName: &quot;kubernetes.io/csi/openebs-csi.openebs.io^pvc-b39248ab-5a99-439b-ad6f-780aae30626c&quot;) <strong>from</strong> node &quot;csi-node1.mayalabs.io&quot; Volume <strong>is</strong> already exclusively attached <strong>to</strong> node csi-node2.mayalabs.io <strong>and</strong> can&#39;t be attached to another<br>I1021 10:37:55.629191       1 event.go:258] Event(v1.ObjectReference{Kind:&quot;Pod&quot;, Namespace:&quot;default&quot;, Name:&quot;percona-6795d6fb68-pqvqh&quot;, UID:&quot;26ee6109-9d7e-4729-843b-18bb88926c87&quot;, APIVersion:&quot;v1&quot;, ResourceVersion:&quot;7063944&quot;, FieldPath:&quot;&quot;}): type: &#39;<strong>Warning</strong>&#39; reason: &#39;FailedAttachVolume&#39; Multi-Attach error for volume &quot;pvc-b39248ab-5a99-439b-ad6f-780aae30626c&quot; Volume is already exclusively attached to one node and can&#39;t be attached <strong>to</strong> another<br>I1021 10:37:55.742498       1 gc_controller.go:166] Forced deletion <strong>of</strong> orphaned Pod kube-<strong>system</strong>/kube-proxy-b9q25 succeeded<br>I1021 10:37:55.742697       1 gc_controller.go:62] PodGC <strong>is</strong> <strong>force</strong> deleting Pod: kube-<strong>system</strong>/calico-node-4fv7n<br>I1021 10:37:55.787435       1 gc_controller.go:166] Forced deletion <strong>of</strong> orphaned Pod kube-<strong>system</strong>/calico-node-4fv7n succeeded</pre><pre>```</pre><h3>CSI Based Volumes:</h3><h4>Attach-Detach Controller:</h4><p>If the volume is created using CSI Provisioner, a custom resource `volumeattachment` would be created. The Attach-detach controller will wait for the `maxWaitForUnmountDuration` i.e., 6 minutes to forcefully detach the attached volume from the node. Then the CR will be recreated and attach to any available node. To recover from the multi-attach error, this `volumeattachment` CR can be deleted along with node CR. Therefore the time taken to mount the volume on a new node will be reduced by 6 minutes.</p><pre>$ kubectl <strong>get</strong> volumeattachment pvc-b39248ab-5a99-439b-ad6f-780aae30626c<br><strong>NAME</strong>                                                                   ATTACHER                 PV                                         NODE                    ATTACHED   AGE<br>csi-6ae3ead0d1c3a6e73e7d4c8e27f9098b927f3e4edc21bcf6bb7cf3fcdb4101de   openebs-csi.openebs.io   pvc-b39248ab-5a99-439b-ad6f-780aae30626c   csi-node1.mayalabs.io   <strong>true</strong>       11m</pre><pre>$ kubectl logs -f kube-controller-manager-csi-master.mayalabs.io -n kube-system</pre><pre>```<br>W1021 10:43:55.629673       1 reconciler.<strong>go</strong>:232] attacherDetacher.DetachVolume started <strong>for</strong> volume &quot;pvc-b39248ab-5a99-439b-ad6f-780aae30626c&quot; (UniqueName: &quot;kubernetes.io/csi/openebs-csi.openebs.io^pvc-b39248ab-5a99-439b-ad6f-780aae30626c&quot;) <strong>on</strong> node &quot;csi-node2.mayalabs.io&quot; This volume <strong>is</strong> not safe <strong>to</strong> detach, but maxWaitForUnmountDuration 6m0s expired, force detaching<br>I1021 10:43:55.671000       1 operation_generator.<strong>go</strong>:526] DetachVolume.Detach succeeded <strong>for</strong> volume &quot;pvc-b39248ab-5a99-439b-ad6f-780aae30626c&quot; (UniqueName: &quot;kubernetes.io/csi/openebs-csi.openebs.io^pvc-b39248ab-5a99-439b-ad6f-780aae30626c&quot;) <strong>on</strong> node &quot;csi-node2.mayalabs.io&quot; <br>I1021 10:43:55.730390       1 reconciler.<strong>go</strong>:288] attacherDetacher.AttachVolume started <strong>for</strong> volume &quot;pvc-b39248ab-5a99-439b-ad6f-780aae30626c&quot; (UniqueName: &quot;kubernetes.io/csi/openebs-csi.openebs.io^pvc-b39248ab-5a99-439b-ad6f-780aae30626c&quot;) from node &quot;csi-node1.mayalabs.io&quot; <br>I1021 10:43:55.752273       1 operation_generator.<strong>go</strong>:358] AttachVolume.Attach succeeded <strong>for</strong> volume &quot;pvc-b39248ab-5a99-439b-ad6f-780aae30626c&quot; (UniqueName: &quot;kubernetes.io/csi/openebs-csi.openebs.io^pvc-b39248ab-5a99-439b-ad6f-780aae30626c&quot;) from node &quot;csi-node1.mayalabs.io&quot; <br>I1021 10:43:55.753344       1 event.<strong>go</strong>:258] Event(v1.ObjectReference{Kind:&quot;Pod&quot;, Namespace:&quot;default&quot;, Name:&quot;percona-6795d6fb68-pqvqh&quot;, UID:&quot;26ee6109-9d7e-4729-843b-18bb88926c87&quot;, APIVersion:&quot;v1&quot;, ResourceVersion:&quot;7063944&quot;, FieldPath:&quot;&quot;}): type: &#39;Normal&#39; reason: &#39;SuccessfulAttachVolume&#39; AttachVolume.Attach succeeded <strong>for</strong> volume &quot;pvc-b39248ab-5a99-439b-ad6f-780aae30626c&quot; <br>```</pre><p>That’s it for today’s post. I hope you find it helpful. Feedback and comments are appreciated.</p><p><strong>About the author: </strong>Prateek Pandey, Software Engineer at MayaData/OpenEBS</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2448a89e0124" width="1" height="1" alt=""><hr><p><a href="https://medium.com/openebs/recover-from-volume-multi-attach-error-in-on-prem-kubernetes-clusters-2448a89e0124">Recover from Volume Multi Attach Error in On-Prem Kubernetes Clusters</a> was originally published in <a href="https://medium.com/openebs">OpenEBS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup Continuous Integration for Helm chart]]></title>
            <link>https://medium.com/openebs/setup-continuous-integration-for-helm-chart-5dcf572fd88f?source=rss-487395ff1add------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dcf572fd88f</guid>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[harbor]]></category>
            <category><![CDATA[travis-ci]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[openebs]]></dc:creator>
            <pubDate>Wed, 05 Feb 2020 11:31:02 GMT</pubDate>
            <atom:updated>2020-03-09T11:12:10.752Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.helm.sh/">Helm</a> is a package manager for Kubernetes that allows developers and operators to easily package, configure, and deploy applications and services onto Kubernetes clusters.</p><figure><img alt="Setup Continuous Integration for Helm chart" src="https://cdn-images-1.medium.com/max/500/0*glYf3411ewS-ibot.png" /><figcaption>Setup Continuous Integration for Helm chart</figcaption></figure><p>Helm is now an official Kubernetes project and is part of the<a href="https://www.cncf.io/"> Cloud Native Computing Foundation</a>, a non-profit Linux Foundation that supports Open Source projects in and around the Kubernetes ecosystem.</p><p>In this tutorial, we will set up a continuous integration of the Helm chart. We will package the Helm chart with the help of CI tools like (Travis, Jenkins), and push it to chart registries like (Harbor, Chartmuseum).</p><h4>Prerequisites:</h4><ul><li>Registry to store Helm like Harbor or Chartmuseum</li><li>Understanding of Helm and any of the CI platforms (Travis, Jenkins, circle, CI)</li><li>A Git repository to maintain version control of helm chart</li></ul><p><em>I am going to use Travis as a CI platform and Harbor as a Helm registry to host the helm.</em></p><p><em>As I choose Travis here, .travis.yml consists of the job lifecycle. Let’s write job cycle for the helm chart.</em></p><h4>Lifecycle 1:</h4><p>Choose the base language as Python</p><pre>---<br>language: python</pre><p>We need to have some environment variables so that we can update whenever there’s a new version of the Helm release or change of the registry URL.</p><p>Here is the list of a variable that we’ll need:</p><blockquote>HELM_URL=<a href="https://storage.googleapis.com/kubernetes-helm">https://storage.googleapis.com/kubernetes-helm</a> (this is the URL where we can download the helm package)</blockquote><blockquote>HELM_TGZ=helm-v2.4.2-linux-amd64.tar.gz (this is the Helm tar filename)</blockquote><blockquote>REPO_DIR=/home/travis/build/inyee786/test-helm (this is the path where Travis keep Git folder)</blockquote><blockquote>YAMLLINT_VERSION=1.8.1 (this is yamllint version which is used to check lint of file)</blockquote><blockquote>HARBOR_CHART_URL=https://harbor-test.mayadata.io/chartrepo (change this according to your chart registry url{harbor or Chartmuseum}</blockquote><blockquote>HARBOR_PROJECT_NAME=maya (this is the Harbor project name, where we will store the chart)</blockquote><blockquote>CHART_FOLDER=charts (this is the folder name, where we can keep the Helm charts)</blockquote><p>It looks like this</p><pre>env:<br> global:<br>   - HELM_URL=https://storage.googleapis.com/kubernetes-helm<br>   - HELM_TGZ=helm-v2.4.2-linux-amd64.tar.gz<br>   - REPO_DIR=/home/travis/build/inyee786/test-helm<br>   - YAMLLINT_VERSION=1.8.1<br>   - HARBOR_CHART_URL=https://harbor-<br>test.mayadata.io/chartrepo<br>   - HARBOR_PROJECT_NAME=maya<br>   - CHART_FOLDER=charts</pre><p>We need some private variables, where we can store the credentials and push it to the Helm registry (Harbor has an excellent feature where we can have bot user, and you can use the bot credential). All we have to feed is-</p><pre>HARBOR_USERNAME:<br>HARBOR_PASSWORD:</pre><p>Inside Travis, go to (<em>settings &gt; Environment Variables) </em>to set the private env</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*zfZD8KHAf2lJ_Hq5.png" /></figure><h4>Lifecycle 2 :</h4><p>Install the Prerequisites to Set up a CI environment to build and check the YAML lint.</p><p>Download helm and <strong>untar</strong> the chart after downloading</p><ul><li>wget ${HELM_URL}/${HELM_TGZ}</li><li>tar xzfv ${HELM_TGZ}</li><li>PATH=`pwd`/linux-amd64/:$PATH</li></ul><p>Initialize the helm client and update the helm repo</p><ul><li>Helm init — client-only</li><li>Helm repo update</li></ul><p>Install helm plugin to push chart on the registry</p><ul><li>Helm plugin install<a href="https://github.com/chartmuseum/helm-push"> https://github.com/chartmuseum/helm-push</a> — version v0.7.1</li></ul><p>Install yamllint python package to check the lint</p><ul><li>sudo pip install yamllint==”${YAMLLINT_VERSION}”</li></ul><p>It looks like the below config</p><pre><strong>install</strong>:<br># Installing Helm<br> - wget ${HELM_URL}/${HELM_TGZ}<br> - tar xzfv ${HELM_TGZ}<br> - <strong>PATH</strong>=`pwd`/linux-amd64/:$<strong>PATH</strong><br> - helm init --client-only<br> # helm plugin to push helm chart<br> - helm <strong>plugin</strong> <strong>install</strong> <a href="https://github.com/chartmuseum/helm-">https://github.com/chartmuseum/helm-</a><br>push --version v0.7.1<br> # Installing pip deps<br> - sudo pip <strong>install</strong> yamllint==&quot;${YAMLLINT_VERSION}&quot;<br> - helm repo <strong>update</strong></pre><h4>Lifecycle 3 :</h4><p>Before going further to build a chart, we need to run some script to check the lint in the chart and Travis file. It is a good practice to check the lint</p><p>Check the Helm lint of all Helm chart</p><ul><li>For dir in `ls ${REPO_DIR}/${CHART_FOLDER}`; do<br>helm lint ${REPO_DIR}/${CHART_FOLDER}/$dir<br>if [ $? != 0 ]; then<br>travis_terminate 1<br>fi</li></ul><p>To check the YAML lint for travis.yml, chart.yaml and value.yaml, we use the yamllint python package. We need the rule to check the lint.</p><ul><li>yamllint -c .yamllint.yml -s .travis.yml .yamllint.yml</li><li>yamllint -c .yamllint.yml -s $(find . -type f -name “Chart.yaml”)</li><li>yamllint -c .yamllint.yml -s $(find . -type f -name “values.yaml”)</li></ul><p>The script section should look like the below config</p><pre>script:<br>  # Check charts format<br>  - &gt;<br>     for dir in `ls ${REPO_DIR}/${CHART_FOLDER}`; do<br>      helm lint ${REPO_DIR}/${CHART_FOLDER}/$dir<br>      if [ $? != 0 ]; then<br>       travis_terminate 1<br>      fi<br>     done<br>  # Check YAML styling<br>  - yamllint -c .yamllint.yml -s .travis.yml .yamllint.yml<br>  - yamllint -c .yamllint.yml -s $(find . -type f -name &quot;Chart.yaml&quot;)<br>  - yamllint -c .yamllint.yml -s $(find . -type f -name &quot;values.yaml&quot;)</pre><p>Here comes the interesting part where we are going to build and package the chart.</p><p><strong>Lifecycle 4:</strong></p><p>It’s better to build and push when we merge the chart in the <em>master</em> branch. So we run the below command when we merge the chart in the <em>master</em> branch</p><p>We need a temporary directory where we will build and package the chart</p><ul><li>BUILD_DIR=$(mktemp -d)</li></ul><p>Run a loop to all the charts to build, package, and push it to the registry. The below commands will run on each chart</p><ul><li>helm dep update ${REPO_DIR}/${CHART_FOLDER}/$dir</li></ul><p>Package the chart with the below command</p><ul><li>helm package ${REPO_DIR}/${CHART_FOLDER}/$dir</li></ul><p>Then push the chart to registry</p><ul><li>helm push — username ${HARBOR_USERNAME} — password ${HARBOR_PASSWORD} ${REPO_DIR}/${CHART_FOLDER}/$dir ${HARBOR_CHART_URL}/maya</li></ul><p>Below is the what the config will look like</p><pre># Temporary dir for storing new packaged charts and index files<br>      BUILD_DIR=$(mktemp -d)      # Push temporary directory to the stack<br>      pushd $BUILD_DIR      # Iterate over all charts are package them push it to Harbor<br>      for dir in `ls ${REPO_DIR}/${CHART_FOLDER}`; do<br>       helm dep update ${REPO_DIR}/${CHART_FOLDER}/$dir<br>       helm package ${REPO_DIR}/${CHART_FOLDER}/$dir<br>       helm push --username ${HARBOR_USERNAME} --password ${HARBOR_PASSWORD}  ${REPO_DIR}/${CHART_FOLDER}/$dir ${HARBOR_CHART_URL}/maya<br>       if [ $? != 0 ]; then<br>        travis_terminate 1<br>       fi<br>      done# Pop temporary directory from the stack<br>      popd</pre><p>Wow! We have successfully completed all the steps. Now, our setup is ready to build and push the helm chart to the registry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*BbWrwzeivY6Qkcgu.png" /></figure><p>Here is the full Travis file<br><a href="https://gist.github.com/inyee786/d779f347d7fa272aed4ee8457182af35.js">https://gist.github.com/inyee786/d779f347d7fa272aed4ee8457182af35.js</a></p><p>Here is .yamllint.yml file which contains lint rule for charts.yaml values.yaml and .travis.yaml<br><a href="https://gist.github.com/inyee786/ef15b05c98bb4761b41af5f4fe268239.js">https://gist.github.com/inyee786/ef15b05c98bb4761b41af5f4fe268239.js</a></p><h4>Conclusion:</h4><p>Here we packaged the helm chart and pushed it to the helm registry.</p><h4>About me</h4><p>You can follow me at the below profiles and can ask any questions related to Angular, JavaScript, Travis, Kubernetes, etc.</p><ul><li><a href="https://github.com/inyee786/">GitHub</a></li><li><a href="https://www.linkedin.com/in/intakhab-ali/">Linkedin</a></li><li><a href="https://medium.com/@intakhab.cusat">Medium</a></li></ul><p>This blog was originally published on 28th Jan 2020 on <a href="https://blog.mayadata.io/openebs/setup-continuous-integration-for-helm-chart">MayaData’s blog</a>.</p><p><strong>About the author:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/0*iniXdqZNTlh3u2w4.jpg" /></figure><h4>Intakhab Ali</h4><p>Software Engineer at MayaData</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dcf572fd88f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/openebs/setup-continuous-integration-for-helm-chart-5dcf572fd88f">Setup Continuous Integration for Helm chart</a> was originally published in <a href="https://medium.com/openebs">OpenEBS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with OpenEBS and Cloud-Native Distributed SQL]]></title>
            <link>https://medium.com/openebs/getting-started-with-openebs-and-cloud-native-distributed-sql-1d6c5c36e634?source=rss-487395ff1add------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d6c5c36e634</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[openebs]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[yugabyte]]></category>
            <category><![CDATA[cloud-native]]></category>
            <dc:creator><![CDATA[openebs]]></dc:creator>
            <pubDate>Mon, 03 Feb 2020 13:01:01 GMT</pubDate>
            <atom:updated>2020-02-03T13:01:01.637Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Getting Started with OpenEBS and Cloud-Native Distributed SQL" src="https://cdn-images-1.medium.com/max/1024/1*IDHtKJKgVajgkuTUtOogrA.png" /><figcaption>Getting Started with OpenEBS and Cloud-Native Distributed SQL</figcaption></figure><p><a href="https://www.openebs.io/">OpenEBS</a> is a CNCF project that provides cloud-native, Open Source container attached storage (CAS). OpenEBS delivers persistent block storage and other capabilities such as integrated back-up, management of local and cloud disks, and more. For enterprise cloud-native applications, OpenEBS provides storage functionality that is idiomatic with cloud-native development environments, with granular storage policies and isolation that enable cloud developers and architects to optimize storage for specific workloads.</p><p>Because YugabyteDB is a cloud-native, distributed SQL database that runs in Kubernetes environments, it can interoperate with OpenEBS and many other CNCF projects.</p><p><strong><em>Wait, what’s YugabyteDB?</em></strong><em> It is an Open Source, and high-performance distributed SQL database built on a scalable and fault-tolerant design inspired by Google Spanner. Yugabyte’s SQL API (YSQL) is PostgreSQL wire compatible.</em></p><p><strong>Why OpenEBS and YugabyteDB?</strong></p><p>YugabyteDB is deployed as a StatefulSet on Kubernetes and requires persistent storage. OpenEBS can be used for backing YugabyteDB local disks, allowing the provisioning of large-scale persistent volumes. Here are a few of the advantages of using OpenEBS in conjunction with a YugabyteDB database cluster:</p><ul><li>There’s no need to manage the local disks as OpenEBS manages them.</li><li>OpenEBS and YugabyteDB can provision large size persistent volumes.</li><li>With OpenEBS persistent volumes, capacity can be thin provisioned, and disks can be added to OpenEBS on the fly without disruption of service. When this capability is combined with YugabyteDB, which already supports multi-TB data density per node, this can prove to be<a href="https://docs.openebs.io/features.html#reduced-storage-tco-upto-50"> massive cost savings on storage.</a></li><li>Both OpenEBS and YugabyteDB support multi-cloud deployments <a href="https://docs.openebs.io/docs/next/features.html#truely-cloud-native-storage-for-kubernetes">helping organizations avoid cloud lock-in.</a></li><li>Both OpenEBS and YugabyteDB integrate with another CNCF project, <a href="https://prometheus.io/">Prometheus</a>. This makes it easy to <a href="https://docs.openebs.io/docs/next/features.html#prometheus-metrics-for-workload-tuning">monitor both storage and the database</a> from a single system.</li></ul><p>Additionally, OpenEBS can do <a href="https://docs.openebs.io/docs/next/features.html#synchronous-replication">synchronous replication</a> inside a geographic region. In a scenario where YugabyteDB is deployed across regions, and a node in any one region fails, YugaByteDB would have to rebuild this node with data from another region. This would incur cross-region traffic, which is more expensive and lower in performance. But, with OpenEBS, this rebuilding of a node can be done seamlessly because OpenEBS is replicating locally inside the region. This means YugabyteDB does not end up having to copy data from another region, which ends up being less expensive and higher in performance. In this deployment setup, only if the entire region failed, YugabyteDB would need to do a cross-region node rebuild.</p><p>Additional detailed descriptions of OpenEBS enabled use cases can be found <a href="https://docs.openebs.io/docs/next/usecases.html">here.</a></p><p><strong>Prerequisites</strong></p><p>Below is the environment which we’ll use to run a YugabyteDB cluster on top of a Google Kubernetes cluster integrated with OpenEBS CAS.</p><ol><li>YugabyteDB — <a href="https://docs.yugabyte.com/latest/quick-start/install/">Version 2.0.10</a></li><li>OpenEBS — <a href="https://github.com/openebs/openebs">Version 1.6.</a></li><li>A <a href="https://cloud.google.com/gcp/">Google Cloud Platform</a> account</li><li>A <a href="https://mayadata.io/">MayaData</a> account</li></ol><p>MayaData is an enterprise-grade OpenEBS platform that makes it easier to run stateful applications on Kubernetes by helping get your workloads provisioned, backed-up, monitored, logged, managed, tested, and even migrated across clusters and clouds.</p><p><strong>Setting Up a Kubernetes Cluster on Google Cloud Platform</strong></p><p>To deploy YugabyteDB on the Google Cloud Platform (GCP), we first have to set up a cluster using Ubuntu as our base node image. Please note that GKE Container-Optimized OS does not come with an iSCSI client pre-installed and does not allow the installation of an iSCSI client. Therefore, OpenEBS does not work on Kubernetes clusters, which are running the GKE Container-Optimized OS version of the image on the worker nodes.</p><p>Go to <em>Kubernetes Engine&gt; Clusters &gt; Create Cluster</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GjACR5NGuP6K-8_p" /></figure><p>Create a <em>Standard cluster</em> using the default options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dn-Y-9wQNZuuF9cT" /></figure><p>Make sure to select the <em>More options</em> button under <em>Node pools</em> to specify the Ubuntu base image and 2 local SSD disks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/0*ltViZgZ2v_L-9MFP" /></figure><p>Connect to the <em>Google Cloud Shell</em> and verify that the nodes are set up and running by using the command:</p><pre>&gt; gcloud container clusters list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5UnF8I5XHb4YkO8A" /></figure><p><strong>Installing OpenEBS on the GKE Cluster</strong></p><p>To install OpenEBS on the GKE cluster, complete the steps found <a href="https://docs.openebs.io/docs/next/installation.html">here.</a><br>A summary of the required steps include:</p><ul><li>Verify if <a href="https://docs.openebs.io/docs/next/installation.html#verify-iscsi-client">iSCSI client</a> is running</li><li>Unmount local persistent disks to use for your storage pool</li><li>Set Kubernetes <a href="https://docs.openebs.io/docs/next/installation.html#set-cluster-admin-user-context-and-rbac">admin context</a> and RBAC</li><li>Installation using <a href="https://docs.openebs.io/docs/next/installation.html#installation-through-helm">helm</a> chart (or), <a href="https://docs.openebs.io/docs/next/installation.html#installation-through-kubectl">kubectl yaml</a> spec file</li></ul><p>Currently, GKE’s Ubuntu instances do not come with the iSCSI client service started. You can check this with by logging into each node via SSH and running:</p><pre>systemctl status iscsid</pre><p>If the iSCSI service status is showing as inactive, then you may have to enable and start the iscsid service using the following command:</p><pre>sudo systemctl enable iscsid &amp;&amp; sudo systemctl start iscsid</pre><p>While logged into your Kubernetes node, ensure that any local disks are not mounted or formatted. For example, on a GKE node:</p><pre>sudo ls /mnt/disks<br>ssd0  ssd1<br>sudo umount /mnt/disks/ssd0<br>sudo umount /mnt/disks/ssd1</pre><p>Once the above steps are complete, you can verify that OpenEBS is installed and running on the GKE cluster by running the command:</p><pre>&gt; kubectl get pods -n openebs</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_Edpr5IKWd4pGjrv" /></figure><p><strong>Configure cStor Pool and Create Storage Class</strong></p><p>After the OpenEBS installation, the <em>cStor Pool</em> has to be configured. If <em>cStor Pool </em>is not configured in your OpenEBS cluster, this can be done with the instructions <a href="https://docs.openebs.io/docs/next/ugcstor.html#creating-cStor-storage-pools">here</a>. First, identify your local block devices by running:</p><pre>kubectl get blockdevice -n openebs</pre><pre>NAME                                           NODENAME                                     SIZE           CLAIMSTATE   STATUS   AGE<br>blockdevice-11a54a76e84dd32328e4de732b90cc70   gke-yb-ebs-demo-default-pool-e3222e18-hk09   402653184000   Unclaimed    Active   4m<br>blockdevice-212662daececcdcd5976b5caeab4c950   gke-yb-ebs-demo-default-pool-e3222e18-hk09   402653184000   Unclaimed    Active   4m<br>blockdevice-388b9664ca802b287fd14f5f31ab8f71   gke-yb-ebs-demo-default-pool-e3222e18-trqx   402653184000   Unclaimed    Active   4m</pre><p>Now create your storage pool using those specific block devices. For example:</p><pre>#Use the following YAML to create a cStor Storage Pool.<br>apiVersion: openebs.io/v1alpha1<br>kind: StoragePoolClaim<br>metadata:<br>  name: cstor-disk-pool<br>  annotations:<br>    cas.openebs.io/config: |<br>      - name: PoolResourceRequests<br>        value: |-<br>            memory: 2Gi<br>      - name: PoolResourceLimits<br>        value: |-<br>            memory: 4Gi<br>spec:<br>  name: cstor-disk-pool<br>  type: disk<br>  poolSpec:<br>    poolType: striped<br>  blockDevices:<br>    blockDeviceList:<br># Use the blockdevices that are available to your kubernetes nodes<br>#    - blockdevice-11a54a76e84dd32328e4de732b90cc70<br>#    - blockdevice-212662daececcdcd5976b5caeab4c950<br>#    - blockdevice-388b9664ca802b287fd14f5f31ab8f71<br>---</pre><p>You must also configure a <em>StorageClass</em> to provision a <em>cStor </em>volume on a given <em>cStor</em> pool. <em>StorageClass</em> is the interface through which most of the OpenEBS storage policies are defined. In this solution, we are using a <em>StorageClass</em> to consume the <em>cStor Pool,</em> which is created using external disks attached to the Nodes. Since YugabyteDB is a <em>StatefulSet</em> application, it requires only one replication at the storage level. So, the <em>cStor</em> volume <em>replicaCount</em> should be set to 1. For example:</p><pre>apiVersion: storage.k8s.io/v1<br>kind: StorageClass<br>metadata:<br>  name: openebs-sc-rep1<br>  annotations:<br>    openebs.io/cas-type: cstor<br>    cas.openebs.io/config: |<br>      - name: StoragePoolClaim<br>        value: &quot;cstor-disk-pool&quot;<br>      - name: ReplicaCount<br>        value: &quot;1&quot;<br>provisioner: openebs.io/provisioner-iscsi</pre><p><strong>Installing YugabyteDB on the GKE Cluster using Helm</strong></p><p>The next step is to install YugabyteDB on the cluster. This can be done by completing the steps <a href="https://docs.yugabyte.com/latest/deploy/kubernetes/helm-chart/">here</a>.</p><p>A basic summary of the steps include:</p><ul><li>Verifying the prerequisites</li><li>Creating the YugabyteDB cluster via Helm</li></ul><p>To ensure you are using the latest Helm chart available from the Yugabyte repo, run:</p><pre>helm search repo yugabytedb/yugabyte<br>NAME                CHART VERSION APP VERSION DESCRIPTION                                       <br>yugabytedb/yugabyte 2.0.9         2.0.9.0-b13 YugaByte Database is the high-performance distr...</pre><p>We will use the latest available version in our helm install command. Also, note that the default <em>storageclass </em>will need to be overridden by setting that option when installing the Helm chart. For example:</p><pre>helm install yb-demo yugabytedb/yugabyte --namespace yb-demo --version 2.0.9 --wait --set storage.master.storageClass=openebs-sc-rep1,storage.tserver.storageClass=openebs-sc-rep1</pre><p>To verify that YugabyteDB has been successfully installed on GKE, use the following command:</p><pre>&gt; helm status yb-demo</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EgMi5eEhW9jc7Ig2" /></figure><p>That’s it! You now have YugabyteDB running on GKE with OpenEBS storage. Stay tuned for an upcoming blog where we’ll look at how to connect a YugabyteDB + OpenEBS cluster to <a href="https://docs.openebs.io/v130/docs/next/directoronline.html">OpenEBS Director</a>. This SaaS service makes managing and monitoring the cluster easier with Prometheus metrics, logs, and topology view of OpenEBS volumes via an intuitive UI.</p><p><strong>Next Steps</strong></p><ul><li>Learn more about OpenEBS by visiting the <a href="https://github.com/openebs/openebs">GitHub</a> and <a href="https://docs.openebs.io/">official Docs</a> pages.</li><li>Learn more about YugabyteDB by visiting the <a href="https://github.com/yugabyte/yugabyte-db">GitHub</a> and <a href="https://docs.yugabyte.com/">official Docs</a> pages.</li></ul><p><strong>About the author:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*RTEvq6hZgNOyWOI8H7kQPA.jpeg" /><figcaption>Jimmy Guerrero</figcaption></figure><p>Jimmy Guerrero, VP Marketing and Community at YugaByte.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d6c5c36e634" width="1" height="1" alt=""><hr><p><a href="https://medium.com/openebs/getting-started-with-openebs-and-cloud-native-distributed-sql-1d6c5c36e634">Getting Started with OpenEBS and Cloud-Native Distributed SQL</a> was originally published in <a href="https://medium.com/openebs">OpenEBS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Native Chaos Engineering — Enhancing Kubernetes Application Resiliency]]></title>
            <link>https://medium.com/openebs/cloud-native-chaos-engineering-enhancing-kubernetes-application-resiliency-6e8f031cf213?source=rss-487395ff1add------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e8f031cf213</guid>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[chaos-engineering]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[openebs]]></dc:creator>
            <pubDate>Mon, 25 Nov 2019 07:36:05 GMT</pubDate>
            <atom:updated>2020-03-09T10:49:18.684Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cloud Native Chaos Engineering — Enhancing Kubernetes Application Resiliency</h3><h4>Extending Cloud Native Principles to Chaos Engineering</h4><p>Faults are bound to happen no matter how hard you test to find them before putting your software into production — clouds and availability zones will have issues, networks will drop, and, yes, bugs will make their presence felt. Resilience is how well a system withstands such faults — a highly resilient system, for example, one built with loosely coupled micro services that can themselves be restarted and scaled easily, overcomes such faults without impacting users. Chaos Engineering is the practice of injecting faults into a system before they naturally occur. Chaos Engineering is now accepted as an essential approach for ensuring that today’s frequently changing and highly complex systems are achieving the resilience required. Through chaos engineering, unanticipated failure scenarios can be discovered and corrected before causing user issues.</p><p>Broad adoption has made Kubernetes one of the most important platforms for software development and operations. The word “Cloud Native” is an overloaded term that has been co-opted by many traditional vendors to mean almost anything; even CNCF has allowed the use of the term cloud native to describe technologies that predate the cloud native pattern by, in some cases, decades. For the purposes of this blog, I’d like to use a more technical definition of cloud native; cloud native is here defined as an architecture where the components are microservices that are loosely coupled and, more specifically, are deployed in containers that are orchestrated by Kubernetes and related projects.</p><p>In this blog, I would like to introduce a relatively new or less frequently used term called “Cloud Native Chaos Engineering”, defined as engineering practices focused on (and built on) Kubernetes environments, applications, microservices, and infrastructure.</p><p>CNCF is, first and foremost, an open-source community (while some projects may not be strictly cloud native, they are all open-source). If Kubernetes had not been open-source, it would not have become the defacto platform for software development and operations. With that in mind, I’d like to stake the claim that Cloud Native Chaos Engineering is necessarily based on open source technologies.</p><h4>4 Principles of a Cloud Native Chaos Engineering Framework</h4><ol><li>Open source — The framework has to be completely open-source under the Apache2 License to encourage broader community participation and inspection. The number of applications moving to the Kubernetes platform is limitless. At such a large scale, only the Open Chaos model will thrive and get the required adoption.</li><li>CRDs for Chaos Management — Kubernetes native — defined here as using Kubernetes CRDs as APIs for both Developers and SREs to build and orchestrate chaos testing. The CRDs act as standard APIs to provision and manage the chaos.</li><li>Extensible and pluggable — One lesson learned why cloud native approaches are winning is that their components can be relatively easily swapped out and new ones introduced as needed. Any standard chaos library or functionality developed by other open-source developers should be able to be integrated into and orchestrated for testing via this pluggable framework.</li><li>Broad Community adoption — Once we have the APIs, Operator, and plugin framework, we have all the ingredients needed for a common way of injecting chaos. The chaos will be run against a well-known infrastructure like Kubernetes or applications like databases or other infrastructure components like storage or networking. These chaos experiments can be reused, and a broad-based community is useful for identifying and contributing to other high-value scenarios. Hence a Chaos Engineering framework should provide a central hub or forge where open-source chaos experiments are shared, and collaboration via code is enabled.</li></ol><figure><img alt="Cloud Native Chaos Engineering Framework" src="https://cdn-images-1.medium.com/max/300/0*gezmIO48LU9KSMgA.png" /><figcaption>Cloud Native Chaos Engineering Framework</figcaption></figure><h4>Introduction to Litmus</h4><p>Litmus is a cloud native chaos Engineering framework for Kubernetes. It is unique in fulfilling all 4 of the above parameters. Litmus originally started as a chaos toolset to run E2E pipelines for the CNCF SandBox project OpenEBS — powering, for example, <a href="https://openebs.ci/">OpenEBS.ci</a> — and has evolved into a completely open-source framework for building and operating chaos tests on Kubernetes based systems. It consists of four main components-</p><ul><li>Chaos CRDs or API</li><li>Chaos Operator</li><li>Chaos libraries and plugin framework</li><li>Chaos Hub</li></ul><figure><img alt="Introduction to Litmus" src="https://cdn-images-1.medium.com/max/300/0*GSvTfFh5KgBKM7M5.png" /><figcaption>Introduction to Litmus</figcaption></figure><h4>Chaos API</h4><p>Currently, Litmus provides three APIs:</p><ul><li>ChaosEngine</li><li>ChaosExperiment</li><li>ChaosResult</li></ul><p>ChaosEngine: ChaosEngine CR is created for a given application and is tagged with appLabel. This CR ties one or more ChaosExperiments to an application.</p><p>ChaosExperiment: ChaosExperiment CR is created to hold and operate the details of actual chaos on an application. It defines the type of experiment and key parameters of the experiment.</p><p>ChaosResult: ChaosResult CR is created by the operator after an experiment is run. One ChaosResult CR is maintained per ChaosEngine. The ChaosResult CR is useful in making sense of a given ChaosExperiment. This CR is used for generating chaos analytics which can be extremely useful — for example when certain components are upgraded between the chaos experiments, and the results need to be easily compared</p><h4>Chaos Operator</h4><p>The Litmus Operator is implemented using the Operator-SDK. This operator manages the lifecycle of the chaos CRs. The lifecycle of Litmus itself can be managed using this operator as it follows the lifecycle management API requirements. The chaos operator is also available at <a href="https://operatorhub.io/operator/litmuschaos">operatorhub.io</a></p><h4>Chaos Libraries and external Plugins</h4><p>The actual injection of chaos is done by chaos libraries or chaos executors. For example, the Litmus project has already built a chaos library called “LitmusLib”. LitmusLib is aware of how to kill a pod, how to introduce a CPU hog, how to hog memory or how to kill a node, and several other faults and degradations. Like LitmusLib, there are other open-source chaos projects like Pumba or PowerfulSeal. The CNCF landscape has more details of various chaos engineering projects. As shown below, the Litmus plugin framework allows other chaos projects to make use of Litmus for chaos orchestration. For example, one can create a chaos chart for the pod-kill experiment using Pumba or PowerfulSeal and execute it via the Litmus framework.</p><figure><img alt="Chaos Libraries and external Plugins" src="https://cdn-images-1.medium.com/max/300/0*0vm-YfScAxXoijFd.png" /><figcaption>Chaos Libraries and external Plugins</figcaption></figure><p><em>* PowerfulSeal and Pumba are shown as examples.</em></p><h4>Chaos Hub</h4><p>Chaos charts are located at <a href="https://hub.litmuschaos.io/">hub.litmuschaos.io</a>. ChaosHub brings all the reusable chaos experiments together. Application developers and SRE share their chaos experiences for others to reuse. The goal of the hub is to have the developers share the failure tests that they are using to validate their applications in CI pipelines to their users, who are typically SREs.</p><figure><img alt="Chaos Hub" src="https://cdn-images-1.medium.com/max/300/0*22JUDGxtNFNcgU5J.png" /><figcaption>Chaos Hub</figcaption></figure><p>Currently, the chaos hub contains charts for Kubernetes chaos and OpenEBS chaos. We expect to receive more contributions from the community going forward.</p><h4>Example use cases of Litmus:</h4><p>The most simple use case of Litmus is application developers using Litmus in the development phase itself. Chaos Engineering has been limited to the Production environment, and lately, we are seeing this practice being adopted in CI pipelines. But with Litmus, chaos testing is possible during development as well. Like Unit Testing, Integration Testing, and Behavior-Driven Testing, Chaos Testing is a test philosophy for developers to carry out the negative test scenarios to test the resiliency of the code before the code is merged to the repository. Chaos testing can be appended very easily to the application, as shown below: Chaos testing can be appended very easily to the application, as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*xT_x1Wd2TFyM2LfR.gif" /><figcaption>Example use cases</figcaption></figure><p>Other use cases of Litmus are for inducing chaos in CI pipelines and production environments.</p><h4>Summary</h4><p>With the introduction of chaos operator, chaos CRDs, and chaos hub, Litmus has all the key ingredients of cloud native Chaos Engineering.</p><h4>Important links:</h4><p>GitHub: <a href="https://github.com/litmuschaos/litmus">github.com/litmuschaos</a><br>Twitter: <a href="https://twitter.com/litmuschaos">@litmuschaos</a><br>Chaos Charts: <a href="https://hub.litmuschaos.io/">hub.litmuschaos.io</a><br>Community Slack: <a href="https://kubernetes.slack.com/messages/CNXNB0ZTN">#litmus channel on K8S Slack</a></p><p>This post was originally published by Umasankar Mukkara, on <a href="https://www.cncf.io/blog/2019/11/06/cloud-native-chaos-engineering-enhancing-kubernetes-application-resiliency/">Nov. 06, 2019 on CNCF’s blog</a>.</p><p><strong>About the author</strong>: <strong>Umasankar Mukkara (Uma)</strong> has over 20 years of experience as a hands-on developer, architecting scalable products and building innovative teams. Uma led product development in the early days of MayaData (CloudByte). He has led multiple innovations in multi-tenant storage and has contributed to more than 10 patents. Prior to CloudByte, he has contributed significantly to the development of Access Management solutions and has a sound understanding of cloud storage and security architecture. Uma also spends significant time building chaos engineering practices in the OpenEBS development eco-system, community engagement, and partner ecosystem development. Uma holds a Masters’s degree in Telecommunications and software engineering from Illinois Institute of Technology, Chicago and a bachelor’s degree in Communications from S.V.University, Tirupati, India. Contributor at openebs.io, Co-founder&amp; COO@MayaData.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e8f031cf213" width="1" height="1" alt=""><hr><p><a href="https://medium.com/openebs/cloud-native-chaos-engineering-enhancing-kubernetes-application-resiliency-6e8f031cf213">Cloud Native Chaos Engineering — Enhancing Kubernetes Application Resiliency</a> was originally published in <a href="https://medium.com/openebs">OpenEBS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lessons from KubeCon EU: storage for K8S is an opportunity, not (just) a problem to fix.]]></title>
            <link>https://medium.com/@openebs/lessons-from-kubecon-eu-storage-for-k8s-is-an-opportunity-not-just-a-problem-to-fix-9c446718aa49?source=rss-487395ff1add------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c446718aa49</guid>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[openebs]]></dc:creator>
            <pubDate>Sun, 26 May 2019 22:22:29 GMT</pubDate>
            <atom:updated>2019-07-31T07:26:36.790Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/96/0*i4LsCZjI9IJk6Y5V.jpeg" /></figure><p>Last week’s KubeCon was special for everyone who has been working on OpenEBS and related software for the last few years. By contributing OpenEBS to the CNCF and being embraced by various speakers at KubeCon, we seem to have broken through into the consciousness of many thousands of Kubernetes users — all of whom at one point seemed to be queuing up to chat with us (or to grab a sticker of the Mule visiting Sagra Familia).</p><p>Tweets like this one — thank you Priyanka! — led to a lot of great conversations at and around the booth.</p><p><a href="https://twitter.com/pritianka/status/1130738477853581312?source=post_page---------------------------">https://twitter.com/pritianka/status/1130738477853581312</a></p><p>Many if not most of the conversations were with existing users of OpenEBS who were happy and just wanted to stop by, meet us in person, and perhaps learn about <a href="https://blog.openebs.io/openebs-0-9-and-plans-for-1-0-7b1d4907e088?source=post_page---------------------------">0.9 and the recently added support for LocalPV</a> and the forthcoming high performance storage engine, on premise deployments of MayaOnline or whatever. A good amount of buzz about <a href="https://www.kubemove.io/?source=post_page---------------------------">KubeMove </a>as well — more on that below.</p><p>A special thanks to those engineers who stopped by from various car companies and for example reported that OpenEBS is now a preferred solution under a number of Kafka pipelines and even in the on-line configurator for a public facing web site. Not all the state of this configurator (where you design your own car) is being handled by Kubernetes, but some of it is and they want to put all of it on Kubernetes itself as opposed to being on external systems only connected via API or otherwise. As their usage points out — APIs check the box for connectivity however these and countless other users of Container Attached Storage from OpenEBS and our proprietary friends show that there is something more going on here. These users are not stopping at the API level — whether CSI at the storage layer or via Kafka or some other layer of connectivity at the DB and data layers. Instead they are embracing Kubernetes itself as a substrate for storage and data management.</p><p>Well — why is that? And how is it that after many years of effort OpenEBS has become…</p><p>Read the complete article in <a href="https://blog.mayadata.io/openebs/lessons-from-kubecon-eu-storage-for-k8s-is-an-opportunity-not-just-a-problem-that-needs-fixing">MayaData’s Blog</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c446718aa49" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Performance tuning, CAS and OpenEBS]]></title>
            <link>https://medium.com/openebs/performance-tuning-cas-and-openebs-5be702953a69?source=rss-487395ff1add------2</link>
            <guid isPermaLink="false">https://medium.com/p/5be702953a69</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cassandra]]></category>
            <category><![CDATA[openebs]]></category>
            <category><![CDATA[mayaonline]]></category>
            <category><![CDATA[kubectl]]></category>
            <dc:creator><![CDATA[openebs]]></dc:creator>
            <pubDate>Wed, 30 Jan 2019 11:22:28 GMT</pubDate>
            <atom:updated>2019-12-10T07:54:38.628Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cpL30PKzMoboBo3A" /><figcaption>IOPS SCREENS FROM MAYAONLINE</figcaption></figure><p>Now and again — ok almost every day — we get a question on the community or from our commercial users about performance.</p><p>And our typical response is “mileage may vary.” Sometimes we also mention that there are a bunch of tunables then talk to us for help. And by the way — we love to discuss performance requirements as it shows off how CAS is different and also we get to learn much more about how OpenEBS is being used.</p><p>This blog shares some high-level points and then shares info.</p><p>First, it is worth noting that Container Attached Storage — where the workload is married to the storage controller — is by definition <strong>per workload storage</strong>. So when you compare OpenEBS to, for example, CEPH or some other pre-Kubernetes antediluvian scale-out storage system you risk apples to banana comparisons. While CAS will be constrained by the environment itself and how many resources OpenEBS utilizes from Kubernetes — it will not be directly impacted by the addition of more and more workloads. Those workloads are more or less an island as to themselves. By comparison, a system that checks with a metadata store to determine where to write and where to read the data and stripes data across nodes, for example, will have far greater performance impacts as more workloads are added.</p><p>Secondly, as I mentioned on twitter the other day, sometimes the performance you are looking to optimize should be human as opposed to workload. With OpenEBS running natively in Kubernetes you can spin up storage in seconds on a per-workload basis — and manage it in a very familiar Kubernetes way. No external distributed system run on a foundation other than Kubernetes can be as simple to run and scale. You’ll need a team of experts to run that external distributed storage system — experts that arguably should be applied to running the distributed system you are betting upon — Kubernetes itself. And you’ll inevitably find that it takes weeks to understand any external distributed state store and years to understand how it will behave in the real world. By comparison, <em>if you know how to run Kubernetes, you already know how to run OpenEBS.</em> So, if you compare the human factor of storage performance — the humans and their ability to understand and run the storage software itself — there is no real comparison between OpenEBS and any other storage. (yes, I see my fellow members of the CAS category and I know what having a kernel module means for ongoing operations :)).</p><p>Alright, enough with the high-altitude view! If you are still reading, I assume you want to know the details about tuning OpenEBS.</p><p>The good news is that you can tune cStor — which is our more enterprise-focused storage engine released in 2018 — based on the characteristics of your workload. We are working on adding these configurations directly to your storage classes as part of the forthcoming 0.9 release (we are on 0.8.1 currently) to support the infrastructure as a code pattern.</p><p>Here are the two main tunings that can help improve performance:</p><ol><li>Scheduling the application and associated cStor storage pods</li><li>Tuning the cStor volume based on the application IO pattern</li></ol><h4>Scheduling</h4><figure><img alt="Scheduling the Application and Associated cStor Storage Pods" src="https://cdn-images-1.medium.com/max/800/0*RPEsSdC1H2iH4wTK" /><figcaption>Scheduling the Application and Associated cStor Storage Pods</figcaption></figure><p>cStor is the OpenEBS storage engine written in C. It is Kubernetes-native and follows the same constructs as other application pods, where affinity and anti-affinity rules can be specified to localize the access to the data and to distribute the storage pods to be resilient against node and zone failures. cStor uses synchronous replication behind the scenes to keep copies of your data, so the network latency between the cStor target and its replicas will have a performance impact that needs to be accounted for when designing the system for resiliency. Note that quorum policies are configurable, so you can specify if you want cStor to acknowledge writes when received or, more typically, when received and then confirmed by one or two replicas. Perhaps not surprisingly, performance is best when the application, the cStor target, and its replicas are co-located or connected via a fast network.</p><h4>Tuning the cStor Volume</h4><figure><img alt="Tuning the cStor Volume Based on the Application IO Pattern" src="https://cdn-images-1.medium.com/max/800/0*zIOamZIDQ0gKRPhc" /><figcaption>Tuning the cStor Volume Based on the Application IO Pattern</figcaption></figure><p>The two main tunings are LU, or “lun worker,” and queue depth, which is simply the depth of the queue used in IO for the OpenEBS target. By default, when you turn up OpenEBS and use the default configurations, OpenEBS runs in a lightweight manner. However, performance improves as you add more CPU to add more workers to LU and QD.</p><p>It is possible to modify the default settings via <a href="https://github.com/openebs/openebs/tree/master/k8s/demo/dbench">`kubectl exec`</a> and if you would like to try these out, feel free to contact us through the OpenEBS Slack community. With 0.9, the tunable will be available as with other storage policies that OpenEBS currently supports via storage class and persistent volume claim annotations.</p><p>You can read more about these storage policies both for cStor and for the earlier Jiva based storage engine on our docs here:</p><p><a href="https://docs.openebs.io/docs/next/storagepolicies.html?__hstc=216392137.181b23812f103703b848f80cc28e7104.1575964270497.1575964270497.1575964270497.1&amp;__hssc=216392137.1.1575964270498&amp;__hsfp=2230078507">OpenEBS Storage Policies ·</a><a href="https://docs.openebs.io/docs/next/storagepolicies.html?__hstc=216392137.181b23812f103703b848f80cc28e7104.1575964270497.1575964270497.1575964270497.1&amp;__hssc=216392137.1.1575964270498&amp;__hsfp=2230078507">docs.openebs.io</a></p><figure><img alt="Types of Storage Policies for cStor" src="https://cdn-images-1.medium.com/max/800/0*XLgrgMXwz5liR-Te" /><figcaption>Types of Storage Policies for cStor</figcaption></figure><p>Keep in mind that optimizing performance based on environmental and workload characteristics can be fairly complex. For example, performance often depends upon whether your workload is sequential or random and of course whether it is largely read or write. Many transactional DBs are sequential write-heavy, whereas analytic workloads are often sequential read-heavy and logging is typically more random writes. Also, the block sizes matter as does the characteristics of the underlying storage device (disks vs. SSDs for example). In the case of sequential workloads on cStor, your write performance may actually <em>degrade</em> with additional workers. In that case, you would want to decrease the workers to only one thread.</p><p>Again, remember that if you are on this path we are happy to help you and learn from your experience.</p><p>We have a variety of automated routines coming to assist in performance testing in OpenEBS 0.9 and later releases and in MayaOnline. There is a vast amount that can be done by closing the loop between configuration and actual performance as monitored — especially when combined with an active testing or chaos engineering solution such as Litmus. While there is some performance testing in Litmus, we and others in the community are adding workload tests such as TPS or transaction tests for various DBs that are frequently run on OpenEBS (thank you, Cassandra, NuoDB, MongoDB and other friends). We are also working on additional closed-loop optimization to build into OpenEBS operators and make visible via MayaOnline. As always, we welcome your feedback and suggestions!</p><p>So, when might you want to make changes to tune your storage for performance? Typically, we see requests for these changes in environments in which storage is the primary performance bottleneck. As an example, we have a large IoT provider that is using cStor in thousands of remote nodes. This user knows the hardware underlying those nodes and their likely workloads. They felt that it was reasonable to maximize the resource usage of OpenEBS in order to expedite local on node performance of a random heavy workload.</p><p>On the other hand, if you are most interested in saving money and are running the workloads in clouds where CPU usage is relatively expensive, then you may prefer to run OpenEBS in a lightweight manner with as few workers as possible. Keep in mind that a common use case is running OpenEBS on persistent disks from the cloud providers, converting these more performant and less-expensive ephemeral resources into the foundation for resilient storage, thereby saving money while boosting performance.</p><p>As stated before, the mileage may vary from case to case, so feel free to contact us about your unique scenario. We are seeing many ways that necessary trade-offs between performance, resource usage, and workload and storage configurations can be better optimized on a per-workload basis. If you test many permutations of storage configurations against workloads configured in many ways, you can quickly find yourself in test scenarios that could take years to complete (gulp). It is far better to decompose the problem down to workloads so that the problem becomes more tractable. For example, you can configure MySql and the underlying OpenEBS storage differently depending on the use case, and even have systems in place that alter the configuration as needed. In other words, a fundamental advantage of the CAS architecture is that it enables a level of customization and refinement that shared everything storage approaches of the past made impossible.</p><p>Thanks for reading. Feedback and questions are welcome.</p><p>About the Author:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*cB4v1rogVOPYYulYiQZjBA.png" /><figcaption>Evan Powell</figcaption></figure><h4>Evan Powell</h4><p>Founding CEO of a few companies including StackStorm (BRCD) and Nexenta — and CEO &amp;Chairman of <a href="https://openebs.io/">OpenEBS</a> / <a href="https://mayadata.io/">MayaData</a>. ML and DevOps and Python, oh my!</p><p>Twitter:<br><a href="https://twitter.com/epowell101">https://twitter.com/epowell101</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5be702953a69" width="1" height="1" alt=""><hr><p><a href="https://medium.com/openebs/performance-tuning-cas-and-openebs-5be702953a69">Performance tuning, CAS and OpenEBS</a> was originally published in <a href="https://medium.com/openebs">OpenEBS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>