« DevOps Concept » : différence entre les versions

De Marijan Stajic | Wiki
Aller à la navigation Aller à la recherche
Ligne 33 : Ligne 33 :
== Containers ==
== Containers ==


'''To save time''' and '''avoid problems''' about installing and configuring various '''libraries and dependencies''', we can use '''containers'''. By using containers, we can '''create a template''' and apply it to each server. Docker, for instance, enables this capability with creating a Dockerfile and build this image on every server.
'''To save time''' and '''avoid problems''' about installing and configuring various '''libraries and dependencies''', we can use '''containers'''. By using containers, we can '''create a template''' and apply it to each server. '''Docker''', for instance, enables this capability with creating a '''Dockerfile''' and build this image on every server.


Another benefit of using containers is the ability to '''run multiple instances of the application''' on the same server. This allows us to perform multiple tasks simultaneously.
Another benefit of using containers is the ability to '''run multiple instances of the application''' on the same server. This allows us to perform multiple tasks simultaneously.

Version du 20 mars 2024 à 17:41

Concepts

Here are some important concepts.

Git

Imagine you have a company with several developers, all of whom are working on their own environments but on the same codebase. To avoid problems like when two people are working on the same file, we can use Git.

Git helps all developers to work on the same application simultaneously and collaborate efficiently. You can configure project organizations and define different access levels for each group and user.

There are other similar platforms like GitLab or Bitbucket that serve the same function.

To summarise, Git is the command-line tool used to facilitate collaboration among multiple developers, and GitHub is the Git-based publicly accessible repository where you push and find your code. With GitHub, you can share your project with others along with documentation, and people can contribute to your project as well.

Three-step process

The production deployment is divided into three stages :

  1. First, the development phase. Here, you must develop your application ;
  2. Next, the build phase. In this stage, you build your application to execute it ;
  3. Finally, the production deployment phase. This is where you can deploy your application into production.

In fact, the common workflow is as follows:

  1. Developers work on their development environment and push their changes to the Git server ;
  2. Next, they build the code into an executable and manually copy the executable to the test server to check if everything is okay (no bugs, works well, etc.).
  3. Once everything is verified, they move it to the production environment.

To automate these tasks and save time, there are applications such as Jenkins, GitHub Actions, or GitLab CI/CD. These tools handle tasks such as building the executable, pushing it to the test server for verification, and deploying it to the production server.

The important thing is that all of these parts need to be configured in the same way using the same tools, for example, if all of them are using Python, Java, and Ruby for example.

Containers

To save time and avoid problems about installing and configuring various libraries and dependencies, we can use containers. By using containers, we can create a template and apply it to each server. Docker, for instance, enables this capability with creating a Dockerfile and build this image on every server.

Another benefit of using containers is the ability to run multiple instances of the application on the same server. This allows us to perform multiple tasks simultaneously.