Skip to content

Deploying an ASP.NET Core web app to an AWS Linux VM and SQL Server for Linux - Will it Deploy? Episode 7

License

Notifications You must be signed in to change notification settings

OctopusSamples/WillItDeploy-Episode007

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploying an ASP.NET Core web app to an AWS Linux VM and SQL Server for Linux - Will it Deploy? Episode 7

Welcome to another Will it Deploy? episode where we try to automate the deployment of different technologies with Octopus Deploy. In this episode, we're trying to deploy an ASP.NET Core 2.0 web app to an Amazon Web Services (AWS) Ubuntu Linux Virtual Machine (VM) with SQL Server for Linux. We also explore setting up a cloud-based delivery pipeline with AppVeyor and Octopus.

Deploying an ASP.NET Core app to Linux - Will it Deploy? Episode 7

NOTE: Octopus Cloud is coming soon! Register your interest and stay up to date with our cloud-based solution.

Problem

Tech Stack

Our app is a random quote generator web app called Random Quotes. This is fairly simple, but it'll allow us to walk through how to automate the deployment of an ASP.NET Core web application with a database to an Ubuntu Linux VM and SQL Server for Linux running in AWS.

Kudos to our marketing manager Andrew who has been learning to code and built the first cut of this app. Nice job!

Deployment Target

Amazon web services logo

Solution

So will it deploy? Yes it will!

Our cloud-based delivery pipeline looks like the following:

GitHub, AppVeyor and Octopus delivery pipeline

We're committing our source code to GitHub, building our app automatically with AppVeyor, and deploying to an AWS Ubuntu VM with Octopus.

It's quick and easy to integrate AppVeyor with Octopus. We're using a custom build script to build and package our application and we configure the 'Octopus Deploy' deployment provider to deploy it.

AppVeyor build settings

AppVeyor deployment provider settings

Our deployment process looks like the following:

Octopus deployment process

  • Octopus Deploy a Package step to acquire/unzip our database scripts on the Octopus Server.
  • Octopus Community Contributed step template - SQL - Execute Script File to execute our Entity Framework Core migration script agaist our SQL Server database.
  • Octopus Deploy a Package step to deploy our ASP.NET Core web application to our Ubuntu Linux VM and configure it appropriately.

This project uses the following variables to store our app settings and database connection details.

Project variables

About

Deploying an ASP.NET Core web app to an AWS Linux VM and SQL Server for Linux - Will it Deploy? Episode 7

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published