Day 26 of #90DaysOfDevOps

Day 26 of #90DaysOfDevOps

Welcome back to our blog series! Today, we're diving into the deployment of a two-tier application on Docker using Jenkins. This guide assumes that Docker is already installed on the Jenkins agent.

If you haven't already, I've previously covered setting up an agent node and configuring it in Jenkins. You can find that discussion in my earlier blog post here.

Let's get started with deploying our two-tier application:

  1. Create a New Item: Start by creating a freestyle job named "two-tier-app" in Jenkins.

  1. Add Description: Provide a brief description for your job to help identify its purpose.

  2. Select Agent: Choose the agent where you want to deploy your application. For this example, we'll select "Jenkins_Agent".

  1. Choose Your Git Repository and Branch: Select the Git repository and the branch containing your application code.

  1. Configure Build Step: In the build step, add the command to build your application using Docker Compose. Use the command docker-compose up -d to deploy the application.

That's it! Your Jenkins job is now set up to deploy your two-tier application using Docker.

Consider setting up webhooks for this project to automate triggering builds upon code changes. If you're unfamiliar with webhooks, I've covered them in detail in a previous blog post, which you can find here.

For more details and to explore the code for this project, you can visit my GitHub repository here.

Stay tuned for more exciting content in our DevOps journey!