252
Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%3 31 'ubhasish (hosh Director, )lou*)over+n @ner*ometer Dec 8-12 2014 Microsoft, Hyderabad Programming Azure Better, Best Practices De!"#s

Programming Microsoft Azure

Embed Size (px)

DESCRIPTION

Programming Microsoft Azure

Citation preview

Dec 8-12 2014 Microsoft, Hyderabad
Programming Azure Better, Best Practices De!"#s
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
)ontact e subhasishghosh2013@hotmailcom, [email protected]/ m !"1#""1$0%331
in/e*+n httpslin/e*incominsghosh2011 '/.pe pin/4o.*2005
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
Ob6ective o7 the 8or/shop earn ho to leverage 9icroso7t Azure 7eatures couple* ith best practices in :'2013 7or architecting an* *eveloping highl.#scalable n#tier 8eb Applications
• 1000am ; 1200pm ; 'ession – 2 hrs
• 1200pm ; 1230pm ; unch Brea/
• 1230pm ; 230pm ; 'ession – 2 hrs
 
Day1 Day2 Day$ Day4 Day%
• +ntro*uction • )lou*
Development Best Practices
• Data 'torage Options
8ithstan*ing <ailure
• 8P+ & 8eb9atri-3 # Demo
• 8h. =o#'>?   • sing 9anage*
• 8eb 'ites & Auto'cale ; Demo
• async in = %C   • Blob 'torage   • sing Azure e*is
)ache   • ab
• )o*e evie & 3 Best Practices
• )o*e evie in :'2013
  • ab C   • Poer'hell )m*lets
# Demos
Azure   • ab 5 & ab "
• Azure 9anagement portal al/through
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
&aboratories 1,2,$,4,%,',(,8,) 1* +.P +nstall 9icroso7t Azure 'DE 7or = Fvs2013G # 2C, +nstall :isual 'tu*io -press 2013 7or 8eb ith 9icroso7t Azure 'DE ; 2C, 9icroso7t Azure Poer'hell, Open 9icroso7t Azure 'ubscription +A 30#*a. account )reate a :9, stop & stop#*eallocate using Azure Poer'hell
2* +/.  )reating an A'P= 9:) application an* then a**ing 'ingle 'ign#On F''OG to .our application using Azure Active Director. FAADG
$* /&".D +3/+ )reating a )lou* 'ervices F8eb & 8or/er olesG application Publishing to 9icroso7t Azure associate* ith a 9icroso7t Azure 'torage AccountH )onIgure Auto#scaling
4* A. MA5A6D /A/H +3/ )reating a )ache 7or Azure 9anage* )ache 'ervice using Azure Poer'hell cm*lets )onnecting to this 9)' 7rom a client application
%* A. D+ /A/H )reating an* conIguring Azure e*is )ache, conIguring cache clients, a**ing an* removing ob6ects 7rom the cache, an* storing A'P= session state in the cache
'* M"5"56 /"D )reating a =e elic account, integrating it ith an Azure 8eb 'ites application an* then publishing to AzureH an* chec/ing out the tool
(* +"./ /"5"& sing (it in :'2013, -ploring 7eatures Fbranches, merging, comments etcG
8* D3"P+ A."MA"5 sing 9icroso7t Azure Poer'hell ; installation, cm*lets, Azure 'ubscription *etails an* unboo/s +ntro*uction
 
 
Assessment n* o7 Da. C
20 9ultiple )hoice >uestions, %0 9inutes
 
DAN 1
Demo 1 8eb Plat7orm +nstaller F8eb P+G & 8eb9atri-3
 
Demo 2 :'2013 ; atest <eatures
 
Demo 3 9.<i-+t Application
 
)urrent ren*s
7e are gonna ta9 about:
 
 
 
 
 
 
 
Microsoft "#en ec;noogies
httpsvm*epotmsopentechcom
 
Demo %  in/ering aroun* ith :9 Depot
 
http/atanapro6ectco*eple-co m
 
httpmsopentechcom
Demo C  in/ering aroun* ith Eatana Pro6ect
 
>uic9 Demo
PM? nsta-Pac9age Microsoft*"@in*Diagnostics
PM? nsta-Pac9a e
httpmsopentechcom
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
+nsi*e the O8+= 'tartup class, enter a##*.se7ecomePageC
Press <C
 
ProEect =atana
DM"F
Jo to run same program using O8+= *e7ault server, Jttpistener?
HINT  in/er ith 9icroso7tOinJostJttpistener
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
ab 1 8P+ C0, +nstall 9icroso7t Azure 'DE 7or = Fvs2013G # 2C
+nstall :isual 'tu*io -press 2013 7or 8eb ith 9icroso7t Azure 'DE ; 2C
9icroso7t Azure Poer'hell, Open 9icroso7t Azure 'ubscription +A 30# *a. account
)reate a :9, stop & stop#*eallocate using Poer'hell
 
Azure Portal 8al/through
 
DAN 2
Day1 Day2 Day$ Day4 Day%
• +ntro*uction • )lou*
Development Best Practices
• Data 'torage Options
8ithstan*ing <ailure
• 8P+ & 8eb9atri-3 # Demo
• 8h. =o#'>?   • sing 9anage*
• 8eb 'ites & Auto'cale ; Demo
• async in = %C   • Blob 'torage   • sing Azure e*is
)ache   • ab
• )o*e evie & 3 Best Practices
• )o*e evie in :'2013
  • ab C   • Poer'hell )m*lets
& Doc/er # Demos
Azure   • ab 5 & ab "
• Azure 9anagement portal al/through
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
  +tateess 7eb ier Be;ind an stic &oad Baancer
+cae-"ut 7eb ier Based on
Actua Demand
5o +ession +tateC .se /ac;e
.se /D5 for +tatic "bEectsGies
 
9icroso7t Azure )ompute
 
Azure )lou* 'ervices
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
8or/loa*s 7or )lou* 'ervices • :9 is e-plicitl. +aa', )lou* 'ervices is e-plicitl. Paa', 8eb 'ites is e-plicitl.
hosting
• )lou* 'ervices gives .ou a*ministrative access to .our applications :9s 8eb 'ites *o not provi*e this his lets .ou install arbitrar. so7tare that .our application nee*s, something thats not possible ith 8eb 'ites
• =#tier stateless applications is per7ect 7or )lou* 'ervices OQers both eb roles an* or/er roles FreRuirement 7or separate :9s 7or their business logicG
• )lou* 'ervices provi*es separate staging an* pro*uction environments, ma/ing application up*ates somehat smoother than 8eb 'ites
• )lou* 'ervices lets .ou use netor/ing technologies such as Azure :irtual =etor/ an* Azure )onnect to hoo/ on#premises computers to )lou* 'ervices applications =o such thing on 8eb 'ites
 
 
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
3Ps in /oud +er!ices
- Public +P a**ress pointing to Azure )lou* 'ervice here :9 is *eplo.e*
- ver. )lou* 'ervice has a :+P an* ever. )lou* 'ervice can have several :9s
 
/onnecting /oud +er!ices !ia 3Ps
 
/onnecting /oud +er!ices !ia 35
 
Azure 8eb 'ites
Paa'
 
Demo Azure 8eb 'ites
.nder t;e Hood
.nder t;e Hood
 
 
Demo 5 Auto#'caling Options in Azure
 
async +u##ort in *5 4*%
Anyone using async  in
*5 4*% today I
async +u##ort in *5 4*%
# async language support to buil* non#bloc/ing, as.nchronous, server#si*e applications
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
7;at ;a##ens in asyncI 1 An event han*ler calls an* aaits the Access;e7ebAsync as.nc metho*
2 Accesshe8ebAs.nc calls the 6et+tringAsync as.nchronous metho* to *onloa* the contents o7 a ebsite as a string
3 'omething happensH to avoi* bloc/ing resources, (et'tringAs.nc .iel*s control to its caller, Accesshe8ebAs.nc
% Donde#endent7or9  is a s.nchronous metho* that *oes its or/ an* returns to its caller
 
 
Pro#erties
# async co*e is 5" multi#threa*e* co*e
- b. *e7ault, co*e ritten ithin async & await  are single#threa*e*
 
$ Best Practices for async
# async void  onl. 7or top#level event han*lers
-  he t;read#oo is 7or )P#boun* co*e, not +O#boun* co*e
-  Nour metho*s cannot lie
 
Best Practice 1 se )ase 1
 
 
/ode in t;e a##ication:
 
/ontro Go@:
7;ic; await returns earierI
 
 
/on!ert t;e async void to Task  
returning met;od
Best Practice 2 se )ase 2
 
 
/ode in t;e a##ication:
 
/ontro Go@:
e#ace for  @it; Parallel.For 
 
;ings s;oud become GasterI
ig;tI
 
7;at ;a##ens:
 Eob*
es#onse time $00 Ms is better t;an %00
Ms* ig;tI
7"56K
7;at actuay ;a##ens:
 
s it /P.-bound " "-bound t;at is
fasterI
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
;read#oo is A##ication-6oba
resource*
;is is ;o@ it s;oud be:
 
"-bound*
 
Best Practice 3 se )ase 3
 
 our met;ods cannot ie
 
2 met;ods
$ ty#es of met;ods
/oud dentity J +ync;ronized J ADG+
 
 
Azure Acti!e Directory AAD
/assic .se /ase
 here are to apps on the eb an* the user has a plain#ol* broser
'ince the to apps never tal/ to each other *irectl., a mechanism oul* nee* to be *evices here the user logs onto App A, receives an* access to/en into their broser an* passes it through to App B ith then calls bac/ to App A via some AP+ to ma/e sure the access to/en is vali*
 
Demo " Active Director. Options in Azure
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
4 ste#sF
)reating an ASP.NET MV a!!lication using :'2013
nsuring AD user has V(lobal ightsS an* correctl. set  permissions 7or logging#in using Azure AD
onnectin" the application to Azure AD
 
 
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
 
 
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
=o go bac/ to Azure 9anagement portal, open the AD e create* earlier an* then go to WApplicationsX tab Nou ill In* W-penseeportsX a**e* there
+nsi*e W-penseeportsX go to WsersX an* then select +am Fie test@)ontosongineeringJ.*onmicroso7tcomG an* A''+(=D L N'
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
 
DAN 3
Day1 Day2 Day$ Day4 Day%
• +ntro*uction • )lou*
Development Best Practices
• Data 'torage Options
8ithstan*ing <ailure
• 8P+ & 8eb9atri-3 # Demo
• 8h. =o#'>?   • sing 9anage*
• 8eb 'ites & Auto'cale ; Demo
• async in = %C   • Blob 'torage   • sing Azure e*is
)ache   • ab
• )o*e evie & 3 Best Practices
• )o*e evie in :'2013
  • ab C   • Poer'hell )m*lets
& Doc/er # Demos
Azure   • ab 5 & ab "
• Azure 9anagement portal al/through
 
ecap Da. 1 & Da. 2
 
/ase +tudyF
Data +torage "#tions
"rganization based in Mumbai* Has de!eo#ed HM+ a##ication using *5 on Azure* +caed faster t;an e#ected* Ha!e issues @it; storing data, #rocessing data, re#orting and aso scaing a##*
M++56 L
Balancing Priorities
Data +torage "#tions
 
 
 
 
 
 
 
 
 
 
Best Practices
5o+>& aong @it; +>&
+torage "#tions
>uestions to As9 
Azure +>& Db 3s* +>& +er!er in 3M
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
7;y 5o-+>&I - Huge Data +ets - Denormaized Data +ets - 5eed fast access to
unstructured data
- am#e use casesF - +ocia Media, Anaytics,
+ecurity, and /om#iance - Anayse and searc; data of a
ty#es, suc; as tet, images, !ideos, music*
- Hig;-#erformance core data #rocessing and anaytics*
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
Brief ntro L Mongo DB - Mongo DB stores data in t;e form of docu#ents, @;ic; are  N+"5-i9e <ed and !aue #airs*
- Documents are anaogous to structures in #rogramming anguages t;at associate 9eys @it; !aues e*g* dictionaries, ;as;es, ma#s, and associati!e arrays*
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
Data Partitioning +trategies
 
3ertica Partitioning
+;arding
BA5 A+KKKKKKKKK Hy$rid Partitionin"
 
Pan BG" Arc;itecting /oding
 Avera"e %sa"e   /   o   m   #   u    t   e
ime
 
ime
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
Demo O10F .nderstanding t;e /ode
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
Demo O10F .nderstanding t;e /ode  he <i-+t)onte-t class *erives 7rom ntit. <rameor/, Db)onte-t class, i*entiIes the *atabase an* speciIes the tables in the *atabase
 
Demo O10F .nderstanding t;e /ode
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
Demo O10F .nderstanding t;e /ode  he ntit. <rameor/ creates a Gitas9s table base* on the properties inclu*e* in the Gitas9  entit. class
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
 
 
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
• etSs go step b. step to buil* this application
• Open Azure 'torage mulator Open :'2013 Vas a*ministratorS
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
• 'elect :isual )  one WA'P= 8eb oleX an* W8or/er oleX )all it WJello8orl*8ebX an* WJello8orl*8or/erX
• 'elect 9:), OE 
• ight#clic/ an* Buil* the solution he press <C
• et us no a** a HelloWorld controller
  Jello8orl*8eb   )ontroller ight#clic/ an* WA**X )ontroller +t opens a ne *ialog bo- 'elect the Wmpt. )ontrollerX
=ame it WJello8orl*J.*eraba* )ontrollerX
 
Open App'tart  +o$te%on,g-cs
)ontroller L shoul* be same as controller name in cs 
 
• ight#clic/ the clou* service, an* then select WPublishX
• 'ign#in into .our Azure 'ubscription accountH hich .ou nee* to selectH an* then settings here .ou can either select an e-isting storage account in same region O create a ne one in same region
• Procee* ne-t stage 7or provisioning this )lou* 'ervice on Azure
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
DAN %
Day1 Day2 Day$ Day4 Day%
• +ntro*uction • )lou*
Development Best Practices
• Data 'torage Options
8ithstan*ing <ailure
• 8P+ & 8eb9atri-3 # Demo
• 8h. =o#'>?   • sing 9anage*
• 8eb 'ites & Auto'cale ; Demo
• async in = %C   • Blob 'torage   • sing Azure e*is
)ache   • ab
• )o*e evie & 3 Best Practices
• )o*e evie in :'2013
  • ab C   • Poer'hell )m*lets
& Doc/er # Demos
Azure   • ab 5 & ab "
• Azure 9anagement portal al/through
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
/ac;ing on Azure
- -cellent 7or ea*#Onl. Pattern hen un*erl.ing services o7 a Distribute* '.stem is having issues
- Do not hit *ata source ever. time
 
$ y#es of /ac;e
- Azure 9anage* )ache 'ervice
- Azure e*is )ache
- Azure +n#9emor. )ache
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
- 9ust use 7or buil*ing 7ast, highl. scalable n#tier eb applications
- 'ecure, De*icate* )ache, 'A """Y availabilit.
- 3 oQerings • Basic # 1259B to 1(B cache sizes, non#JA, 125(B
increments
• +tandard # 1(B to 10(B cache sizes, non#JA, 1(B increments
• Premium # C(B to 1C0(B cache sizes, JA, C(B
Azure Managed /ac;e +er!ice M/+
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
Open Azure Poer'hell as a*ministrator
 .pe in WA**#AzureAccountX hich enters a *ialog A** .our Jotmail i* associate* ith Azure subscription account an* procee*
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
(o to W)onIgureX an* W'caleX options to revie the options available
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
Open ebconIg Ile +*enti7. this line WZautoDiscover isnable*L[true[ i*entiIerL[\)ache role name or 'ervice n*point][ ^X
eplace \)ache role name or 'ervice n*point] ith the en*point hich is *ispla.e* on the )ache Dashboar* in the 9anagement Portal +n our e-ample
 
ncomment the securit.Properties section, an* replace \Authentication Ee.] ith the authentication /e. 7rom the Azure portal  9anage Ee.s   Primar. Ee.
 o use this programmaticall.
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
- +n#memor. )ache ; /e.value store but too/ one step 7urther
- -cellent replacement 7or mem)ache*
- But not a replacement 7or persistent storage F eg '> server G
edis
- httptr.re*isio
edis utoria
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
- 'ecure, *e*icate* e*is cache, manage* b. 9icroso7t A cache create* using Azure e*is )ache is accessible 7rom an. application ithin 9icroso7t Azure
- 9icroso7t Azure e*is )ache ill be available in to tiers - Basic ; 'ingle no*e 9ultiple sizes up to
C3(B - +tandard ; o#no*e 9aster'lave
+nclu*es """Y 'A an* replication support p to C3 (B
Azure edis /ac;e
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
- )reate the cache
- )onIgure the cache
Azure 9anagement portal   )ache
 
=o, e ill conIgure the cache clients
- Open :'2013, create an A'P= application, an* then install using =u(et Poershell ;
  Oinsta-#ac9age +tac9c;ange*edis
  Oinsta-#ac9age +tac9c;ange*edis*+trong5ame
 
eference to t;e cac;e
- +n or*er to programmaticall. or/ ith a cache, .ou nee* a re7erence to the cache A** the 7olloing to the top o7 an. Ile 7rom hich .ou ant to use the 'tac/-changee*is client to access an Azure e*is )ache
.sing edis /ac;e in /ode
 
/onnect to t;e cac;e
 
+et e#iration to items in cac;e
-  o speci7. the e-piration o7 an item in the cache, use the  ime'pan parameter o7 'tring'et
.sing edis /ac;e in /ode
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
+tore A+P*5 +ession +tate in cac;e
- Azure e*is )ache provi*es a session state provi*er that .ou can use to store .our session state in a cache rather than in#memor. or in a '> 'erver *atabase o use the caching session state provi*er, Irst conIgure .our cache, an* then conIgure .our A'P= application 7or cache using the e*is )ache 'ession 'tate =u(et pac/age
  Oinsta-#ac9age Microsoft*7eb*edis+ession+tatePro!ider
.sing edis /ac;e in /ode
 
/;ec9 7eb*con<g <e
.sing edis /ac;e in /ode
 
- nabe more oose-cou#ing bet@een @eb tier bac9-end
- nabe async;ronous message #rocessing in case of faiures
- % Ee. use cases to +*enti7. - Hig; /P. - Hig; &atency - Greuent n-freuent &oad Bursts - +er!ice reuiring a $rd-Party n#ut
>ueuing on Azure
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
-  our a##ication must store o!er 80 6B of messages in a ueue, @;ere t;e messages ;a!e a ifetime s;orter t;an ( days*
-  our a##ication @ants to trac9 #rogress for #rocessing a message inside of t;e ueue* ;is is usefu if t;e @or9er #rocessing a message cras;es* A subseuent @or9er can t;en use t;at information to continue from @;ere t;e #rior @or9er eft oQ*
-  ou reuire ser!er side ogs of a of t;e transactions eecuted against your ueues*
.se /ases A##ication De!eo#er
 
ig;ty /ou#ed
9.<i-+t Application
 
&oosey /ou#ed
9.<i-+t Application
&oosey /ou#ed, 1 7eb ier
9.<i-+t Application
&oosey /ou#ed, n 7eb ier
>ueue istener
 as/ >ueue
 
 
Ho@ to use itI
Ho@ to use itI
"d code
5e@ code
 
 
 
DAN C
Day1 Day2 Day$ Day4 Day%
• +ntro*uction • )lou*
Development Best Practices
• Data 'torage Options
8ithstan*ing <ailure
• 8P+ & 8eb9atri-3 # Demo
• 8h. =o#'>?   • sing 9anage*
• 8eb 'ites & Auto'cale ; Demo
• async in = %C   • Blob 'torage   • sing Azure e*is
)ache   • ab
• )o*e evie & 3 Best Practices
• )o*e evie in :'2013
  • ab C   • Poer'hell )m*lets
& Doc/er # Demos
Azure   • ab 5 & ab "
• Azure 9anagement portal al/through
 
Design to +ur!i!e Gaiures
 
<ailures ill ;a##en
 
y#es
.nderstanding +co#e:
 
A##ication +&A R I
 
Buy a 6ood eemetry +er!ice
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
Open eb site, go to )O=<+(, app settings
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
Buil* in :'2013, save all Iles an* e-it )lose :2013, open 8eb9atri- an* then WPublishX +t shos the ne Iles to publish, clic/ OE an* procee*
 
 
DevOps
De!"#s
De!"#s on /oud
De!"#s Princi#es
 
  .se t reat Automation
+ource /ontro
settings
@or9So@s
/reate sub-branc;es
Pro*uction
<eatures being +ntegrate*
5eed a Hot<Bug<I
Pro*uction
• )onI*ence • Agilit. • ess Prone to rrors
 
.sing Distributed +ource /ontro
• (it • 9ercurial •  <'
• :isual 'tu*io 2013 supports (it • (it#tooling built in • <' 'erver & <' Online 'ervice
no supports publishing (it repositor.
 
+tore +ensiti!e Data in Azure
Microsoft Azure
• %onnection Strings in Azure
 
ab sing (it in :'2013
• sing (it in :'2013
• (it, OE, creates (it repositor. in solution 7ol*er
• ight#clic/ 'olution -plorer, %ommit 
• nter commit comment, an* clic/ %ommit 
• %ompare with odi,ed to see changes that ere ma*e
• -plore Branches, 9erging etc
Automation in Microsoft Azure
Automation in Microsoft Azure
 
7;at are /mdetsI
A c#dlet  is a lighteight comman* that is use* in the 8in*os Poer'hell environment he 8in*os Poer'hell runtime invo/es these cm*lets ithin the conte-t o7 automation scripts that are provi*e* at the comman* line he 8in*os Poer'hell runtime also invo/es them programmaticall. through 8in*os Poer'hell AP+s
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
A fe@ co##on /mdetsF
• 'et#-ecutionPolic. • A**#AzureAccount • (et#Azure'ubscription • 'et#Azure'ubscription • (et#AzurePublish'ettings<ile • +mport#AzurePublish'ettings <ile • (et#Azureocation • =e#AzureATnit.(roup • =e#Azure'torageAccount
 
 
Open Poer'hell as Wa*minX
 
 
 
 
 
Be7ore assigning )urrent'torageAccount=ame to Azure'ubscription
A7ter assigning )urrent'torageAccount=ame to Azure'ubscription
 
Be7ore assigning )urrent'torageAccount=ame to Azure'ubscription
A7ter assigning )urrent'torageAccount=ame to Azure'ubscription
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
+taged De#oyment 6itHub ntegration 8hen .ou *eplo. .our application to Azure 8eb 'ites, .ou can *eplo. to a separate *eplo.ment slot instea* o7 the *e7ault pro*uction slot, hich are actuall. live sites ith their on hostnames his option is available in the +tandard @eb ;osting #an <urthermore, .ou can sap the sites an* site conIgurations beteen to *eplo.ment slots, inclu*ing the pro*uction slot
Deplo.ing .our application to a *eplo.ment slot has the 7olloing beneIts
1 A7ter a sap, the slot ith previousl. stage* site no has the previous pro*uction site +7 the changes sappe* into the pro*uction slot are not as .ou e-pecte*, .ou can per7orm the same sap imme*iatel. to get .our [last /non goo* site[ bac/
2 Deplo.ing a site to a slot Irst an* sapping it into pro*uction ensures that all instances o7 the slot are arme* up be7ore being sappe* into pro*uction his eliminates *ontime hen .ou *eplo. .our site
 
 
 
 
(o insi*e V'taging 8eb 'iteS an* >uic/ (lance
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
# +nsi*e :'2013, right#clic/ Wpro6ectX an* WA** to 'ource )ontrolX
-  eam -plorer )hanges  )ommit the changes ith a comment
- 8e then nee* to choose hich epositor. .ou ish to connect (ive 7or .our (itJub repositor. 7rom the Azure 9anagement Portal An* then connect in *ialog an* commit
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
 
 
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
 
 
Day1 Day2 Day$ Day4 Day%
• +ntro*uction • )lou*
Development Best Practices
• Data 'torage Options
8ithstan*ing <ailure
• 8P+ & 8eb9atri-3 # Demo
• 8h. =o#'>?   • sing 9anage*
• 8eb 'ites & Auto'cale ; Demo
• async in = %C   • Blob 'torage   • sing Azure e*is
)ache   • ab
• )o*e evie & 3 Best Practices
• )o*e evie in :'2013
  • ab C   • Poer'hell )m*lets
& Doc/er # Demos
Azure   • ab 5 & ab "
• Azure 9anagement portal al/through
 
Assessment n* o7 Da. C
20 9ultiple )hoice >uestions, %0 9inutes
 
2% B' PA)+)' A*vance* echniRues
)onsi*er these ones be7ore migrating applications to )lou*
 
  Programming Azure Better, Best Practices & DevOps subhasishghosh2013@hotmailcom !"1#""1$0%331
2% Architectural Best Practices to 7ollo be7ore 9igrating ine#o7# Business FOBG Applications to )lou*
Donloa* ;tt#Fmsdn*microsoft*comen-usibrarydn%'80))*as#
ecommen*e* eBoo/sDonloa* & Print
G
Best Practices to 7ollo
 
+ntro*uction to Azure
- )oming 7rom +n7ra bac/groun*
+ntro*uction to Azure
- )oming 7rom Developer bac/groun*
Best Practices hile *ealing ith J.bri* )lou*
- )oming 7rom 'enior 'olutions Architect + bac/groun*
 
+ntro*ucing 9icroso7t Azure JD+nsight
- )oming bac/ Developer Big Data B+ bac/groun*s
 
- )oming bac/ Developer Architect bac/groun*s
 
Best Practices to Buil*ing Architecting )lou* Applications 7or 'cale
- )oming bac/ Developer Architect bac/groun*s
- B Irst basics o7 Azure must be ver. clear
 
8or/shop Dec/
Ho@ do you co#yI