eas architecturef) ode_eas... · x .net core x ef core x serilog x automapper x redis x swagger...

16
Click to add a little subtitle EAS Architecture TOMY RHYMOND – EAS CLOUD ARCHITECT

Upload: others

Post on 16-Nov-2019

33 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

Click to add a little subtitle

EAS Architecture

TOMY RHYMOND – EAS CLOUD ARCHITECT

Page 2: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

DEVELOPMENT APPROACHES

▪ A monolithic app contains domain-specific functionality and is normally divided by functional layers, such as web, business, and data

▪ You scale a monolithic app by cloning it on multiple servers/virtual machines/containers.

▪ A microservice application separates functionality into separate smaller services.

▪ The microservices approach scales out by deploying each service independently, creating instances of these services across servers/virtual machines/containers.

1

2

3

4

Page 3: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

MICROSERVICE APPLICATION APPROACH

• Defines an architecture that structures the application as a set of loosely coupled, collaborating services.

• Services can be developed and deployed and scaled independently of one another

• Each service has its own database in order to be decoupled from other services

• Enables the continuous delivery and deployment of large, complex applications

• Each microservice is relatively small

• Improved fault isolation

• Eliminates any long-term commitment to a technology stack

Web Browser

Application Gateway

Asset Service

Document Service

Database

Database

REST

Api

REST

Api

Party Service

Asset Tracking Service

Front End Service

Front End Service

Back End Service

Back End Service

Page 4: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

TECHNOLOGY STACK▪ Azure Service Fabric

▪ Distributed systems platform that makes it easy to package, deploy, and manage scalable and reliable microservices and containers.

▪ Azure Application Gateway

▪ Gives you application-level routing and load balancing services that let you build a scalable and highly-available web front end in Azure.

▪ Azure Application Insight

▪ Application Insights is an extensible Application Performance Management (APM) service for web developers on multiple platforms.

▪ Use it to monitor your live web application.

▪ It will automatically detect performance anomalies.

▪ It includes powerful analytics tools to help you diagnose issues and to understand what users actually do with your app.

▪ Azure SQL Service

▪ Datastore for EAS applications

▪ Azure Storage Blob

▪ EAS documents will be stored in blob storage

▪ Azure Service Bus

▪ Asynchronous Microservice integrations are achieved via Service Bus

▪ Redis Cache

▪ For caching data

▪ Azure Functions

▪ Handle server less functions. For example get data from service bus and update Cosmos DB

▪ Cosmos Db (Mongo API)

▪ No SQL Database for Search

▪ Angular

▪ Bootstrap

▪ .NET Core 2

▪ Entity Framework Core

▪ Swagger

▪ Serilog

▪ MediatR

▪ Automapper

▪ Autofac

▪ Ready Roll

▪ Mongo Driver Core

Page 5: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

INFRASTRUCTURE ARCHITECTURE

Browser

Application Gateway

Storage blob

Virtual Network

PORT

Azure SQL database

Service Fabric Cluster

Oracle DB

Services

On-Premise

CORE Application

Azure

HTTPHTTPS

VPN Gateway

Redis cache

Application Insights Cosmos DB (Mongo)

Azure Function

Nod

e

Node

Node

NodeNode

Azure Key Vault

Service bus

Page 6: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

SERVICE ARCHITECTURE

API Gateway (Back End For Front End)

ServiceService

Stateless Service

ServiceService

Stateless Service

ServiceService

Stateless Service

ServiceService

Stateless Service

Azure SQL database Cosmos DB

(Mongo)Redis cache

Storage blob Service bus

Background Services

Storage blob

API Gateway (Back End For Fron End)

HTTP

Azure Key Vault

HTTP HTTP

Functions

Logg

ing

(Se

rilo

g)

ApplicationInsights

Azure Application Gateway

HTTPSHTTPS

Angular Web App (Browser) Angular Web App (Browser)

REST REST

Page 7: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

SERVICE FABRIC

Azure Service Fabric is a distributed systems platform that makes it easy to package, deploy, and manage scalable and reliable microservices.

Infrastructure concepts Application concepts System services

Cluster

Node

▪ A network-connected set of virtual or physical machines into which your microservices are deployed and managed.

▪ Clusters can scale to thousands of machines

▪ A machine or VM that's part of a cluster is called a node.

▪ Each node is assigned a node name

▪ An application is a collection of constituent services that perform a certain function or functions.

Application

▪ A service performs a complete and standalone function and can start and run independently of other services.

Service

Naming Service

Image Store Service

Failover Manager Service

▪ Resolves service names to a location in the cluster

▪ Deployed and versioned application packages are kept.

▪ Performs functions related to high availability and consistency of services

▪ Orchestrates application and cluster upgrades

Page 8: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

SERVICE FABRIC APPLICATION

• A service fabric application package is the smallest deploy-able unit to a service fabric cluster. The content of an application package describe a service or a set of services that will be deployed on a Service Fabric cluster

• The content and structure of the package is so important to understand in context of creating & updating your micro- services.

Application Manifest

Service Fabric Application

Service

Stateless Service

Code Config Data

• .NET Core • EF Core• Serilog• AutoMapper• Redis• Swagger

Service Manifest

Service Fabric Application

Page 9: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

MICROSERVICE APPLICATION

Entity Framework Core

Databse

DbContext

Repository Repository Repository Repository

Unit of WorkUnit of WorkUnit of Work

Model Model Model Model

DbContext DbContext

Cache

API ControllerView

ModelView

ModelView

Model

Mapper

Logg

ing

(Se

rilo

g) Storage blob

Business ServiceEntity Entity Entity

Azure Key Vault

Application Insights

Page 10: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

SEARCH MICRO SERVICE

Api Controller

Command Bus

Command Handler

Domain

Repository

DbContext

EntityFramework Core

Domain Model

Domain Model

Domain Model

Event Handler

Database

Eve

nt

Ha

nd

ler

Service bus topic

Cosmos DB(Mongo)

Query Service

Repository

DbContext

EntityFramework Core

Search Api Controller

Query Service

Repository

DbContext

Page 11: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

AUTHENTICATION

SAFE Portal

Angular App

Auth Service

Token

OEDS

JWT Token with Claims

ServicesServices

JWT Token with Claims

Azure

On-Premise

Page 12: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

CONTINUOUS DELIVERY

Development OperationsCollaboration

Develop & TestRelease

Monitor & LearnPlan

Developers and Test

Operators

Release Management

Requirement Backlog

Performance and availability diagnostics

Continuous Learning and Improvement

Continuous Acceptance Testing

Planning Automated Release pipeline is needed to deliver at the pace development with full traceability

Agile methodologies are accelerating dev/test process

Availability and performance issues are hard to troubleshoot in this fast changing world with distributed applications

Usage should determine the next set of priorities and learning

Page 13: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

Database CI/CD

PRODAzure SQL database

VSTS

SQL Script

QAAzure SQL database

DEV Azure SQL database

SQL database (local)

1

2

3

6

4

5

Page 14: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

RELEASE MANAGEMENT

Developer

ReleaseBuild

DEV

QA

STAGE

PROD

Build Release

Source Control

master

Dev

Manager

Manager

Manager

CI/CD Pipeline

CI/CD Pipeline

Page 15: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

RELEASE MANAGEMENT (cont.)

▪ Manage automated deployments through each stage of your pipeline.

▪ Deploy applications, database changes, and infrastructure to the cloud, on-premises, or hybrid cloud

▪ Gated Release with Approvals at every stage.

▪ Build once and deploy the same bits to all environments

▪ Seamlessly Manage Azure Environments

Page 16: EAS ArchitectureF) ODE_EAS... · x .NET Core x EF Core x Serilog x AutoMapper x Redis x Swagger Service Manifest Service Fabric Application. MICROSERVICE APPLICATION Entity Framework

DEVELOPMENT TOOLS

Developer Tool Installer Location

Visual Studio 2017 (Available in developer machine, no install necessary)

.NET Core SDK 2.xx https://www.microsoft.com/net/download/windows

VS Code https://code.visualstudio.com/

SQL Server 2017 https://www.microsoft.com/en-us/sql-server/sql-server-editions-express

SQL Server Management Studiohttps://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-

ssms

Microsoft Service Fabric SDK (for

VS 2017)Install from Web Platform Installer

Microsoft Service Fabric Explorerhttps://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-visualizing-your-

cluster

Node.Js https://nodejs.org/en/

Linq Pad http://www.linqpad.net/

Docker Container https://store.docker.com/editions/community/docker-ce-desktop-windows

Redis Cache

From Command Line run the following command:

docker run –name eas-cloud –d redis

Run the following command to confirm:

docker ps

Redis cache will now accept connection on container port 6379