Automatically deployment to Azure Web Sites
-
Upload
gian-maria-ricci -
Category
Technology
-
view
242 -
download
2
description
Transcript of Automatically deployment to Azure Web Sites
![Page 1: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/1.jpg)
Template designed by
windows azure deployment & tfs
Ricci Gian [email protected]://www.getlatestversion.it
![Page 2: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/2.jpg)
brought to you by
![Page 3: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/3.jpg)
Visual Studio ALM MVP
Appassionato di community e libero professionista
Contatti
Skype: alkampferaokTwitter: alkampferBlog: http://www.codewrecks.com http://www.getlatestversion.it http://blogs.ugidotnet.org/rgm E-Mail: [email protected]
Chi sono
![Page 4: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/4.jpg)
Concetti di base di Continuous Deployment
Continuous deployment su Windows Azure Web Sites
Deploy tramite git
Deploy tramite TF Service
Personalizzazione del workflow di rilascio
agenda
![Page 5: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/5.jpg)
Rilascio automatizzato del software
Rilasci in test / produzione
Velocizzare i feedback nel mondo agile
Verifica costante dello stato di salute del software
Evitare il «bagno di sangue» durante i rilasci
Continuous Deployment
![Page 6: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/6.jpg)
Azure Web Sites
Supporto di sorgenti di
pubblicazione eterogenee
![Page 7: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/7.jpg)
dem
o Deploy: Hello World con
Git
![Page 8: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/8.jpg)
Dietro le quinte
![Page 9: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/9.jpg)
Github
Codeplex
Qualsiasi hosting che supporta git
Cartella locale
Subversion (git-svn)
TFS VCS (git-tf)
Da dove posso pubblicare con Git
![Page 10: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/10.jpg)
.deployment
Come personalizzo lo script di build
[config]command = deploy.cmd
deploy.bat
@echo off
Echo Questo è il mio script di build
Powershell
Bash
Php
…
![Page 11: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/11.jpg)
Non partire da zero con il build script
azure site deploymentscript --aspWAP DemoApplication\demoapplication.csproj -s "demoapplication.sln"
deploy.cmd
@echo off
:: ----------------------:: KUDU Deployment Script:: ----------------------
:: Prerequisites:: -------------
:: Verify node.js installedwhere node 2>nul >nulIF %ERRORLEVEL% NEQ 0 ( echo Missing node.js executable, please install node.js goto error)
:: Setup:: -----
setlocal enabledelayedexpansion
SET ARTIFACTS=%~dp0%artifacts
IF NOT DEFINED DEPLOYMENT_SOURCE ( SET DEPLOYMENT_SOURCE=%~dp0%.)
IF NOT DEFINED DEPLOYMENT_TARGET ( SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot)
IF NOT DEFINED NEXT_MANIFEST_PATH ( SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest
IF NOT DEFINED PREVIOUS_MANIFEST_PATH (............
I command line tool di azure prevedono la generazione di uno script base di rilascio che potrete modificare
![Page 12: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/12.jpg)
Con TF Service è possibile pubblicare tramite una TFS Build
TF Service
![Page 13: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/13.jpg)
dem
o Deploy: Hello World con
TF Service
![Page 14: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/14.jpg)
Dietro le quinteViene creata una build di TFS che si basa su un template apposite per la pubblicazione in azure
TF Service Build agent (elastic build) Azure Web
Site
![Page 15: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/15.jpg)
Build on-premiseÈ naturalmente possibile usare un build agent on-premise per la build
TF Service Build agent (on - premise) Azure Web
Site
![Page 16: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/16.jpg)
Vantaggi
Trigger: ad ogni checkin, manuale, schedulato, …
Integrato con TF Service (TFS)
Basato su workflow foundation
Estendibile
Log, drop folder, pubblicazione simboli sorgenti, etc (TFS Build)
Feedback tool
![Page 17: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/17.jpg)
Personalizzazioni tipiche
Deploy di una struttura database mediante SSDT
Esecuzione di smoke test al termine del deploy
Pubblicazione del risultato di una build completata in passato (build quality / testing team)
Warm up del sito dopo il deploy
Invio mail con cambiamenti (bug chiusi etc)
…
![Page 18: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/18.jpg)
demoPersonalizzazione del template per aggiornare database con SSDT
![Page 19: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/19.jpg)
Ulteriori dettagli
Non è possibile, per ora, pubblicare da un progetto TF Service basato su git• Ancora il workflow di build non è personalizzabile
• Si può semplicemente deployare da un git locale
È possibile pubblicare su azure anche se si ha una installazione completa TFS on premise• Importare da Visual Studio il file publishsettings
• Specificare i parametri di deploy specifici per msbuild
![Page 20: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/20.jpg)
Deploy from TFS on-premise to Azure Web Sites
Tutta l’infrastruttura TFS risiede on-premise
TFS Server Build agent (on - premise) Azure Web
Site
![Page 21: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/21.jpg)
Sm
oke
test
Running a web performance
test to «smoke test» the site
After deploy a test is failed, deploy is flagged failed
![Page 22: Automatically deployment to Azure Web Sites](https://reader035.fdocuments.us/reader035/viewer/2022062418/5564342ed8b42ace308b4941/html5/thumbnails/22.jpg)
Grazie a tutti per la partecipazione
Riceverete il link per il download a slide e demo via email nei prossimi giorni
Per contattarmi
[email protected], [email protected]
Grazie