Use specific VM only for TFS Builds - c#

I am currently building a C# Web API and publishing it to Azure. I'm using Visual Studio Online to host my TFS source control. Of course, Azure has options to use their build servers, but those are not free after your first 60 minutes of build time, and this is an educational endeavor.
Is it possible to set up a VM (or use my local machine) as the TFS build server for continuous integration? How would I go about that? My initial guess is that this is possible, and I just am not googling using the correct terminology to find what I'm looking for.
I'm not terribly savvy on TFS in depth, so please feel free to correct any incorrect assumptions I have.

You can create a Windows Server VM in Azure, and simply install TFS 2013 and when you get to the configuration wizard just choose to configure Build Server only. When it asks you for the URL to your collection, give it the URL for your VSO collection (e.g. https://foo.visualstudio.com/DefaultCollection)
Pretty straightforward to do, I've done it many times.
PS - Of course you could use an on-premise VM also, but I like the option of using a VM in Azure.

You can download and install TFS on your local server/machine: VS & TFS Download page
But if you need only build server you can use any other CI server as well (e.g. TeamCity or Jenkins) and build your code from visualstudio.com there.

Related

Docker in the big picture for complete DevOps

could someone point me to the right documents or describe how Docker would help (or what should be Dockerized) in the following scenario:
4 environments: Developer's laptop, DEV, TEST, PRO
C# web MVC application running under IIS8.
Databse running on Oracle dedicated Exadata server.
Source Control is TFS-TFS, with builds under TFS and a binary repository with rest apis. (Proprietary)
Deployment in TEST and PRO must follow a strict approval process.
with all that said, I know I am not in the most common environment for going to Docker, however I specifically selected this use case in order to get the most of the answers.
I can follow 2 path:
Either try to Dockerize the DEV environment itself, but I doubt Visual Studio can be Dockerized today? So that would leave my with running a smalle database engine in dock as well a maybe a mono instance for running the application, however I doubt developers will see an added value compared to the built-in VSS features.
I could also try to dockerize the 'run' environments, but again for IIS I am not sure Docker will do.
If the answer is "nothing will do on Microsoft stack", please switch to Java, SVN, Jenkins, RAD and WAS where appropriate, that would match some of my use cases too.
For dealing with DEV/TEST/PROD see Dockerfile and dev/test/prod environment
You may have a look at the (343) Oracle Database in container you can find in the registry hub https://registry.hub.docker.com/search?q=oracle&searchfield=
If you choose another webserver replacing IIS, it is easy to use a container with Nginx or Apache or...

How to move a WCF service layer from Azure to on-premises

Due to some (insane) limitation at my customer, I built up a WCF layer using Azure, just as a proof of concept. Now, what is a smooth way to re-deploy it to their on-premises server? Is there such a way?
I understand that the publishing of my service to the cloud is a nice luxury that can't be performed as easily when deploying on-premises. :(
Because of some (equivalently insane) limitations, I'm not able to connect my computer (with the IDE and source code) to the internal net of the customer. I might be able to get an IDE installed on their computer, though. Is moving the source code files and recompiling the only option?
In a perfect world, I'd like to copy the entire project to the customer's computer and just change some settings in a deployment file (or whatever thing stores that information). Is it possible?
Well, what about the deploying the solution to the local temp folder by using the Deploy Wizard from Visual Studio and then simply create by hands a new application on server side and copy all files there.

What do I need to do to create a self hosted NuGet feed

I would like to create a custom nuget feed at work, but the computer that I want to host it from doesn't have IIS installed and I can't get it installed either. So I wanted to create my own self-hosted feed, but I'm not sure where to start. I already have a visualSVN server running on this computer, so I know that apache is already installed. Is there a way to host a nuget feed without IIS?
You should be able to use a share. See the section Creating Local Feeds here.
So, if your share is located at \\server\nugetfeed, replace c:\LocalNuGetFeed in the example with that location.
Yes, you can have a local feed running just from a directory on the computer. Once the packages are in a folder, you then need to add that folder as a local NuGet feed in Visual Studio.
Here are a couple of links describing the process:
http://docs.nuget.org/docs/creating-packages/hosting-your-own-nuget-feeds
and this one is a bit older but still relevant I believe:
http://haacked.com/archive/2010/10/21/hosting-your-own-local-and-remote-nupack-feeds.aspx
You could install IIS Express. It could be a simpler solution worth a try if you already know you cannot put the full IIS on the machine.
Unless the same reasons you can't install IIS apply to IIS Express...
Even though it may be too late at this point, my company's product ProGet was designed for hosting private NuGet feeds and ships with an integrated web server - and it looks like the free edition will suit your use case just fine.

How to deploy a C#, MVC4 application on Azure using Git

I am developing a C#, MVC4, EF5 Code First application on .NET in Visual Studio 2012 and have used the VS publish mechanism to deploy it to an Azure Website with an Azure SQL Database.
I now want to use Git and GitHub for version control and involve others in the project.
However, although I am familiar with using Git in a LAMP environment, I have no experience of using Git with Windows, Azure Websites and a compiled environment.
I would like to use the Azure Website as the production server, another Azure Website as a Staging server, developer Windows machines using Visual Studio for development and GitHub as the central repository.
There is a helpful article here: http://www.windowsazure.com/en-us/develop/net/common-tasks/publishing-with-git/ . I can get my head around what would be needed here for, say, a PHP application on Azure. But I am unsure of the best approach with a compiled application and what I can achieve using Azure Websites and Visual Studio.
A nudge or two in the right direction would be greatly appreciated!
don't publish from VS to azure, instead setup your azure website to pull from the github repo. the deployment process compiles your solution.
watch http://www.youtube.com/watch?v=5NGieL0tinw&feature=youtu.be&hd=1 or read http://vishaljoshi.blogspot.com/2012/09/continuous-deployment-from-github-to.html
Also SocttGu announced this on his blog # http://weblogs.asp.net/scottgu/archive/2012/09/17/announcing-great-improvements-to-windows-azure-web-sites.aspx he also talks about a cool feature of publishing branches, this will nail your requirement for a stage server and production server. Have a stage branch and a production branch and merge to them as desired. see the section "Support for multiple branches"
looks like they added support for private repos finally.
appharbor is a competitor to azure that does something similar.
You are basically introducing a new step with the requirement that the source code must be compiled before it can be deployed to the server. Where you implement this step is up to you. You could:
Ensure that your target server has the capabilities to compile the source code (some Continuous Integration tools could help with this, such as CruiseControl.NET). This has the caveat that the target server be able to compile source code (possibly even requiring Visual Studio to be installed), so that may not be an option.
Check the compiled binaries into source control. You could keep these compiled binaries separate from the main source branch, to keep things clean. Deploy the binaries to the target server.
Some hybrid of the previous two options is also possible; you could set up a Continuous Integration server with CruiseControl.NET, which can check out the current source, build it, and check the resulting binary back into a special branch, then deploy that branch to your target Server.

Anyway to test the TFS Api without installing local TFS Server

I need to write a proof of concept with the TFS API (fetching data from tfs server regarding workitems and put this data in our tables).
Can Any body suggest a way to do this without setting up my own TFS Server.
You can just set up one on the MS Cloud TFS which is now on tfs.visualstudio.com (previously called TFSPreview.com.
With TFS, your code is accessible from anywhere. You can check in code
directly from Visual Studio and Eclipse, or you can use command-line
tools to check in your code from Xcode and other IDEs. Since it's all
in the cloud, your team can get started quickly with no infrastructure
to manage.

Categories

Resources