How much will CI/CD cost on top of Azure VSTS?
When it comes to cloud-computing, you may find some concepts to be fairly complicated. One that is highly important to understand are the practices of Continuous Integration and Continuous Delivery, commonly referred to as CI/CD. These practices can be combined into a pipeline that ensures quick, reliable, and secure storage and delivery of information, the kind that is required for cloud-computing. In this post, we’ll tackle the cost estimation of a CI/CD system to be hosted on top of Visual Studio Team Services (VSTS) in a generic scenario, which we’ll introduce below.
Context for this CI/CD Scenario
First we need to start with a little context around this process. For this example, we will start from an on-premises system that has a CI/CD system built on top of Jenkins, which deploys the web application on a local IIS. For each project, we have an SQL Server Database, which can reach up to 100 GB. Our source control repository will be GitHub (but BitBucket is also a great repository), and we’ll use JIRA for task management and tracking.
With this scenario, we’ll have around 20 projects that need migration. However, the cost estimation will be determined per project, allowing us to come up with the most accurate forecast for each. It should be noted that for the purposes of this explanation we won’t take into consideration any other dependencies that a more-specific project could have, such as Windows Services.
Most clients are already using Azure to host their production environments for their web application. Going into the cloud is more than acceptable for them. Besides this, remember that you have the code inside GitHub. In some cases, we are required to keep the output of the build for 6 to 12 months after its completion. This is vital to consider since the build output is deleted after a specific period in VSTS.
Reasoning behind using CI/CD
There are two main reasons to consider this kind of migration. The first one is related to on-premise hardware that needs to be constantly upgraded. When your vision for the next 3-5 years is to be a true cloud-first company, you need to decide if you want to invest in new hardware, or if you want to externalize it. Constantly upgrading new hardware can be very costly.
The second driver is more so related to security and privacy. Clients will require dedicated sandboxes where the CI/CD pipelines can run in an isolated testing environment. Simply put, it is much harder and more expensive to offer this using on-premises systems.
These two reasons bring to light the direct benefits of the Cloud. With the cloud, once you have already configured everything the way you need it, you will be able to pay based on your need. Overall, maintenance costs are lower, and you can grow or shrink your requirements quickly, depending on how well the business is performing.
CI/CD Practice | What You’ll Need
1. Build Machine (Microsoft-hosted CI/CD)
As far as build machines go, the initial phase should be done with Microsoft-hosted CI/CD. This way, you can’t change the tier, while also running in a “shared resource pool”. The main advantage of this is that the cost per month is flat and affordable (usually around $40). When necessary, self-hosted CI/CD is also a good option, but this should only be used when absolutely required. You don’t want to manage the build machine all by yourself.
Each project shall have its own Microsoft-hosted CI/CD, providing the flexibility to run their builds whenever necessary. This way you you won’t have to wait for others. It also enables us to completely isolate the access to each CI/CD by individual team, instead of by organization.
2. Website Hosting (Azure Web Apps Basic)
As for web application hosting, there are two locations where we could do this. The first one is inside Azure Web Apps, where we can deploy the web application. In this location, there is full control at the project level as to how we want to configure and setup the application. Another approach would be hosting with Azure DevTest, which supports Web Apps. At this point, we don’t want to add extra complexity by using multiple types of resources. This will be covered more thoroughly in the next section.
3. Database Storage (Azure SQL Database S0)
For database storage, the most appealing option is the Azure SQL Database, the S0 tier is more than enough. There is full control of the database, and minimized risk that some features may not be supported inside the Azure SQL Database.
Azure DevTest is another appealing option. It’s a perfect location for running the databases that are not as compatible with the Azure SQL Database. However, the downside is that it’s more expensive. Yes, even if you have multiple SQL Databases inside SQL Server Web Virtual Machines, this still doesn’t quite cut it. It’s critical to have a sandbox for each project to avoid resource sharing throughout.
In the long-run, Azure DevTest will be the best place for most scenarios. However, in the short-term, Azure SQL Databases and Azure Web Apps are the best options for the context provided at the beginning of the article. Another overall advantage of this is the cost monitoring, since this can be done from only one location. Also note that if we combine Azure DevTest Labs with other resources, it becomes a bit more complex.
4. Artifacts History (Azure Blob Storage)
To be able to store build output for a long period of time, the simplest solution is Azure Blob Storage. This can be used to store and archive any artifact. Furthermore, its policy capability allows us to automatically delete content after a specific period of time, giving us the perfect place to store and manage the build output.
Note: Once Azure DevTest Labs has support for PaaS (more specifically Azure SQL Database), the migration to Azure DevTest will be much smoother and faster. At this point, it’s only a matter of time.
CI/CD | Cost Inputs
Now, in order to estimate the cost as accurately and realistically as possible, we need to collect the right data on the aspects that affect our monthly cost. The inputs that I consider relevant in this discussion are the following:
- Average build duration
- Number of builds per day
- Build output size
- Build storage duration
- Database size
- Web app complexity
Each of these item needs to be considered for each type of pipeline.
CI/CD | Final Cost Calculation
Finally, the calculation! Time to figure out how much this is going to cost your business. The total cost of a CI/CD that includes this development environment would come to $63 per month. If we remove the development environment (subtracting costs related to the Web Application and Azure SQL Database combination) and focus only on the CI/CD cost, then the cost can even be as low as $41 per month.
The following requirements, based on standard averages, were used to calculate the cost:
- Average build duration: 5 minutes
- Number of builds per day: 50 builds
- Build output size: 200 MB
- Build storage duration: 90 days
- Database size: 5 GB
- Web app complexity: Low (Web App with Basic tier)
The total number of build minutes is around 9,000 per month, meaning that we can have a dedicated concurrent job, which will be $40 per month. You can also easily include 2-3 additional environments or create multiple pipelines when needed. You can even share the same Microsoft-hosted CI/CD job across pipelines as long as they are under the same VSTS project.
This means that if you have 4-5 projects hosted inside your source control repository, you could have the same job shared between them as well as dedicated pipelines for each of them. This drastically reduces the cost.
As you can see, the cost per month of CI/CD inside Microsoft Azure is more than acceptable. With a lower end of $40, and a higher end of $63, then the average expected cost is $52 per month. Compared to the routine maintenance costs of on-premise hosting methods, there is simply no contest. Cloud-based hosting looks way better on your budget. And, based on what you want to achieve, the price can be even less. Again, one of the most important capabilities that Azure is the ability to extend and add complexity to your system as needed.
Discover more Cloud topics with Luminos Labs
Did you find this post helpful in breaking down the specifics of CI/CD cost estimation? We’re happy to provide you the answers you’re looking for in this cost estimation breakdown, as it’s an area in which we hold great expertise. In fact, Luminos is named Episerver’s Digital Experience Cloud Partner of the Year in North America.
The Episerver platform also leverages the cloud, and it’s one most cloud-capable options on the market. Our teams across the world help companies implement the platform efficiently and effectively. We also consult with the client to integrate valuable 3rd party systems – like OrderDynamics and Tealium – seamlessly into the platform.
Find out what Luminos can do for your business. We work with clients of varying sizes and industries, so we’ve got the experience to find the solutions you need. All initial consultations are free of charge. And if now just isn’t the right time, then please feel free to subscribe to our weekly newsletter for more e-commerce updates, trends, and announcements.