Sergey Zwezdin
Установка пакета Web Deploy
Настройка публикации
Здесь же можно указать SSL-сертификат, если у вас такой имеется.
Если вы все сделали правильно, то в контекстном меню каждого сайта должен появиться пункт меню Deploy :
Внимание: Важно, чтобы пользователь, которого вы указываете при настройке Web Deploy имел права на запись в папку веб-сайта.
Теперь всё готово для публикации приложения.
Публикация
Публиковать приложение можно двумя способами — напрямую из Visual Studio и используя автоматизированные билд-скрипты.
Для публикации через msbuild-скрипт, можно использовать следующий подход: сначала мы собираем пакет для публикации (который к тому же будет является артефактом сборки), а затем публикуем его.
Как видно, при публикации требуется указать адрес для публикации, имя пользователя и пароль, а также имя сайта на сервере.
Разрешение проблем
По опыту могу сказать, что при настройке публикации могут возникать проблемы. Если вы убедились, что файрвол не блокирует ваши подключения и сервис WebDeploy установлен корректно, то можно включить отслеживание запросов и понять в чем причина.
Как разворачивать веб-сайты в Microsoft Azure?
Неделя Хэллоуина – популяция статей про веб-сайты в облаке Microsoft Azure удваивается.
Разворачиваем веб-сайт с помощью системы контроля версий, находящейся в облаке
Простым и хорошим способом развернуть веб-сайт является настройка системы контроля версий в облаке. Это снимает необходимость в установке и настройке ее локально.
Visual Studio Online (VSO)
Visual Studio Online (ранее Team Foundation Service) — облачный сервис в виде системы контроля версий и других возможностей для обеспечения коллаборации внутри команд. Сервис бесплатен для использования до 5 разработчиков. VSO полностью интегрирована с Azure Websites, и репозиторий может быть Git или TFVC.
Git в облаке
В Azure есть набор функций для автоматизации развертывания веб-сайтов из репозиториев Git в Azure WebSites (GitHub, CodePlex и BitBucket).
Mercurial
Dropbox
Разворачиваем из IDE
Visual Studio
WebMatrix
Разворачиваем по FTP
Вы можете разворачивать веб-сайты на Azure WebSites по FTP — например, с помощью Internet Explorer или FileZilla. Azure Websites поддерживают FTPS. Однако развертывание по FTP не поддерживает дополнительные задачи, например, развертывание базы данных, и не поддерживает сравнение файлов на источнике и приемнике.
Разворачиваем с помощью системы контроля версий, находящейся локально
Если вы используете локальный TFS, Git или Mercurial, то из этих репозиториев также можно разворачивать веб-сайты на Azure WebSites.
Локальные Git или Mercurial
В Azure достаточно ввести URL репозитория Git или Mercurial для развертывания из них.
Разворачиваем с помощью утилит командной строки и Azure REST API Management API
Автоматизировать — это всегда хорошо, но, если это не получается сделать с системой контроля версий, всегда можно использовать утилиты командной строки. В Azure многие задачи управления упрощены, плюс в наличии имеется REST API для управления платформой и несколько фреймворков для работ с ним.
MSBuild
Если для разработки вы используете Visual Studio IDE, для автоматизации вы можете использовать MSBuild, настроив его на использование Web Deploy или FTP/FTPS. Web Deploy умеет автоматизировать задачи, например, развертывание баз данных.
FTP-скрипты
Получить доступ к Azure WebSites по FTP/FTPS достаточно просто, и созданный аккаунт для доступа можно использовать для исполнения FTP-скриптов.
Windows PowerShell
Выполнять развертывание MSBuild или FTP можно с помощью Windows PowerShell, используя большое количество командлетов, специализированных для работы с Azure REST API.
.NET management API
Еще для MSBuild или FTP можно писать C#-код для доступа к REST API.
Кроссплатформенные утилиты командной строки (xpat-cli)
Утилиты командной строки для управления платформой и развертывания доступны также на Mac и Linux.
Web Deploy
Что дальше?
Развернули?
Почитайте про то, как тестировать Azure WebSites в продакшене.
Изучите, как работает и как делается резервирование ваших веб-сайтов.
Читайте остальную документацию.
Инструмент веб-развертывания Web Deploy 3.5
Web Deploy (MSDeploy) упрощает развертывание веб-приложений и веб-сайтов на серверах IIS.
Развертывания веб-приложений более легко
Web Deploy для Visual Studio и WebMatrix, помогает разработчикам упростить развертывание веб-приложений на веб-серверах Microsoft IIS или в Microsoft Azure. Кроме того, интеграция с Web Platform Installer позволяет разработчикам легко и просто установить веб-приложения.
Web Deploy позволяет упаковать содержимое веб-приложений, конфигурации, базы данных и любые другие артефакты, такие как реестр, GAC сбороки и т.д., которые могут быть использованы для хранения или перемещения.Если пакет должен быть перераспределен в другой среде, значения параметров конфигурации в пределах пакета могут быть параметризованы во время развертывания, не требуя изменений в самих пакетах. После создания, эти пакеты могут быть развернуты с помощью Web Deploy CmdLine или диспетчера IIS, не требуя привилегий администратора.
Миграция веб-серверов из IIS 6 в IIS7, IIS8 и IIS8.5
Упростить планирование перехода IIS6 / IIS7 / IIS8 путем определения несовместимостей и предварительного просмотра предлагаемых изменений перед началом процесса. Узнав о любых возможных проблемах заранее, вы сможете принять меры по исправлению положения и упростить миграцию.Й
Синхронизировать фермы серверов
Web Deploy позволяет эффективно синхронизировать сайты, приложения или серверы через фермы серверов IIS путем обнаружения различий между источником и содержанием назначения, а также передать только те изменения, которые требуют синхронизации. Инструмент упрощает процесс синхронизации, автоматического определения конфигурации, содержание и сертификаты должны быть синхронизированы для конкретного сайта. В дополнение к стандартным параметрам, у вас еще есть возможность указать дополнительные для синхронизации, в том числе баз данных, объекты COM, GAC узлы и параметры реестра.
Web Deploy 3.6
Windows This is a Microsoft Supported Download | Works With: IIS 7, IIS 7.5, IIS 8, IIS 8.5, IIS 10
Overview
Package, archive and deploy Web applications more easily
Web Deploy empowers Visual Studio to help developers streamline the deployment of Web applications to Microsoft IIS Web servers or to Microsoft Azure Websites. In addition, integration with Web Platform Installer allows developers to simply and easily install community web applications.
Web Deploy enables you to package your Web application content, configuration, databases and any other artifacts like registry, GAC assemblies etc., which can be used for storage or redeployment. If the package needs to be redeployed to a different environment, configuration values within the package can be parameterized during deployment without requiring modifications to the packages themselves. Once created, these packages can be deployed using Web Deploy cmdline or IIS Manager without requiring administrative privileges.
Migrate Web servers from IIS 6 to IIS7, IIS8, IIS8.5, and IIS 10 with ease
Simplify the planning of your IIS6/IIS7/IIS8/IIS10 migrations by determining incompatibilities and previewing the proposed changes before starting the process. Learning about any potential issues in advance gives you the chance to take corrective measures and simplifies migration.
Synchronize your server farm efficiently
Web Deploy allows you to efficiently synchronize sites, applications or servers across your IIS server farm by detecting differences between the source and destination content and transferring only those changes which need synchronization. The tool simplifies the synchronization process by automatically determining the configuration, content and certificates to be synchronized for a specific site. In addition to the default behavior, you still have the option to specify additional artifacts for the synchronization, including databases, COM objects, GAC assemblies and registry settings.
Installing and Configuring Web Deploy on IIS 8.0 or Later
Summary
In this walkthrough, we will show steps for installing and configuring Web Deploy on IIS 8.0 or later for administrator or non-administrator deployments. This means the steps necessary to enable a client to use Web Deploy to publish Web site content to the server, even if the client does not have administrator credentials for the server.
Windows 8.0 and 8.1 do not come with the Web Management Service that is required for remote connections. For more information, see Remote Publishing Cannot Be Set up on Windows 8.0 or 8.1.
Installing Web Deploy
You can install Web Deploy by using the Web Platform Installer (Web PI) or the Web Deploy MSI.
Installing Web Deploy as Part of the Recommended Server Configuration for Web Hosting Providers
When the Web Platform Installer installs the Recommended Server Configuration for Web Hosting Providers, it configures the web server with the most common deployment for web hosting providers. This package makes sure that the IIS 8.0 or later prerequisites required for Web Deploy are installed. Dependencies such as SQL Server Management Objects and SQL Server are selected automatically for installation, and installed with the Web PI prerequisites, such as the Web Service Management Handler. The package includes some optional components, such as PHP and MySQL, that you can choose not to install with this bundle by clicking the X next to them.
The Recommended Server Configuration for Web Hosting Providers can be installed on Windows 2012 Server or later. For information about installing on earlier versions of Windows Server with IIS 7, see Installing and Configuring Web Deploy on IIS 7.
Using the Web Platform Installer to install Web Deploy Separately
You can install Web Deploy separately with its dependencies, such as the Web Management Service (WMSvc). You can install the following versions of Web Deploy.
If you install Web Deploy directly in Web PI, rather than as part of the Recommended Server Configuration for Web Hosting Providers, the dependencies required for Web Deploy may not be installed.
Using Web PI, Web Deploy can be installed on Windows 2012 Server or later, or Windows 8.0 or later. For information about installing on earlier versions of Windows Server or Windows with IIS 7, see Installing and Configuring Web Deploy on IIS 7.
To install Web Deploy separately using Web PI:
Using the Web Deploy Installer to Install Web Deploy
You can install Web Deploy directly using the MSI installer. Using the MSI directly is generally not recommended for the novice user, as recommended or required dependent products may need to be installed separately. The following limitations may create issues when using the MSI instead of Web PI to install Web Deploy on servers:
Using the Web Deploy Installer, Web Deploy can be installed on Windows 2012 Server or later, or Windows 8.0 or later.
Configuring a Site for Delegated Non-Administrator Deployment
After installing Web Deploy, all server-level configuration is complete for non-administrator publishing; however, additional configuration is required at a site level. This site configuration can be accomplished using PowerShell or IIS Manager, as described below.
Remote Publishing Cannot Be Set up on Windows 8.0 or 8.1
You cannot set up remote publishing using Web Deploy for a site that is hosted in IIS on Windows 8.0 or 8.1. The reason is that the client SKUs for Windows do not come with the Web Management Service that is required for remote connections. As a result, on Windows 8.0 or 8.1, the IIS Manager Permissions icon and the Configure Web Deploy Publishing deployment option that are required to configure remote publishing are not available in the IIS Manager.
When you use the Add Roles and Features wizard to install the Management Service role on Windows Server 2012 or later, the Web Management Service is installed and enabled. The IIS Manager Permissions icon is available for a Web site in the Management area of the IIS Manager, and the Configure Web Deploy Publishing deployment option is available in the Deploy menu for a Web site in IIS Manager. With these features, the Web Management Service allows you to configure publishing to a Web server from a remote computer using Web Deploy.
Using PowerShell to configure Web Deploy for a Non-Administrator
Using the IIS Manager to configure Web Deploy for a Non-Administrator
The following steps configure publishing on an existing site for an existing user using the IIS Manager UI.
Start IIS Manager (open Server Manager, click Tools, and then open IIS Manager.
Expand the Sites node and click a site.
In the Management area of the site’s home pane, double-click IIS Manager Permissions.
In the Actions pane, click Allow User.
In the Allow User… dialog box, with Windows selected, click Select.
In the Select User or Group dialog box, in Enter the object name to select, enter the name of a non-administrator Windows user who will have publishing permissions to the site, with domain. Click Check Names, and then after the name has been verified, click OK.
In the Allow User… dialog box, click OK.
Verify that the name with domain is entered in the IIS Manager Permissions pane.
Note: If the Deploy command is not shown in the menu for a site, close and then reopen IIS Manager.
Click the down arrow for Select a user to give publishing permissions, and select the user that you entered for IIS Manager Permissions.
Click Setup.
The following log lines will appear:
The non-administrator Windows user (NonAdminUser) may now publish to the site.
Install and Configure Web Deploy for Administrator deployments
Requirements:
Install Web Deploy using one of the procedures described above.
Troubleshooting Common Issues:
If you are upgrading an existing installation of Web Deploy, make sure to restart the handler and agent services by running the following commands at an administrative command prompt:
net stop msdepsvc & net start msdepsvc
net stop wmsvc & net start wmsvc
Make sure your firewall allows connections to the service you are using. By default, the Web Deployment Agent Service (MsDepSvc) listens on port 80, and the Web Management Service (WmSvc, also called the «handler») listens on port 8172 by default.
You must run MsDepSvc by using the built-in Administrator account, or from a domain account that has been added to the Administrators group. A local administrator which is not the built-in account will not work with MsDepSvc.


















