DevOps.com

  • Latest
    • Articles
    • Features
    • Most Read
    • News
    • News Releases
  • Topics
    • AI
    • Continuous Delivery
    • Continuous Testing
    • Cloud
    • Culture
    • DataOps
    • DevSecOps
    • Enterprise DevOps
    • Leadership Suite
    • DevOps Practice
    • ROELBOB
    • DevOps Toolbox
    • IT as Code
  • Videos/Podcasts
    • Techstrong.tv Podcast
    • Techstrong.tv - Twitch
    • DevOps Unbound
  • Webinars
    • Upcoming
    • Calendar View
    • On-Demand Webinars
  • Library
  • Events
    • Upcoming Events
    • Calendar View
    • On-Demand Events
  • Sponsored Content
  • Related Sites
    • Techstrong Group
    • Cloud Native Now
    • Security Boulevard
    • Techstrong Research
    • DevOps Chat
    • DevOps Dozen
    • DevOps TV
    • Techstrong TV
    • Techstrong.tv Podcast
    • Techstrong.tv - Twitch
  • Media Kit
  • About
  • Sponsor
  • AI
  • Cloud
  • CI/CD
  • Continuous Testing
  • DataOps
  • DevSecOps
  • DevOps Onramp
  • Platform Engineering
  • Sustainability
  • Low-Code/No-Code
  • IT as Code
  • More
    • Builder Community Hub
    • Application Performance Management/Monitoring
    • Culture
    • Enterprise DevOps
    • ROELBOB
Hot Topics
  • Veracode Extends DAST Reach Left Toward Developers
  • Fear of the Future
  • KubeCon 2023: Internal Developer Platforms and Developer Productivity
  • Three Strategies for Reducing MTTD and MTTR as Outage Costs Spiral
  • Observability: The Central Watchtower Your All-Seeing IT Needs

Blogs Doin' DevOps Closing the Deltas Between Development and Production

Closing the Deltas Between Development and Production

By: Ben Good on March 19, 2014 2 Comments

Who hasn’t heard the classic statements “It works on my machine!” or, “Man that would have been easier with real data!”?  In either case, had the development happened in production, problems would have been avoided!  Fortunately, in a DevOps world, the walls between production and non-production get broken down making the reality of developing and testing in production more tangible.  In no particular order, here are some of the things I’ve done to breakdown those walls.

Recent Posts By Ben Good
  • Scripts or Machine Images, What is the Best Way to bootstrap
  • My DevOps Bookshelf
  • Don’t Be Afraid of the “R” Word
More from Ben Good
Related Posts
  • Closing the Deltas Between Development and Production
  • IBM InterConnects Intuitive Themes to DevOps Challenges
  • 7 Best Practices for Continuous Delivery Success
    Related Categories
  • Blogs
  • Doin' DevOps
    Related Topics
  • ben good
  • code
  • deploy
  • dev
  • production
Show more
Show less

Develop on and deploy from a single code line.

Many times we find ourselves in complex processes around deployments and production bug fixes.  For example, the code is branched for release candidates and deployments are done from the branches.  Branching before release by itself isn’t complicated, however, when there is a production bug, engineers find themselves repeating or merging the fix into at least two, if not several, different places.  Repeat that a few times over and, uh oh, now there is a problem because there are many moving parts and questions about what exactly is in production.  Unfortunately, the differences are most likely unintentional.

Instead, simplify the process and have everyone work off the same code line and have that same code line deployed directly to production.  Now there is only one code base, therefore no question about what code is running in production.  Production isn’t static, so change will still happen after deployment.   Notation is required indicating what version was deployed, so you can still reproduce production.

 Let testing happen on the production database.

Ok, even I’m not that crazy, but let developers use a copy of the production database.  There are two very important aspects to this.  First, refresh it often.  I suggest daily.  I have had very good luck using EBS snapshots to get a copy of the database on a different server, but if your database is small, good old SQL dumps also will work.  Second, make it safe.  Put some safe guards in place to make sure a change doesn’t accidently get made to the real production database.  Keep your ACLs tight, change the passwords and practice proper database user management.  Lastly, a bonus outcome is that you are constantly testing your database backups and recovery procedures.

Minimize the steps between development and production.

Each step, especially the manual ones, between the developer’s machine and production is another point where unexpected changes can be introduced.  It sounds obvious, but the gates code must pass through before entering production must be purposeful and prove their usefulness.  For example, if code must go through a regression, but no regressions are being found, then that step is not useful and just increases the probability of unintended change.  I have been a part of a process where code had to be deployed to “staging” where it was then hooked up to the live production database, but was only to be exercised in a read-only manner.  After doing that for many, many releases and very rarely finding defects before production, we decided to just get better at deploying to production and eliminated the deployment to staging.  In the end, we got faster and with no impacts to quality.  Less can be more.

Depending on your situation, database size, regulatory compliance, etc. you might to be able to do all of them, but breaking down those walls will yield better code, fewer bugs, happier engineers and fewer sleepless nights to name a few.  So, grab that wrecking ball and break down a few walls.

Filed Under: Blogs, Doin' DevOps Tagged With: ben good, code, deploy, dev, production

« PEBKAC Avoidance
New Relic Announces Groundbreaking Real-Time Analytics Platform »

Techstrong TV – Live

Click full-screen to enable volume control
Watch latest episodes and shows

Quiz

Results to last week’s quiz are here.

Upcoming Webinars

Building Resilient Organizations Around IT and Cybersecurity
Wednesday, November 29, 2023 - 1:00 pm EST
How to Bring DevSecOps to V-Shaped Development
Thursday, November 30, 2023 - 1:00 pm EST
Scale and Standardize Your infrastructure in Azure, With Red Hat Enterprise Linux
Thursday, November 30, 2023 - 3:00 pm EST

GET THE TOP STORIES OF THE WEEK

Sponsored Content

Why AIOps is Critical for Networks

October 3, 2023 | Mitch Ashley

JFrog’s swampUP 2023: Ready for Next 

September 1, 2023 | Natan Solomon

DevOps World: Time to Bring the Community Together Again

August 8, 2023 | Saskia Sawyerr

PlatformCon 2023: This Year’s Hottest Platform Engineering Event

May 30, 2023 | Karolina Junčytė

The Google Cloud DevOps Awards: Apply Now!

January 10, 2023 | Brenna Washington

TSTV Podcast

On-Demand Webinars

DevOps.com Webinar ReplaysDevOps.com Webinar Replays
  • Home
  • About DevOps.com
  • Meet our Authors
  • Write for DevOps.com
  • Media Kit
  • Sponsor Info
  • Copyright
  • TOS
  • Privacy Policy

Powered by Techstrong Group, Inc.

© 2023 ·Techstrong Group, Inc.All rights reserved.