Using On-premise TFS 2018. Looking for advice to build and deploy multiple tenants to IIS with the below structure. We are using GIT for the source control.
Each tenant is a customized 'clone' of a .Net Core 2.0 website. It shares some basic functionality through assemblies, but offers per-tenant customizations.
Each tenant has its own Visual Studio 2017 sln and csproj file. For now the solution references the shared assembly directly (as we are not as yet using nuget for our shared assemblies).
The structure is:
Tenants (GIT repository)
L Share Assemblies
L assmbly1.csproj
L assmbly2.csproj
L Projects
L PRJ1
L PRJ1.sln (prj1.csproj, and customized files)
L PRJ2
L PRJ2.sln (prj2.csproj, and customized files)
L PRJN
L PRJN.sln (prjn.csproj, and customized files)
What I am interested in is advice on how to deploy (via continuous deployment) to tenants that 1) have changes at the project level, and 2) tenants that use shared assemblies that have changed.
We have the potential for our tenants to grow very large, so we don't want to deploy all tenants on each build.
Is there a way to filter so we only deploy tenants that have changes?
Thanks
One option would be to use a separate environment for each tenant and add an approval to deploy to the environment.
Other option could be have one environment and many phases, one for each tenant. I prefer the first one.
Another one could be to have a file and create a powershell script to create a loop and deploy for each tenant. This one is more complex to implement.
Related
I am installing TFS 2018 on premises and I want to try to enforce some logical folder structure where all of the deposit related projects\development are in the Deposits folder. All of the lending in Lending etc. etc.
I created two collections one for testing of the tfs installation and a production collection. It seems you can only create Team Projects in a collection. Is there no way to create a hierarchy?
Or how about a sub project? I don't want to have a team project for every single task. Some tasks are tiny while others are large multi programmer projects. And if I create a Team project for say Deposits and have folders for each task\project then won't I lose the extensive amount of ALM features for projects? I mean, won't they comingle when they are all under one project?
I must be missing something. Even sourcesafe allowed you to create a working folder. thanks
Hierarchies are established within team projects. A team project is a portfolio of related applications.
Use teams, iterations, and area paths within a single team project for organization of work items. Iterations define your schedule for work, and area paths allow for organization of work items for filtering and assignment to specific teams.
For source code, if you're using TFVC, you can either create folders within a single team project and enforce access via security settings, or create separate team projects for each unrelated suite of applications.
A typical TFVC structure within a team project would be something along the lines of
$/MyTeamProject
/ApplicationX
/Main (trunk)
/Dev (branch from Main)
/ApplicationY
/Main (trunk)
/Dev (branch from Main)
Or if ApplicationX and Y are related and need to be branched together, you invert the structure:
$/MyTeamProject
/Main (trunk)
ApplicationX
ApplicationY
/Dev (branch from Main)
ApplicationX
ApplicationY
For Git, you can either keep unrelated applications in separate repositories, or adopt a monorepo approach. Each approach has advantages and disadvantages and will require you to do some research to decide which one fits your use-case.
I am new to VS Team Foundation Server 2015 and there I have project for example "WebProjectA". I also have MVC .NET Project called "WebProjectA".
How to manage that project in TFS when I have 3 environments (Development, Testing, Production) ?
Need I have 3 TFS Projects
WebProjectA_Development
WebProjectA_Testing
WebProjectA_Production
Or can I place all WebProjectA solutions to one VS workspace or 3 workspaces and somehow to link it to the TFS and have version system enabled per solution in one TFS project ?
How do you solve this situation ?
I would handle this using a TFS branching structure. Create a single Team Project, called WebProjectA, and a single branch called Testing. Then, branch off for Development, and again for Production. This means that, when you make a change in development, you can merge through to testing, and again into production.
It also gives you the flexibility to switch to feature branching at a later date, and to maintain multiple production branches, should you wish to.
Further reading
I have a web application (C# and Angular). There are two folders called "Views" and "Resources" which will be different for each customer. I would like to have them all under TFS. Any suggestions?
I would create a single set of Views and Resources that excersize the functionality that you are building for all customers.
You should use an automated build to package your vanilla site and deploy it to your development server continuously. Ideally you should package your vanilla site as a zip or Nuget package.
Then, in a separate folder (TFVC) or Repo (Git), you create a resource/view set for a customer. Have your solution pull the packaged vanilla site and unpack it (so it'snot under source control here) and let'syou run the site for development.
Package and publish each customers customisations along with the vanilla site.
Now when you go to ship to a customer you can have a script that pulls the vanilla+customer packages and deployes the site.
If you want you can publish the bits to a known and accessible location and have your site self update.
You might also leverage the release management tools to deploy.
In our current setup, we have a top level TFS project and all the projects within in as separate folders with their Dev and Main branch.
To start trying VS Team Services, I am looking into migrating just a folder(Project) from TFS 2013 on-premise project to Team Services. Can I do that?
The options I am getting are to choose the project collection but not the folders within it? Is there a workaround for that.
It is not. You need to migrate everything as is.
If you want that level of control you need to use the TFS Integration Tools. They are a lot more configurable, and complicated to boot.
I would recommend that you move with only the head/tip.
I've recently installed and started using TFS. Mainly using for source repository initially and then will get into using the Work Item features. I'm moving from using Vault as repository and have some questions on best practices for setting up the project structure.
My current structure from Vault is:
Projects
- CustomerName1
-- Application1
-- Application2
- CustomerName2
-- Application1
-- Application2
Can I have a smiliar structure in TFS? Is there any good documentation that has real examples and
instructions on how to set this up? From what I see is all real basic and the books I have don't have real-life repository examples that mimic the structure I have.
I have created a new Team Project called CustomerName1, then added other Team Projects, Application1, underneath CustomerName1. However, I lose on the Application1 the separate folders like Work Items, Documents, Reports, and Builds.
So this doesn't appear set-up correctly.
Thanks ...
A few questions for clarification.
Do you have any shared assemblies between Customer1 and Customer2? If so, put a single Team Project and then add sub-folders in source control explorer for Customer1\App1, Customer1\App2, etc, etc. Also a shared libraries or some such parallel to the CustomerX folders.
Do you have an existing branch/merge strategy?
You will have shared SharePoint sites, Builds, WorkItems, Reports, and Documents by default for the Team Project. You will have shared TFS Databases in SQL (effecting WorkItem numbers) for Team Project Collections.
You can, however, set permissions for any user/group to folders via Source Control Explorer.