Deploy an ASP.NET Core Web App to IBM Cloud Foundry

Gayan Kuruppu
4 min readDec 11, 2020

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.
  • If you are using Lite account the maximum memory limit is 256M. 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

  1. Go to cloud.ibm.com/catalog and enter “Toolchain”.
  2. Select Toolchain card.
  3. Scroll down to find Other Templates category and select Build your own toolchain card.
  4. 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.
  5. Click Create button to continue.

3 — Create Continuous Delivery Service

  1. Go to cloud.ibm.com/catalog and enter “Continuous Delivery”.
  2. Select Continuous Delivery card.
  3. 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.
  4. 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

  1. Click Add tool.
  2. Search GitHub in the search bar.
  3. Click GitHub card.
  4. 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.
  5. Select Existing from Repository type drop down menu.
  6. Paste URL of forked repository from your GitHub profile to Repository URL input.
  7. Select Enable GitHub Issues option.
  8. Click Create Integration button to continue.

4.2— Add Eclipse Orion Web IDE Integration

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

4.3 — Add Delivery Pipeline Integration

  1. Click Add tool.
  2. Search Delivery Pipeline in the search bar.
  3. Click Delivery Pipeline card.
  4. Enter Pipeline name. In this case Pipeline name is asp-net-core-web-app-pipeline.
  5. 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

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

5.2 — Add Deploy Stage

  1. Click Add Stage.
  2. Go to Jobs in MyStage.
  3. Click ADD JOB drop down menu.
  4. Select Deploy option.
  5. Click API key input.
  6. Click New+ button on Enter and API key model.
  7. Click OK button on Create a new API key with full access model.
  8. Click Authenticate button on Enter an API key model.
  9. 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.

You can connect with him on Medium, Twitter, or GitHub

--

--