This guide walks you through the process of deploying an ASP.NET Core 3.1 web app to IBM Cloud Foundry.
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.
- 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.
- 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.
- 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.
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 task 2 by IBM. You can find asp-net-core-web-app-toolchain under Developer tools in Resources list.
- 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.
- 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.
- 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.
We have to add Build and Deploy to delivery pipeline integration. You can follow the official doc create a custom toolchain task 3 by IBM. You can find asp-net-core-web-app-pipeline under asp-net-core-web-app-toolchain in Toolchains.
- Click Add Stage.
- Go to Jobs in MyStage.
- Click ADD JOB drop down menu.
- Select Build option.
- Click Save button to continue.
- 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.
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.