Contagious Dancing (CD) with Ballerina

Jim K
Jim K
Sep 3 · 3 min read
“BAHA BALLERINA” by Allan Jones is licensed under CC BY-NC 4.0

Backstory

We have gone from configuration to code driven development flow. Developers have rejoiced at the chance to use code to create their services over XML.

Our original flow:

Graphical Overview of development and deployment
Graphical Overview of development and deployment
Overview: 1. Push XML Config to source control, 2. Webhook Initiates Build Process, 3. Build and Deploy to NFS

Overview of components:
- WSO2 EI, API, and IS (8)
- Docker (4)
- Kubernetes (5)
- Gitlab (3)
- Jenkins (2)

While we are also in progress on creating a Continuous Integration (CI) flow to reduce delivery time, there are still some minor hurdles in terms of deployment and testing and keeping everything “like prod”.


A New Dance

Our team was a the inaugural release of Ballerina (1) at WSO2Con USA 2017 (8) and immediately saw its potential. Instead of having various tooling and configuration solutions, we could now have all aspects of the deployment lifecycle in the very code that is being maintained and deployed.

The initial deployment of our first production ballerina backed service was for a single resource of one of top-5 used services. A good blend for a widely used services and segmenting potential failures to a single resource. We have had this in production with zero downtime, data loss, or issues for over a year.

As this was the initial deploy, it was built and deployed manually to our Kubernetes (5) cluster.

Since the initial deploy of this service we have on-boarded several development teams ranging from Mobile/Web-App, Security, SaaS, and Infrastructure. To prepare ourselves for a rush of incoming Ballerina deployments we created a scaffolding CLI and deployment pipeline.

Current Deployment Overview:

Graphical overview of ballerina development and deployment flow
Graphical overview of ballerina development and deployment flow
Overview: 1. Locally develop Ballerina and push to source control, 2. Merge request webhook triggers test,build, and deploy, 3. Update existing WSO2 API Store with new Swagger/OpenAPI, 4. Developers subscribe to API

I’ll go into more detail of current deployment pattern in a future post.

One of the largest components of our environment that I did not go into great detail about is our culture of collaboration. For every technical decision that is made there is a non-technical impact. Our team has been termed the “Rogue in Context” team for good reason. Using the inter-team relationships that we have had for years, we were able to go from build, deploy, run model to a true DevOps approach. Instead of having to send an email for an environment rebuild we can now configure some upstream items and kick off a pipeline build to build and deploy entire environments. This wasn’t well received initially, but the organization is coming to realized the speed of adaptation and quality that we have created. You will want to have this type of culture to some degree for Ballerina to be well integrated into work flows. If your organization still thinks the Earth is flat, aka throw the pig over the wall operations, then this language will make you your org’s Giordano Bruno (9).

Sculpture of Giordano Bruno
Sculpture of Giordano Bruno
Ettore Ferrari, Giordano Bruno (1889). Source: http://www.northernrenaissance.org/wordpress/wp-content/uploads/2015/11/FerrariBrunoTesta.jpg

TL;DR;

Ballerina (1) will enable fast, quality, 12-Factor (7) ready deployments out of the box. The strong annotation set is great “batteries included” approach that will have Devs and Ops collaborating from the start of development.

If you don’t have a DevOps culture or want to build one, this is a great catalyst point for starting that conversation.

References:

Jim K

Written by

Jim K

App/Platform Architect, DevOps, AppSec

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade