Day23 of #90DaysOfDevOps Challenge

Day23 of #90DaysOfDevOps Challenge

CI/CD

Continuous integration and continuous delivery help in automating the software development lifecycle stages, doing bug fixes and hotfixes, faster release cycles, and isolating different environments like development, testing, staging, and production.

In CI, different developers commit new changes to the source code repo and the pipeline checks out the source code from the repository. It installs all the required dependencies, then the build stage builds the executable artifact, and required testing is performed for the application and archives it.

The CD deploys the artifact to different stages and that is how the CI-CD pipeline runs continuously.


Task-01

  • create an agent for your app.

Create a new node -

No alt text provided for this image

Provide a path to configure the Jenkins node in the Host machine -

No alt text provided for this image
No alt text provided for this image

Now click on the created agent and it will give the commands required to download the agent.jar file and connect the agent to Jenkins -

No alt text provided for this image

Now run the above commands on the machine where you are configuring the agent.

And My agent is now online -

No alt text provided for this image

  • Create a new Jenkins freestyle project for your app.

No alt text provided for this image

  • In the "Build" section of the project, add a build step to run the "docker build" command to build the image for the container.
  • Add a second step to run the "docker run" command to start a container using the image created in step 3.

Add the repo where the application code is saved and restrict the job to run on our new agent1 -

No alt text provided for this image
No alt text provided for this image

Now add the steps to build the image and run the container -

No alt text provided for this image

Build the job. The job was successful -

No alt text provided for this image

The image is ready and the container is running -

No alt text provided for this image

And my App is also running -

No alt text provided for this image

Task-02

  • Create Jenkins project to run the "docker-compose up -d" command to start the multiple containers defined in the compose file (Hint- use day-19 Application & Database docker-compose file)

No alt text provided for this image
No alt text provided for this image

  • Set up a cleanup step in the Jenkins project to run the "docker-compose down" command to stop and remove the containers defined in the compose file.

No alt text provided for this image


No alt text provided for this image
No alt text provided for this image

Thank you for reading! ??


Gajanan B.

DevOps |AWS Cloud| Git| Docker| Jenkins |Kubernetes| Terraform| Ansible| Linux| Python| Mainframe

1 年

great share Aishwarya keshri

要查看或添加评论,请登录

Aishwarya keshri的更多文章

  • Day26 of #90DaysOfDevOps Challenge

    Day26 of #90DaysOfDevOps Challenge

    Jenkins Pipeline: Jenkins Pipeline is a suite of plugins that supports implementing and integrating continuous delivery…

  • Day24 of #90DaysOfDevOps Challenge

    Day24 of #90DaysOfDevOps Challenge

    ??Project: Containerise and deploy a node.js application using Jenkins Job.

  • Day22 of #90DaysOfDevOps Challenge

    Day22 of #90DaysOfDevOps Challenge

    ??Jenkins Jenkins is an open-source tool that helps in creating pipelines and automating the software development…

  • Day21 of #90DaysOfDevOps Challenge

    Day21 of #90DaysOfDevOps Challenge

    Important interview questions and Answers for Docker: 1. What is the difference between an Image, Container and Engine?…

  • Day20 of #90DaysOfDevOps Challenge

    Day20 of #90DaysOfDevOps Challenge

    Docker Cheat Sheet: ??Docker images- Show all locally stored top-level images: docker images Pull an image from a…

  • Day 19 of #90DaysOfDevOps Challenge

    Day 19 of #90DaysOfDevOps Challenge

    Docker Volumes When we are working on docker, the data we store gets lost when the container is destroyed. So, to…

    2 条评论
  • Day 18 of #90DaysOf DevOps Challenge

    Day 18 of #90DaysOf DevOps Challenge

    ?Docker Compose Using docker commands, we can only run and manage a single container at a time, but there can be…

  • Day17 of #90DaysOfDevOps Challenge

    Day17 of #90DaysOfDevOps Challenge

    Dockerfile: Instead of manually creating docker images by running multiple commands one by one, we can write a script…

    1 条评论
  • Day 16 of #90DaysOfDevOps Challenge

    Day 16 of #90DaysOfDevOps Challenge

    ?Docker: Docker is a containerization tool that helps us create a lightweight container with all the required packages…

  • Day15 of #90DaysOfDevOps Challenge

    Day15 of #90DaysOfDevOps Challenge

    ?Python Libraries: The collection of modules used in Python while writing different programs is known as libraries…

社区洞察

其他会员也浏览了