Bid farewell to “But It Works On My Machine”

Rania Darwish Saleh
IBM Data Science in Practice
4 min readJan 24, 2021
Diagram of a DevOps feedback loop

In the fifth century BCE, Darius I came up with the idea of the Royal Road to connect the Persian Empire and its regions. On this road, the couriers traveled in relays. When a courier reaches a checkpoint, he passed the information to the next courier.

Software development used to follow the waterfall methodology. This method reminds me of the Persian Royal Road. The project was divided into stages (Requirements, Development, Testing, Deployment, etc.). Each stage wouldn’t start until the previous one ends. This model lacks the agility required in the modern software world. We needed to respond faster to this perpetual changing business. From this need, DevOps was born.

DevOps supports an iterative, repeatable and reliable deployment process. An automated delivery pipeline allows continuous integration, deployment, and verification. This process will enable us to fail early and fail fast, which will result in failing cheap. An IBM research in 2010 noticed an exponential increase in the cost of fixing bugs as we go in the process.

3D histogram of the cost of fixing defects in software
Source:https://www.researchgate.net/publication/255965523_Integrating_Software_Assurance_into_the_Software_Development_Life_Cycle_SDLC

In the pre-DevOps days, Deployment was not a smooth process. The isolation between Development and Operation caused unforeseen differences between the two environments. These differences caused surprises at the deployment time. Deployment was a roll of the dice action — it may work right away, or the code may break. The developer used to say frustratedly, “But It Works On My Machine!!”. In DevOps. we overcome this obstacle by developing and testing against production-like systems.

cartoon of someone saying “But it works on my machine!”

So the theory is nice, but how can we implement this in real life? Let's dive in and try to build a simple pipeline using IBM Cloud toolchain:

  1. Login to IBM Cloud, if you don’t have an account, click here to create a free one.
  2. Click on the “+” sign in the left menu and select DevOps
screenshot of IBM Cloud dashboard
screenshot of IBM Cloud dropdown menu

3. In the toolchains page, click “Create toolchain”

screenshot of creating a toolchain in IBM Cloud

4. Choose “Develop a Cloud Foundry app” template

screenshot of selecting “Develop a Cloud Foundry app” on creating a toolchain board on IBM Cloud

5. On the creation page, click in the “About” tab to review the toolchain diagram

screenshot of the “About” page for creating a Cloud Foundry app

6. Click on the “Create” tab to update the toolchain properties

screenshot of creating a Cloud Foundry app page

6. Update the Git repo information

screenshot of updating Git repo and issue tracking

6. Click on the “Delivery Pipeline” to configure the toolchain’s pipeline. You need IBM Cloud API key, you can either choose an existing key, or click on new button to create new key.

screenshot of Delivery Pipeline

7. Click “Create” and wait until the pipeline status is “Success”. You can access your website. Click on “Visit App URL”

screenshot of the Demo toolchain page

8. Your website is ready and deployed. Check this tutorial for more advanced and more detailed steps.

screenshot of the demo page front end

Are you intrigued by DevOps? Try these IBM free courses. Gain more in-depth understanding of DevOps. Practice building your first pipeline. And as a bonus, you get several badges that you can share in your network.

--

--

Rania Darwish Saleh
IBM Data Science in Practice

DevOps at IBM Cognos Analytics Interests include: DevOps, Cloud,Security, Blockchain