SlideShare a Scribd company logo
1 of 5
Deploying to Azure Web Sites
Introduction
ThisdocumentdescribeshowtosetupanEPiServerCMSsite to run onAzure WebSites.Formore
informationsee Azure WebSites.Here anemptysite iscreatedfromVisual Studiointegrationbut
the most stepsdescribedappliestoothersitesaswell.
Create site
In Visual Studioselectcreate newProjectandchose EPiServerWebsite (eitherMVCor WebForms).
Note that thisrequiresEPiServerVisual Studioadd-ontobe installed.
Project references
Install NuGetpackagesEPiServer.Azure andEPiServer.CMS.Core tothe project(the referencesforthe
projectwill automaticallybe updatedtouse the NuGetpackagesinsteadof GACinstalledassemblies
whichisrequiredforpublishingthe site).
Create Azure resources
Create Azure Web Site
Openthe Azure managementportal andselectoption“WEBSITES” inthe leftmenu.Select“NEW”in
the bottomleftcornerand inthe dialogselect“CUSTOMCREATE”. Give an URL foryour website and
selectaRegionof your choice.Selectalsotocreate a new SQL database.Indatabase settingseither
selectanexistingseverorcreate a newone and give a login userandpassword.
Create Azure Storage
WhenrunningonAzure the media(forexample images) shouldbe storedinAzure blobstorage to
enable elasticscaling.Tocreate a blobstorage account go to the Azure Managementportal and
select“STORAGE”from the leftmenu.Select“NEW”in the bottomleftcornerandin the dialogselect
“QUICK CREATE”. Give an URL forthe storage andselecttocreate the storage account.
Tip: Create twoblobstorage accounts, one fordevelopmentandone forproduction,tomake iteasy
to switchbetweenthemusingjustthe connectionstring.
Create Service Bus
To be able toscale the site to run on several instanceswe needtosetupa Service Busto handle
messagesbetweenthe site instances.Tocreate a service busgo to Azure Managementportal and
select“SERVICEBUS” fromthe leftmenu.Select“CREATE”inthe bottommenuandin the dialog
selectanamespace name anda region.
Tip: Create twoservice busaccounts,one for developmentandone forproduction,tomake iteasy
to switchbetweenthemusingjustthe connectionstring.
Install database schema
OpenDeploymentCenterandchoose option“InstallSQLServerdatabase”.Inthe dialogthatopens
enterthe name of the SQL serverinAzure,the database userandpassword.The settingscanbe
foundinAzure Managementportal underthe createdAzure WebSite tothe right under“View
connectionstrings”.Indropdownselectthe database thatwascreatedduringcreationof Azure Web
Site.
Update configuration
EPiServer.Framework.config
OpenupEPiServer.Framework.configandaddthe followingblocktomapblobandeventprovidersto
Azure:
<blob defaultProvider="azureblobs">
<providers>
<add name="azureblobs"
type="EPiServer.Azure.Blobs.AzureBlobProvider,EPiServer.Azure"
connectionStringName="EPiServerAzureBlobs" container="MySiteMedia"/>
</providers>
</blob>
<event defaultProvider="azureevents">
<providers>
<add name="azureevents"
type="EPiServer.Azure.Events.AzureEventProvider,EPiServer.Azure"
connectionStringName="EPiServerAzureEvents" topic="MySiteEvents"/>
</providers>
</event>
Attribute containerforblobproviderand topicforeventprovidershouldbe unique persite within
the same storage or service busaccount.
connectionStrings.config
In connectionStrings.configchange connectionstringEPiServerDBtothe connectionstringfrom
Azure Managementportal (see Install databaseschema).Rememberthoughtokeepsetting
MultipleActiveResultSets=true.
Adda connectionstringnamed“EPiServerAzureBlobs”(aname thatmatchesthe settingin
EPiServer.Framework.configforthe provider).The connectionstringtothe blobstorage shouldbe in
format:
connectionString="DefaultEndpointsProtocol=https;AccountName=<name>;AccountKey=<key>"
where <name>iswhat wasgiveninsection“Create Azure Storage”.<key>can be foundinAzure
Managementportal under“Storage”if youselectthe name and thenselect“MANAGEACCESSKEYS”
inthe bottommenu.
Adda connectionstringnamed “EPiServerAzureEvents”(aname thatmatchesthe settingin
EPiServer.Framework.configforthe provider).The connectionstringtoService Buscanbe foundin
Azure Managementportal under“SERVICEBUS” if you selectthe name thatwas giveninsection
“Create Service Bus”and select“ACCESSKEY”in the bottommenu.
Tip: Connectionstringscanbe definedonanAzure WebSite underthe tab “CONFIGURE”whichis a
convenientwaytohave differentconnectionstringsforstagingandproduction.
episerver.config
In episerver.configchange the settingsiteUrl onelementepiserver/sites/site/siteSettingstothe site
that wascreatedundersection“Create Azure WebSite”.The URL can be foundinAzure
Managementportal under“WEB SITES” if you selectthe createdwebsite andselectdashboardin
the top menu.Thenthe site URL is giveninrightcolumn.
Web.config
The database schemafor Workflow3.5 (thatis the versionEPiServerCMScurrentlyuse) isnot
supportedinAzure database.Therefore the configurationforWorkflow persistence service mustbe
removed(thatisthe entrywithtype SqlWorkflowPersistanceService under
workflowServices/runtime).
The ASP.NETbuilt-inschemaformembership,role andprofile providersare notsupportedonSQL
Azure,therefore the configurationforthose SQLprovidersshouldbe changedtouse ASP.NET
Universal Providers(those are addedautomaticallytothe projectwheninstallingthe EPiServer.Azure
package).Change the providerstothe followingnew typesinweb.config:
System.Web.Providers.DefaultRoleProvider, System.Web.Providers
System.Web.Providers.DefaultMembershipProvider, System.Web.Providers
System.Web.Providers.DefaultProfileProvider, System.Web.Providers
Create an admin/edit user
Before deployingtoAzure create auserthat have access to adminandeditmode.Youdo thisby
configuringMultiplexingRoleProviderandMultiplexingMembershipProviderasdefaultprovidersto
enable Windowsauthenticationlocallyonyourmachine.Thenbrowse the site locallybutwiththe
database connectionstringsetupagainstthe database inAzure.Thengotoadminmode and under
“AdministerGroups”create twogroups WebAdminsandWebEditors.Thencreate auserthat is
memberof boththe createdgroups.Configure the site withSQLmembership/roleprovidersas
defaultprovidersandensure thatthe createdusercan loginandaccess adminmode.
Deployment using FTP
In Azure Managementportal youcan downloadapublishprofile forthe website byselectingthe site
and dashboardfromtop menu.Thenyoufind“Downloadthe publishprofile”inthe rightmenu.You
can use thisprofile lateronto publishyourtemplatesdirectlyforwithinVisualStudio.
If you openthe settingsfile youcanfindFTPaccesssettingsthere.OpenupaFTP client(forexample
FileZilla) andconnecttoyourAzure WebSite usingthe settings.
Navigate intowwwrootfolderonthe ftphostand sendoverfilesfromyourlocal site root(itis
enoughtosendfilesnecessarytorunsite like forexample bin,modulesbinetc.if youare uncertain
youcan sendall files).
Thennavigate one level uponftphost(foldercalledsite) anduploadappdatafoldertothat location.
Tip: Increase the numberof maximumparalleluploadsinFileZillatothe maximumof 10 to increase
uploadperformance whenyouuploadalarge amountof filessuchasappdata.
Deploying Content
The recommendedwaytotransferdatato an EPiServersite runningonAzure WebSitesistouse
EPiServerCMSExport/Importfunctionality.There are howeverotheroptionslike the migration
wizardto migrate an existingSQLServerdatabase.
Deployment through source control
It ispossible toconfigure Azure WebSitessoitusesacontinuousdeploymentfromsource code
control.It supportsforexample Git,GitHubandTFS. Fora full descriptionsee PublishfromSource
control.
Basicallyitworksinthe way that whenyoudoa committo yoursource control WindowsAzure will
getthe latestcode fromthe source control builditand deploy the outputtothe website(when
workingwithalocal git repositoryyoucaninsteadpushyourchangesto Azure WebSites).
Azure will buildyourprojectandpublishthe filesreferencedbythe projectinthe same wayas a
publishfromvisual studioworks.ForanEPiServerCMSsite there are some additional resourceslike
folderappdata (containsforexampleprotectedadd-ons) andfoldersmodules/modulesbin(that
containpublicadd-ons) thatare neededtobe able torun the site.
Here there are some optionsonhowto handle this additional resources.The synchronizationof files
whenAzure deploysfilestothe Azure WebSite worksso that it keepstrackof filesthatare inthe
code repositoryandonlythose filesare changedduringdeployment.Thatmeansthatmanually
transferredfileswillnotbe modified/deletedduringcontinuousdeployment.
No modules in source control
One optionisto not include those additionalfoldersinthe source code repositoryandinsteaduse
FTP to transferthe files. Additional add-onscanthenbe installeddirectlyonthe site runningon
Azure.
Modules included in source control
The other optionistohave the resourcesincludedinthe source code repository.Thenadd-onscould
be handledinthe waythat theyare firstinstalledonalocal site.Thenwhenverifiedthatthe add-on
workas expectedthe resource folderis committedandthendeployedtothe site runninginAzure.
Since the deploymenttothe website inazure onlyincludesfilesreferencedbythe projecta
modificationtothe deploymentneedstobe done sothe additional resourcesare includedinthe
deployment.
Duringthe deploymentprocesstoAzure website the “deployer”willlookforafile named
.deployment,if itexistitwill use itfordeploymentotherwise itwillcreate adefault.deploymentfile.
To be able tohandle additional resourcesthe .deploymentfile(oractuallythe dependent
deploy.cmd) needstobe modified.The firststeptodois to generate the fileslocally,how todothat
isdescribed here.The files.deploymentanddeploy.cmdshouldbe addedtosource control inthe
root (fora normal CMS projectthe source code repositoryrootshouldbe the foldercontaining
wwwrootandappdata).
Afterthat the deploy.cmdneedstobe modifiedsoitincludessynchronizationof appdata,modules
and modulesbinfolders. Asanexampleof amodifieddeploy.cmdfirstsome variablesare addedin
the setuppart afterthe onesalreadyinthe file,like:
SET NEXT_APPDATA_MANIFEST_PATH=%NEXT_MANIFEST_PATH%appdata
SET PREVIOUS_APPDATA_MANIFEST_PATH=%PREVIOUS_MANIFEST_PATH%appdata
SET NEXT_MODULESBIN_MANIFEST_PATH=%NEXT_MANIFEST_PATH%modulesbin
SET PREVIOUS_MODULESBIN_MANIFEST_PATH=%PREVIOUS_MANIFEST_PATH%modulesbin
SET NEXT_MODULES_MANIFEST_PATH=%NEXT_MANIFEST_PATH%modules
SET PREVIOUS_MODULES_MANIFEST_PATH=%PREVIOUS_MANIFEST_PATH%modules
setcurrent=%DEPLOYMENT_TARGET%
pushd..
setDEPLOYMENT_ROOT=%cd%
popd
Andin the deploymentpartsome additionaldeploymentcallsare addedlike:
call %KUDU_SYNC_CMD% -v 50 -f "%DEPLOYMENT_SOURCE%<wwwroot>modulesbin"-t
"%DEPLOYMENT_TARGET%modulesbin"-n"%NEXT_MODULESBIN_MANIFEST_PATH%" -p
"%PREVIOUS_MODULESBIN_MANIFEST_PATH%"
call %KUDU_SYNC_CMD% -v 50 -f "%DEPLOYMENT_SOURCE%<wwwroot>modules"-t
"%DEPLOYMENT_TARGET%modules"-n"%NEXT_MODULES_MANIFEST_PATH%" -p
"%PREVIOUS_MODULES_MANIFEST_PATH%"
call %KUDU_SYNC_CMD% -v 50 -f "%DEPLOYMENT_SOURCE%appdata"-t
"%DEPLOYMENT_ROOT%appdata"-n"%NEXT_APPDATA_MANIFEST_PATH%" -p
"%PREVIOUS_APPDATA_MANIFEST_PATH%"
Note that itusesa tool kuduSyncinsteadof forexample xcopy.kuduSyncwilluse manifestfilesto
keeptrack of whichfilesthatare presentina deployment.Thenatnextdeploymentitwill compare
the current state withthe previousmanifestfile andcanthendetermine whichfilesthathave been
added/deletedetc.

More Related Content

What's hot

Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStackPuppet
 
How to customize Spring Boot?
How to customize Spring Boot?How to customize Spring Boot?
How to customize Spring Boot?GilWon Oh
 
Spring Boot Actuator
Spring Boot ActuatorSpring Boot Actuator
Spring Boot ActuatorRowell Belen
 
Provisioning in Microsoft Azure
Provisioning in Microsoft AzureProvisioning in Microsoft Azure
Provisioning in Microsoft Azureilagin
 
Micronaut For Single Page Apps
Micronaut For Single Page AppsMicronaut For Single Page Apps
Micronaut For Single Page AppsZachary Klein
 
Ansible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration ManagementAnsible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration ManagementShapeBlue
 
06 integrate elasticsearch
06 integrate elasticsearch06 integrate elasticsearch
06 integrate elasticsearchErhwen Kuo
 
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...Ryan Weaver
 
Felix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the futureFelix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the futureMarcel Offermans
 
03 integrate webapisignalr
03 integrate webapisignalr03 integrate webapisignalr
03 integrate webapisignalrErhwen Kuo
 
Spring Boot & WebSocket
Spring Boot & WebSocketSpring Boot & WebSocket
Spring Boot & WebSocketMing-Ying Wu
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with SpringJoshua Long
 
New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10Takayoshi Tanaka
 
Java Web Application Security - UberConf 2011
Java Web Application Security - UberConf 2011Java Web Application Security - UberConf 2011
Java Web Application Security - UberConf 2011Matt Raible
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Max Andersen
 
New features of Azure Cloud Provider at OCP 3.10
New features of Azure Cloud Provider at OCP 3.10New features of Azure Cloud Provider at OCP 3.10
New features of Azure Cloud Provider at OCP 3.10Takayoshi Tanaka
 
Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated wayMichaël Perrin
 

What's hot (20)

Azure powershell management
Azure powershell managementAzure powershell management
Azure powershell management
 
Firebase with Android
Firebase with AndroidFirebase with Android
Firebase with Android
 
Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStack
 
How to customize Spring Boot?
How to customize Spring Boot?How to customize Spring Boot?
How to customize Spring Boot?
 
Spring Boot Actuator
Spring Boot ActuatorSpring Boot Actuator
Spring Boot Actuator
 
Provisioning in Microsoft Azure
Provisioning in Microsoft AzureProvisioning in Microsoft Azure
Provisioning in Microsoft Azure
 
Micronaut For Single Page Apps
Micronaut For Single Page AppsMicronaut For Single Page Apps
Micronaut For Single Page Apps
 
Ansible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration ManagementAnsible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration Management
 
06 integrate elasticsearch
06 integrate elasticsearch06 integrate elasticsearch
06 integrate elasticsearch
 
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
 
Felix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the futureFelix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the future
 
03 integrate webapisignalr
03 integrate webapisignalr03 integrate webapisignalr
03 integrate webapisignalr
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
 
Spring Boot & WebSocket
Spring Boot & WebSocketSpring Boot & WebSocket
Spring Boot & WebSocket
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 
New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10
 
Java Web Application Security - UberConf 2011
Java Web Application Security - UberConf 2011Java Web Application Security - UberConf 2011
Java Web Application Security - UberConf 2011
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
 
New features of Azure Cloud Provider at OCP 3.10
New features of Azure Cloud Provider at OCP 3.10New features of Azure Cloud Provider at OCP 3.10
New features of Azure Cloud Provider at OCP 3.10
 
Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated way
 

Similar to Deploying to azure web sites

Integrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code SuiteIntegrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code SuiteAtlassian
 
SCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AISCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AIHiroshi Tanaka
 
Infrastructure as-code-guide-en-v6 299129
Infrastructure as-code-guide-en-v6 299129Infrastructure as-code-guide-en-v6 299129
Infrastructure as-code-guide-en-v6 299129Ai K
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsAndrey Karpov
 
Running Vue Storefront in production (PWA Magento webshop)
Running Vue Storefront in production (PWA Magento webshop)Running Vue Storefront in production (PWA Magento webshop)
Running Vue Storefront in production (PWA Magento webshop)Vendic Magento, PWA & Marketing
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursAmazon Web Services
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAmazon Web Services
 
Automating Windows Azure
Automating Windows AzureAutomating Windows Azure
Automating Windows AzureIdo Flatow
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAmazon Web Services
 
AWS Webcast - Getting Started with AWS OpsWorks
AWS Webcast - Getting Started with AWS OpsWorksAWS Webcast - Getting Started with AWS OpsWorks
AWS Webcast - Getting Started with AWS OpsWorksAmazon Web Services
 
Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法
Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法
Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法Masahiko Ebisuda
 
Java – azure integration
Java – azure integrationJava – azure integration
Java – azure integrationpramajaya
 
AWS July Webinar Series: Introducing AWS OpsWorks for Windows Server
AWS July Webinar Series: Introducing AWS OpsWorks for Windows ServerAWS July Webinar Series: Introducing AWS OpsWorks for Windows Server
AWS July Webinar Series: Introducing AWS OpsWorks for Windows ServerAmazon Web Services
 
Simple Odoo ERP auto scaling on AWS
Simple Odoo ERP auto scaling on AWSSimple Odoo ERP auto scaling on AWS
Simple Odoo ERP auto scaling on AWSJulien Lecadou,MSc.
 
Spring boot-application
Spring boot-applicationSpring boot-application
Spring boot-applicationParag Patil
 
Azure DevOps Deployment Group
Azure DevOps Deployment GroupAzure DevOps Deployment Group
Azure DevOps Deployment GroupRiwut Libinuko
 
Cloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWSCloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWSAmine Sadry
 

Similar to Deploying to azure web sites (20)

Integrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code SuiteIntegrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code Suite
 
SCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AISCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AI
 
Infrastructure as-code-guide-en-v6 299129
Infrastructure as-code-guide-en-v6 299129Infrastructure as-code-guide-en-v6 299129
Infrastructure as-code-guide-en-v6 299129
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
 
Running Vue Storefront in production (PWA Magento webshop)
Running Vue Storefront in production (PWA Magento webshop)Running Vue Storefront in production (PWA Magento webshop)
Running Vue Storefront in production (PWA Magento webshop)
 
AWS essentials EC2
AWS essentials EC2AWS essentials EC2
AWS essentials EC2
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office Hours
 
AWS Serverless Workshop
AWS Serverless WorkshopAWS Serverless Workshop
AWS Serverless Workshop
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for Government
 
Automating Windows Azure
Automating Windows AzureAutomating Windows Azure
Automating Windows Azure
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for Government
 
AWS Webcast - Getting Started with AWS OpsWorks
AWS Webcast - Getting Started with AWS OpsWorksAWS Webcast - Getting Started with AWS OpsWorks
AWS Webcast - Getting Started with AWS OpsWorks
 
Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法
Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法
Azure Stack Hub Development Kit (ASDK)のAzure上への構築方法
 
Java – azure integration
Java – azure integrationJava – azure integration
Java – azure integration
 
AWS July Webinar Series: Introducing AWS OpsWorks for Windows Server
AWS July Webinar Series: Introducing AWS OpsWorks for Windows ServerAWS July Webinar Series: Introducing AWS OpsWorks for Windows Server
AWS July Webinar Series: Introducing AWS OpsWorks for Windows Server
 
Simple Odoo ERP auto scaling on AWS
Simple Odoo ERP auto scaling on AWSSimple Odoo ERP auto scaling on AWS
Simple Odoo ERP auto scaling on AWS
 
Spring boot-application
Spring boot-applicationSpring boot-application
Spring boot-application
 
Azure DevOps Deployment Group
Azure DevOps Deployment GroupAzure DevOps Deployment Group
Azure DevOps Deployment Group
 
Cloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWSCloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWS
 
Deployment automation
Deployment automationDeployment automation
Deployment automation
 

Recently uploaded

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

Deploying to azure web sites

  • 1. Deploying to Azure Web Sites Introduction ThisdocumentdescribeshowtosetupanEPiServerCMSsite to run onAzure WebSites.Formore informationsee Azure WebSites.Here anemptysite iscreatedfromVisual Studiointegrationbut the most stepsdescribedappliestoothersitesaswell. Create site In Visual Studioselectcreate newProjectandchose EPiServerWebsite (eitherMVCor WebForms). Note that thisrequiresEPiServerVisual Studioadd-ontobe installed. Project references Install NuGetpackagesEPiServer.Azure andEPiServer.CMS.Core tothe project(the referencesforthe projectwill automaticallybe updatedtouse the NuGetpackagesinsteadof GACinstalledassemblies whichisrequiredforpublishingthe site). Create Azure resources Create Azure Web Site Openthe Azure managementportal andselectoption“WEBSITES” inthe leftmenu.Select“NEW”in the bottomleftcornerand inthe dialogselect“CUSTOMCREATE”. Give an URL foryour website and selectaRegionof your choice.Selectalsotocreate a new SQL database.Indatabase settingseither selectanexistingseverorcreate a newone and give a login userandpassword. Create Azure Storage WhenrunningonAzure the media(forexample images) shouldbe storedinAzure blobstorage to enable elasticscaling.Tocreate a blobstorage account go to the Azure Managementportal and select“STORAGE”from the leftmenu.Select“NEW”in the bottomleftcornerandin the dialogselect “QUICK CREATE”. Give an URL forthe storage andselecttocreate the storage account. Tip: Create twoblobstorage accounts, one fordevelopmentandone forproduction,tomake iteasy to switchbetweenthemusingjustthe connectionstring. Create Service Bus To be able toscale the site to run on several instanceswe needtosetupa Service Busto handle messagesbetweenthe site instances.Tocreate a service busgo to Azure Managementportal and select“SERVICEBUS” fromthe leftmenu.Select“CREATE”inthe bottommenuandin the dialog selectanamespace name anda region. Tip: Create twoservice busaccounts,one for developmentandone forproduction,tomake iteasy to switchbetweenthemusingjustthe connectionstring. Install database schema OpenDeploymentCenterandchoose option“InstallSQLServerdatabase”.Inthe dialogthatopens enterthe name of the SQL serverinAzure,the database userandpassword.The settingscanbe foundinAzure Managementportal underthe createdAzure WebSite tothe right under“View connectionstrings”.Indropdownselectthe database thatwascreatedduringcreationof Azure Web Site.
  • 2. Update configuration EPiServer.Framework.config OpenupEPiServer.Framework.configandaddthe followingblocktomapblobandeventprovidersto Azure: <blob defaultProvider="azureblobs"> <providers> <add name="azureblobs" type="EPiServer.Azure.Blobs.AzureBlobProvider,EPiServer.Azure" connectionStringName="EPiServerAzureBlobs" container="MySiteMedia"/> </providers> </blob> <event defaultProvider="azureevents"> <providers> <add name="azureevents" type="EPiServer.Azure.Events.AzureEventProvider,EPiServer.Azure" connectionStringName="EPiServerAzureEvents" topic="MySiteEvents"/> </providers> </event> Attribute containerforblobproviderand topicforeventprovidershouldbe unique persite within the same storage or service busaccount. connectionStrings.config In connectionStrings.configchange connectionstringEPiServerDBtothe connectionstringfrom Azure Managementportal (see Install databaseschema).Rememberthoughtokeepsetting MultipleActiveResultSets=true. Adda connectionstringnamed“EPiServerAzureBlobs”(aname thatmatchesthe settingin EPiServer.Framework.configforthe provider).The connectionstringtothe blobstorage shouldbe in format: connectionString="DefaultEndpointsProtocol=https;AccountName=<name>;AccountKey=<key>" where <name>iswhat wasgiveninsection“Create Azure Storage”.<key>can be foundinAzure Managementportal under“Storage”if youselectthe name and thenselect“MANAGEACCESSKEYS” inthe bottommenu. Adda connectionstringnamed “EPiServerAzureEvents”(aname thatmatchesthe settingin EPiServer.Framework.configforthe provider).The connectionstringtoService Buscanbe foundin Azure Managementportal under“SERVICEBUS” if you selectthe name thatwas giveninsection “Create Service Bus”and select“ACCESSKEY”in the bottommenu. Tip: Connectionstringscanbe definedonanAzure WebSite underthe tab “CONFIGURE”whichis a convenientwaytohave differentconnectionstringsforstagingandproduction. episerver.config In episerver.configchange the settingsiteUrl onelementepiserver/sites/site/siteSettingstothe site that wascreatedundersection“Create Azure WebSite”.The URL can be foundinAzure Managementportal under“WEB SITES” if you selectthe createdwebsite andselectdashboardin the top menu.Thenthe site URL is giveninrightcolumn. Web.config The database schemafor Workflow3.5 (thatis the versionEPiServerCMScurrentlyuse) isnot supportedinAzure database.Therefore the configurationforWorkflow persistence service mustbe
  • 3. removed(thatisthe entrywithtype SqlWorkflowPersistanceService under workflowServices/runtime). The ASP.NETbuilt-inschemaformembership,role andprofile providersare notsupportedonSQL Azure,therefore the configurationforthose SQLprovidersshouldbe changedtouse ASP.NET Universal Providers(those are addedautomaticallytothe projectwheninstallingthe EPiServer.Azure package).Change the providerstothe followingnew typesinweb.config: System.Web.Providers.DefaultRoleProvider, System.Web.Providers System.Web.Providers.DefaultMembershipProvider, System.Web.Providers System.Web.Providers.DefaultProfileProvider, System.Web.Providers Create an admin/edit user Before deployingtoAzure create auserthat have access to adminandeditmode.Youdo thisby configuringMultiplexingRoleProviderandMultiplexingMembershipProviderasdefaultprovidersto enable Windowsauthenticationlocallyonyourmachine.Thenbrowse the site locallybutwiththe database connectionstringsetupagainstthe database inAzure.Thengotoadminmode and under “AdministerGroups”create twogroups WebAdminsandWebEditors.Thencreate auserthat is memberof boththe createdgroups.Configure the site withSQLmembership/roleprovidersas defaultprovidersandensure thatthe createdusercan loginandaccess adminmode. Deployment using FTP In Azure Managementportal youcan downloadapublishprofile forthe website byselectingthe site and dashboardfromtop menu.Thenyoufind“Downloadthe publishprofile”inthe rightmenu.You can use thisprofile lateronto publishyourtemplatesdirectlyforwithinVisualStudio. If you openthe settingsfile youcanfindFTPaccesssettingsthere.OpenupaFTP client(forexample FileZilla) andconnecttoyourAzure WebSite usingthe settings. Navigate intowwwrootfolderonthe ftphostand sendoverfilesfromyourlocal site root(itis enoughtosendfilesnecessarytorunsite like forexample bin,modulesbinetc.if youare uncertain youcan sendall files). Thennavigate one level uponftphost(foldercalledsite) anduploadappdatafoldertothat location. Tip: Increase the numberof maximumparalleluploadsinFileZillatothe maximumof 10 to increase uploadperformance whenyouuploadalarge amountof filessuchasappdata. Deploying Content The recommendedwaytotransferdatato an EPiServersite runningonAzure WebSitesistouse EPiServerCMSExport/Importfunctionality.There are howeverotheroptionslike the migration wizardto migrate an existingSQLServerdatabase. Deployment through source control It ispossible toconfigure Azure WebSitessoitusesacontinuousdeploymentfromsource code control.It supportsforexample Git,GitHubandTFS. Fora full descriptionsee PublishfromSource control. Basicallyitworksinthe way that whenyoudoa committo yoursource control WindowsAzure will getthe latestcode fromthe source control builditand deploy the outputtothe website(when workingwithalocal git repositoryyoucaninsteadpushyourchangesto Azure WebSites).
  • 4. Azure will buildyourprojectandpublishthe filesreferencedbythe projectinthe same wayas a publishfromvisual studioworks.ForanEPiServerCMSsite there are some additional resourceslike folderappdata (containsforexampleprotectedadd-ons) andfoldersmodules/modulesbin(that containpublicadd-ons) thatare neededtobe able torun the site. Here there are some optionsonhowto handle this additional resources.The synchronizationof files whenAzure deploysfilestothe Azure WebSite worksso that it keepstrackof filesthatare inthe code repositoryandonlythose filesare changedduringdeployment.Thatmeansthatmanually transferredfileswillnotbe modified/deletedduringcontinuousdeployment. No modules in source control One optionisto not include those additionalfoldersinthe source code repositoryandinsteaduse FTP to transferthe files. Additional add-onscanthenbe installeddirectlyonthe site runningon Azure. Modules included in source control The other optionistohave the resourcesincludedinthe source code repository.Thenadd-onscould be handledinthe waythat theyare firstinstalledonalocal site.Thenwhenverifiedthatthe add-on workas expectedthe resource folderis committedandthendeployedtothe site runninginAzure. Since the deploymenttothe website inazure onlyincludesfilesreferencedbythe projecta modificationtothe deploymentneedstobe done sothe additional resourcesare includedinthe deployment. Duringthe deploymentprocesstoAzure website the “deployer”willlookforafile named .deployment,if itexistitwill use itfordeploymentotherwise itwillcreate adefault.deploymentfile. To be able tohandle additional resourcesthe .deploymentfile(oractuallythe dependent deploy.cmd) needstobe modified.The firststeptodois to generate the fileslocally,how todothat isdescribed here.The files.deploymentanddeploy.cmdshouldbe addedtosource control inthe root (fora normal CMS projectthe source code repositoryrootshouldbe the foldercontaining wwwrootandappdata). Afterthat the deploy.cmdneedstobe modifiedsoitincludessynchronizationof appdata,modules and modulesbinfolders. Asanexampleof amodifieddeploy.cmdfirstsome variablesare addedin the setuppart afterthe onesalreadyinthe file,like: SET NEXT_APPDATA_MANIFEST_PATH=%NEXT_MANIFEST_PATH%appdata SET PREVIOUS_APPDATA_MANIFEST_PATH=%PREVIOUS_MANIFEST_PATH%appdata SET NEXT_MODULESBIN_MANIFEST_PATH=%NEXT_MANIFEST_PATH%modulesbin SET PREVIOUS_MODULESBIN_MANIFEST_PATH=%PREVIOUS_MANIFEST_PATH%modulesbin SET NEXT_MODULES_MANIFEST_PATH=%NEXT_MANIFEST_PATH%modules SET PREVIOUS_MODULES_MANIFEST_PATH=%PREVIOUS_MANIFEST_PATH%modules setcurrent=%DEPLOYMENT_TARGET% pushd.. setDEPLOYMENT_ROOT=%cd% popd
  • 5. Andin the deploymentpartsome additionaldeploymentcallsare addedlike: call %KUDU_SYNC_CMD% -v 50 -f "%DEPLOYMENT_SOURCE%<wwwroot>modulesbin"-t "%DEPLOYMENT_TARGET%modulesbin"-n"%NEXT_MODULESBIN_MANIFEST_PATH%" -p "%PREVIOUS_MODULESBIN_MANIFEST_PATH%" call %KUDU_SYNC_CMD% -v 50 -f "%DEPLOYMENT_SOURCE%<wwwroot>modules"-t "%DEPLOYMENT_TARGET%modules"-n"%NEXT_MODULES_MANIFEST_PATH%" -p "%PREVIOUS_MODULES_MANIFEST_PATH%" call %KUDU_SYNC_CMD% -v 50 -f "%DEPLOYMENT_SOURCE%appdata"-t "%DEPLOYMENT_ROOT%appdata"-n"%NEXT_APPDATA_MANIFEST_PATH%" -p "%PREVIOUS_APPDATA_MANIFEST_PATH%" Note that itusesa tool kuduSyncinsteadof forexample xcopy.kuduSyncwilluse manifestfilesto keeptrack of whichfilesthatare presentina deployment.Thenatnextdeploymentitwill compare the current state withthe previousmanifestfile andcanthendetermine whichfilesthathave been added/deletedetc.