CircleCI moves Baracoda to monorepo architecture
Creator of AIoT platform for consumer health products cuts build time by more than half
The challenge
Daily healthtech pioneer Baracoda creates connected products to empower people to improve their health. They build “the bathroom of the future,” with a hub for IoT devices such as smart bath mats that measure weight, posture and balance, smart toothbrushes, and smart mirrors for grooming and skin monitoring. Baracoda built an AIoT platform to help internal engineering teams fast-track the development of digital experiences and IoT products, and to offer the platform as a SaaS solution.
As a “fail fast” company with a quick-delivery work style, Baracoda’s ambitious goals demanded a CI/CD solution that offered similar speed, and the opportunity for engineers to test options as often as needed. The engineering team was using a self-hosted version of Jenkins inside of a Kubernetes cluster.
“We had one teammate who was running Jenkins – logging in the morning, checking, breaking everything, and asking us to fix the issues he introduced,” says Timothy Nibeaudeau, Head of Software Engineering for Baracoda. “It was time-consuming for him and for at least one person on each specific team.”
The team additionally wanted to consolidate its projects into a monorepo to manage everything in the same place. “Having all of them in the same repository allows us to run end-to-end integration tests, share common resources, and fail fast,” says Nibeaudeau. “It also enables us to enforce best practices at the monorepo level, and to manage only one CI configuration.”
But the process was slower than engineers would have liked. “By introducing the monorepo, it was taking a lot of time to build – as long as one hour,” Nibeaudeau says. “We had to find a solution to reduce this time to agree with our ‘fail fast’ approach.”
The solution
CircleCI proved to be the only CI/CD provider that could migrate code from Jenkins without losing any of the platform features. In addition, CircleCI allowed Baracoda to manage its large monorepo.
“We compared CircleCI with Bitrise and Jenkins,” Nibeaudeau says. “CircleCI matched most of our criteria. We needed a platform to allow us to do exactly what we were doing in Jenkins. For building iOS applications, we needed a macOS runner to do some custom builds on a custom agent.”
Engineers have praised the ability to customize CircleCI. “We’ve made lots of changes to how CircleCI works to make sure we’re not building stuff that we don’t need when we’re making changes,” Nibeaudeau explains. “We’re also making sure the integration between the technologies is working properly. For instance, if we change something in the back end, the CI should check that the changes don’t break anything on the mobile applications.”
Baracoda engineers are using just about every feature offered by CircleCI, including caching, orbs, self-hosted runners, Docker layer caching (DLC), customizable compute, and parallelism.
“In the monorepo, we have more than 20 workflows in the same repo, and we have some images that are more than 5GB,” Nibeaudeau says. “Without Docker layer caching, the images took at least one minute each to download, which is too long. When we enabled DLC, we save one minute each time.”
“Now we can have nearly 50 instances running in parallel in under 20 minutes … a huge accomplishment with CircleCI.”
Timothy Nibeaudeau | Head of Software Engineering at Baracoda
How CircleCI powers Baracoda’s business
With far less time needed to manage CI/CD, thanks to adoption of CircleCI’s SaaS solution, Baracoda engineers gain back more time for strategic projects – such as migrating to a monorepo.
Engineers have also reduced time to build significantly. With Jenkins, build time was 40 minutes to one hour. “It wasn’t possible to run as much as we wanted in parallel,” Nibeaudeau says. “Now we can have nearly 50 instances running in parallel in under 20 minutes. This has been a huge accomplishment with CircleCI.”
As engineers join the platform team, they can jump right into using CircleCI with no ramp-up time needed. “With CircleCI, it’s straightforward – you write your scripts, you use YAML, and there’s a lot of up-to-date documentation,” Nibeaudeau says. “It’s nice that anyone in my team can jump into a CI task within a few hours to get to know the system. Everyone can do some tweaking in a matter of minutes.”
Benefits of using CircleCI:
- Ease of migrating to monorepo
- Parallelism saves time
- Build time is shortened significantly
About Baracoda
Baracoda is a leader in daily healthtech. The company infuses connected tech into the everyday routine – leveraging AI, data analysis, machine learning, app development, gamification and more. Baracoda launches products and scales businesses alongside global market leaders, relying on a unique B2B2C business model.