From the course: Agile Software Development: Cloud Architecture

Containerize legacy application

From the course: Agile Software Development: Cloud Architecture

Start my 1-month free trial

Containerize legacy application

- [Instructor] Containerizing an application means packaging an applications executable and binaries, configuration settings, run time and all of the constructs that the application is dependent on and putting all these inside what is known as a container image, you can use that image to run that application as a container, as we already know the agile core application has become huge and its installation processes complex and error prone. So the development team continued to discuss the possibility of containerizing the legacy agile core application as the first. The development team took a step back to debate if containerizing the agile core application was worth the effort, instead of containerizing the agile core application, one option was to build a new set of services that would replace agile core. This process would take a long time, but it would be easier to implement for the team as they would not have to make any changes to the existing code. Another advantage with this approach would be that they could build a new services with the latest technologies. An alternate approach would be to break the existing agile core application into smaller services. This would require considerable code refactoring effort and was very risky considering the lack of knowledge of the code organization among developers. Changing code could break a lot of things and since the application was deployed as a monolith there was a risk of breaking things in production. Third approach would be to build new services from ground up but retain the existing agile core application till it was no longer needed. The plan was to build new services in a phased manner. Each service would be independently deployable and would implement one business capability of the agile core application with each services deployment traffic from the agile core application would be intercepted by a proxy tool and diverted to the new service. The process would continue till the agile core application was no longer needed. This approach seemed like a good compromise between the highly risky approach of refactoring code and developing from scratch approach that had low-risk but would provide business value very late. The next decision point was to confirm if the agile core application should be containerized. One of the solution architects explained why containerizing a legacy application could beneficial containerizing the application would make it portable the application and its dependencies would be packaged inside a container and the container can run on any server physical or virtual with a compatible container runtime and operating system an image would be built with the help of installation scripts that already exist. The 75 page installation guide would no longer be needed. The other advantage for the microservice would be easier scaling and faster DevOps pipeline. Another team member pointed out that containers are portable and can be deployed fairly easily. So containerization helps in the process of deploying multiple application independently in the same environment. So containerization does facilitate microservice implementation. They warned that you can take any monolithic app and build a container image out of it but it stays a monolith because any change in the application could still break the entire application. So every containerized application is not a microservice. The next step was to create a container image. One of the developers suggested that they use Docker as the containerization platform, as you already know a container is a running instance of an image. So the next step was to build a Docker image and building a Docker image, looked like a big ones and run new error approach. The development team continued to discuss that they already have installation scripts for the application and the application binaries and other files at a centralized location. So why not build a Docker image with a Docker file and include those scripts in the installation process? Docker file would also have instructions to copy latest application files and build those into the image.

Contents