A Comprehensive CI/CD Guide: Deploying a Spring Boot Application on Choreo — Deploying your docker image in Choreo

Buddhima Udaranga
4 min readDec 13, 2023

--

Welcome back, fellow developers! In our previous blogs, we embarked on a journey of crafting a sleek Spring Boot application and encapsulating it within a Docker embrace. Today, our adventure takes a thrilling turn as we explore the realm of container orchestration with WSO2 Choreo. Buckle up as we unravel the magic behind deploying our Dockerized creation onto the orchestration stage, where WSO2 Choreo orchestrates the symphony of containers with finesse. Get ready to witness the seamless dance of microservices orchestrated in perfect harmony. Let the show begin! 🚀 #WSO2Choreo #ContainerOrchestration #DevOpsMagic

What is choreo

Choreo represents an internal developer platform that transforms the way you craft digital experiences. With Choreo, you have the capability to effortlessly design, develop, deploy, and govern your cloud-native applications. This platform not only fosters innovation but also significantly minimizes time-to-market.

Configuring Endpoints.yaml

First you need to create your open api definition for your spring boot application. For this you will need the following dependency

<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.2.0</version>
</dependency>

This will generate a yaml file that has the specifications of the APIs defined in your spring boot application.

Then create a .choreo folder in your github repo and have a yaml file named endpoints.yaml

version: 0.1
endpoints:
- name: Employee API
port: 8080
type: REST
networkVisibility: Public
context: /
schemaFilePath: openapi.yaml

The openapi.yaml file can be obtained from the earlier step and should be committed just outside the .choreo folder.

Trying Out

Go to https://console.choreo.dev/signup

You can sign in simply using Google or using the email address. Then it will prompt you to create a organization

You will have a default project created and you can click on the default project. That will direct you to a page as follows

Click on create and then service

Enter a component name and then click on Authorize with github.

This should show a repositories of the github account you have connected. Then you can click on Docker and select docker context and docker file

In the left plane there is a deploy button when you clicked on that you will be directed to the following

Then click on build.

In build now you should see the following

Click on Test in the left plane and then click the console.

You can try your APIs from here.

--

--