<?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 Aravind Pedapudi on Medium]]></title>
        <description><![CDATA[Stories by Aravind Pedapudi on Medium]]></description>
        <link>https://medium.com/@arawind?source=rss-b36065b3f771------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4wtXCJt1ZchF-JA9.jpeg</url>
            <title>Stories by Aravind Pedapudi on Medium</title>
            <link>https://medium.com/@arawind?source=rss-b36065b3f771------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 02:16:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arawind/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[The development and deploy process at Stayzilla]]></title>
            <link>https://medium.com/stayzilla/the-development-and-deploy-process-at-stayzilla-1a103f785914?source=rss-b36065b3f771------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a103f785914</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Aravind Pedapudi]]></dc:creator>
            <pubDate>Thu, 27 Oct 2016 05:22:48 GMT</pubDate>
            <atom:updated>2016-10-27T05:22:48.561Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*XdzLwh5zOOBSh4s56THVCw.png" /><figcaption>Sample daily slackbot post-deploy message</figcaption></figure><p>Product and business managers in a company primarily care about the velocity at which product features are being deployed to production. In order to achieve that goal, having a robust development and deploy process is critical and often underestimated. At <a href="https://stayzilla.com/">Stayzilla</a>, we have organised ourselves into small, self-contained teams (called “pods”) with 2–8 members and work on independent projects in parallel. This blog post talks about our current development and deploy practices in order to maximise developer productivity as well as product feature velocity.</p><p>There is nothing particularly ground-breaking here but serves to give an overall picture of how we have put the various pieces together to achieve our objectives. This process has been fairly stable for us for at least a couple of months and working well for us at our scale.</p><h3><strong>Components</strong></h3><p>We use the following tools and services right now:</p><ul><li>Github (for code hosting, code reviews)</li><li>Shell scripts (for building, testing, deployments)</li><li>Circle CI (for continuous integration and deployments)</li><li>Other services (email, google sheets, etc)</li></ul><p>However, we like to set a few constraints for ourselves:</p><ul><li>Automate things as much as possible, BUT</li><li>Keep things very simple, AND</li><li>Never take cloud services for granted</li></ul><p>So, essentially, the workflow that follows uses only two of the tools above as the base:</p><ul><li>git</li><li>Shell scripts</li></ul><p>Everything else is good to have.</p><h3><strong>Environments</strong></h3><p>We currently have three environments — development, pre-production and production. These are in sync with the branches across our codebase on git: devel, rc-* and master. We’re currently working on providing another set of environments for hosting long running features, so that the features can be developed and tested before entering the release cycle.</p><h3>Code repositories on Github</h3><p>We have a large number of code repositories on Github. In each repository, the scripts needed to build, test and deploy the code repository to any environment are checked into git, so are the environment config files. As a convention, we put these scripts into three files under the project root of each repository. For example, consider the website repo:</p><pre>website/<br>    - .git/<br>    - cfg/<br>          - config.ini<br>          - devel.config.ini<br>          - preprod.config.ini<br>          - production.config.ini<br>    - public/<br>          - app.js<br>          - styles.css<br>    - scripts/<br>          - dependencies.sh<br>          - build.sh<br>          - deploy_devel.sh<br>          - deploy_preprod.sh<br>          - deploy_production.sh<br>    - test/<br>    - .gitignore<br>    - app.js<br>    - circle.yml<br>    - package.json<br>    - readme.md</pre><p>which has the following scripts:</p><pre><strong>- scripts/dependencies.sh</strong>:</pre><pre><em>#!/bin/bash</em><br><strong>npm</strong> install</pre><pre><strong>- scripts/build.sh<br></strong>  <br><em>#!/bin/bash<br></em><strong>echo</strong> &quot;Running tests...&quot;<br><strong>jshint</strong> app.js<br><strong>npm</strong> test</pre><pre><strong>echo</strong> &quot;Building...&quot;<br><strong>rmdir</strong> dist<br><strong>mkdir</strong> dist<br><strong>cp</strong> *.js dist/<br><strong>cp</strong> -R cfg dist/<br><strong>cp</strong> -R node_modules dist/<br><strong>cp</strong> -R public dist/</pre><pre><strong>- scripts/deploy_dev.sh<br></strong>  <br><em>#!/bin/bash<br></em><strong>echo</strong> &quot;Changing config to devel&quot;<br><strong>cp</strong> cfg/devel.config.ini dist/cfg/config.ini</pre><pre><strong>echo</strong> &quot;Deploying to devel environment...&quot;<br><strong>rsync</strong> -r --delete dist user@devhost:/var/www/website</pre><pre><strong>echo</strong> &quot;Restarting services...&quot;<br><strong>ssh</strong> user@devhost &quot;systemctl restart website&quot;</pre><p>Checking all these scripts into the code repository allows anyone to easily set up code repositories on their local box. A self-sufficient deploy script can also be used without any Continuous Delivery tool — i.e. in case of emergency, a system admin could trigger deploys from their own machines.</p><h3>Continuous Integration and deploys using Circle CI</h3><p>We are using <a href="https://circleci.com/">Circle CI</a> for testing and deploys. Whenever a branch gets updated on github, Circle CI gets notified, and it starts running the tasks specified for that repo. Here is a sample “circle.yml” for the website repo:</p><pre><strong>machine</strong>:<br>    <strong>node</strong>:<br>        <strong>version</strong>: 4</pre><pre><strong>dependencies</strong>:<br>    <strong>override</strong>:<br>        <strong>-</strong> scripts/dependencies.sh</pre><pre><strong>test</strong>:<br>    <strong>override</strong>:<br>        <strong>- </strong>scripts/test.sh</pre><pre><strong>deployment</strong>:<br>   <strong>devel</strong>:<br>        <strong>branch</strong>: devel<br>        <strong>commands</strong>:<br>            <strong>-</strong> scripts/deploy_dev.sh<br>   <strong>staging</strong>:<br>        <strong>branch</strong>: /rc-.*/<br>        <strong>commands</strong>:<br>            <strong>-</strong> scripts/deploy_preprod.sh<br>   <strong>production</strong>:<br>        <strong>branch</strong>: master<br>        <strong>commands</strong>:<br>            <strong>-</strong> scripts/deploy_prod.sh</pre><pre><strong>general</strong>:<br>   <strong>artifacts</strong>:<br>        <strong>-</strong> dist</pre><p>We are telling Circle CI to use the same scripts we are familiar with. Checking in this file to github also allows a system administrator to understand how to set up a machine (in this case — they’d know to set up Node.js v4).</p><h3><strong>Git branches and code review</strong></h3><p>We use <a href="http://nvie.com/posts/a-successful-git-branching-model/">a popular git branching model</a> for our development. People keep pushing work to feature branches on their forks, and raise merge requests on devel branches of the repo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*8-zDz1s5Atux_yNW_mXmfg@2x.png" /><figcaption>Source: <a href="http://nvie.com/posts/a-successful-git-branching-model/">http://nvie.com/posts/a-successful-git-branching-model</a></figcaption></figure><p>Every pull request is checked by Circle CI as well as our own in-house Peer-review checks, and these are mandatory to pass. The peer review check ensures that at least two people other than the author of the merge request add a <strong>+1</strong> comment before a merge is allowed. As long as these checks pass, anyone on the team is allowed to merge the changes in to devel. Merging to devel triggers Circle CI again, and this time it deploys the code to the dev environment.</p><h3><strong>Daily Deploys</strong></h3><p>Given our velocity, we have determined that doing deploys daily on every weekday is the ideal cadence for us. We evolved from doing adhoc deploys to once a week to twice a week to our current practice of doing it daily. As a bit of surprise to us ourselves, we find that we have plenty of stuff being deployed every day. Further, while we had a dedicated engineer babysitting a deploy earlier for multiple hours, we estimate that each deploy for us now takes less than 5 minutes of developer time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L4E3HC4-10zNOavttF7FLQ.png" /><figcaption>The daily mail with the list of changes that are in preprod</figcaption></figure><h4><strong>The Daily Cycle</strong></h4><p>At 6pm everyday, an automated script uses the Github API to create a release-candidate from the devel branch for each repo. It also opens a pull request from the release candidate to master. This step freezes the next set of changes using the rc branch tag, but allows development to continue on devel. Again, Circle CI kicks in, deploying any branch with the signature rc-* to pre-production. This script that creates the release candidates also creates a Google Sheet having this signature:</p><pre>project  | branch        | merge req url               |  qa status<br>====================================================================<br>website  | rc-05-10-2016 | <a href="http://github.com/pulls/123">http://github.com/pulls/123</a> |  pending  <br>website  | rc-05-10-2016 | <a href="http://github.com/pulls/345">http://github.com/pulls/345</a> |  pass  <br>website  | rc-05-10-2016 | <a href="http://github.com/pulls/567">http://github.com/pulls/567</a> |  fail</pre><p>This sheet is shared with our QA team after the cut to preproduction. The QA team runs its suite of tests and sets the status flag for each repo / merge request. At 2pm every day, the QA sheet for the previous day is picked up and fed as a csv to another script, which merges each merge request that has the QA flag set to <em>pass</em>. Both these scripts also send summary emails about the changes in each environment as well as sends bot messages on slack.</p><h3>Incidents and hot fixes</h3><p>When something critical is found breaking on production, it is considered as an <em>Incident</em>. Incidents are usually resolved by sending hot-fix merge requests to master or rc- branches. In case of pre-production, the QA team may choose to mark the status as “failed”, in which case, the entire set of changes for that repository are prevented from going live.</p><h3>Conclusion</h3><p>Here is how we can summarize our approach to development and deployment:</p><ol><li>Check in all the scripts for building, testing and deployments to the relevant code repositories</li><li>Use merge requests and enforce code reviews by multiple people before allowing anything to go to devel</li><li>Automatically flush dev changes to preproduction at a fixed time regularly</li><li>Send QA verified changes to production</li><li>Let Circle CI use our own scripts for testing and deployment, in response to branch updates (devel, rc-* or master)</li></ol><p>We continue to fine-tune our development and deployment process but overall this system has worked out quite well for us. It has allowed us to achieve high feature velocity and developer productivity while maintaining a very low number of incidents and rollbacks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a103f785914" width="1" height="1" alt=""><hr><p><a href="https://medium.com/stayzilla/the-development-and-deploy-process-at-stayzilla-1a103f785914">The development and deploy process at Stayzilla</a> was originally published in <a href="https://medium.com/stayzilla">Stayzilla</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>