Running .Net Applications in Oracle Cloud Infrastructure Quickly and Easily

February 16, 2022 | 3 minute read
Text Size 100%:

We’re pleased to announce a new Quick Start solution that demonstrates how to quickly set up an automated deployment pipeline for ASP .NET applications on Oracle Cloud Infrastructure (OCI).

Quick Starts are complete solutions that you can deploy quickly on your OCI Free Tier or trial account. They let you try real solutions while learning about the services and capabilities in OCI. This solution shows you how to build and deploy .NET applications quickly on OCI using Windows instances.

The solution

The Quick Start solution provides the automation to provision the resources in your tenancy to host a .NET application. OCI supports several industry standard resource management tools such as Terraform and Ansible. In this Quick Start, you use Terraform to create and manage the Windows-based .Net environment.

OCI provides a managed Terraform service called Oracle Resource Manager. This free service makes it easy for teams to work with Terraform by integrating directly with various source control systems, providing infrastructure automation and managing the Terraform state. Oracle Resource Manager can help package Terraform configurations as stacks, which create and manage infrastructure components in a user-friendly and wizard-driven manner. Developers can apply the same steps presented here to build their own stacks for easy, consistent, and repeatable deployments.

This .NET Quick Start solution is open source, which enables you to use it as a sandbox or starting point for more complex deployments. The Terraform automation manages the components and is packaged as a reusable stack that you can later use to modify the topology and configuration. You can run the Terraform code published on GitHub in multiple ways. For a quick deployment, you can use the deploy button, which uses the Oracle Resource Manager. You can also choose to deploy the solution directly through the Terraform CLI in your development environment or in the Oracle Cloud Shell.

Expressing infrastructure as code using the methods described in this example gives you repeatability and consistency in your infrastructure and application deployments.

The solution architecture

This solution showcases a simple ASP.NET application, and provides the scaffolding for the following capabilities:

  • Create the target infrastructure using automation

  • Automate the build process based on source control triggers

  • Deploy the application after a build to the target infrastructure

To demonstrate build and deployment automation while keeping dependencies to a minimum, this project uses GitHub workflows as the build and deployment tool. You can run the same processes or commands from any build and deployment system to get similar results. In this example, the build is triggered by a commit to the repository or a pull request. When triggered, the workflow builds the application. The built binaries are packaged, and Terraform updates the infrastructure and deploy the application. The OCI API keys are managed as GitHub secrets.

The example application is a simple ASP.NET sample that you can replace with your own applications of any complexity. The processes to automate the build and the deployment of the application remains the same and is the core focus of this project.

A graphic depicting the example architecture.

You can run the solution using either GitHub workflows or the Oracle Resource Manager. To deploy this solution using Oracle Resource Manager, click the deployment button to start the deployment in your OCI tenancy.

Next steps

To learn more about the architecture, the automation tools and to build your own cloud native deployments, head over to the Quick Start GitHub repository. You can also evolve your deployment to production scale using the advanced deployment patterns provided in our reference architecture, published in the OCI Architecture Center. The OCI Architecture Center provides a catalog of cross-product reference architectures, solution playbooks, and best practices.

If you don’t already have an Oracle Cloud Infrastructure account, you can get started using either the Oracle Cloud Free Tier or a 30-day free trial, which includes US$300 in credits to get you started with a range of services, including compute, storage, and networking.

Join the conversation!

If you’re curious about the goings-on of Oracle Developers in their natural habitat, come join us on our public Slack channel! We don’t mind being your fish bowl 🐠

Jeevan Joseph


Previous Post

Creating, Building, and Invoking a Function on OCI with Terraform

Lucas Jellema | 6 min read

Next Post


Interacting with OCI Object Storage using Go SDK: First Steps

Lucas Jellema | 13 min read