How to manage approval and production environments with Team Services?

Asked

Viewed 955 times

9

I’m on an ASP.Net C# project that’s starting now, but I come from ASP Clássico, where things are very different.

In this new project we need to create and manage approval and production environments, where the changes must go to the approval environment, tested by another team, and after approved, go to the production server.

The way we did it in ASP Clássico was simply to have two domains, with distinct FTP, and after approved in the homologation environment, we copied the files from one FTP to the other, so that it is available in production.

No . Net I was introduced to Team Services, but I confess that I still don’t quite get the hang of how it works and if he can help me in this seemingly simple problem.

My question is: How Team Services works and how it could help me in this version and environment control?

2 answers

8


The best introduction is this one.

In projects that use Git, a good practice that is becoming common is not performing commits and pushes in the branch master: this branch is usually used for continuous integration, i.e., each time new code is sent or merged (merged) in master, there is a feature that can be activated so that the project is tested and published alone.

For teams, other teams should be created branches representing or working flows (dev, Refactoring, layout, etc.) or new functionalities ("new resource-name1", "old-resource-refactore2", etc.). When the functionalities are completed, the merge for master and, depending on the configuration, the integration service continues to move the project up to a testing instance or even production.

TFS has the same feature.

In addition, there are a number of tools offered that are inherent to a project development effort, such as Backlog, productivity tools, and integration with other cloud services.

With this, the idea of using FTP is simply outdated. For example, in an ASP.NET MVC project with Entity Framework, the database update is done automatically by a process called Web Deploy, which also has the function of publishing the code on the application server.

  • 1

    I already used (Git and TSF) if I chose GIT.

  • 1

    @Marconcíliosouza We are two.

  • I guess I’m the only one who finds the TFS better than GIT. If you’re going to use Team Services fully then...

  • It has nothing to do with the question but for the comments. Now MS calls TFVC.

  • @Randrade The problem with TFS is the merges, young. I liked it too, until I had to work with separated Features.

  • @Ciganomorrisonmendez I never had a problem with it. I have problems with VS + Git on this issue, but this is because of VS and not GIT.

  • Sorry to be so raw on . Net, but I’m still having second thoughts. Let’s say my production server is in production.com.br, and the changes need to be published for analysis before going into production...TFS (or Git) would do something like producao.com.br:5506, or would I have to create a development.com.br and point to the unapproved files? I’m really starting at . Net, so I’m having these doubts.

  • I would make a branch for production.com.br and other for development.com.br, both with continuous integration. When a development step ends, you do an operation of merge to the branch development. The code goes up by itself. You test. Being everything ok, you do another merge, this time from branch development for the branch production.

  • I understood...it was very clear now. Thank you @Ciganomorrisonmendez

Show 4 more comments

3

Completing Gypsy Morrison’s Response,

To manage and deploy multiple environments you can use Release Management https://www.visualstudio.com/team-services/release-management/

Here we work as Gypsy commented, we have a master branch where we have a Build Definition with a Trigger pointing to this master branch. Every checkin that is done on this branch is the trigger to queue a build. Upon completion of the entire build the team receives an email notification.

inserir a descrição da imagem aqui

And we also have a Release Definition where Trigger is precisely our Build Definition. With each build successfully completed is launched our release which is quite simple, just makes a publication of the application on the server.

inserir a descrição da imagem aqui

But with Release Management you can set up much more details such as publishing in various environments, which await approval and when approved are published in the next environment. For example, publish in an approval environment, upon being approved for a pre-production environment, upon being approved, publish in production.

You can also run various processes such as testing or even run local commands on the servers for environment adjustments.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.