Developing And Deploying Applications On AWS

3y ago
58 Views
2 Downloads
892.40 KB
43 Pages
Last View : Today
Last Download : 3m ago
Upload by : Francisco Tran
Transcription

Developing and Deploying .NETApplications on AWSJuly 2020

NoticesCustomers are responsible for making their own independent assessment of theinformation in this document. This document: (a) is for informational purposes only, (b)represents current AWS product offerings and practices, which are subject to changewithout notice, and (c) does not create any commitments or assurances from AWS andits affiliates, suppliers or licensors. AWS products or services are provided “as is”without warranties, representations, or conditions of any kind, whether express orimplied. The responsibilities and liabilities of AWS to its customers are controlled byAWS agreements, and this document is not part of, nor does it modify, any agreementbetween AWS and its customers. 2020 Amazon Web Services, Inc. or its affiliates. All rights reserved.2

ContentsAbstract .5Introduction .6Working with Different Variants of .NET .6Running .NET Applications in the AWS Cloud .10Choosing a Host Operating System .11Building Monoliths or Microservices .11Migrating and Rehosting .NET Applications .13Modernizing and Replatforming .NET Applications .17Storage Solutions for .NET Applications on AWS .21Artificial Intelligence and Machine Learning with .NET .22Developing .NET Applications.23AWS .NET SDKs .23AWS Toolkit for Visual Studio .24AWS Toolkit for Visual Studio Code .24AWS Tools for PowerShell.25Test Tools .25Continuous Integration and Continuous Delivery .25Infrastructure as Code.26Using AWS Developer Tools .27Seamless Integration with Azure DevOps .30Security and Operations .32Application Security .32Monitoring .37Conclusion .42Contributors .43Document Revisions.433

4

AbstractAs the standard application development framework for Microsoft Windows, developingand deploying .NET applications on Amazon Web Services (AWS) is a key activity tohelp organizations achieve the scale and agility offered by cloud computing.Whether it’s migrating legacy .NET Framework applications or creating modernmicroservices using .NET Core, AWS offers a wide range of end-to-end services, toolsand solutions for application development, deployment and maintenance, and continuesto be a preferred platform to run traditional and modern .NET applications.This paper focuses on introducing the AWS tools and services that are directly suitedfor .NET development and deployment. It serves as a starting point for .NET architectsand developers who wish to develop, build, deploy and maintain their applications onAWS. It describes the approaches that can be used to deploy .NET applications onAWS, and details the options, choices, and services that can help readers get the mostbusiness value from their cloud-based .NET workloads.5

IntroductionDeveloping and deploying applications are critical aspects of providing modernorganizations with new and innovative services while helping them maintain andoperate their existing capabilities. Although there are an increasingly diverse set ofapplication development technologies, .NET has been the de facto standard forWindows since it was first released by Microsoft, and with a growing ecosystem ofalternative .NET implementations, it is increasingly being chosen for a variety of crossplatform workloads.Nonetheless, no application is an island, and .NET applications not only depend onenvironments to execute in, but also require a plethora of additional services, including,but not limited to, relational databases, queuing middleware, authentication andauthorization services, file storage, networking, caching, and a variety of operationalmonitoring and logging services.AWS provides a reliable, scalable and global infrastructure platform with a broad set ofglobal cloud-based services. With over 200 services that can be provisioned quicklywithout upfront capital expenses, AWS provides the ideal environment to not onlydeploy existing .NET applications, but also to create new, modern and innovative .NETapplications.This paper focuses on the key AWS services for developing and deploying .NETapplications. For information on the full range of services, refer to the homepage on theAWS website.Working with Different Variants of .NETGiven the wide variety of .NET implementations, each of which provides slightlydifferent capabilities and packaging tools, it’s useful to understand the key differencesbetween the implementations to understand the full set of options and how best to run.NET applications on AWS.Page 6

Amazon Web ServicesDeveloping and Deploying .NET Applications on AWSFigure 1: Common variants of .NET.NET FrameworkThe .NET Framework is the original implementation of .NET and exclusively runs onWindows. Although it is closed-source there are many open-source projects developedon top of it, including the ASP.NET MVC, Entity Framework, and Enterprise Library.Since it has been around for a long time, most legacy and existing .NET applicationsare developed for the .NET Framework, and it also has the richest set of libraries,assemblies, and an ecosystem of packages.One of the key challenges for .NET Framework applications is that backwardcompatibility can be broken by changes in the framework and programming techniquesacross different versions. There are a number of different versions, some of which arein-place updates for previous versions and cannot be installed side-by-side. Therefore,a server hosting an application running on an earlier version of .NET Framework, mayor may not be able to host applications that need newer versions at the same time.NET Framework is primarily used for monolithic applications, and with .NET Core set toofficially replace the .NET Framework when .NET 5 is released1, it is no longerrecommended for new applications.You can run .NET Framework server applications in two ways:1. Directly deployed on a Windows server2. Running inside a Windows container7

Amazon Web ServicesDeveloping and Deploying .NET Applications on AWSBoth methods are supported on AWS, and in later sections of this paper, we discuss thevarious deployment methods and tools suitable for running .NET Frameworkapplications.MonoThe Mono project was launched shortly after the .NET Framework, and provides anopen-source, cross-platform implementation of the .NET Framework. Supporting both32- and 64-bit systems on various architectures, Mono runs on a wide variety ofoperating systems, including: Android, BSD, Linux, macOS, Solaris, Sony PlayStation 4,and Windows.With Mono version 6.4 supporting C# 8 and many features from the .NET Framework4.7, it is increasingly used in niche use cases when cross-platform applications requirespecific capabilities not available in .NET Core.You can run Mono applications on AWS using Amazon Elastic Compute Cloud(Amazon EC2), and containers, and it can run on Windows and the Linux operatingsystem.XamarinSpawned as an offshoot from Mono for mobile development, Xamarin provides anumber of tools and libraries for developing GUI applications for a variety of operatingsystems, including Android, iOS, macOS, tvOS, watchOS, and Windows.Given its use for developing mobile applications, one of the key AWS services thatsupports Xamarin development is AWS Device Farm, a service for testing Android andiOS applications on a variety of physical devices, including phones and tablets.Xamarin also implements the .NET Standard. Although it predominately runs on enduser devices, you can run Xamarin applications on AWS using Windows running onAmazon EC2, or within Amazon Elastic Container Service (Amazon ECS) or AmazonElastic Kubernetes Service (Amazon EKS) containers.UnityUnity is a cross-platform game engine supporting a wide range of platforms, and can beused to create 2D and 3D games. It uses Mono as a scripting engine, and supports.NET Standard 2.0.8

Amazon Web ServicesDeveloping and Deploying .NET Applications on AWSAlthough Unity client applications, by their very nature, run on end-user devices, youcan run Unity applications on Windows and Linux hosted on EC2. Additionally, sincemany modern games provide multiplayer options and rely on various online services—for example, for storing scores—you can also use Unity with the Amazon GameLiftgame server hosting, or other tools described on the AWS Game Tech webpage.Although it’s predominately used for games, Unity’s growing popularity for creating XRcontent—including Virtual Reality, Augmented Reality, and Mixed Reality—means itsincreasingly finding use for architecture, design, and engineering applications.NET Core.NET Core is a modern, open-source, cross-platform implementation of .NET, and runson Windows, Linux and macOS. However, although .NET Core provides many of thesame interfaces and method signatures as the .NET Framework, there are a variety ofdifferences, making it potentially difficult to migrate applications from the .NETFramework to .NET Core.Although there are some limitations for migrating existing .NET Framework applicationsto .NET Core, this can be simplified by checking compatibility using the .NET PortabilityAnalyzer, and by using the Windows Compatibility Pack.NET Core is the recommended platform for modern scalable and high-performanceapplications, and, unlike .NET Framework, its design makes it ideal for targetingmicroservices architectures. You can run .NET Core applications on AWS as directdeployments on Windows or Linux EC2 instances, on Windows or Linux containersrunning on EC2 instances, serverless Linux containers running on AWS Fargate, orserverless AWS Lambda functions. These services are discussed in more detail in latersections of this paper.NET StandardMicrosoft initially created Portable Class Libraries (PCL) to allow libraries to be sharedacross different implementations of .NET. However, since .NET Core introduced someadditional cross-platform constraints, a new way was needed to share libraries acrossdifferent .NET implementations so Microsoft created the .NET Standard which defines acommon subset of libraries available in all compliant .NET implementations.Although the .NET Standard is constantly evolving and now has multiple versions, bydeveloping libraries against a specific version of .NET Standard you can ensure DLLs9

Amazon Web ServicesDeveloping and Deploying .NET Applications on AWScan be reused in all flavors of .NET that support that version of .NET Standard, with noneed to change the code or recompile.Running .NET Applications in the AWS CloudThe AWS Cloud provides a number of benefits, including elasticity, scalability, andflexibility, but many legacy applications were designed with the server hardware andinfrastructure being critical aspects of the application’s design.Architects and software engineers had little choice but to shape .NET applications intoexisting deployment environments, which generally involved a fixed set of resourcesthat often needed to be shared across a number of applications or services.For the many legacy .NET applications, the most suitable compute choice for runningapplications in AWS is using virtual machines, using either AWS Elastic Beanstalk orAmazon EC2. In some cases, it’s also possible to run .NET applications in Windowscontainers, and you can also run .NET applications on Amazon EC2 bare metalinstances, either by running directly on the Windows OS of the host instance oralternatively by running Hyper-V on the instance.In contrast, modern .NET applications can be designed to take advantage of all thecloud benefits by using Infrastructure as Code (IaC) and DevOps practices. Not onlycan modern applications use the traditional set of compute choices, but they can alsotarget various types of serverless environment, including AWS Fargate or AWSLambda.Figure 2: AWS deployment targets for compute workloads10

Amazon Web ServicesDeveloping and Deploying .NET Applications on AWSAlthough the variety of compute choices can be daunting for new applications, a goodrule of thumb is to consider serverless options for innovative and highly-elasticworkloads, and then consider the various container options or virtual machines whenthere are specific dependencies on the environment or when more precise control isneeded.For legacy .NET applications, virtual machines are often considered the natural choice,although the integration of Docker with Windows means the use of containers isgrowing increasingly common, since they bring with them a number of benefits,including immutable deployment and improved resource utilization.Subsequent sections cover each of these compute choices in more detail. However,prior to choosing a compute environment, you must choose an operating system forhosting an application and choose a suitable architectural style.Choosing a Host Operating SystemAlthough Windows remains the natural choice for legacy applications using the .NETFramework, the rise of .NET Core means Linux is now an equally viable choice for newand future .NET applications. One of the challenges in choosing an OS is they havebroadly reached a state of commoditization, with the current focus on OS evolutionbeing largely about increased efficiency of resource use, as shown by the growingpopularity of containers, and the future lure of library operating systems.Another factor driving the choice of OS is the current architectural wisdom to explicitlydeclare and isolate dependencies, as promoted by the 12-factor app approach, whichalso aligns to the single process model of containers. Given the rich set of services builtinto Windows, it is common for legacy .NET Framework applications to implicitly dependon a variety of services—such as Active Directory for authentication and authorization,COM for distributed transaction processing, or DFS for file sharing—but with the movetowards explicitly declaring and isolating such dependencies, relying on Windows’intrinsic features no longer holds the lure for .NET applications that it once did.Building Monoliths or MicroservicesOne of the most common ways to build enterprise applications is as a single, unifiedapplication, in which all components are tightly coupled, and working from a shareddatabase. When the .NET Framework was released such monolithic applications werewidespread, and even today, it’s not uncommon to see ASP.NET applications with overa hundred thousand lines of code, that have to be deployed to a single IIS instance.11

Amazon Web ServicesDeveloping and Deploying .NET Applications on AWSAs enterprise applications grew bigger, new challenges began to emerge out of thisapproach. The first problem is managing the resources available to an application. Asmonolithic applications grow bigger, they invariably require more resources, fromcompute and memory requirements, through to storage and network bandwidth.Although these issues can be solved by scaling the application servers vertically up orhorizontally out, this approach naturally scales the whole application, even if a singlemodule needs the additional resources.The second problem is complexity. Monolithic applications with tightly coupled modulesgrow increasingly complex over time, which can make maintenance so complicated thateven the smallest changes require significant effort for development, testing, anddeployment. Although there’s an inherent simplicity in the design of monolithicapplications, the increasing complexity adds friction to the business need for agility.Because of the challenges inherent in monolithic applications, many modernapplications have shifted to a new paradigm, commonly known as a microservicesarchitecture. Microservices are small services providing a bounded context offunctionality, each using their own data store, and predominantly integrating with otherservices by using event-driven communication.Although microservices introduce their own complexities, such as how to separate dataor how to distribute services, breaking monolithic applications into loosely coupledmicroservices can help overcome many of the problems with monolithic applications.Aside from the architectural benefits of microservices, the loose coupling inmicroservices means each service can be deployed and scaled independently. Byensuring each microservice has its own development lifecycle, DevOps teams are nolonger tied to other team’s release cycles, and can therefore increase their deploymentfrequency, improving their agility, and increasing the business’s ability to respond tochange.Although .NET Core can be used for a variety of application architectures, its lightweightand cross-platform nature makes it ideal for microservices, and it’s also highly suitablefor deploying to modern execution environments, including containers and serverlessfunctions.The following sections of this paper include several ways you can deploy bothmonolithic and distributed applications in the AWS Cloud. Monolithic deploymentpatterns are mostly applicable for legacy enterprise applications, or for developing newapplications with limited complexity or scaling requirements, whereas microservices arecommonly chosen for building optimized modern applications.12

Amazon Web ServicesDeveloping and Deploying .NET Applications on AWSFor more information on how to design and develop microservices, see theImplementing Microservices on AWS whitepaper.Migrating and Rehosting .NET ApplicationsWhen migrating any type of application to AWS, including legacy .NET Frameworkapplications, there are a number of different approaches. These approaches are knownas the six Rs of migration.Figure 3: Six Rs of migrationAlthough there’s a number of reasons to modernize applications by re-platforming orrefactoring—including optimizing or adding new features—the simplest way to mi

on top of it, including the ASP.NET MVC, Entity Framework, and Enterprise Library. Since it has been around for a long time, most legacy and existing .NET applications are developed for the .NET Framework, and it also has the richest set of libraries, assemblies, and an ecosystem of packages. One of the key challenges for .NET Framework applications is that backward- compatibility can be .

Related Documents:

Deployment uie Deploying F5 with Oracle PeopleSoft Enterprise Applications Welcome to the F5 deployment guide for Oracle PeopleSoft Enterprise applications. F5 provides a highly effective way to optimize and direct traffic for PeopleSoft applications with the BIG-IP Local Traffic Manager (LTM), Application Acceleration Manager (AAM), Application Security Manager (ASM), and in 11.6 and .

The tutorial guides you through the following tasks: Downloading and installing your own Tomcat server. Coding and deploying a JSP on Tomcat. Coding and deploying a servlet on Tomcat. Coding and deploying a Web service using Tomcat and Apache Axis. The tutorial provides

Installing and Deploying Data Endpoint 1 Installing and Deploying Data Endpoint Clients Websense Data Endpoint is a solution for securing client workstations, laptops, and other endpoint machines from data loss when the machines are outside the corporate network and for identifying sensitive data on the clients themselves.

7.2.1. Copying Prometheus metrics configuration to a custom resource 7.2.2. Deploying a Kafka cluster with Prometheus metrics configuration 7.3. VIEWING KAFKA METRICS AND DASHBOARDS IN OPENSHIFT 4 7.3.1. Deploying the Prometheus resources 7.3.2. Creating a Service Account for Grafana 7.3.3. Deploying Gra

Deploying the BIG-IP LTM with IBM . Cognos Insight. Welcome to the F5 Deployment Guide for IBM Cognos Insight. This document provides guidance for deploying the BIG-IP Local Traffic Manager (LTM) with IBM Cognos. The BIG-IP LTM brings high availability, SSL offload, and TCP optimizations to IBM Cognos solutions.

activity monitoring. By deploying Guardium appliances to collect information from databases, your organization gains up-to-the-second insight into the activity happening at the application and data level. Now, by deploying the Database Security functionality within the BIG-IP system, you can correlate front-end information with database .

Citrix.com Deployment Guide Deploying Microsoft SharePoint 2016 with NetScaler 8 Deploying Microsoft SharePoint 2016 with NetScaler Deployment Guide After clicking OK, you will see the Basic Settings screen for the LB vserver. Here, you may change settings such as the session persi

Aug 01, 2016 · Oracle Database 12c Release 1 (12.1) on Red Hat Enterprise Linux 7. It is intended to provide a Red Hat Oracle reference architecture that focuses on the following tasks: Deploying Oracle Grid Infrastructure 12c Release 1 (12.1.0.2.0) Deploying Ora