SlideShare a Scribd company logo
1 of 26
Microsoft Orleans
The Easy Way
JOHN S AZARIAH
PRINCIPAL SDE, MICROSOFT CORP
@JOHNAZARIAH
Introduction
Getting Started Is (mostly) Simple
• https://dotnet.github.io/orleans/
• https://gitter.im/dotnet/orleans
• https://devblogs.microsoft.com/dotnet/orleans-3-0/
• Blogs,Videos, ConferenceTalks
The first hurdles
• Concept of Virtual Actors
• Idiosyncratic Code Layout (Grain Interfaces, Grains, …)
• Declarative persistence
• State management
• Query patterns, Fan-out, Fan-in and performance implications
• Silos, Clients, Configuration
• Failure modes - split-brain scenarios, concurrency
• Advanced Concepts (Reentrancy, Timers, Reminders,
Streaming, …)
My own n00b path
• Writing a simple dummy app which runs locally based on
samples
• Preparing the application to run in the cloud - configuration,
secrets and so on
• Preparing the application to run in clustered mode
• Provisioning and deploying to Azure
• CI/CD considerations - stability, repeatability
Orleans
Application
Code Structure
Silo Client
Interface
Implementation
Interface
Client Code
Orleans
Application
Code Structure
Orleans
Runtime
Components
Client
Silo
Client
Silo
Client
Silo
Load Balancer
Persistence (Grain Storage)
Clustering
Orleans Universal Silo
Introducing Orleans Universal Silo
• https://github.com/johnazariah/orleans-contrib-universalsilo
• https://www.nuget.org/packages/Orleans.Contrib.UniversalSilo/
• https://www.nuget.org/packages/Orleans.Contrib.UniversalSilo.Te
mplates/
• https://github.com/johnazariah/orleans-contrib-
universalsilo/blob/main/docs/index.md
Setting up your work environment
• https://github.com/johnazariah/orleans-contrib-
universalsilo/blob/main/docs/setup-environment-setup.md
Getting Started
• Install template library with
dotnet new --install
Orleans.Contrib.UniversalSilo.Templates
• List installed templates
dotnet new --list
• Ensure OrleansWebAPI template is present
Getting Started
• Create newWebAPI Direct Client Project
dotnet new orleans-webapi –name Cornflake
• Initialize Git
make init
• Inspect code withVisual Studio
start Cornflake.sln
Testing
• All tests are IntegrationTests
• Test Clusters are set up with Host Clustering and In-Memory Storage
• Use Property BasedTesting whenever possible
Running
• .NET Generic HostApplication
• Hit http://localhost:5000/swagger/index.html with browser to see
app
• Hit http://localhost:8080/ with browser to see Orleans Dashboard
Running
• .NET Generic HostApplication
• Hit http://localhost:5000/swagger/index.html with browser to see
app
• Hit http://localhost:8080/ with browser to see Orleans Dashboard
Development Workflow
.net CLI targets
• Clean the project with make dotnet-clean.This removes build
artefacts and restores
• Restore, Build andTest the project with make dotnet-test.
• Publish the project to an output folder with make dotnet-publish.
• Run the artefacts in the output folder with make dotnet-run.
• make dotnet-all is an alias target which does dotnet-clean dotnet-
test dotnet-publish dotnet-run.This will implicitly rebuild, test,
republish and run the project as you make changes in your code
and re-run it.
Docker targets
• Build the docker image with make docker-build
• Run the image with HostLocal clustering mode with make docker-
run.
• Run with Azure clustering mode against local Azure Storage
Emulator with make docker-run-local-ase
• Stop all running containers with make docker-stop
• List the docker images you have built with make docker-list
Local Kubernetes Deployment
• Ensure you are running with the correct context (docker-desktop)
• make dotnet-all to build, test and run your project until
satisfactory.
• git commit (to update the hash of the HEAD commit)
• make docker-build to build a docker image with these changes,
tagged with the current branch and commit hash
• make k8s-deploy or make k8s-upgrade to deploy 3 copies of the
latest image into the current k8s context.
• make k8s-status is an alias for kubectl get all
Manual AKS deployment
• You can install Azure CLI tools, or just use the docker container.
• Recommend using two shells for this – one for Azure and one for
the Project
Manual AKS deployment : Azure Shell
• make az-start fires up an interactive shell inside the officialAzure CLI Docker
image
• make az-login will allow you to use your browser to authenticate againstAzure.
Find the id of the subscription you want.
• make az-sub-set sub=<id you selected above> will set the shell to use the
selected subscription by default.
• Put the org-name and project-name, and the subscription id in Setup.cfg
• make az-new-org should only be run once per organization name.
• make az-new-proj should only be run once per project.
• Put emitted values for paks_storage_connection_string and
oaks_acr_login_token into Setup.cfg
Manual AKS deployment : Project Shell
• make aks-prepare to set up the k8s context to the remote AKS
cluster
• make docker-push to push the latest built image to the remote
Azure Container Registry
• make k8s-deploy to deploy the remote AKS cluster
CI/CD AKS deployment : WIP
• This is the next feature I’m working on
Next Steps
• Try these templates and improve them. Pull Requests welcome.
• Get the CI/CD stage completed.This is work-in-progress.
• Use this approach for non-Orleans .NET core generic hosts to
support deployment onAKS
• Work out an integration story with ProjectTye
• Community suggestions
Thank you!

More Related Content

What's hot

SEP DevOps Ignite Talk - Packer
SEP DevOps Ignite Talk - PackerSEP DevOps Ignite Talk - Packer
SEP DevOps Ignite Talk - PackerRyan Sweeney
 
Containerize All the (Multi-Platform) Things! by Phil Estes
Containerize All the (Multi-Platform) Things! by Phil EstesContainerize All the (Multi-Platform) Things! by Phil Estes
Containerize All the (Multi-Platform) Things! by Phil EstesDocker, Inc.
 
Docker get started
Docker get startedDocker get started
Docker get startedTruong LD
 
Things I've learned working with Docker Support
Things I've learned working with Docker SupportThings I've learned working with Docker Support
Things I've learned working with Docker SupportSujay Pillai
 
Opscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft WindowsOpscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft WindowsChef Software, Inc.
 
Docker on azure
Docker on azureDocker on azure
Docker on azureAnuraj P
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
Automated Deployment with Capistrano
Automated Deployment with CapistranoAutomated Deployment with Capistrano
Automated Deployment with CapistranoSumit Chhetri
 
Containerization using docker
Containerization using dockerContainerization using docker
Containerization using dockerWingChan46
 
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Continuous Delivery in Enterprise Environments using Docker, Ansible and JenkinsContinuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Continuous Delivery in Enterprise Environments using Docker, Ansible and JenkinsMarcel Birkner
 
Automation in the Small: Code to Cloud
Automation in the Small: Code to CloudAutomation in the Small: Code to Cloud
Automation in the Small: Code to CloudJay Barker
 
Sitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PS
Sitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PSSitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PS
Sitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PSPeter Nazarov
 
Docker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David LawrenceDocker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David LawrenceDocker, Inc.
 
Boosting Sitecore Development With Sitecore Docker
Boosting Sitecore Development With Sitecore DockerBoosting Sitecore Development With Sitecore Docker
Boosting Sitecore Development With Sitecore DockerPeter Nazarov
 
Installing WordPress on AWS
Installing WordPress on AWSInstalling WordPress on AWS
Installing WordPress on AWSManish Jain
 
Container Days Boston - Kubernetes in production
Container Days Boston - Kubernetes in productionContainer Days Boston - Kubernetes in production
Container Days Boston - Kubernetes in productionMike Splain
 
Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Puppet
 

What's hot (20)

SEP DevOps Ignite Talk - Packer
SEP DevOps Ignite Talk - PackerSEP DevOps Ignite Talk - Packer
SEP DevOps Ignite Talk - Packer
 
Django via Docker
Django via DockerDjango via Docker
Django via Docker
 
Azure workshop
Azure workshopAzure workshop
Azure workshop
 
Containerize All the (Multi-Platform) Things! by Phil Estes
Containerize All the (Multi-Platform) Things! by Phil EstesContainerize All the (Multi-Platform) Things! by Phil Estes
Containerize All the (Multi-Platform) Things! by Phil Estes
 
Docker get started
Docker get startedDocker get started
Docker get started
 
Things I've learned working with Docker Support
Things I've learned working with Docker SupportThings I've learned working with Docker Support
Things I've learned working with Docker Support
 
Opscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft WindowsOpscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft Windows
 
Docker on azure
Docker on azureDocker on azure
Docker on azure
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Automated Deployment with Capistrano
Automated Deployment with CapistranoAutomated Deployment with Capistrano
Automated Deployment with Capistrano
 
Containerization using docker
Containerization using dockerContainerization using docker
Containerization using docker
 
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Continuous Delivery in Enterprise Environments using Docker, Ansible and JenkinsContinuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
 
Automation in the Small: Code to Cloud
Automation in the Small: Code to CloudAutomation in the Small: Code to Cloud
Automation in the Small: Code to Cloud
 
Sitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PS
Sitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PSSitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PS
Sitecore Docker XM&XP 9.2.0/9.3.0 SXA+JSS+PS
 
Docker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David LawrenceDocker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David Lawrence
 
Boosting Sitecore Development With Sitecore Docker
Boosting Sitecore Development With Sitecore DockerBoosting Sitecore Development With Sitecore Docker
Boosting Sitecore Development With Sitecore Docker
 
Installing WordPress on AWS
Installing WordPress on AWSInstalling WordPress on AWS
Installing WordPress on AWS
 
Container Days Boston - Kubernetes in production
Container Days Boston - Kubernetes in productionContainer Days Boston - Kubernetes in production
Container Days Boston - Kubernetes in production
 
Docker slides
Docker slidesDocker slides
Docker slides
 
Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014Using Docker with Puppet - PuppetConf 2014
Using Docker with Puppet - PuppetConf 2014
 

Similar to The Easy Way to Get Started with Microsoft Orleans

[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at NuxeoNuxeo
 
Experts Live Europe 2017 - Why you should care about Docker - an introduction
Experts Live Europe 2017 - Why you should care about Docker - an introductionExperts Live Europe 2017 - Why you should care about Docker - an introduction
Experts Live Europe 2017 - Why you should care about Docker - an introductionMarc Müller
 
DevOps Fusion 2019: Docker - Why the future takes place in containers
DevOps Fusion 2019: Docker - Why the future takes place in containersDevOps Fusion 2019: Docker - Why the future takes place in containers
DevOps Fusion 2019: Docker - Why the future takes place in containersMarc Müller
 
Container Native Development Tools - Talk by Mickey Boxell
Container Native Development Tools - Talk by Mickey BoxellContainer Native Development Tools - Talk by Mickey Boxell
Container Native Development Tools - Talk by Mickey BoxellOracle Developers
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and MicroserviceSamuel Chow
 
Docker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container worldDocker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container worldzekeLabs Technologies
 
Containers docker-docker hub-azureacr-azure aci
Containers docker-docker hub-azureacr-azure aciContainers docker-docker hub-azureacr-azure aci
Containers docker-docker hub-azureacr-azure aciRajesh Kolla
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesArun Gupta
 
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzureDocker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzurePatrick Chanezon
 
Kolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in SydneyKolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in SydneyVikram G Hosakote
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoHannes Hapke
 
A curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & KubernetesA curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & KuberneteszekeLabs Technologies
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDocker, Inc.
 
Oracle database on Docker Container
Oracle database on Docker ContainerOracle database on Docker Container
Oracle database on Docker ContainerJesus Guzman
 
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Patrick Chanezon
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platformnirajrules
 
You, and Me, and Docker Makes Three
You, and Me, and Docker Makes ThreeYou, and Me, and Docker Makes Three
You, and Me, and Docker Makes ThreeChristopher Grayson
 
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...Amazon Web Services
 

Similar to The Easy Way to Get Started with Microsoft Orleans (20)

Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
 
[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo
 
Experts Live Europe 2017 - Why you should care about Docker - an introduction
Experts Live Europe 2017 - Why you should care about Docker - an introductionExperts Live Europe 2017 - Why you should care about Docker - an introduction
Experts Live Europe 2017 - Why you should care about Docker - an introduction
 
DevOps Fusion 2019: Docker - Why the future takes place in containers
DevOps Fusion 2019: Docker - Why the future takes place in containersDevOps Fusion 2019: Docker - Why the future takes place in containers
DevOps Fusion 2019: Docker - Why the future takes place in containers
 
Container Native Development Tools - Talk by Mickey Boxell
Container Native Development Tools - Talk by Mickey BoxellContainer Native Development Tools - Talk by Mickey Boxell
Container Native Development Tools - Talk by Mickey Boxell
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and Microservice
 
Docker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container worldDocker - A curtain raiser to the Container world
Docker - A curtain raiser to the Container world
 
Containers docker-docker hub-azureacr-azure aci
Containers docker-docker hub-azureacr-azure aciContainers docker-docker hub-azureacr-azure aci
Containers docker-docker hub-azureacr-azure aci
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and Kubernetes
 
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzureDocker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
 
Kolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in SydneyKolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in Sydney
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
 
A curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & KubernetesA curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & Kubernetes
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
Oracle database on Docker Container
Oracle database on Docker ContainerOracle database on Docker Container
Oracle database on Docker Container
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
 
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platform
 
You, and Me, and Docker Makes Three
You, and Me, and Docker Makes ThreeYou, and Me, and Docker Makes Three
You, and Me, and Docker Makes Three
 
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
 

Recently uploaded

complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 

Recently uploaded (20)

Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 

The Easy Way to Get Started with Microsoft Orleans

  • 1. Microsoft Orleans The Easy Way JOHN S AZARIAH PRINCIPAL SDE, MICROSOFT CORP @JOHNAZARIAH
  • 3. Getting Started Is (mostly) Simple • https://dotnet.github.io/orleans/ • https://gitter.im/dotnet/orleans • https://devblogs.microsoft.com/dotnet/orleans-3-0/ • Blogs,Videos, ConferenceTalks
  • 4. The first hurdles • Concept of Virtual Actors • Idiosyncratic Code Layout (Grain Interfaces, Grains, …) • Declarative persistence • State management • Query patterns, Fan-out, Fan-in and performance implications • Silos, Clients, Configuration • Failure modes - split-brain scenarios, concurrency • Advanced Concepts (Reentrancy, Timers, Reminders, Streaming, …)
  • 5. My own n00b path • Writing a simple dummy app which runs locally based on samples • Preparing the application to run in the cloud - configuration, secrets and so on • Preparing the application to run in clustered mode • Provisioning and deploying to Azure • CI/CD considerations - stability, repeatability
  • 10. Introducing Orleans Universal Silo • https://github.com/johnazariah/orleans-contrib-universalsilo • https://www.nuget.org/packages/Orleans.Contrib.UniversalSilo/ • https://www.nuget.org/packages/Orleans.Contrib.UniversalSilo.Te mplates/ • https://github.com/johnazariah/orleans-contrib- universalsilo/blob/main/docs/index.md
  • 11. Setting up your work environment • https://github.com/johnazariah/orleans-contrib- universalsilo/blob/main/docs/setup-environment-setup.md
  • 12. Getting Started • Install template library with dotnet new --install Orleans.Contrib.UniversalSilo.Templates • List installed templates dotnet new --list • Ensure OrleansWebAPI template is present
  • 13. Getting Started • Create newWebAPI Direct Client Project dotnet new orleans-webapi –name Cornflake • Initialize Git make init • Inspect code withVisual Studio start Cornflake.sln
  • 14. Testing • All tests are IntegrationTests • Test Clusters are set up with Host Clustering and In-Memory Storage • Use Property BasedTesting whenever possible
  • 15. Running • .NET Generic HostApplication • Hit http://localhost:5000/swagger/index.html with browser to see app • Hit http://localhost:8080/ with browser to see Orleans Dashboard
  • 16. Running • .NET Generic HostApplication • Hit http://localhost:5000/swagger/index.html with browser to see app • Hit http://localhost:8080/ with browser to see Orleans Dashboard
  • 18. .net CLI targets • Clean the project with make dotnet-clean.This removes build artefacts and restores • Restore, Build andTest the project with make dotnet-test. • Publish the project to an output folder with make dotnet-publish. • Run the artefacts in the output folder with make dotnet-run. • make dotnet-all is an alias target which does dotnet-clean dotnet- test dotnet-publish dotnet-run.This will implicitly rebuild, test, republish and run the project as you make changes in your code and re-run it.
  • 19. Docker targets • Build the docker image with make docker-build • Run the image with HostLocal clustering mode with make docker- run. • Run with Azure clustering mode against local Azure Storage Emulator with make docker-run-local-ase • Stop all running containers with make docker-stop • List the docker images you have built with make docker-list
  • 20. Local Kubernetes Deployment • Ensure you are running with the correct context (docker-desktop) • make dotnet-all to build, test and run your project until satisfactory. • git commit (to update the hash of the HEAD commit) • make docker-build to build a docker image with these changes, tagged with the current branch and commit hash • make k8s-deploy or make k8s-upgrade to deploy 3 copies of the latest image into the current k8s context. • make k8s-status is an alias for kubectl get all
  • 21. Manual AKS deployment • You can install Azure CLI tools, or just use the docker container. • Recommend using two shells for this – one for Azure and one for the Project
  • 22. Manual AKS deployment : Azure Shell • make az-start fires up an interactive shell inside the officialAzure CLI Docker image • make az-login will allow you to use your browser to authenticate againstAzure. Find the id of the subscription you want. • make az-sub-set sub=<id you selected above> will set the shell to use the selected subscription by default. • Put the org-name and project-name, and the subscription id in Setup.cfg • make az-new-org should only be run once per organization name. • make az-new-proj should only be run once per project. • Put emitted values for paks_storage_connection_string and oaks_acr_login_token into Setup.cfg
  • 23. Manual AKS deployment : Project Shell • make aks-prepare to set up the k8s context to the remote AKS cluster • make docker-push to push the latest built image to the remote Azure Container Registry • make k8s-deploy to deploy the remote AKS cluster
  • 24. CI/CD AKS deployment : WIP • This is the next feature I’m working on
  • 25. Next Steps • Try these templates and improve them. Pull Requests welcome. • Get the CI/CD stage completed.This is work-in-progress. • Use this approach for non-Orleans .NET core generic hosts to support deployment onAKS • Work out an integration story with ProjectTye • Community suggestions