Wednesday, November 29, 2017

Deploying the .net core application on Cloud Foundry






  1. Getting registered with https://login.run.pivotal.io/
  2. Download and install the cli for Windows Url : https://docs.cloudfoundry.org/cf-cli/install-go-cli.html
  3. Open the cmd and login with credentials used in step 1



Provide the password.



We are connected to the cloud foundry.
we will create the .net core application by using the visual studio code,before that we need to install .net core. Follow the below steps.
Install the .Net Core SDK. An installation guide can be found here: https://www.microsoft.com/net/core
Please install the .NET Core  SDK version of  is 2.0.3
 The SDK can be found on https://www.microsoft.com/net/download/core#/current. Download and install the SDK that fits your OS.
Install the Visual Studio code. Url : https://code.visualstudio.com/Download
Open the cmd and install the project for MVC. Find the below commands which helps creating the mvc project and restores the .net core project.
command: dotnew new mvc -au none -o aspnetcoreapp



Open the visual studio code Terminal and run the below command.
command: Dotnet run



The application is running local on 5000 port.



Now the application is running local and  deploy this application to the cloud foundry.
Command: cf push c:\dotnetcore\aspnetcoreapp

The status can be seen the below screen shot.

Check the deployed status at the cloud foudary portal.


Click on the high lighted url and you would be directed to the deployed application.

I have clicked on the other links and it works as expected.