Plan the Deployment

Converting a monolithic application to a microservice architecture involves containerizing your monolith application as a docker image, and then making that image available in any source code repository, such as GitHub, GitLab, or Bitbucket.

  1. Create containers for your monolithic application

    After housing your application’s code in a source code library, such as Bitbucket, GitHub or Gitlab, download the source code to your local machine.

    After the download is complete, issue the Docker command to create the Docker image. After the Docker image is created, create a repository in Oracle Cloud Infrastructure Registry (OCIR) and issue a Docker push command using authentication credentials to store the images in OCIR.

  2. Deploy your monolithic application in your containers

    Create an Oracle Cloud Infrastructure Container Engine for Kubernetes (OKE) cluster and then deploy the Docker image that you pushed to the OCIR to the Kubernetes cluster. Create an application load balancer to route the traffic through port 80 and to distribute requests. The architecture below is containerized, but still monolithic because each container has all the services.



    apps-aggregate-services-arch-oracle.zip

  3. Break out the monolithic application

    The end user makes a request, the load gets distributed by the load balancer, and the REST calls are routed accordingly. In the diagram below, we have separated each service or application process to run independently on each container. For example, the Authentication Service runs in its own container as do the Users service and the Analysis service. There is a complete isolation between these services which you can update or modify independently, based on your current requirements.



    apps-multiservices-arch-oracle.zip

  4. Deploy the microservices

    In this final step, you deploy the microservices and safely transition the application’s traffic away from monolithic application instances.

    1. Start the microservices and switch the incoming traffic by updating the respective URLs.
    2. Adjust the load balancer to route the traffic to the updated URLs.
    3. Finally, shut down the monolithic application instances. Observe and monitor the traffic and requests coming in and ensure that the application is working well in the new environment.


    update-rest-uri-oracle.zip