How do I deploy a .net Core App from my Mac to Amazon AWS (Ubuntu) - visual-studio

I've created an C# app on my Macbook using Visual Studio Community edition, and would now like to deploy it on AWS.
While I could setup a windows machine on AWS, I want to challenge myself and try it on Linux.
Although I see a lot of tutorials saying you need to setup core yourself on the server, I think this is no longer necessary as it appears AWS can set this all up for you:
AWS Image:
So assuming I just do that, and now I have my server up, what happens next?
I know that I could use puTTY or FTP or something to move the files to the server, but is that the recommended approach? I read you can use 'dotnet publish" with arguments to create the package to deploy but still seems a bit archaic and time-consuming unless I make a script. Visual Studio for Windows allows much more robust publishing options, such as publishing directly to the server, but for Mac, what are the options to do this in a more robust fashion? What are others doing?
Thanks so much!

https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-2.1&tabs=aspnetcore2x
A good way of getting your code inside is SSH and git clone your repository.

Related

Why is latest Xamarin needed on local TFS server for CI?

The requirements on the following page state that you need to install Visual Studio with Xamarin on your local TFS server to setup Xamarin CI builds:
https://developer.xamarin.com/guides/cross-platform/ci/intro_to_ci/
topography of the CI
This is a real pain. We have lots of developers that rely on our local TFS server, most of whom don't do any Xamarin development. As such, any changes are heavily scrutinized. This often leads to us not installing the latest VS/Xamarin releases, as it's considered too risky for this vital bit of infrastructure.
We could have a Windows build machine with VS and Xamarin installed, that is connected to a Mac build machine. We'd be free to update the Windows and Mac build machines regularly, without the fear of compromising the TFS server. Is this possible? If not, why not?
Thanks in advance.
That diagram can't be right. There is no reason why you'd need VS or Xamarin installed on your TFS app tier.
I think it's showing a simplified configuration where the Windows build agent is installed alongside the app tier. That is a supported setup but is never, ever recommended by anyone, for exactly the reasons why you don't want to do it.
The diagram is simplified. You don't need to install anything on your TFS server. What you do instead is to install a Build Agent on a separate machine or virtual machine.
The installation details for the TFS 2017 / VSTS build agent v2 can be found in the official visual studio documentation.
The procedure is similar for both TFS and VSTS, where you generate an access token in TFS/VSTS, then simply enter the url for the TFS/VSTS instance when running the build agent install script, along with the access token.
There are build agents for Windows, Linux and macOS, so it is up to you how you configure how iOS builds are made.

Setup CI Environment Using TFS and Amazon EC2

Can someone recommend a good approach for setting up a CI environment that would deploy to a multiple websites (QA/PROD) hosted on Amazon's EC2 while using TFS?
Here are the requirements I'm looking to fulfill:
Have TFS deployed somewhere to track tasks, manage source control, run tests on code check-in and do automatic deployments to a QA environment.
If everything passes the CI build in TFS, code should be automatically deployed to a QA environment hosted in Amazon EC2.
After testing, take the same deployment package we used for the QA environment and push it to an identical environment in EC2 which is our production environment.
We are a start-up so we don't need all the of bells and whistles just yet. We have limited resources currently so I am trying to be as minimal as possible while meeting the above requirements.
My first pass at this was to use the free program at Amazon for first-time users to have access to the EC2 cloud for free for 12 months. Then to setup a virtual machine at a low cost (~$20) with a web host to host our TFS environment which would then push to the Amazon cloud.
We also considered using "Visual Studio Online" to do this but it looks like it only deploys to Azure which is a little more than twice the cost to host a website with SQL on than Amazon so we don't want to go that route.
Is this a good approach? I'd appreciate any feedback. Thanks!
Using the latest TFS vNext build system this should be possible. You would need to install the AWS command line tools via npm, load your credentials, and then use aws command line to deploy to ec2.
Here is a screen shot of adding an npm task. Install the aws command line sdk. Run commands to package and upload your project.
You should install Release Management for Visual Studio 2013. It is easy to install and comes with your MSDN.
http://nakedalm.com/install-release-management-2013/
With it you can create a release pipeline with rollback to deploy your application. You will likely need to add any command line tools that you need to deploy to amazon and it will make sure they get to where they need to be.
http://nakedalm.com/building-release-pipeline-release-management-visual-studio-2013/

How do i share my asp.net code with my team without using a server?

I'm working on asp.net project using VS2010.
I want to share my project code with one of my team member who is at some other geographical location but as we don't have a server we are not able to use TFS.
Can anyone tell me how can I share my code?
Or somehow can I use TFS on my local machine (or any other VS extension) and share it with him?
So that by using internet we can share our code with each other with help of any tool like TFS?
I would however recommend that you use TFS Preview to achieve this as it is free and provided all of the same goodies as having a local server without the need to run even a local server.
However if you must have local storage you can use TFS Express. It is free and will run just fine on your local computer. All you then need to do is expose your computer over HTTP and you are good to go.
Have you considered using distributed version control such as Mercurial? I do not know whether these systems can run serverless, nor do I have personal experience using them, but I've heard good things about the concept.

What's the best workflow for an Azure virtual machine (Windows)?

I'm developing a Socket.IO application with a MongoDB database. For various reasons I am developing the application to run on a Windows virtual machine within Azure. Setting everything up was fairly painless and I now have a basic application within the cloud. However, I am unable to find a comfortable workflow. I want to be able to push changes to the virtual machine (as if I was on *nix system using git) and I'm not sure how best to do this.
So you can use Visual Studio to develop along with Github for Windows.
For something familiar to Linux, you may want to try Cloud9 IDE, which is an IDE in a browser that also makes it easy to connect to your github or bitbucket accounts. It actually supports the basic git commands along with some basic debugging.
The Cloud9 IDE is not quite as advanced as Visual Studio. But it's very focused for node.js and I have been enjoying it quite a bit for my personal projects.

Getting an ASP.Net application on an Apache Server

I know this sounds like a long shot, but is this possible? I'd like to do this without using Mono so I can use Visual Studio and have all of the latest nitty gritties. I'm just not a fan of Windows Server; I feel more powerful using a command line in Linux, especially with Amazon ec2.
You can still use Visual Studio with Mono.... If you compile your code in Windows with Visual Studio your assemblies will run on Mono.
So you could easily deploy an EC2 Linux instance and setup your website with Apache2 and mod_mono. Then upload all of your assemblies and template files to your EC2 instance and you will be in business.

Resources