Deploy an ASP.NET Core Web App to IBM Cloud Foundry
By: Gayan Kuruppu
Tags: Aspnetcore, Ibm Cloud, IBM, Csharp, Web Development

This guide walks you through the process of deploying an ASP.NET Core 3.1 web app to IBM Cloud Foundry.

Fork this repository to your profile before getting started.

Go to deployment of the app

Follow step by step video of the tutorial

You will deploy an ASP.NET Core web app by using the GitHub asp-net-core-web-app to IBM Cloud Foundry by using continuous integration with GitHub.

The advantage of selecting IBM Cloud for application deployment over AWS, Google Cloud, or Azure is the process is simple, and you don’t need to add a credit card to activate the account.

I created an IBM cloud account, and if you don’t have an IBM Cloud account you can go to this tutorial.

1 — Add manifest.yml to solution directory

Add a manifest.yml to your solution directory as like this this file manifest.yml and push changes to the GitHub repository.

to your solution directory as like this this file and push changes to the GitHub repository. If you are using Lite account the maximum memory limit is 256M . You can use low memory, in this case I use 64M.

. You can use low memory, in this case I use 64M. Push your changes to the repository.

You don’t need to add manifest.yml, if you are using the repository https://github.com/gayanvoice/asp-net-core-web-app.

2 — Build your own toolchain

Go to cloud.ibm.com/catalog and enter “Toolchain”. Select Toolchain card. Scroll down to find Other Templates category and select Build your own toolchain card. Give a Toolchain Name and Select Region. In this case Toolchain Name is asp-net-core-web-app-toolchain and Select Region is Dallas. Refer Figure 1 — Build your own toolchain. Click Create button to continue.

3 — Create Continuous Delivery Service

Go to cloud.ibm.com/catalog and enter “Continuous Delivery”. Select Continuous Delivery card. Select Region, Select a pricing plan, and scroll down to find Configure your resource category. Give Service Name. In this case Select Region is dallas, Select a pricing place is Lite, and Service Name is asp-net-core-web-app-continuous-delivery. The Refer Figure 2— Create Continuous Delivery Service. Click Create button to continue.

4— Add Tool integrations

We have to add GitHub, Eclipse Orion Web IDE, and Delivery Pipeline to the toolchain. You can follow the official doc create-a-custom-toolchain by IBM. You can find asp-net-core-web-app-toolchain under Developer tools in Resources list.

4.1 — Add GitHub Integration

Click Add tool. Search GitHub in the search bar. Click GitHub card. If you haven’t authorized GitHub for IBM. Click on Authorize button. The site will redirect to GitHub and click on Authorize IBM-Cloud button to authorize. Select Existing from Repository type drop down menu. Paste URL of forked repository from your GitHub profile to Repository URL input. Select Enable GitHub Issues option. Click Create Integration button to continue.

4.2— Add Eclipse Orion Web IDE Integration

Click Add tool. Search Eclipse Orion Web IDE in the search bar. Click Eclipse Orion Web IDE card. This tool integration does not require configuration. Click Create Integration button to continue.

4.3 — Add Delivery Pipeline Integration

Click Add tool. Search Delivery Pipeline in the search bar. Click Delivery Pipeline card. Enter Pipeline name. In this case Pipeline name is asp-net-core-web-app-pipeline. Click Create Integration button to continue.

5 — Add Stages to Delivery Pipeline integration

We have to add Build and Deploy to delivery pipeline integration. You can follow the official doc task 3 by IBM. You can find asp-net-core-web-app-pipeline under asp-net-core-web-app-toolchain in Toolchains.

5.1 — Add Build Stage

Click Add Stage. Go to Jobs in MyStage. Click ADD JOB drop down menu. Select Build option. Click Save button to continue.

5.2 — Add Deploy Stage

Click Add Stage. Go to Jobs in MyStage. Click ADD JOB drop down menu. Select Deploy option. Click API key input. Click New+ button on Enter and API key model. Click OK button on Create a new API key with full access model. Click Authenticate button on Enter an API key model. Click Save button to continue.

6— Deploy

You can deploy the app, click Run Stage button in Build MyStage.

I hope you found this Medium guide useful! I will continue to update the steps to it as they are changed by the IBM.

Thanks for reading this article! Leave a comment below if you have any questions. Be sure to follow for the @gayanvoice on Medium and share this post with other programming enthusiasts.

Gayan is a developer and student from Colombo. He shares articles and repositories on ASP.NET Core, Java Spring, and Android.