Continuous Delivery and Software Distribution at Scale

Pavan Belagatti
ITNEXT
Published in
7 min readApr 12, 2020

--

Source credits: Pixabay

The software development processes and methodologies have evolved over time from Agile to DevOps today. Continuous integration and continuous delivery play a vital role in producing software in bits and pieces, integrating and making sure that the code is always ready to be deployed at any given moment with confidence. Not just CI/CD, but organizations today are doing a lot of experiments with regards to the distribution and scaling of the software. Agree or not, after culture formation and setting the DevOps norms in the company, it is very critical to have such tools that make sure to align with your DevOps strategy. Today, we will see what is continuous delivery is essential and also about the software distribution flow.

What is continuous delivery?

Continuous delivery (CD) is an approach in software engineering which involves producing software in short cycles. By developing software in short cycles, the teams can reliably and confidently release their software at any given time without any hindrance. With CD, development teams get a huge advantage of building, testing, and releasing software faster and more frequently.

The original idea of continuous delivery was developed and shared by Martin Fowler, the Chief Scientist of ThoughtWorks. He described the CD practice as: “Every developer integrates with everybody else’s work frequently. […] And, if something has failed, nobody has the more important job than fixing the backstage”.

Over the last decade, continuous delivery is one of the most discussed and popular development practices in DevOps. Making incremental software updates available rapidly, increasing the velocity of delivery from the developer to deployment. With the advent of methodologies like 12 Factor App and Multitier architecture have been driving this trend and provide guidelines and principles to follow. This has become a practice in many software organizations, while it once sounded like magic and not possible, the breakthroughs with automation engineering has made frequent updates possible now.

How continuous delivery works?

With the objective of supporting critical and strategic business needs and deliverables, software-powered organizations are evolving both processes, procedures, and technical frameworks. Modern firms have understood the importance of DevOps and are keen to experiment, fail early, learn early, and evolve accordingly.

From just starting continuous integration, they’ve graduated to implementing CD, transforming the way software is delivered.

In Continuous Delivery, each time your developer makes any changes to the code, integrates, and builds the code, also automatically tests this code through CI on environments that are very similar to production. In the software deployment pipeline, we usually will have a development environment, a test environment, and a staging environment. Still, these stages might vary by the team, product, and organization structure.

In each separate environment, the code your developer wrote is tested differently, and this gives more confidence to the developers. Basically, the code is only promoted to the next environment in the deployment pipeline if it passes the tests of the previous environment. Through this process, the developers get new feedback from the tests in each environment and, if there is any bug, they will get to know more easily where the issue might be, and this is how they can quickly get it fixed before it gets to the production environment or the end-user. This way, continuous delivery makes developers code always ready and deployable at any given moment.

Principal benefits of adopting continuous delivery,

  • Increased developer confidence and efficiency
  • Faster releases
  • Reduced deployment risk
  • Able to track software development progress
  • Enables faster time to market
  • Early user feedback
  • Continuous learning
  • Enables faster application iterations

Stages of the Continuous Delivery Pipeline

  • Test Automation and CI: This is where the new features and prototypes are prepared, and the code is integrated with the base.
  • Build Automation: This is where developers push artifacts to the registry.
  • Alpha Deployments: This where the developer checks-in the changes made. Also, this is the stage where developers can see if they broke anything in the main branch and if there are any abnormalities in the code.
  • Beta Deployments: This is the place where rigorous testing is done manually because manual testing is required to see perfection apart from CI tools. It gives more surety that the application is in good condition and will work properly when deployed.
  • Production Deployments: This is the stage where the application goes live for end users.

Software distribution at scale

Software development has evolved over the years from the waterfall model to agile to lean to CI/CD and continuous operations. While software development plays a vital role, at the same time, the distribution of software is also considered essential. It is crucial to deliver and manage software related functions and tools in the workplace securely. Software distribution is a must to fast pace software management in any organization, and continuous delivery plays a vital role in scaling software distribution. Software distribution means getting the applications into the hands of the end-users for the final usage. This process might involve several steps, ranging from packaging, delivery, installation to maintenance.

Software distribution forms a very important aspect, and it needs a perfect platform that can securely manage the distribution of your software releases. The platform should be able to distribute immutable release bundles to production environments securely. The platform should be able to package artifacts from multiple repository types into one release bundle. With tools like JFrog distribution, you will be able to distribute and scale your application easily.

When it comes to continuous software delivery, companies face some severe challenges in the distribution of production-ready software to the edge, this creates chaos around software releases and lack of continuity between the teams. This is where tools like JFrog distribution helps companies by providing a structured and a secure platform to distribute release binaries to multiple remote locations. This makes organizations not to worry about the software distribution since release bundles are correctly verified by the source destination to ensure they are signed correctly and safe to use by any number of teams within the organization.

Distribution is an on-premise and cloud, centralized platform that lets firms provision software release distribution easily and efficiently. It manages release bundles and their related distribution processes, including release content, permission levels, and target destinations.

The distribution provides a more secure and structured way to distribute release binaries to multiple remote locations anywhere in the globe and update them as new release versions are created. As part of the release flow, the release bundles are verified by the target destination thoroughly to ensure they are signed correctly and all safe to use.

JFrog Distribution was created to support the different needs of moving software artifacts securely from one place to another in the development pipeline/for distribution. Write the code, develop your software, package it in a release bundle, and distribute them to remote locations through distribution. A company that has multiple branches that are spread globally can enjoy the benefits of Distribution like security, atomicity, and concurrency, etc.

It can be achieved by having Edge Nodes on the actual devices or on relevant sites taking into account the geo spread of the distribution to allow lower latency for packages download by the actual devices.

Edge Node

Artifactory Edge Node is a special installation of JFrog Artifactory that immutable and serves the purpose of software provisioning. Edge nodes provide a common user access point for client tools/devices. In our case, an Edge Node can only contain artifacts that were provisioned to it by JFrog Distribution. Edge Node will not allow you to deploy any artifacts on it by any means other than JFrog Distribution. Edge Node as a “read-only” Artifactory for environments that are part of the build/release lifecycle, different than the development environment. With this, you gain the advantage of both the immutability and isolation of your software package from other artifacts resides on dev Artifactory.

Let’s see practically, how Distribution lets you provision software releases using immutable release bundles to many target destinations.

Distribution in 3 Steps

1. Create a release bundle using REST API or the Query Builder.

2. Secure your release bundle by signing it using a GPG key, ensuring that its contents cannot be edited. This will also ensure consistency of distribution among target instances.
Note: The same GPG key is used by the Artifactory Edge to validate the Release Bundle before it is accepted.

3. Distribute your release bundle. Distribution is responsible for triggering the replication process that happens from the source Artifactory to the edge nodes. First, it replicates the Release Bundle info to each edge node and then initiates the replication process in the source Artifactory.

Check out more information on the official website and documentation.

Conclusion

The apparent advantage of Continuous Delivery is to have a stable, reliable, and quality codebase, always ready to go live with confidence. So you shouldn’t be worried about getting any defects or bugs going out to end-users, and if you do, you can fix them quickly and learn fast. While software delivery is an integral part of DevOps and automation, more critical is scaling this process and the distribution aspect of it, which poses some severe challenges to the firms. Hence, selecting a proper strategy and a platform that can do this part more efficiently has been observed as more effective.

--

--

Developer Evangelist | AI/ML| DevOps | Data Science! Currently working at SingleStore as a Developer Evangelist.