<?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 Akhil Yerrapragada on Medium]]></title>
        <description><![CDATA[Stories by Akhil Yerrapragada on Medium]]></description>
        <link>https://medium.com/@akhilyerrapragada905?source=rss-98c94bf3cda4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*sWe2vQc38xyN63pfbzwi7A.jpeg</url>
            <title>Stories by Akhil Yerrapragada on Medium</title>
            <link>https://medium.com/@akhilyerrapragada905?source=rss-98c94bf3cda4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 13:21:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akhilyerrapragada905/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[An Introduction to Distributed Systems]]></title>
            <link>https://medium.com/@akhilyerrapragada905/an-introduction-to-distributed-systems-85fff831ddc7?source=rss-98c94bf3cda4------2</link>
            <guid isPermaLink="false">https://medium.com/p/85fff831ddc7</guid>
            <category><![CDATA[kth]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Akhil Yerrapragada]]></dc:creator>
            <pubDate>Tue, 23 Jun 2020 13:15:59 GMT</pubDate>
            <atom:updated>2020-06-23T13:15:59.731Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*EOJ-JSQck1N31WYzXGpT5g.png" /><figcaption>Distributed systems as a single system image</figcaption></figure><p>As said by Leslie Lamport, a distributed system is nothing but malfunction of a computer somewhere in the network which we don’t know earlier if exists, causing your system the trouble. And this draws the basic contrast between concurrent and distributed systems. In a distributed system along with concurrency, partial failures will be a key characteristic. Distributed systems provide single system view, means, harnessing power of many in one. As an example, let us assume a service that allows users to insert data to database. The database server used here is replicated to balance the load, avoid single point of failure or any other reasons. Goal here is to ensure that all the systems provide same view of data and this requires some coordination among them which means a protocol, in our case it is a distributed algorithm. The algorithm should ensure that all data is shared reliably among servers. We can say that the algorithm is reliable if it can handle all malicious scenarios such as unauthenticated insert, aborting the transaction and many others. All malicious scenarios can be defined in the system model for which we will designing a distributed algorithm. The algorithm should be in a way that it provides a solution to problems faced commonly by many organizations as it helps with re usability of current implementation instead if implementing it again. Note that there is no one solution for a problem in distributed systems. It is just that we pick a solution that fits better to our system model. There can also be a situation that for some problems there is no solution and for some, the research is going on. When looking at types of distributed systems we see currently, client — server and peer to peer systems are known to be used everywhere. With former following a centralized way, the later follows decentralized way of implementation. Centralized way being most vulnerable to single point of failure, decentralized applications are being preferred these days to provide better services as server-less architectures are getting more popular day by day. In this essay we shall be talking more about <strong>Dissemination, Abstractions, Outer Structure </strong>and <strong>Distributed Programming Abstraction</strong>.</p><h4><strong>Dissemination</strong></h4><p>Any disease requires host to reproduce, similarly, for any problem to arise multiple processes need to coordinate with each other. First let us look at a pub-sub system. When a publisher posts information, all the subscribers would want to receive the information. Any subscriber not receiving the information may lead to dissatisfaction and the service is considered reliable. Therefore, we can use a broadcast abstraction here to solve our problem of reliable communication. Second, let us assume multiple processes in a computer need to coordinate with each other to perform a computation that safely predicts position of a aircraft in a radar. Each process contains a sensor that sends the information to it. Now, some processes may or may not produce accurate results when comparing the evaluation results with other processes. In such a scenario, an abstraction that provides consensus is required so that majority processes agree on the position of the aircraft which will be actual result. Third, let us assume a shared document that will be edited my multiple members of the team. Each read and write operation must me done with coordination so that each member of the team will have latest read of written value. In such a case, an abstraction algorithm is required to ensure consistent view for all processes. Fourth, a distributed database usually contains db managers who usually authorize inserts into the database. The dB manager must ensure that, when insertion does not comply to the policy of one database, all the corresponding transactions to other must abort to maintain valid data. All the transactions here must require an abstraction that allows consistency of data across all the database servers. Fifth, when data is shared among many processes (For reasons such as load distribution or capacity limitations on a single node etc) reads and writes must be committed to location of data on a specific node.</p><h4><strong>Abstractions</strong></h4><p>Basic abstractions are the way we represent our system, precisely, our <strong>system model</strong> which can be defined in two ways:</p><ol><li>Processes</li><li>Links</li></ol><p><strong>Processes: </strong>A process in a distributed system can be a computer, processor inside computer or thread. Basically, anything that performs computation.</p><p><strong>Links:</strong> To perform a task with coordination, processes should communicate with each other. To communicate they require some network that transfers messages between them, and these are known as links.</p><p>While advanced abstraction is, referring to current system model and building abstractions that address cooperation problems among processes. The abstraction that captures problems that occur when two processes are interacting is known as <strong>Agreement abstraction</strong>. Building such kind of abstraction is a step by step process. For example, It starts with IP address of process and ends with coordination among them. When taking about coordination, It can be <strong>atomic commitment</strong> — Processes coordinating, agreeing on sequence of steps to be executed or it can be <strong>total order broadcast</strong> — Not just steps but the order at which each of actions are executed in a step among processes.</p><h4><strong>Outer Structure</strong></h4><p>When building a distributed abstraction, it is important to make sure it is separated from actual implementation. Though the programmer has enough expertise to incorporate abstractions to application, It is never a good idea to follow monolith approach as it truncates the flexibility of choosing type of abstraction during runtime.</p><h4><strong>Components and Events</strong></h4><p>Our distributed abstraction is sandwiched between Application layer and Network layer. As mentioned above we shall base discussing about processes and links when talking about basic abstractions. Each process contains one or more <strong>Components </strong>that has some functionality associated with it. These components together are called <strong>Modules</strong>. Each component has <strong>events</strong> that act as a communication medium. An event is generally denoted by <strong>Request </strong>and <strong>Indication</strong>. Request is used to invoke a component of specific functionality or send an acknowledgment. Indication is used to deliver necessary responses or deliver acknowledgements. Events are executed in FIFO order in a component. The pseudo code inside a component can be executed in a synchronous or asynchronous way. While synchronous way delivers indication after receiving a request event and completion of execution of statements, asynchronous way holds all the requests in a buffer and provides indication of completion immediately after receiving them. Note that an event can be used by multiple components. Events take <strong>Attributes</strong>, usually one or more. The syntax will usually be as follows:</p><blockquote>&lt;Component, Event | Attribute1, Attribute2…….&gt;</blockquote><p>To trigger an event, we must require a handler that injects specific instructions when statement is called which can be as follows:</p><blockquote><strong>upon event </strong>&lt;Component, Event | Attribute1, Attribute2…….&gt; <strong>do</strong></blockquote><blockquote><strong>trigger</strong> &lt;Component, Event | Attribute1, Attribute2…….&gt;</blockquote><p>Whenever an algorithm is initiated an Init event is generated at runtime which can be as follows:</p><blockquote><strong>upon event</strong> &lt;Component, Init&gt; <strong>do</strong></blockquote><p>There can be a case when component must invoke a functionality internally before executing events which can be represented as follows:</p><blockquote><strong>upon </strong>condition<strong> do</strong></blockquote><blockquote>pseudo code;</blockquote><p>There can also be a case when we have to invoke specific code based on event triggered from other modules which can be represented as:</p><blockquote><strong>upon event</strong> &lt;Component, Event | Attribute1, Attribute2…….&gt; <strong>such that </strong>condition <strong>do</strong></blockquote><blockquote>pseudo code;</blockquote><p>But the above approach is usually not suggestible in practical systems as it requires a buffer in runtime to constantly receive other events until the current condition satisfies. Better alternative solution for this problem is to create a dummy that receives requests from events and when the condition satisfies, all the events in the dummy are responded.</p><p><strong>Distributed Programming Abstraction</strong></p><p>Building a distributed programming abstraction requires some design assistance&#39;s which are already available and implemented based on common issues faced in today’s reality. They are classified into the below mentioned types:</p><blockquote><strong>fail-stop</strong>: Failure of one process can be reliably detected by all other processes.</blockquote><blockquote><strong>fail-noisy</strong>: Failure of one process sometimes can and sometimes cannot be detected by other processes.</blockquote><blockquote><strong>fail-silent</strong>: Failure of one process cannot be reliably detected by other processes.</blockquote><blockquote><strong>fail-recovery</strong>: Process crashes, later recovers and participates in normal execution of algorithm.</blockquote><blockquote><strong>fail-arbitrary</strong>: Processes digresses from its normal execution.</blockquote><blockquote><strong>randomized</strong>: All the above, processes can make randomized choices.</blockquote><p>Next article will discuss in detail regarding each of these mentioned abstractions. Hope you like the read and feel free to post a comment. There’s always room to make anything better.</p><p>Reference — Reliable and Secure Distributed Programming (Second Edition) by Christian Cachin, Richid Guerraoui and Luis Rodrigues.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85fff831ddc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beskow — A super computer]]></title>
            <link>https://medium.com/@akhilyerrapragada905/beskow-a-super-computer-b8c4a35ee093?source=rss-98c94bf3cda4------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8c4a35ee093</guid>
            <category><![CDATA[elsa-beskow]]></category>
            <category><![CDATA[supercomputer]]></category>
            <dc:creator><![CDATA[Akhil Yerrapragada]]></dc:creator>
            <pubDate>Sun, 07 Jun 2020 17:42:56 GMT</pubDate>
            <atom:updated>2020-06-07T17:43:38.728Z</atom:updated>
            <content:encoded><![CDATA[<h3>Beskow — A Super Computer</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*JIrfs69IZs99Sl9TsvDllA.png" /><figcaption>Cray XC series super computer. Image courtesy: <a href="https://www.cray.com/sites/default/files/resources/CrayXCNetwork.pdf">Cray</a></figcaption></figure><p>Beskow is a super computer provided by KTH university, Sweden, Stockholm.</p><h4>Summary</h4><p>Beskow is a Cray XC series super computer. The Cray XC series is a distributed memory system developed as part of Cray’s participation in the Defense Advanced Research Projects Agency’s (DARPA) High Productivity Computing System (HPCS) program. The Cray-developed Aries interconnect provides high network performance and programming ability. Beskow has two chips. First contains <strong>2 Haswell processors</strong> per node<strong> </strong>with 22nm technology, 16 cores and 2.30–3.60 GH z clock speed. The caches is range as follows: L1–64KB per core, L2–256KB per core and L3 24MB shared. It contains 4 memory channels with a max bandwidth of 68 GB/s. Second contains <strong>2 Broadwell processors </strong>per node<strong> </strong>with 14nm technology, 18 cores and 2.10–3.30 GHz clock speed. The cache range is as follows : L1–64Kb per core, L2–256Kb per core, L3–27Mb shared. It contains 4 memory channels with max bandwidth of 76.8 Gb/s. The network topology used by beskow is <strong>Dragonfly</strong>. It provides scalable global bandwidth while minimizing the number of expensive optical links. Dragonfly is a direct network, meaning it reduces the optical links required for global bandwidth. It is a low diameter network constructed from high radix routers. Aries provides a system-on-a-chip design that combines four high performance network interface controllers (NIC) and a high radix router. Low-cost electrical links are used to connect the NICs in each node to their local router and the routers in a group. The network protocol can transfer 8–64 byte messages with low overhead.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8c4a35ee093" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Application Level Chaos Engineering with Chaos Machine]]></title>
            <link>https://medium.com/@akhilyerrapragada905/application-level-chaos-engineering-with-chaos-machine-c7b5bf340946?source=rss-98c94bf3cda4------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7b5bf340946</guid>
            <category><![CDATA[chaos-engineering]]></category>
            <dc:creator><![CDATA[Akhil Yerrapragada]]></dc:creator>
            <pubDate>Wed, 06 May 2020 21:43:20 GMT</pubDate>
            <atom:updated>2020-06-05T20:30:05.820Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*GTsA_AsIWr8L7y8qX-ifXQ.gif" /><figcaption>Chaos Machine</figcaption></figure><p>With its history dating from 2011, chaos engineering played a pivotal role in the way the applications are being monitored in production systems. With rapid deployment, production systems are being vulnerable to failures. Some tools that implement chaos engineering on production systems either lack controlled failure injection or custom defining type of failure when injecting. <strong>Chaos Machine</strong>, an application level chaos engineering tool, took a stride by implementing chaos engineering at refined level. More specifically, targeting try-catch blocks of your application. This essay provides an insight on overall functionality of chaos machine and why it must be chosen compared to others.</p><p>Before getting into the technical aspects of Chaos machine, let us quickly look at the overview of what will be covered.</p><ul><li><strong>What is Chaos Engineering?</strong></li><li><strong>Basic principles in brief</strong></li><li><strong>Tools to create chaos</strong></li><li><strong>Failure Injection Vs Chaos Engineering</strong></li><li><strong>The CHAOS MACHINE</strong></li></ul><h3>What is Chaos Engineering?</h3><p>Chaos engineering is a branch of devOps with a motto of making each cycle in devOps tool chain stronger and less vulnerable to failures by injecting controlled perturbations to production instances. It helps identifying vulnerabilities of your production systems preemptively and provides a broader view of your application.</p><p>Chaos engineering can be done at three stages:</p><ol><li>Infrastructure level</li><li>Network level</li><li>Application level</li></ol><p>Infrastructure level chaos engineering refers to enabling and disabling your production systems(hardware) and monitoring the performance of your system. Example: <a href="https://github.com/Netflix/SimianArmy">Simian Army</a></p><p>Network level chaos engineering refers to manually injecting latency to your application to verify it’s performance. Example: Latency Monkey (One of tools in Simian Army Suite)</p><p>Application level chaos engineering refers to testing applications by manually injecting failures such as exceptions to verify the resilience of your system. Example: Byte Monkey, <a href="https://github.com/KTH/royal-chaos/tree/master/chaosmachine">Chaos Machine</a>.</p><h3>Basic Principles In Brief</h3><ol><li>Verify that the system works.</li><li>Input can be any kind of perturbation.</li><li>Play with production environment.</li><li>Automate the experiments.</li><li>Make sure less number of clients are effected.</li></ol><p>Personally felt adding the below in principles could make this interesting and debatable.</p><ul><li>Make sure no data is lost.</li><li>Do not inject perturbation if it cannot be controlled.</li></ul><h3>Some Tools To Create Chaos</h3><h4>1. Simian Army:</h4><ol><li>Chaos Monkey</li><li>Chaos Gorilla</li><li>Chaos Kong</li><li>Latency Monkey and o</li><li>thers</li></ol><p><strong>Some specifications:</strong></p><ul><li>Originated from Netflix.</li><li>Relies on Spinnakar.</li><li>Codecentric provides<a href="https://codecentric.github.io/chaos-monkey-spring-boot/"> chaos monkey</a> for springboot applications.</li></ul><h4>2. Gremlin:</h4><ol><li>Resource gremlins</li><li>Network gremlins</li><li>State gremlins</li></ol><p><strong>Some Specifications:</strong></p><ul><li>Provides interactive UI.</li><li>Very useful at organization level.</li><li>Available as paid version.</li></ul><h4>3. Chaos Machine:</h4><ul><li>Available as application level chaos engineering tool.</li></ul><p><strong>Some Specifications:</strong></p><ul><li>Controlled perturbation.</li><li>Can discover hypothesis.</li><li>Can specify hypothesis in try catch block of code.</li><li>Provides a detailed report on overall resilience of the system.</li><li>Easy to use.</li></ul><h3>Failure Injection Vs Chaos Engineering</h3><p>Both fault injection and chaos engineering are often conflicting terms. But here is the difference, fault injection is different test cases we tryout in our test instance whereas chaos engineering is failure injection in production instance which provides full access to real time workload. Here, failure injection or perturbation needs to be done in a controlled way because uncontrolled perturbation may lead to end user dissatisfaction and can cause loss of business. Other possible risks with both failure injection and chaos engineering is data loss. This problem needs to be addressed carefully.</p><h3>The CHAOS MACHINE</h3><p>It’s simple, you can “try” chaos machine and “catch” vulnerabilities of your application. Chaos machine concentrates on try-catch blocks of the code because its the area that is most vulnerable to failures. The ultimate goals defined by chaos machine are “One should be able to specify, falsify and discover hypothesis”. So what are hypothesis here? Its the behavior of application when a particular perturbation is injected.</p><h4>Types of hypothesis and what they mean!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*7F4-YbTYuisXr8dGhQEyWA.png" /><figcaption>Hypothesis types that can be defined with chaos machine</figcaption></figure><h4>Architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*nB0yXzyNtPJfiptdkKdI4w.png" /><figcaption>Chaos machine architecture.</figcaption></figure><h4>Experiments with chaos machine</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*RIkyRM-U1SJBfH2a5W1WEQ.png" /><figcaption>Experiments with chaos machine</figcaption></figure><p>“Observation” Mode comes with default settings.</p><h4>Important components of chaos machine</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*bvJqWnAh5yx7FP9HWh6DsQ.png" /><figcaption>3 important components of chaos machine</figcaption></figure><p>The output will be a detailed report on the resilience of the system.</p><h4><strong>Implementation of Chaos Machine — Annotation Processor</strong></h4><p>The annotation processor fetches the class, method, exception type, defined hypothesis and index number of specific try block. This index is called perturbation point and the annotation processor registers these details to a CSV file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hjnjzNQwNzIWzylbE3QVjA.png" /><figcaption>“registerPerturbationPoint” registers the perturbation point to a CSV file.</figcaption></figure><p>The example of annotation will look as below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*gNwt4V1TDa7PdngJCfytGA.png" /><figcaption>An example of annotation.</figcaption></figure><h4>Implementation of Chaos Machine — Controller</h4><p>Chaos machine uses Memecached — A distributed memory cached system. The controller fetches the info of try catch blocks and updates it to a HashMap. The hashmap will then be registered as a memcached client. Also, JMX is used as a monitoring tool to monitor processCPUTime etc whereas log monitor is used to check the file updates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*-4EB7rvSehcBtYPXDmCxaQ.png" /><figcaption>controller registering the details of try-catch info to memcached client</figcaption></figure><h4>Implementation of chaos machine — Perturbation Injector</h4><p>Generates controlled perturbation when chaos controller sends the command. The classes to perturbation injector are loaded using automated code instrumentation. Also, it can be activated and deactivated individually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HWc37FfZrq7uX4FdyMCEXg.png" /><figcaption>Byecod einsertion at the beginning of try catch block</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*sqDVdAUCmmSkViuO0vi4Sg.png" /><figcaption>code instrumentation to load classes</figcaption></figure><p>Overall, chaos machine provides a comfortable way compared to other tools available to implement application level chaos engineering. By making it part of devOps, each cycle of it will be made less vulnerable to failures. One intriguing feature about chaos machine is that it provides a way to discover hypothesis and injects perturbation in a controlled way. This feature on the other hand lack in many of application level chaos engineering tools. To dig deeper into its implementation and functionality refer to <a href="https://arxiv.org/pdf/1805.05246.pdf">A Chaos Engineering System for Live Analysis and Falsification of Exception-handling in the JVM</a>.</p><p>Hope you like the read and feel free to post a comment. There’s always room to make anything better.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7b5bf340946" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing CICD in ServiceNow using flow designer]]></title>
            <link>https://medium.com/@akhilyerrapragada905/implementing-cicd-in-servicenow-using-flow-designer-81152a0f4c9d?source=rss-98c94bf3cda4------2</link>
            <guid isPermaLink="false">https://medium.com/p/81152a0f4c9d</guid>
            <category><![CDATA[servicenow]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[devops-practice]]></category>
            <category><![CDATA[cicd-pipeline]]></category>
            <category><![CDATA[devops-tool]]></category>
            <dc:creator><![CDATA[Akhil Yerrapragada]]></dc:creator>
            <pubDate>Sun, 19 Apr 2020 10:25:38 GMT</pubDate>
            <atom:updated>2020-04-23T01:24:12.562Z</atom:updated>
            <content:encoded><![CDATA[<h3>Implementing CICD In ServiceNow Using Flow Designer</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KOtLqv_m0OlluLLKNAFvvg.png" /><figcaption>CICD with ServiceNow</figcaption></figure><p><strong>What is ServiceNow?</strong></p><p><a href="https://www.servicenow.com/company.html">ServiceNow</a> is a cloud-based platform that offers software as a service (SaaS), namely IT Service Management, HR Service Delivery, Governance Risk and Compliance, Customer Service Management and many more. Multi-instance architecture provided by ServiceNow makes it unique in the world of cloud. With rich out of the box (OOTB) features, it stands out among it’s competitors (BMC Remedy). ServiceNow introduces its new features in their releases, with the latest to date being “Orlando”.</p><p><strong>Fun fact</strong>: ServiceNow was formerly known as “GlideSoft”. It is said as per community that, Fred Luddy, the founder of ServiceNow, heard a pilot announce the plane would be “gliding” into their destination while he was coding and just liked the name. Even today, relics of that name live on every time a developer references a “<strong>GlideRecord</strong>” or calls the “gr.” API.</p><p>Before getting into the tutorial, let us have an insight on some basic definitions.</p><p><strong>What is a spoke?</strong></p><p>A spoke is a scoped application containing content dedicated to a particular application or record type. For example: ITSM Spoke.</p><p><strong>Why is it important to your organization or client to have this feature?</strong></p><p>CICD removes the overhead of manual deployment of your data into other ServiceNow instances. By leveraging the functionality of CICD spoke with flow designer, you can automate your deployments. In the flow, you can include actions such as ATF (Automated Test Framework), Plugin activation and much more! Integrating with version control for deployments has been much awaited feature and it can now be explored to the maximum. To explore other features of CICD spoke, refer to official documentation by clicking <a href="https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/integrationhub-store-spokes/concept/cicd-spoke.html">here</a>.</p><p><strong>What is expected from the tutorial?</strong></p><p>A basic overview on CICD spoke introduced in Orlando release of ServiceNow platform which enables easy movement of your application updates through various ServiceNow instances i.e. from Dev to Test or Test to Prod. The distributed version control system, GitHub, will be used to manage the movement. A brief overview of what will be covered:</p><p>1) Creating an application and committing the changes to version control.</p><p>2) Creating a custom automated flow using flow designer.</p><p>3) Leveraging the OOB CICD spoke in the flow.</p><p><strong>Before that, let us get ServiceNow instance with 4 simple steps!</strong></p><ol><li>Go to the <a href="https://signon.service-now.com/ssoregister.do?redirectUri=https://servicenowsignon.okta.com/app/template_saml_2_0/k317zlfESMUHAFZFXMVB/sso/saml">Registration</a> page to register yourself with ServiceNow and activate your account.</li></ol><p>2. <a href="https://signon.service-now.com/ssologin.do?RelayState=%252Fapp%252Ftemplate_saml_2_0%252Fk317zlfESMUHAFZFXMVB%252Fsso%252Fsaml%253FRelayState%253Dhttps%25253A%25252F%25252Fdeveloper.servicenow.com%25252Fsaml_redirector.do%25253Fsysparm_nostack%25253Dtrue%252526sysparm_uri%25253D%2525252Fnav_to.do%2525253Furi%2525253D%252525252Fssologin.do%252525253FrelayState%252525253Dhttps%25252525253A%25252525252F%25252525252Fdeveloper.servicenow.com%25252525252Fdev.do&amp;redirectUri=&amp;email=">Login</a> to your developer site and request an instance in “Your Instance” section. The new instance must be opted be in “Orlando” release.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/1*9Wa0XIpqaPddgKzzqddt9w.png" /><figcaption>Instance status — Orlando</figcaption></figure><p>3. Reset your password and open your personal developer instance by clicking on the “Instance URL”. Below welcome screen appears post logging in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*hDcwzG8x32J6fFRzhmwlVA.png" /><figcaption>ServiceNow homepage</figcaption></figure><p>We will now create a simple custom application, submit the changes to repository, create custom flow designer and explore.</p><p><strong>Note:</strong> Since the motto of this tutorial is to let audience know the functionality of CICD Spoke, we will create a custom application for this tutorial which basically will have a simple script include considering ease. OOTB applications will not be used.</p><p>Let us now <strong>Glide</strong> into the tutorial…</p><h3><strong>Creating an application and committing the changes to version control.</strong></h3><p>ServiceNow provides “<strong>Studio</strong>” to build applications. <strong>ServiceNow Studio</strong> provides an Integrated Development Environment (IDE)-like interface for application developers to work on custom applications in one centralized location. It offers a simple way to create, review, and update application files from a tabbed environment. Type as mentioned in the application navigator as mentioned below image. Click on the studio application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*yOkMyky2UWh1J2YKOw6qGA.png" /><figcaption>Studio in ServiceNow instance</figcaption></figure><p><strong>Creating application repo in source control</strong></p><ol><li>Create a repository in your organization’s GitHub account and name it with your application.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*No4sKXV5gdM32PhUEA-mrg.png" /><figcaption>Application repo — GitHub</figcaption></figure><p>2. Open the “Source Control” menu from top left corner of the studio and click on “Link To Source Control”.</p><p>3. Add your repository’s URL, branch, and credentials of your organization’s account. Post you link your application successfully</p><p><strong>Let us now create a simple application in ServiceNow with the following steps:</strong></p><p>1. Click on “Create Application”.</p><p>2. Name — DevOps Tutorial</p><p>3. Description — This tutorial is to show the CICD working in ServiceNow.</p><p>4. Click on “Create” and then on the below mentioned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/159/1*zPorV-lJ0Ahwcbqe9l8DFg.png" /></figure><p>5. Open your application by clicking on the link.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*TsT6TkyII8NIjR3jIgnVMA.png" /><figcaption>Your application in ServiceNow studio</figcaption></figure><p>6. Open “File” menu from top left corner of the studio and click on “Create File”</p><p>7. Type “Script Include” in the Filter and click on click on it in Filter Results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*tEkFXeVZwub4RynBoRnp7w.png" /><figcaption>Create Script Include in your application</figcaption></figure><p>8. Give “test_devops_course” in name section and click on “Submit”.</p><p>9. Open the “Source Control” menu from top left corner of the studio and click on “Commit Changes”. Below window appears.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*TA7i1iA_OraBk5BZ7_vV2Q.png" /><figcaption>Moving updatesets in ServiceNow to git</figcaption></figure><p>10. Click on continue and now you can see that all the code is committed to GitHub in the branch of your developer instance.</p><p>The mentioned process enables the ServiceNow applications to constantly integrate the changes to your version control. However, since the code committed is in the form of XML, it will be difficult to modify the code outside the ServiceNow instance. Therefore, the application can be linked to VS code for any modifications if necessary.</p><p><strong>Note</strong>: For the sake of simplicity and availability (ServiceNow allows one instance per mail ID), we will be using one single instance for both development and deployment.</p><p>Assume that the Developer instance we are using is the Test instance we need to deploy our application into.</p><p>Make the following changes to the above-mentioned application in your repository.</p><ol><li>Open your branch in application repository. It should appear as mentioned in the below image.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*HcgKN4midtecg3OszYBLBw.png" /><figcaption>Your branch in application repo</figcaption></figure><p>2. Open folder -&gt; update -&gt; script include.xml</p><p>3. In script tag, change the code as mentioned below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*VnUA-DTMGaIohV6eg6HpxQ.png" /><figcaption>Modified script Include in ServiceNow script_include.xml</figcaption></figure><h3><strong>Creating a custom automated flow using flow designer.</strong></h3><ol><li>Type “Flow” in the application navigator and click on “Designer”.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/1*70IrdQXjgfQdALa6p8M_hQ.png" /><figcaption>Flow Designer in application navigator</figcaption></figure><p>2. Click on “+ New” and select “Flow”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*_AJn_JB_FeH3cwzZfd4Exw.png" /><figcaption>“Flow” in flow designer</figcaption></figure><p>3. Name the flow as “DevOps Tutorial” and create the flow.</p><p>4. Now click on “Select to add a trigger” and choose “Run Once”. Also, set the time when you want to run the flow. Click on Done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*vksoM-gjy49tN5qGYCi4lQ.png" /><figcaption>Execute the flow in flow designer</figcaption></figure><p><strong>Fun Fact: </strong>ServiceNow instances for demo or development purposes can use a set of pre-loaded demo data. Some of the sample data includes employees, incidents, assets, and even locations.Those locations, though, are not all that random. Most of them are the <strong>real addresses to Hooters restaurants</strong>. Don’t believe it? Ever been to 1111 W 120th Ave, Westminster CO or 1211 13th Avenue Dr Se, Hickory NC? You will find hot wings and cold beer there if you go.</p><p>5. Now, choose the type of action as “Continuous Integration and Continuous Deployment”. In the “Source Control” Section to the right, select “Apply Changes From Source Control With Scope”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*DZtBZbrsIf3oh61E_NWU1g.png" /><figcaption>CICD in SNow flow designer.</figcaption></figure><p>6. Now, Fill the details as mentioned below.</p><p>i) The “App Scope” will be the scope of your application. It will be found in the script include (API Name) that we have created earlier. The scope of the application here is “”x_483663_devops_tu”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*wX3niCW2zHFJ8PwcXEUb6g.png" /><figcaption>Scope of the application in script include</figcaption></figure><p>ii) In the “Instance URL” section provide the URL of the instance that we want the updates to be moved into. Specifically, the Test or Prod. For example — <a href="https://dev87596.service-now.com/">https://dev87596.service-now.com/</a></p><p>iii) Specify the name of your branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*tePFcDBkAn2BXnsMekkfTQ.png" /><figcaption>Leveraging CICD in flow designer</figcaption></figure><p>iv) Save the flow.</p><p>Note: We must setup credentials and credentials alias in connections &amp; credentials tab. If a connection is already setup to the repository, you may ignore this step. Note that this must be setup for each user who want to make</p><p>7. Type “Credentials” in the application navigator and click on “Credentials”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/231/1*x9m1C-YcqSyt_tR0Lhfstg.png" /><figcaption>Credentials in left nav</figcaption></figure><p>i) Create a new record in the table by clicking “New”. Choose “<a href="https://dev87596.service-now.com/wizard_view.do?sys_action=sysverb_wizard_ans&amp;WIZARD:action=follow&amp;wiz_referring_url=discovery_credentials_list.do?sys_id=-1@99@sys_target=discovery_credentials@99@sysparm_fixed_query=@99@sysparm_group_sort=@99@sysparm_parent=b54536d7db04101062f22946489619aa@99@sysparm_query=@99@sysparm_target=@99@sysparm_view=&amp;wiz_collection_key=&amp;wiz_collectionID=&amp;wiz_collection=&amp;wiz_collection_related_field=&amp;wiz_view=&amp;wiz_action=sysverb_new&amp;sys_id=b1553ed7db04101062f2294648961925&amp;sysparm_query=&amp;sysparm_target=&amp;sys_target=discovery_credentials">Basic Auth Credentials</a>”.</p><p>ii) In the “Name” field, enter the name of your choice. Set your password and in credential alias, click on magnifying glass to choose the “sn_cicd_spoke.CICD”. Finally click “Submit”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*QOuHi2pcY-kT2ruVWu_wJQ.png" /><figcaption>Updating credentials for aliasing</figcaption></figure><h3><strong>Leveraging the OOB CICD spoke in the flow</strong></h3><p>Using the flow designer, we can test execute the flow. The trigger section of the flow enables the flow to execute as per our requirement namely monthly, daily etc. We can also add approvals If blocks and many more as per our requirement. Usually we use approvals to make sure we have the required permissions to proceed ahead with the deployment.</p><p>1. Open the flow we created in the flow designer and click on “Test” available at right corner.</p><p>2. Execute the test and wait for it to process.</p><p>3. Below window appears on the screen with the status completed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*TH-o6RzVWPGtUI1IlEyavg.png" /><figcaption>Executing the completed flow</figcaption></figure><p>4. You can see the status of the execution by clicking on the block. For example, In the below mentioned screenshot, the status is pending and the status code is 200 (Copy the link provided in new tab to see the progress)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*nNLvBA6hvd7gSnWPrF-VmA.png" /><figcaption>Execution pending with status code 200</figcaption></figure><p>5. Post completion, open the script include we created to observe the changes we added to our application.</p><p>Overall, it a much needed feature considering the manual deployment overhead. Including all the actions provided in the spoke along with a series of approvals in the flow designer will be much more interesting and I would leave that to you for a try 😃. Please post your view on the tutorial.</p><p>Hope you like it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81152a0f4c9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>