<?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 Ramnath Nayak on Medium]]></title>
        <description><![CDATA[Stories by Ramnath Nayak on Medium]]></description>
        <link>https://medium.com/@ramnathn?source=rss-fb2e49dca9f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*fm7lJ7O1wRVUU7zXrni5rw.jpeg</url>
            <title>Stories by Ramnath Nayak on Medium</title>
            <link>https://medium.com/@ramnathn?source=rss-fb2e49dca9f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 02:43:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ramnathn/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[Observability and beyond — building resilient applications and infrastructure]]></title>
            <link>https://medium.com/cloudnativeinfra/observability-and-beyond-building-resilient-applications-and-infrastructure-9922b35812a4?source=rss-fb2e49dca9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/9922b35812a4</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Ramnath Nayak]]></dc:creator>
            <pubDate>Wed, 23 Oct 2019 21:52:05 GMT</pubDate>
            <atom:updated>2019-10-23T21:52:05.684Z</atom:updated>
            <content:encoded><![CDATA[<h3>Observability and beyond — building resilient application infrastructure</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*1BxKNqa0V3a-yW5YIAuF7A.jpeg" /></figure><h3>The journey from being reactive to being proactive</h3><p>Things were quite simple in the old days. Proactively monitoring applications or infrastructure was not the norm. If there was a failure, a user would pick up the phone to inform help-desk that the app is broken.</p><p>Troubleshooting was all reactive and the only path to resolution was for someone to roll up their sleeves and go in and look at log files and manually fix errors by themselves.</p><p>Luckily, those days are now over. We now live in the age of observable applications running on observable infrastructure. Failure costs time and money to fix and ruins brand value. Uptime, scalability and the ability to identify and fix errors are the factors that determine if you stay in business or lose to the competition.</p><p>Here is a whirlwind tour of observability concepts and commonly used tools to consider while building out your observability solution.</p><h3>Monitoring Dashboards</h3><h4>Prometheus</h4><p>There is nothing more ‘observable’ than a shiny dashboard that visually depicts the state of your applications and infrastructure. Prometheus and Grafana are by far the most effective tools in this space. They make a great tag team. Prometheus ingests your metrics, Grafana visualises them.</p><p>You expose your application’s metrics using the Prometheus client libraries. You need to use the client libraries in your application and export the metrics to Prometheus. Prometheus is just a single executable that can be deployed on a VM or as a sidecar container, which then scrapes your application’s HTTP endpoints for metrics and general health info.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uHBmT1vADYYgoGAC9JU_mA.png" /><figcaption>Prometheus Metrics and Graphs</figcaption></figure><p>Prometheus stores the data in its internal time-series data model. You can then use PromQL query language to build complex expressions, in addition to being able to define alerts.</p><h4>Grafana</h4><p>Grafana, on the other hand, is a visually engaging dashboard that is also deeply functional. Grafana supports Prometheus as a data source (among several others) and the deep integration between the two facilitates building of sophisticated visualisations using the metrics exported by Prometheus.</p><p>Dashboards are made up of individual tiles called Panels, which can be graphs, statistics, tables, lists, free text, heat-maps or alert lists. Grafana also has built-in alerting capability (and I prefer this over Prometheus alerts because you can have a better view of what triggered the error).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NudvLv1rN76pjEHsJUlGqg.png" /><figcaption>Grafana Dashboard</figcaption></figure><p>There is a large ecosystem of plugins, packaged dashboards and full-fledged applications on the <a href="https://grafana.com/grafana/plugins">grafana website</a> that you can save time with before you go and build one from scratch.</p><h4>Golden Signals</h4><p>Prometheus + Grafana give you access to hundreds of metrics, but how do you decide what kind of primitive/derived metrics to monitor?</p><p>In the Site Reliability Engineering book, Google SREs talk about <a href="https://landing.google.com/sre/sre-book/chapters/monitoring-distributed-systems/#xref_monitoring_golden-signals">Golden Signals </a>— the four most important types of signals to monitor:</p><p><strong>Latency</strong>: How long requests and actions take to complete, with respect to a known good baseline so that you can identify when the application performance starts to degrade.</p><p><strong>Traffic:</strong> Number of connections, requests per seconds, IOPS, network usage, etc that give you an indication of how much volume is being processed by the system.</p><p><strong>Errors</strong>: Number of HTTP 500s, non zero return codes and any other indicators of a failure.</p><p><strong>Saturation</strong>: An indicator for how ‘full’ is the service — for e.g., 100% CPU, disk or network utilisation or resource pressure of any kind that indicates an overload.</p><blockquote>To get the best out of your dashboard, make sure you set it up with the critical stats that give you an indication of what is out of order so that you can triage issues quickly. The dashboard should tell you what is wrong without you having to search inside logs.</blockquote><h3>Health checks</h3><p>One of the best practices while developing a cloud native application is to make sure the app exposes its health through an HTTP end point. Any observer like your cloud Load Balancer or the Kubernetes platform can then query the state of your application to make decisions like stop sending traffic to it or replace it with a new healthy instance.</p><p>In the context of setting up your own observability framework, health checks play the important role identifying failures so that you can take remedial action, like initiate a scaling operation (when it is an event that can be handled) or raise an alert notification to a human to address the failure.</p><blockquote>Health checks are a proactive means of ensuring that the application continuously exposes its well being to its observers (more reliable than the observers trying to guess the state) so that failures can be automatically acted on.</blockquote><p>There is also another type of health check, for e.g. the one <a href="https://docs.cloud.oracle.com/iaas/Content/HealthChecks/Concepts/healthchecks.htm">offered by OCI</a> that you can use where you continuously check the availability of your application from various vantage points in the world. Failures are not always on the application side, it can also be in the network connectivity and localised to certain geographical regions.</p><p>For instance, the reason why your users in Johannesburg are not able to connect to the service running in London could be due to a localised network issue, and this ‘observing from various vantage points’ approach can help identify such localised issues easily. Such observations do not have to be restricted to “<em>is it running”</em> but can also be used to keep an eye on latency and quality of service.</p><h3>Events and alerts</h3><p>An alert is more of a feature of a monitoring tool or a cloud platform to inform a human of a situation needing attention, than a standalone product by itself. But something that needs to be said is the importance of having the alerting system to integrate into your incident response system like PagerDuty and the ticketing system behind it, like Jira.</p><blockquote>Alerts are not just for infrastructure incidents like resource shortages and failures, they can also be used at the application level to notify application owners of exceptional events that the application cannot handle on its own.</blockquote><p>For e.g., consider an e-commerce system that has taken payment for a product, but had an internal failure before the order was fully processed. Setting up an alert that logs an incident with the ticketing system for a human team to address the failure (or initiate a refund) can help proactively address the issue without having the end customer to call up helpdesk.</p><h3>Distributed Tracing</h3><p>One of the challenges with moving to microservice based architecture is that the call stack between microservices can grow tall and it can get difficult to know where the performance bottlenecks are, or to get a view of the dependencies between the various services. This is where distributed tracing tools like <a href="https://www.jaegertracing.io/">Jaeger</a> and <a href="https://zipkin.io/">Zipkin</a> become indispensable.</p><p>The visual nature of these tools make it very useful in a crisis to understand where the bottlenecks are.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N0b_IEG4yiOLI3afcO9cHw.png" /><figcaption>Jaeger visualisation of a trace</figcaption></figure><p>Above is a screenshot of Jaeger showing the traces for a demo app called HotROD and the benefits are obvious — a visual depiction of errors and long running services that are affecting the health of your application.</p><p>Another useful feature is to compare two different traces to see where the performance has degraded, a nifty feature to help detect the bottlenecks.</p><h3>Log aggregation</h3><p>Logs are still the most authoritative source of information to establish the root cause of the issue. But what is new, is that unlike the old days, you do not want to start with the logs when there is an issue.</p><blockquote>Ideally, all of the other observability features should tell you the issue, and you should scan through the logs only to confirm your theory of why the failure happened based on what you saw in other observability mechanisms.</blockquote><p>The amount of information logged has increased manifold. Any system these days generates several thousands of lines of logs per second in files spread across multiple locations, we now need a system to make it easy to browse and search for log entries.</p><h4>Fluentd</h4><p>Fluentd provides a “unified logging layer” that captures logs from various apps in JSON format and forward these to other systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/0*P4cKFhwUJpCMIOLR.png" /></figure><p>Fluentd supports memory and file-based buffering to prevent inter-node data loss, robust failover and can be set up for high availability.</p><p>At the heart of Fluentd is an event driven system supported by a plugin based architecture with hundreds of plugins.</p><p>All events are processed against rules you define and are routed to a destination provided by your rules. To process and forward logs from a cloud native app, fluent bit is a lightweight tool from the fluentd family.</p><h4>ELK Stack</h4><p>When the <a href="https://www.elastic.co/what-is/elk-stack">ELK stack</a> (made up of the trio of <a href="https://www.elastic.co/products/elasticsearch">Elasticsearch</a>, <a href="https://www.elastic.co/products/elasticsearch">Logstash</a> and <a href="https://www.elastic.co/products/kibana">Kibana</a>) became popular a few years ago, that was a part of major push in the industry towards enabling observability into what the application and infrastructure are doing at any given point in time. It is fair to say that the ELK stack has played a major role in making observability a thing.</p><p>Logstash collects and aggregates logs, Elasticsearch makes the logs searchable and Kibana visualises the result in the form a visually appealing dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NhMgd4djQS29CBlYDs7STA.png" /><figcaption>Elk stack in action</figcaption></figure><p>Though Prometheus, Grafana and Fluentd have become favourites in recent times with cloud native audiences, the ELK stack remains popular, especially among enterprises. The sidecar deployment pattern of Prometheus and Fluentbit has also contributed to their popularity.</p><p>ELK stack also has an equivalent for Fluentbit called Beats to provide similar lightweight edge based forwarding capability. There is also a dedicated Logs app in Kibana that provides a console view of logs, APM to provide Application Performance Monitoring and Metrics to visualise infrastructure metrics.</p><p>It is not all or nothing with the ELK stack, another popular combination (EFK) is to use Fluentd in place of Logstash.</p><h4>Sentry</h4><p>Sentry is a more specialised tool with a very specific purpose — to surface those errors and exceptions in your application code. You include the client libraries in your code and it intercepts the errors making it easy to spot where when and why those happened by pulling together the details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O8xK8FVi314KjZcOOF4lOg.png" /><figcaption>Sentry in action</figcaption></figure><p>When an error occurs, Sentry can throw a dialogue box to the end user of your application to enter additional details about what they were doing that led to the error, sharing addition context with the developer to help replicate the issue.</p><p>Sentry also has integration with Slack, JIRA and other development tools to make it easier to catch bugs and throw them back into the development workflow.</p><h4>Logs as event streams</h4><p>Logging is so important that it is also <a href="https://12factor.net/logs">one of the 12 factors</a> that you need to consider while building a cloud native applications. There are two key messages embedded in this principle.</p><p>The first one is that a cloud native application should not attempt to create, manage or rotate log files. The log messages should go straight to stdout so that the runtime environment (Kubernetes) can surface it easily to the observability frameworks mentioned here.</p><p>The second message is that you should start treating logs as event streams, so that they can be sourced into big data/querying environments for further analysis for trends and co-relating incidents with other environmental factors. That helps answer questions like how your ability to process a certain number of transactions in an hour changed after moving to a different framework or library.</p><p>It can also help address business challenges caused by quiet failures. For example, if a b2b partner phones up to ask about a certain transaction they sent to your system two weeks ago and never had a response for. Having a log repository to reconstruct what happened is very helpful.</p><h3>People and Processes</h3><p>Just as important as the tools are the people who monitor and the processes they follow to act upon the events from your observability framework.</p><h4>You built it, you run it</h4><p>If the application architecture is based on microservices, you should have already organised the team structures around the microservice boundaries so that the people who the service well are the ones. This ensures that the people looking at the observability framework are the ones who know the application well and are best placed to refine the framework over time.</p><p>But unlike the developers who have the luxury of working in isolation to build the service any which way they like, the ‘observers’ need to be aware of how the adjacent services work and what information the other service teams need to ensure collaboration when issues arise that require collaboration</p><h4>Site Reliability Engineering (SRE)</h4><p>Google came up with the idea of Site Reliability Engineering as a pioneering approach to run planetary scale systems. The SRE teams are made of equal number of developers and operators, who spend half of their time on operations and on-call and the remaining half automating all the activities.</p><blockquote>The results of such high levels of automation are systems that are not just automated, but fully automatic that can react and handle situations on their own.</blockquote><p>The <a href="https://landing.google.com/sre/books/">SRE books</a> are a must read for anyone interested in building systems that use observability frameworks to build resilient and highly scalable applications.</p><h3>Synopsis</h3><p>The purpose of making your applications and infrastructure more observable is not merely to ‘know’ what is going on, but to take that to the next level and prevent them from failing in the first place. Failing which, to set up automated recovery mechanism. Or at least be notified of the failure so you can act on that failure, in that order.</p><p>The worst failures are the ones which happen quietly without any indication of an issue having happened. The best failures are the ones where the system detects a failure before it happens and takes remedial action to prevent the failure. Most failures fall somewhere along the two ends of this spectrum.</p><blockquote>One of the benefits of cloud native systems is that a well engineered one does not ‘fail’ completely. Most issues just result in degraded performance. The tools and practices mentioned here help pre-empt those/manage those scenarios so that your applications and infrastructure can remain healthy.</blockquote><p>As we cannot foresee all possible failure scenarios during the development cycle, observability provides an important feedback loop into the development cycle to make the application better. A well engineered observability framework will give you exactly that - a list of problems that you need to address in your application’s code and architecture to grow with your business.</p><ul><li><a href="https://prometheus.io/">Prometheus - Monitoring system &amp; time series database</a></li><li><a href="https://grafana.com/">Grafana: The open and composable observability platform | Grafana Labs</a></li><li><a href="https://www.jaegertracing.io/">Jaeger: open source, distributed tracing platform</a></li><li><a href="https://www.fluentd.org/">Fluentd | Open Source Data Collector</a></li><li><a href="https://www.elastic.co/what-is/elk-stack">The ELK Stack: From the Creators of Elasticsearch</a></li><li><a href="https://sentry.io/welcome/">Application Performance Monitoring &amp; Error Tracking Software</a></li><li><a href="https://landing.google.com/sre/books/">Google - Site Reliability Engineering</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9922b35812a4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudnativeinfra/observability-and-beyond-building-resilient-applications-and-infrastructure-9922b35812a4">Observability and beyond — building resilient applications and infrastructure</a> was originally published in <a href="https://medium.com/cloudnativeinfra">cloudnativeinfra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I spy with my virtual eye — detection of objects in videos using Videoflow and GPUs]]></title>
            <link>https://medium.com/cloudnativeinfra/i-spy-with-my-virtual-eye-detection-of-objects-in-videos-using-videoflow-and-gpus-db34538e3e62?source=rss-fb2e49dca9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/db34538e3e62</guid>
            <category><![CDATA[nvidia-docker]]></category>
            <category><![CDATA[video-processing]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[videoflow]]></category>
            <dc:creator><![CDATA[Ramnath Nayak]]></dc:creator>
            <pubDate>Sun, 28 Jul 2019 17:17:21 GMT</pubDate>
            <atom:updated>2019-07-29T09:55:48.494Z</atom:updated>
            <content:encoded><![CDATA[<h3>I spy with my virtual eye — detection of objects in videos using Videoflow and GPUs</h3><figure><img alt="Attendees at a rock concert filming on their mobile phones" src="https://cdn-images-1.medium.com/max/1024/0*xSbRHAe9RVAoxAIM" /><figcaption>Photo by <a href="https://unsplash.com/@noiseporn?utm_source=medium&amp;utm_medium=referral">Noiseporn</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Content Proliferation</h3><p>We now live in the Information Age, where the rate of creation of content is growing exponentially.</p><p>In the context of video production, the fuse of explosive growth has been lit from both the consumer as well as the commercial ends of the industry.</p><p>On the consumer end, large scale adoption of mobiles with the ability to capture 4K UHD video has contributed to the rapid growth. On the professional media production end, the bar for content has always been high and live telecasts of events in 4K is pushing the envelope even farther.</p><p>There is a third front of prosumer market emerging where drones are being deployed to survey sites and the video relayed back needs to be processed for gaining insight into the activities captured by the drone.</p><blockquote>High quality and high volume data is now produced at a much more rapid rate than we can consume using conventional data consumption paradigms. This has called for a radically new approach in analysing video content to automatically identify, analyse and tag the contents of videos. Machine Learning is rising to the occasion to address these problems.</blockquote><p>For the consumer market, ML may not have really gone beyond auto enhance, but for the prosumer and commercial media industries, ML can save tremendous amount of effort that used to go into generating metadata for the content, saving significant amounts of time while drastically reducing costs.</p><p>Typical use cases include generating metadata to be stored for later search and retrieval, generate ratings, detect potentially offensive content, supporting commentary teams by assisting with player/celebrity recognition etc.</p><p>Outside of the media industry, law enforcement agencies too have started deploying classification on video stream to detect and prevent crimes, identify criminals and prosecute them.</p><h3>ML to the rescue</h3><p>TensorFlow is a one of a kind tool that is extremely powerful for developing Machine Learning applications. Though it is a generic platform that can be used for wide variety of use-cases, the low level nature of TensorFlow can make it a bit daunting to use.</p><p>Enter Videoflow, a video processing framework built on top of Tensorflow. Videoflow provides a higher level abstraction for you to work with, making it much easier to build a video strem processing pipeline (link to Videoflow at the bottom of this page).</p><p>For example, this block of Python code using rhe Videoflow framework ‘parses’ an mp4 file called input.mp4, runs Tensorflow classification against it and generates an output avi file called output.avi with the prediction drawn into the output. This is a modified clone of the sample from Videoflow site, let us save this as vidflow.py</p><pre>import videoflow<br>import videoflow.core.flow as flow<br>from videoflow.core.constants import BATCH<br>from videoflow.consumers import VideofileWriter<br>from videoflow.producers import VideofileReader<br>from videoflow.processors.vision.detectors import TensorflowObjectDetector<br>from videoflow.processors.vision.annotators import BoundingBoxAnnotator<br>from videoflow.utils.downloader import get_file</pre><pre>class FrameIndexSplitter(videoflow.core.node.ProcessorNode):<br>    def __init__(self):<br>        super(FrameIndexSplitter, self).__init__()<br>    <br>    def process(self, data):<br>        index, frame = data<br>        return frame</pre><pre>input_file =  &quot;input.mp4&quot;<br>output_file = &quot;output.avi&quot;<br>reader = VideofileReader(input_file)<br>frame = FrameIndexSplitter()(reader)<br>detector = TensorflowObjectDetector()(frame)<br>annotator = BoundingBoxAnnotator()(frame, detector)<br>writer = VideofileWriter(output_file, fps = 30)(annotator)<br>fl = flow.Flow([reader], [writer], flow_type = BATCH)<br>fl.run()<br>fl.join()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FrldG2WMSmBlF9C9PutnHg.png" /><figcaption>Sample output generated by the videoflow script</figcaption></figure><p>Now that we have an app that can use GPUs, we can containerise this using <a href="https://medium.com/@ramnathn/containerising-gpu-workloads-13085e6d0fa7">Nvidia Docker</a> to make it easy to build and deploy. If you want to pull and run a prebuilt GPU container, just pull <strong>lhr.ocir.io/intrnayak/videoflow-gpu</strong> and run it using this command:</p><pre>nvidia-docker run --rm -u $(id -u):$(id -g) -v $(pwd):/usr/src/app videoflow-gpu python vidflow.py</pre><p>Or if you want to build your own containerised version, here is the Dockerfile I used:</p><pre>FROM tensorflow/tensorflow:latest-gpu-py3</pre><pre>RUN echo &quot;deb <a href="http://security.ubuntu.com/ubuntu">http://security.ubuntu.com/ubuntu</a> xenial-security main&quot; \ <br> | tee -a /etc/apt/sources.list<br>RUN echo &quot;deb <a href="http://ppa.launchpad.net/jonathonf/ffmpeg-3/ubuntu">http://ppa.launchpad.net/jonathonf/ffmpeg-3/ubuntu</a> xenial main &quot; \ <br> | tee -a /etc/apt/sources.list \<br> &amp;&amp; apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4AB0F789CBA31744CC7DA76A8CF63AD3F06FC659</pre><pre>ENV DEBIAN_FRONTEND=noninteractive<br>RUN apt-get update &amp;&amp; apt-get install -y \ <br> pkg-config \<br> python-dev \ <br> python-opencv \ <br> libopencv-dev \ <br> libav-tools  \ <br> libjpeg-dev \ <br> libpng-dev \ <br> libtiff-dev \ <br> libjasper-dev \ <br> python-numpy \ <br> python-pycurl \ <br> python-opencv</pre><pre>COPY . /videoflow<br>RUN pip install /videoflow --find-links /videoflow<br>RUN mkdir -p /usr/src/app<br>WORKDIR /usr/src/app<br>CMD [&quot;python&quot;, &quot;/videoflow/examples/object_detector.py&quot;]</pre><h3>CPU vs GPU</h3><p>To see the real difference in performance between the CPU and GPU for workloads like this, you can build a non-GPU enabled container and run it and see the performance difference for yourself.</p><p>To build a CPU version that does not use GPU, just replace the <strong>latest-gpu-py3</strong> tag in the Dockerfile with <strong>latest-py3</strong> and use <strong>docker</strong> instead of <strong>nvidia-docker</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*45bUyhUAtp5fGWuAgU8HfQ.png" /></figure><p>In tests I ran on the <a href="https://cloud.oracle.com/compute/gpu/features">OCI VM.GPU3.1 shape</a>, a short clip that takes a mere 43 seconds using the GPU instance takes 1 minute 30 seconds without GPUs.</p><p>That is a significant difference in performance, imagine the order of magnitude difference when you run large volume workloads at scale!</p><h3>References</h3><ul><li><a href="https://www.tensorflow.org/">TensorFlow</a></li><li><a href="https://github.com/videoflow/videoflow">videoflow/videoflow</a></li><li><a href="https://github.com/NVIDIA/nvidia-docker">GitHub - NVIDIA/nvidia-docker: Build and run Docker containers leveraging NVIDIA GPUs</a></li><li><a href="https://cloud.oracle.com/compute/gpu/features">Accelerated GPU Cloud Computing - Oracle Cloud Infrastructure</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db34538e3e62" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudnativeinfra/i-spy-with-my-virtual-eye-detection-of-objects-in-videos-using-videoflow-and-gpus-db34538e3e62">I spy with my virtual eye — detection of objects in videos using Videoflow and GPUs</a> was originally published in <a href="https://medium.com/cloudnativeinfra">cloudnativeinfra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Containerising GPU workloads]]></title>
            <link>https://medium.com/cloudnativeinfra/containerising-gpu-workloads-13085e6d0fa7?source=rss-fb2e49dca9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/13085e6d0fa7</guid>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[nvidia-docker]]></category>
            <category><![CDATA[nvidia]]></category>
            <dc:creator><![CDATA[Ramnath Nayak]]></dc:creator>
            <pubDate>Sun, 28 Jul 2019 16:03:19 GMT</pubDate>
            <atom:updated>2019-07-29T09:59:26.719Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bM0JJg3--1YWa3LB" /><figcaption>Photo by <a href="https://unsplash.com/@chuttersnap?utm_source=medium&amp;utm_medium=referral">chuttersnap</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>The Containerisation Revolution</h3><p>Containers have been a powerful catalyst for the adoption of automation, CI/CD and DevOps practices in general. Containers have a provided physical implementation for the abstract aspects of DevOps philosophy around role separation between Dev and Ops teams.</p><p>If you are a Developer, your focus would be on building what is inside a container. If you are an Ops person, your focus would be on deploying, scaling and monitoring to ensure that the containers are running and healthy.</p><blockquote>The container provides a clean separation between build and deployment roles without sending them both down different paths, with the container becoming the unit of deployment and the focal point that unifies the Dev and Ops teams.</blockquote><p>For any team looking to adopt DevOps, there is now a clear paved road to adopt where you check in your code changes to a Git repo which tirggers the build pipeline that produces a container that then gets deployed to production.</p><h3>The anti-pattern</h3><p>With the advent of Machine Learning and AI type workloads, the nature of the the problem domain has required that a lot of large scale mathematical operations that need to happen in parallel.</p><p>Traditional CPU architecture is not the optimal solution for these types of workloads, they run much faster in the highly parallel architecture of GPUs. For workloads that rely on GPUs, the difference in performance between GPU and CPU can be drastically different by several orders of magnitude to the extent of being indispensable.</p><blockquote>Here lies the paradox — on one hand, you want to adopt the paved road of the container as a unit of deployment. On the other hand you need the specialisation of GPUs, which cannot be leveraged by the container, which is essentially a form virtualisation at the OS level and does not provide a direct mechanism for accessing underlying specialised hardware like GPUs.</blockquote><h3>Nvidia-Docker</h3><p>Thankfully, the stalwarts at Nvidia have come up with a plugin for docker (cleverly named <a href="https://github.com/NVIDIA/nvidia-docker">Nvidia Docker</a>) that allows you to do build containers that can leverage the underlying Nvidia GPUs on the host server.</p><blockquote>Nvidia Docker lets you do both — use the paved road for deploying with containers as well as leverage the GPUs so that your ML or graphic processing worklaods can take advantage of the GPUs.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*0Ugi8kcY0MMi3fCkLJdslA.png" /><figcaption>Nvidia Docker Architecture (courtesy Nvidia)</figcaption></figure><p>Most software vendors of have GPU containers built using Nvidia-Docker that you can use as your base containers which you can extend. For e.g., instead of <strong>tensorflow:latest</strong>, use <strong>tensorflow:latest-gpu</strong> and your container will just be able to use the GPU without you having to do anything.</p><p>You will then need to use <strong>nvidia-docker</strong> instead of just <strong>docker</strong> to run your applications to make use of the plugin. Remember that Nvidia Docker containers do not run on vanilla docker, so if you also want cpu based version of the application, you will need to build a separate non-gpu version.</p><h3>Running GPU workloads in the cloud</h3><p>Most cloud providers provide deep learning images with nvidia-docker pre-installed. Just in case if you want to build your own image (with a specific version of the CUDA drivers, for example), here is an ansible script you can use to install your specific version of the Nvidia CUDA drivers, Docker and Nvidia Docker 2.</p><p>Just add your host IP address in /etc/ansible/hosts with the name gpuvm and invoke ansible-playbook gpu.yml</p><pre>- name: Install CUDA, Docker and NVIDIA Docker 2<br>    hosts: gpuvm<br>    become: True<br>    vars:<br>      repo_url : &quot;<a href="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.168-1_amd64.deb">https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.168-1_amd64.deb</a>&quot;<br>      key_url : &quot;<a href="https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub">https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub</a>&quot;<br>    tasks:</pre><pre>- name: Install CUDA GPG Key<br>        apt_key:<br>          url: &quot;{{ key_url }}&quot;<br>          state: present<br>          <br>      - name: Install CUDA repo metadata<br>        apt:<br>          deb: &quot;{{ repo_url }}&quot;<br>          state: present</pre><pre>- name: Install CUDA and pre-req packages<br>        apt:<br>          name: [&#39;gcc&#39;, &#39;linux-headers-{{ansible_kernel}}&#39;, &#39;cuda&#39;]<br>          update_cache: yes<br>          state: present</pre><pre>- name: Install Docker GPG Key<br>        apt_key:<br>          url: <a href="https://download.docker.com/linux/ubuntu/gpg">https://download.docker.com/linux/ubuntu/gpg</a><br>          state: present<br>    <br>      - name: Install Docker repo<br>        apt_repository:<br>          repo: &quot;deb [arch=amd64] <a href="https://download.docker.com/linux/ubuntu">https://download.docker.com/linux/ubuntu</a> {{ansible_distribution_release}} stable&quot;<br>          state: present</pre><pre>- name: Install Docker and pre-req packages<br>        apt:<br>          name: [&#39;apt-transport-https&#39;, &#39;ca-certificates&#39;, &#39;curl&#39;, &#39;software-properties-common&#39;, &#39;docker-ce&#39;]<br>          update_cache: yes<br>          state: present</pre><pre>- name: Add ubuntu user to docker groups<br>        user:<br>          name: ubuntu<br>          groups: docker<br>          append: yes</pre><pre>- name: Install NVIDIA Docker GPG Key<br>        apt_key:<br>          url: <a href="https://nvidia.github.io/nvidia-docker/gpgkey">https://nvidia.github.io/nvidia-docker/gpgkey</a><br>          state: present</pre><pre>- name: Install NVIDIA Docker repo<br>        get_url:<br>          url: <a href="https://nvidia.github.io/nvidia-docker/ubuntu%7B%7Bansible_distribution_version%7D%7D/nvidia-docker.list">https://nvidia.github.io/nvidia-docker/ubuntu{{ansible_distribution_version}}/nvidia-docker.list</a><br>          dest: /etc/apt/sources.list.d/nvidia-docker.list</pre><pre>- name: Install NVIDIA Docker 2<br>        apt:<br>          name: nvidia-docker2<br>          update_cache: yes<br>          state: present</pre><pre>- name: Reboot<br>        reboot:</pre><h3>References</h3><p><a href="https://github.com/NVIDIA/nvidia-docker">GitHub - NVIDIA/nvidia-docker: Build and run Docker containers leveraging NVIDIA GPUs</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13085e6d0fa7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudnativeinfra/containerising-gpu-workloads-13085e6d0fa7">Containerising GPU workloads</a> was originally published in <a href="https://medium.com/cloudnativeinfra">cloudnativeinfra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Should we start baking immutable infrastructure instead of frying on-demand?]]></title>
            <link>https://medium.com/cloudnativeinfra/should-we-start-baking-immutable-infrastructure-instead-of-frying-on-demand-7e321bba2c6d?source=rss-fb2e49dca9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e321bba2c6d</guid>
            <category><![CDATA[spinnaker]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[immutable-infrastructure]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Ramnath Nayak]]></dc:creator>
            <pubDate>Sun, 05 May 2019 21:20:38 GMT</pubDate>
            <atom:updated>2019-05-05T21:20:38.784Z</atom:updated>
            <content:encoded><![CDATA[<p>It is an age-old dilemma that awaits me every time I walk into the chip shop. Should I go for the fried-to-order fish? Or the baked and ready-to-eat meat pie? A similar question can arise in the context of how to build infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s3RIj4pO9htS3-6Y" /><figcaption>Photo by <a href="https://unsplash.com/@laurenzpicture?utm_source=medium&amp;utm_medium=referral">Laurenz Kleinheider</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>The fried-to-order approach</h3><p>‘Frying’ infrastructure on-demand is the default approach to building infrastructure. Pick up an <a href="https://medium.com/@ramnathn/when-to-use-which-infrastructure-as-code-tool-665af289fbde">IaC tool or two</a> and program it to carry out the same steps as you would follow while doing a manual installation.</p><p>Change management process in this case is well known. When there is a new version of the code or a patch or a config change to deploy, get the configuration management tool to carry out the changes on your live servers.</p><h3>The pre-baked approach</h3><p>‘Baking’ your infrastructure, or in other words, building your server images with the application pre-deployed is a radically different idea with some unique benefits. There is a more appropriate name for this approach — <em>immutable infrastructure</em>. The name comes from the fact that you do not change existing infrastructure, but deploy completely new servers with the changes pre-installed.</p><blockquote>If adopting Infrastructure-as-code was about moving from snowflake servers/pets to cattle, immutable infrastructure pushes the envelope further and turns the cattle into phoenixes that die every time you deploy and rise up renewed from their ashes with the new version pre-installed.</blockquote><p>Immutable infrastructure is achieved by getting your CI/CD pipeline to produce a fully ready OS image with the newer version of the application/code/config already deployed and ready to start when provisioned on a compute instance.</p><p>A lot of High Performance Compute (HPC) applications that need to process a large amount of data tend to run in a cluster of servers. Constantly patching and updating these individual servers can be a challenge and adopting an immutable infrastructure architecture can make it relatively easier to roll out changes.</p><h3>Benefits of building immutable infrastructure</h3><p>The most obvious benefit is that deployment to production becomes easy. Spin up a new set of server(s) with the new version of the application image to replace the old ones, and that is all there is to it (of course there may be <em>some</em> housekeeping required like rewiring load balancer backends or DNS updates to point to the new server, but that can be automated to be part of the deployment process).</p><p>This is immensely useful in an environment where application uptime is crucial, as all the Ops/SRE team needs to do is provision a server/cluster from the image to start/scale-up.</p><p>There is no longer a need to worry about things going wrong while deploying the patch to multiple live servers, as all your instances would have been spun up from the same source image and they contain the patch already without you having to distribute them. Configuration drifts cannot happen as there are no ‘deltas’ to apply. Going back to previous versions is also easy, as you just deploy the previous image.</p><blockquote>The Immutable infrastructure approach helps manage your VMs like containers in a Kubernetes cluster, only with OS images instead of container images. You can destroy, spin up and deploy using your favourite deployment strategy (Red/Black, Canary, Rolling updates etc)</blockquote><blockquote>Building immutable infrastructure also creates new challenges that you did not have to deal with before. To build immutable infrastructure or not — that really is the question.</blockquote><h3>Challenges in adopting immutable infrastructure</h3><p>The first challenge is that you will need to <em>shift left</em> and there will be much more to do in earlier stages of your CD pipeline as baking the image becomes a step in the delivery pipeline. Instead of just building code, now you need the entire server stack to be built.</p><p>Automated test coverage will need to be complete, as finding issues leads to rebuild instead of applying patches. The issues need to be found and addressed before committing a server image.</p><p>The build will also need to be triggered for a multitude of different reasons, such as newer versions or patches of the OS, database or any third-party libraries your application needs.</p><p>Service discovery can be a challenge in some cases, depending on the architecture of the application. If a rising phoenix server is not able to discover the other services through a service discovery mechanism, the application’s architecture may not make it conducive to adopt immutable infrastructure. Legacy applications that tend to have problems with this because of their affinity for IP addresses do not make good candidates for adoption of this approach.</p><p>Stateful data needs to be carefully managed when you destroy and rebuild servers. Typically, in cloud environments, this can be achieved by retaining the block and/or boot volumes and reattaching to the newly spun up server. If the server you are replacing is a database of any kind, the data needs to be written to block volumes that then need to be reattached to the new servers.</p><h3>Tools</h3><h4>Your cloud’s imaging and clustering solution</h4><p>The simplest tooling may be what your cloud provider already provides. For e.g., in the case of Oracle Cloud Infrastructure (OCI), you can generate images <a href="https://docs.cloud.oracle.com/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/compute.html">using the tooling</a>. Consider <a href="https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/creatinginstanceconfig.htm">instance configurations</a> and <a href="https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/creatinginstanceconfig.htm">instance pools</a> if you need a cluster of servers instead of just one. Other clouds too have equivalent mechanisms to generate images and instance pools.</p><h4>Packer</h4><p><a href="https://packer.io/">Packer</a> is one of a kind tool that can spin up a base image, deploy your application and configurations on top of that (with the help of other IaC and Configuration Management tools) and create a final image that you can simply spin up your servers from. Packer has plugins for the leading CI/CD tools, so this would be triggered in your pipeline as a build step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iNohOXisNgOYRPqEifog0w.png" /></figure><p><strong>Step 1</strong>. Packer Builder spins up an instance on your favourite cloud, for e.g., OCI, AWS, Azure or GCP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_SAhmmdZ7ZDvLLVdejyC9A.png" /></figure><p><strong>Step 2.</strong> Packer Provisioner deploys and configures the application, configurations, libraries using a configuration management tool like Chef/Puppet/Ansible/Salt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xMKlJHuFgudWfSe8rXzbkA.png" /></figure><p><strong>Step 3.</strong> Packer saves the resulting image in your account which you can then use to spin up your server/cluster.</p><blockquote>Adding the Git commit id and the Jenkins build number to the image name can provide traceability back from running server back to the version of code it was built from.</blockquote><h4>Spinnaker</h4><p>Netflix is the company that pioneered immutable infrastructure and Spinnaker was a tool they built internally to make it happen. Spinnaker is a comprehensive end-to-end build and deploy solution for you to embrace if you want to embrace immutable infrastructure.</p><p>There are three main reasons why Spinnaker helps with immutable infrastructure:</p><p><strong>Reason #1</strong>. It is a batteries included and opinionated CI/CD pipeline tool that spits out a machine image (just as it does with container images). Spinnaker internally uses Packer to generate images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dj808osUz-vLJ7oI50FPAg.png" /><figcaption>Spinnaker pipeline showing a deployment on OCI</figcaption></figure><p><strong>Reason #2.</strong> It has deep integration with clouds that allows it to manage other resources like load balancers and also provides a single pane of glass to manage your resources that can span zones, regions, accounts and cloud providers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1zCCN6DIh6xtlbEOATITaA.png" /><figcaption>Creating an OCI Load Balancer from Spinnaker</figcaption></figure><p><strong>Reason #3.</strong> It supports versioning, deployment/rollout strategies like Red/Black, Canary, Rolling update and importantly — easy means of rolling back to previous version of your infrastructure with two clicks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KD0sZrFH-qeYpDOIapNbmQ.png" /><figcaption>Spinnaker GUI showing a versioned application scaling</figcaption></figure><h3>Summary</h3><p>As with any new technology, the key to successful adoption lies in knowing when to use it and how conducive your application is to benefit from its adoption.</p><blockquote>If your application’s architecture supports spinning up new instances without failing to discover other services and you want a simple Ops set up where deploying to production is made easy by ensuring its quality earlier in the release cycle, immutable infrastructure is perfect for you.</blockquote><h3>References</h3><ul><li><a href="http://shop.oreilly.com/product/0636920075837.do">Cloud Native Infrastructure</a></li><li><a href="https://packer.io/intro/index.html">Introduction - Packer by HashiCorp</a></li><li><a href="https://www.spinnaker.io/publications/ebook/">Continuous Delivery With Spinnaker</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e321bba2c6d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudnativeinfra/should-we-start-baking-immutable-infrastructure-instead-of-frying-on-demand-7e321bba2c6d">Should we start baking immutable infrastructure instead of frying on-demand?</a> was originally published in <a href="https://medium.com/cloudnativeinfra">cloudnativeinfra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When to use which Infrastructure-as-code tool]]></title>
            <link>https://medium.com/cloudnativeinfra/when-to-use-which-infrastructure-as-code-tool-665af289fbde?source=rss-fb2e49dca9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/665af289fbde</guid>
            <category><![CDATA[configuration-management]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <dc:creator><![CDATA[Ramnath Nayak]]></dc:creator>
            <pubDate>Fri, 03 May 2019 18:14:37 GMT</pubDate>
            <atom:updated>2019-05-03T18:14:37.452Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R3hIcuSQn1jUj2dW64F6Pg.png" /></figure><p><a href="https://medium.com/@ramnathn/why-use-infrastructure-as-code-881ccd6c4290">Infrastructure-as-code (IaC)</a> is the concept of writing code to represent your infrastructure requirements and using an IaC tool to apply those changes to your cloud/on-prem environment.</p><p>In this article, I hope to give you an overview of the pros and cons of each IaC tool so that you can get a feel for the best use case for each one.</p><p>If you want to quick refresher on IaC in general, why use it and how to successfully apply the idea, have a read of <a href="https://medium.com/@ramnathn/why-use-infrastructure-as-code-881ccd6c4290">this first</a>.</p><h3>The problems IaC tools can solve</h3><p>Broadly speaking, there are three different needs that these tools try to address:</p><ol><li>Create/change/destroy infrastructure resources such as compute, storage, networking components or platform services like database, Kubernetes cluster etc.</li><li>Deploy/update applications on top of the infrastructure.</li><li>Manage the configurations used by the applications.</li></ol><p>There is a spectrum of solutions available out there to address a variety of needs. This naturally leads to two questions — what tools are out there and what is the best use case for each one?</p><p>Here is a visual representation of the leading tools and what they do, arranged on a spectrum representing the problem space they address. The ones on the left side of the spectrum focus on creating and managing infrastructure resources. The ones on the right side focus more on configuration management.</p><p>Read on below to know more about each tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3HV8dJP3XTTGBBMzYwhqlA.png" /><figcaption>The spectrum of leading IaC tools available today, width represents area of coverage</figcaption></figure><h3>Packer</h3><p><a href="https://packer.io/">Packer</a> is a unique tool that generates VM images (not running VMs) based on steps you provide. This helps generate images with all applications, libraries and configurations baked into the image. This may not sound like much, but is a powerful feature when you start building <em>immutable infrastructure</em>.</p><h4>Packer concepts:</h4><p><strong>Builder:</strong> A Cloud where Packer creates the image you want to build.</p><p><strong>Provisioner:</strong> Another tool which lets you deploy the application/ configuration on top of your image (Ansible, Chef, Puppet, Shell etc).</p><p><strong>Post Processor:</strong> (Optional) Uploads artefacts and re-packages.</p><p>When Packer is run, it uses the Builder you specified to create an instance in your cloud account. Then the provisioning step runs and installs software. When the Provisioner finishes, the instance is terminated and the image saved on the cloud (or can be pushed to Vagrant to build a box).</p><h4>Best used for:</h4><p>Baking compute images.</p><h3>Vagrant</h3><p><a href="https://www.vagrantup.com/">Vagrant</a> builds VMs using a workflow very similar to building Docker containers. You specify the base image (called a Box) in a Vagrantfile along with the steps to configure the VM.</p><p>With a simple command vagrant up, you can get Vagrant to provision a VM with everything set up as per the specifications. There is a significant collection of community built Vagrantfiles at the <a href="https://app.vagrantup.com/boxes/search">Vagrant website</a>.</p><p>While Vagrant does have Provisioners that allow you to deploy on clouds, the main use case for Vagrant remains developer VMs within Type-II hypervisors like VirtualBox (as opposed to deploying infrastructure on clouds). This is because Vagrant focuses solely on spinning up VMs, there is limited support for other resource types.</p><h4>Best used for:</h4><p>Creating pre-configured developer VMs within VirtualBox.</p><h3>Terraform</h3><p><a href="https://www.terraform.io/">Terraform</a> is the only tool to focus solely on creating, destroying and managing infrastructure components.</p><p>You use the Hashicorp Configuration Language (HCL) to describe the infrastructure resources you need. This DSL is simple enough to be mastered quickly, as statements are mostly key-value pairs.</p><h4>Terraform concepts:</h4><p><strong>Provider:</strong> A cloud provider’s plugin to provision on that cloud.</p><p><strong>Provisioner:</strong> Used to execute scripts on a local or remote machine as part of resource creation or destruction. Provisioners can be used to bootstrap a resource, clean-up before destroy, run configuration management (e.g., Chef, Shell command, etc).</p><p><strong>Modules:</strong> Higher level abstractions provided by cloud providers (e.g., compute instance with block volumes attached).</p><p>There is no need for a client or a server to be installed on the infrastructure you manage, you just download the Terraform executable on your laptop or bastion server, enable the Provider (plugin) for the cloud provider of your choice and let Terraform do the work. The Terraform executable connects directly to your cloud and invokes the necessary APIs to manage the infrastructure.</p><p>Terraform runs in two distinct phases:</p><p><strong>Plan phase:</strong> Terraform simulates a run and lists the actions it performs without actually performing them, very useful to make sure the change you are going to perform is as intended.</p><p><strong>Apply phase:</strong> Terraform actually applies the change.</p><p>Terraform maintains a statefile that stores the state of resources it has created so far and uses this statefile (instead of what is really present in the cloud) to decide what changes need to be applied. This introduces additional complexity and makes it unforgiving if you make any changes outside of Terraform after provisioning. The reconciliation loop is a 3-way tango between what you defined, what is in the state file and what is really present in your cloud. Always ensure the state file reflects reality, or it can get messy.</p><p>Oracle Cloud Infrastructure (OCI) uses a Terraform-as-a-service to run its <a href="https://docs.cloud.oracle.com/iaas/Content/ResourceManager/Concepts/resourcemanager.htm">Resource Manager</a>.</p><h4>Best used for:</h4><p>Managing infrastructure resources (no support for applications and config management).</p><h3>Cloud-Init</h3><p><a href="https://cloud-init.io/">Cloud-init</a> is the most unsung and underrated IaC tool today. It is the only fully open source product in this list and is primarily used by the cloud providers to initialise various services on the VM hosts during its lifecycle.</p><p>For us consumers of cloud VMs, the main use case for cloud-init is to execute one-time scripts and commands during the first boot after provisioning using cloud-config modules to do things like install a particular software, set up directories, users, groups, package repos, additional SSH keys and other OS attributes. There is also a runcmd module to run any generic shell command.</p><p>You typically provide the commands in YAML format in the user-data field of VM provisioning form on your cloud provider’s console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bvHOvh6vKMx-RZnzhi3B_Q.png" /><figcaption>An example on Oracle Cloud Infrastructure to set the time zone for a VM during provisioning</figcaption></figure><p>You can also pass cloud-config scripts in the userdata folder of Terraform, for e.g., if that is what you are using to provision instead of the cloud’s console.</p><p>For a complete list of cloud-init modules, refer to the <a href="https://cloudinit.readthedocs.io/en/latest/topics/modules.html">documentation</a>.</p><blockquote>One of the issues with tools like Chef/Puppet/Salt is that they need an agent to be deployed on the VM before they can start managing those servers. Cloud-init can come to the rescue in these scenarios, as there are modules in cloud-init to deploy the agents for Chef/Puppet/Salt.</blockquote><p>A typical workflow for this combination of tools would look like this: Use Terraform to create the infrastructure, Cloud-init to deploy the Chef/Puppet/Salt agent and then invoke a Chef/Puppet/Salt script to deploy and configure the application.</p><p>Another useful cloud-init feature is the #include command to invoke a hosted shell script. For e.g., #include <a href="https://get.docker.com/">https://get.docker.com</a> installs docker on your new VM from the cloud console without you having to log in or using any other IaC tool.</p><h4>Best used for:</h4><p>One-time commands and scripts to be run after spinning up compute.</p><h3>Ansible</h3><p><a href="https://www.ansible.com/">Ansible</a> has quickly grown to be my favourite IaC tool. Unlike Chef, Puppet, and others, Ansible does not need a client to be deployed and can connect to servers and run commands over SSH. This also makes it a good general-purpose tool for building infrastructure as well as deploying and configuring applications on top of them. If you just want to use one lightweight tool, odds are Ansible is the one you need.</p><p>Ansible can also be used as command-line based tool for ad-hoc querying and reporting against your infrastructure estate. (For e.g., How many servers do I have in my estate that have a specific version of software installed and then use that info to deploy an update).</p><p>The default architecture of Ansible is to run in push mode, but it also has a pull mode if you want to pull the config from the managed server.</p><h4>A few Ansible concepts:</h4><p><strong>Module:</strong> Commands that do something (for e.g., create a compute instance, ensure a directory is present on it, upgrade a package, etc.) There are more than 2000 modules available (idempotent) and you can use the shell/command module to run any commands for which a module does not exist (not idempotent).</p><p><strong>Playbook:</strong> A collection of modules that you write to create infrastructure, deploy an application or ensure a config state. Uses YAML and Jinja2 templating, python and shell commands also accepted.</p><p><strong>Role:</strong> Brings modularisation, templating and reusability to playbooks.</p><p><a href="https://www.ansible.com/products/tower">Ansible Tower</a> supports invoking ansible playbooks from a GUI to manage your infrastructure estate. <a href="https://www.rundeck.com/open-source">Rundeck</a> is a third-party alternative to build self-service workflows with deep integration with ansible to invoke playbooks. <a href="https://galaxy.ansible.com/">Ansible Galaxy</a> is a large collection of community-built roles and playbooks.</p><h4>Best used for:</h4><p>Ad hoc analysis as well as general-purpose, push based, agentless IaC tool.</p><h3>Chef</h3><p><a href="https://docs.chef.io/chef_overview.html">Chef</a> is a popular tool that is widely used for configuration management, but has a relatively complex architecture when compared to the other lightweight tools.</p><h4>Chef concepts:</h4><p><strong>Workstation</strong>: This is where you install the Chef Development Kit and do your development.</p><p><strong>Cookbook</strong>: This is your code describing the desired state, in a DSL derived from Ruby.</p><p><strong>Recipe</strong>: The basic configuration element, a cookbook is made up of one or more recipes (you have probably noticed the clever naming convention by now!).</p><p><strong>Server</strong>: The server acts as a centralised repository for metadata. Your cookbooks developed on the workstation are uploaded to the server.</p><p><strong>Nodes:</strong> These are the targets (compute/device/container/cloud) that you manage with Chef. They pull the configuration specifications from the server in an act of ‘convergence’.</p><p><strong>Knife</strong>: Command line interface used to interact with the nodes and the server. If you do choose to use Chef to spin up infrastructure, the knife plugin for your cloud is what you’ll use to provision servers. The client can then set up the server into a node and manage the apps and configs on top of them.</p><p>The <a href="https://supermarket.chef.io/">Chef Supermarket</a> has a large collection of community contributed cookbooks.</p><h4>Best used for:</h4><p>Deploying and configuring applications using a pull-based approach.</p><h3>Puppet</h3><p><a href="https://puppet.com/solutions/configuration-management">Puppet</a> is another popular tool for configuration management. Puppet is built on the client/server model that needs agents to be deployed on the target machines before puppet can start managing them.</p><p>Puppet can backup config files so that you can restore them later if needed.</p><p>Another interesting feature is its frequent polling to check that the config is in the desired state (every 30 mins by default). Unlike other tools that do the job when triggered, Puppet is always on to prevent configuration drift. This means that when you make changes (in response to production events for example) you need to update through your puppet scripts to prevent them overwriting your manual changes.</p><h4>Puppet concepts:</h4><p><strong>Resource:</strong> These are the fundamental building block configurations you can manage. (For e.g., a file that needs to be present or a service that should be running or a compute instance on a cloud).</p><p><strong>Class:</strong> A set of related resources grouped together that describes a service or an application (for e.g., a database server).</p><p><strong>Manifest:</strong> This is your code describing the desired state of the resources, in a DSL called Puppet Configuration Language. You describe the resources and their attributes in key-value pair format.</p><p><strong>Catalog: </strong>Compiled version of manifest that is distributed by the server to the agent on each node.</p><p><strong>Module</strong>: Reusable collection of manifests and other resources (for e.g., to install an app) for sharing with other users. <a href="https://forge.puppet.com/">Puppet Forge</a> is a large community built collection of modules.</p><h4>Best used for:</h4><p>Deploying and configuring applications using a pull-based approach.</p><h3>SaltStack</h3><p><a href="https://www.saltstack.com/">Salt</a> uses the client/server model and is designed to scale. Salt is a platform by itself, so you do not need to write platform specific code.</p><p>Salt is built using Python, supports Jinja template and you provide the code and config in a YAML file — all features it shares with Ansible. Salt even has SSH support which can support agentless mode.</p><p>Salt also has a scheduler that allows you to specify how often to run your code on the managed servers.</p><h4>Salt concepts:</h4><p><strong>Master</strong>: The server process.</p><p><strong>Minion</strong>: The agent running on each managed server.</p><p><strong>State module</strong>: Describes the resource and the state it should be in.</p><p><strong>Formula</strong>: The code you write with state modules, in YAML.</p><p><strong>Package Manager</strong>: Used to package the state, file templates, and other files used by your formula into a single file. After a formula package is created, it is copied to the Repository System where it is made available to Salt masters.</p><p><strong>Repo System:</strong> Hosts the package for distribution to masters.</p><p>Salt Cloud is a utility to allow Salt to spin up and manage resources on the cloud. It is possible to set up Salt to be highly available with a multi-master set up.</p><h4>Best used for:</h4><p>General deployment and configuration applications, quick parallel deployments.</p><h3>CFEngine</h3><p><a href="https://cfengine.com/">CFEngine</a> is the oldest configuration management tool available today and is the inspiration behind some of the other tools like Puppet.</p><p>CFEngine is the only tool in this list that does configuration management only, without any infrastructure management capabilities.</p><p>It claims to have a distributed architecture, but needs a policy hub server to be set up with which each managed server running CFEngine needs to be registered.</p><h4>CFEngine concepts:</h4><p>The academic origins of CFEngine starts to show when you unpick what the creator calls the <a href="https://www.youtube.com/watch?v=2TPsB5WuZgk"><em>Promise Theory</em></a><em>,</em> which is the driving force behind CFEngine.</p><blockquote>Instead of issuing ‘commands’, CFEngine gets every part of the system to make a ‘promise’ to achieve a known state for a resource. If the resource state is achieved, the promise is considered ‘met’. If it failed — this is where CFEngine differs from the other tools — the promise has can be in one of many failed states like repaired, denied, failed or timed out.</blockquote><p>Also central to CFEngine is the philosophy of <em>Convergent Configuration</em>, which means the system strives iteratively to get closer to the desired state even if it cannot get there straight away. The agent runs every five minutes by default.</p><p><strong>Policy</strong>: The code you write in a DSL that is a sophisticated C-like language with datatypes and subroutines.</p><p><strong>Control Body</strong>: A header of a policy that contains the sequence in which the bundles must be invoked.</p><p><strong>Bundle</strong>: A container for promises.</p><h4>Best used for:</h4><p>Fast configuration management.</p><h3>Similarities and differences</h3><h4>Market share</h4><p>Chef and Puppet used to dominate this space, but Ansible is gaining a lot of traction, possibly because the community edition is feature rich and you only need to sign up for a license if you need Ansible Tower.</p><h4>Architecture</h4><p>Chef, Puppet and Salt now offer agentless modes for standalone instances, but their default stance for multi-server deployments seem to be agent-based pull model.</p><h4>Platform abstraction</h4><p>Chef and Ansible tend to require you to write platform specific code (for e.g., installing a package which uses apt on Debian and yum on Red Hat derivatives or what tool to use to start a service), but Puppet and Salt in particular tend to provide a higher-level abstraction that resolves the underlying platform.</p><h4>Documentation</h4><p>Salt documentation coverage is not as good as it could be, but the rest have really good coverage.</p><h4>Licensing</h4><p>All of these tools have a community edition offering a subset of what the enterprise license offers.</p><h3>Cloud specific tooling</h3><p>I have deliberately steered clear of cloud specific tooling such as CloudFormation on AWS, Azure Resource Manager or GCP Deployment manager as these are cloud specific.</p><blockquote>Choosing a cloud agnostic tooling like the tools listed here can help you build a cloud agnostic solution that does not lock you into a specific cloud and also manage resources across cloud and/or on-prem.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=665af289fbde" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudnativeinfra/when-to-use-which-infrastructure-as-code-tool-665af289fbde">When to use which Infrastructure-as-code tool</a> was originally published in <a href="https://medium.com/cloudnativeinfra">cloudnativeinfra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why use Infrastructure-as-Code?]]></title>
            <link>https://medium.com/cloudnativeinfra/why-use-infrastructure-as-code-881ccd6c4290?source=rss-fb2e49dca9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/881ccd6c4290</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Ramnath Nayak]]></dc:creator>
            <pubDate>Sat, 27 Apr 2019 22:12:06 GMT</pubDate>
            <atom:updated>2019-04-28T18:31:20.972Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why use Infrastructure-as-Code and how to be successful at it</h3><p><strong>Infrastructure-as-Code (IaC) </strong>is the idea that you can represent and manage your infrastructure in a source file, the same way you manage your application source code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RHTYp6AUS7ySMisU" /><figcaption>Photo by <a href="https://unsplash.com/@nesabymakers?utm_source=medium&amp;utm_medium=referral">NESA by Makers</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>You describe the compute, storage and network requirements in a text file kept in your version control system, and the IaC tool take care of spinning up the infrastructure according to your code.</p><p>When you need to make changes to the infrastructure, you follow a workflow similar to application code changes and the IaC tool makes the changes happen.</p><h3>Why Infrastructure-as-Code?</h3><p>The most obvious benefit is that infrastructure change management becomes easier, as you will always have a versioned representation of your infrastructure in your SCM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zYZLjzBbf2_PUvbn" /><figcaption>Photo by <a href="https://unsplash.com/@cdr6934?utm_source=medium&amp;utm_medium=referral">Chris Ried</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Using IaC allows you to build environments rapidly without any human intervention.</p><p>It can be a part of a delivery pipeline <em>or</em> it could be set up to fire in response to specific business events, allowing automated infrastructure changes without human intervention.</p><p>Another key benefit is consistency of build. If you need to manage several environments like Dev, QA, Staging, Prod, etc, spinning those up from the same code-base ensures they all behave the exact same way. If you are a System Integrator or Independent Software with multiple customers, you should consider building out your customers’ environments this way to ensure consistency and manageability.</p><p>If you have ‘snowflake’ or ‘pet’ servers that were manually built, generally admins would be scared of rebuilding these servers, as the confidence levels on getting them back up and running in the same condition would be low. By adopting IaC, you can turn these ‘pets’ into ‘cattle’ where you no longer worry about the individual configurations/state and you can boldly run the IaC tooling to rebuild the server, knowing fully well that it will be in a good working state by the end of the rebuild.</p><h3>Should I just use my cloud provider’s CLI or API to create my infrastructure, is that it?</h3><p>No, you need to use a designated IaC tool to reap the benefits. Technically, you can use the CLI or API, but these do not support <a href="https://stackoverflow.com/questions/1077412/what-is-an-idempotent-operation"><em>idempotent operations</em></a>.</p><p>Imagine if you write a procedural script using the CLI or API to create a compute instance. A few lines later, the script aborts. When you rerun the script, it will create another compute instance (because the statements were executed again). Or if the command was to destroy an instance, it may fail with an error because it was already deleted in the first run and it is not able to find it when you re-run the script.</p><p>To get out of this mess you end up writing boiler plate code to check if the resource already exists before you attempt any operation on it — which then ends up being messy procedural code.</p><p>This is where a proper IaC tool is useful as they support idempotent operations. This is how IaC tools operate:</p><ul><li>You describe the desired infrastructure resources in a file (for e.g., a virtual network with three public subnets, a compute instance on one of them with a block volume attached to it). You describe <em>what</em> you need, you never describe <em>how</em> to create them — the IaC tool figures how to create them.</li><li>The tool looks at what you have described in your code and logs in to your cloud account and checks if those resources are present.</li><li>If the resources are not present, they are created.</li><li>If the resources are already present with the same attributes, no action is taken (as what you expect is already present).</li><li>If matching resources are found with differences, the IaC tool assumes you want them changed and makes the change happen.</li><li>The tool does not throw errors/fail/create unintended duplicate resources in any of these cases, because these operations are idempotent.</li></ul><blockquote>To summarise, you describe the desired infrastructure resource state, the IaC tool identifies the delta and applies the changes to make the reality match your desired state without you having to write any procedural code.</blockquote><p>The language used to describe the desired state is usually a <a href="https://en.wikipedia.org/wiki/Domain-specific_language"><em>domain specific language</em></a> specific to the tool (for e.g., HCL for Terraform or YAML for Ansible).</p><p>When invoked, the IaC tool inspects your code to see if your desired state matches the reality and employs the <em>reconciler pattern</em> to apply the change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XYt2RIwE-3YrtQBWgTcjnw.png" /><figcaption>The IaC reconciliation loop</figcaption></figure><h3>Caveats and gotchas</h3><p>Successful adoption of IaC also requires you to have a plan on how you handle certain situations arising from change management in general.</p><p>The typical changes you need to deploy belong to one of these categories:</p><ol><li><strong>Routine application changes in the form of deployments</strong>, ideally delivered through a CD pipeline. If a deployment results in issues, you can rollback to the previous version of the code. But a lot of infrastructure changes cannot be ‘rolled back’ in the traditional sense. If your new version of code created an object storage bucket and you reverted back to a version without the object storage bucket, your IaC tool may delete that object storage bucket along with any data in it. Make sure you have backups done at critical checkpoints (in addition to the routine backups) to safeguard against side effects impacting changes. Some IaC tools like Terraform and Ansible support dry runs to simulate and report what changes are going to be performed. Having a manual intervention to validate scenarios where resources get deleted can be a good practice.</li><li><strong>Reactive changes in response to production events</strong> (for e.g., additional instances needed to cope with unforeseen load). Imagine this: You have a VM or Kubernetes cluster that has been declared to have a desired state of 10 instances. A production issues happens and an Ops/SRE person (or an autoscaling process) decides to scale it up to 20. Your next routine deployment should not overwrite this back to 10. An alternative approach to handle this is to follow <a href="https://www.weave.works/blog/gitops-operations-by-pull-request"><em>GitOps</em></a>, which can detect configuration drifts and send a pull request back merging the change back in to your main branch. Terraform, for e.g., can be brutal if you make changes in the cloud’s console for an emergency fix (as the statefile no longer matches reality). Ensure you use the tool to deploy the fix <em>or </em>update the statefile after the fact to ensure the statefile matches reality.</li><li><strong>Proactive patches, security and version upgrades</strong>. Take an example where you have an Ubuntu 16.04 on a Tesla P100 GPU instance running Nvidia Docker (which in turn needs a specific version of Docker), before you push out an upgrade to any of these, you need to make sure the resulting combination is compatible. Though this does not have much to do with your infrastructure code, that is where you may run into errors (or may fail silently and you may need to have test cases to ensure upgrades did not break anything).</li></ol><blockquote>Resources carrying stateful data like databases, block volumes and object storage deserve special attention when you write your IaC.</blockquote><p>When faced with a change scenario where some attribute of one of these resources is changed, the IaC tool may decide to destroy and spin up a new one that matches your specified criteria, deleting all existing data with it. This depends entirely on the combination of the tool you are using and how your cloud provider has implemented their plugin for the tool.</p><blockquote>Service discovery can be a challenge in the world of IaC with some legacy workloads that rely on physical aspects of infrastructure like IP addresses.</blockquote><p>The use of a service mesh within a Kubernetes cluster can help services locate each other in a world where IP addresses change constantly due to pods being replaced, but that may not be feasible in the VM world with some legacy workloads that rely on IP addresses of the VMs. You will need to remember to update DNS or use floating IP addresses to give these applications a stable end point when your IaC code rebuilds these environments.</p><blockquote>Some IaC tools like Terraform rely on statefiles to track the current state (as opposed to peeking into the cloud account to see what is present). It is important to keep this file in a commonly accessible place as you will not be able make any changes without the statefile.</blockquote><p>These challenges highlight the need for prior planning of how application changes impact your IaC and testing of your IaC code for handling possible scenarios before you apply them in your production environment.</p><blockquote>There are changes resulting from IaC adoption that you will need to get used to, but the rewards of adopting IaC make it worthwhile.</blockquote><p>You can always take it on one step at a time. Start with use of IaC tools to do new installations, you can then gradually expand its use to do ongoing maintenance.</p><p>If you want to know more about the capabilities of specific IaC tools, watch this space for a new post soon that discusses the most commonly used IaC tools.</p><h3>Recommended Reading:</h3><ul><li><a href="http://shop.oreilly.com/product/0636920039297.do">Infrastructure as Code</a></li><li><a href="http://shop.oreilly.com/product/0636920075837.do">Cloud Native Infrastructure</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=881ccd6c4290" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudnativeinfra/why-use-infrastructure-as-code-881ccd6c4290">Why use Infrastructure-as-Code?</a> was originally published in <a href="https://medium.com/cloudnativeinfra">cloudnativeinfra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A brief history of cloud]]></title>
            <link>https://medium.com/cloudnativeinfra/a-brief-history-of-cloud-81e130d4d9e8?source=rss-fb2e49dca9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/81e130d4d9e8</guid>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Ramnath Nayak]]></dc:creator>
            <pubDate>Sat, 27 Apr 2019 16:13:09 GMT</pubDate>
            <atom:updated>2019-04-27T16:13:09.750Z</atom:updated>
            <content:encoded><![CDATA[<p>Once upon a time, every company used to have their own servers hosting their applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*pp7-jaQznZMGJCUdJToshQ.jpeg" /></figure><p>People worked in shifts ensuring server and application uptime and had to run around data centre floors replacing failing parts.</p><p>Companies were required to have infrastructure management staff that ensured everything is running.</p><p>If you were just starting out as a company, co-location was the other option and that too came with high costs, maintenance challenges and scaling problems when your business really needed to grow rapidly.</p><h3>The Virtualisation revolution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/0*VbqP5C48vJenoBH6.png" /></figure><p>In the early noughties, VMWare launched their virtualisation products that allowed your infrastructure to be managed remotely, without physically being present in the data centre. Virtualisation technology was around for decades, but VMWare was first to successfully productise virtualisation.</p><p>You still needed the data centres, but now you had a layer of manageability on top. Infrastructure became a service.</p><p>Virtualisation enabled consolidation and better utilisation of existing hardware resources, reducing investment, wastage and the need for more cooling that was essential while running a large number of bare metal servers.</p><p>VMWare suite came with tooling that allowed spinning up and down of virtual compute, storage and networking resources, in rapid response to changing needs. Infrastructure could now be described in a text file and version controlled like application source code.</p><p>The ability to script and automate went hand in hand with the DevOps and Agile movements that needed a way to do things quickly and automatically in response to events.</p><h3>The two roads to cloud</h3><p>The late noughties saw two significant developments that created the cloud that we see today.</p><p>First was the genesis of AWS, who took the idea of infrastructure virtualisation to the next level by offering those capabilities from their managed data centres. All one needed was to sign up for an account, and you just login and spin up any kind of infrastructure you need.</p><p>There was no longer a need for:</p><ul><li>Managing data centres</li><li>(Expensive) licensed hypervisors</li><li>CapEx spend on hardware</li></ul><p>This was perfect for startups too, all you had to bring was your own business idea and AWS provided the infrastructure. One could burst and scale easily in response to business events.</p><p>But there was still something missing as this was all about infrastructure centric world view of compute, storage and networking. The advent of Google App Engine and Heroku changed this by giving the developers a platform on which they could run their application code without worrying about underlying infrastructure.</p><p><em>Funny that neither AWS nor Google App Engine had the word ‘cloud’ in them, but that is exactly what they were — clouds.</em></p><p>Cloud had well and truly arrived by this point. It was no longer about startups only, enterprises could benefit just as much by being on it. The idea of regions made up of zones linked together by a backbone network made it easy for enterprises to deploy highly available, fault tolerant, DR ready solutions.</p><h3>The age of Cloud Native</h3><p>Cloud has also given us useful new technology solutions that are easy to build on cloud but difficult to implement in the on-prem datacentre.</p><p>Multi-data centre based solutions, Kubernetes clusters, CDN networks, pay per use Functions-as-service, elastic Kafka queues and GPU instances are all easy and cost effective to use on the cloud, but difficult and cost prohibitive to build on-prem.</p><p>This age of cloud has seen it evolve from being a nice-to-have convenience to an essential partner to everyones’ IT needs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81e130d4d9e8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudnativeinfra/a-brief-history-of-cloud-81e130d4d9e8">A brief history of cloud</a> was originally published in <a href="https://medium.com/cloudnativeinfra">cloudnativeinfra</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>