зеркало из
1
0
Форкнуть 0

Merge pull request #194 from Azure/private-preview_4

Private preview 4
This commit is contained in:
Mikkel Mork Hegnhoj 2018-07-05 21:18:49 -07:00 коммит произвёл GitHub
Родитель 69d18f922d 110b4ae6da
Коммит 60404e27fa
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
135 изменённых файлов: 25820 добавлений и 31 удалений

Просмотреть файл

@ -1,6 +1,8 @@
# Azure Service Fabric Mesh - Private Preview 3 # Azure Service Fabric Mesh - Private Preview 4
Azure Service Fabric Mesh is fully managed service where developers can build and deploy mission critical applications without managing any infrastructure such as VMs, storage, or networking. Mesh is a serverless environment for applications built from microservices. Click here for details about the [private preview 4 update](#private-preview-4-updates)
Azure Service Fabric Mesh is a fully managed service where developers can build and deploy mission critical applications without managing any infrastructure such as Virtual Machines, storage, or networking. Mesh is a serverless environment for applications built from microservices.
## We need your feedback to get this right ## We need your feedback to get this right
@ -36,9 +38,23 @@ Here are some of the features you can expect to evaluate and provide feedback on
- Reliable Collections for statefulness - Reliable Collections for statefulness
- Cross-zone deployments for HA - Cross-zone deployments for HA
## Private Preview 3 Capabilities ## Private Preview 4 Updates
This release is focused on an experience for developing .net core applications using Visual Studio on Windows. The preview update brings support for creating resource applications in Visual Studio, running and debugging them in a local Service Fabric cluster, and publishing the applications to Azure Service Fabric Mesh. This update includes stability and reliability fixes for the service along with the following:
- Diagnostics improvements for failing applications
- Introduction of a new ARM api version (2018-07-01-preview)
- Change of ARM namespace from Microsoft.ServiceFabric to Microsoft.ServiceFabricMesh
- CLI version 0.7.0 - bug fixes and information on how to get more information on the failed / stuck deployments
- Visual Studio now uses the new namespace and api version
A few things to be aware of with this release:
- The new ARM namespace Microsoft.ServiceFabricMesh can only be used with the api version 2018-07-01-preview. We still support using the previous api version (2018-03-01-privatepreview) and namespace (Microsoft.ServiceFabric).
- Azure CLI (az mesh) currently only supports api version 2018-03-01-privatepreview and namespace Microsoft.ServiceFabric.
- Visual Studio Tools does not support project created with previous versions. You'll have to migrate your services to a new project.
The preview has support for creating resource applications in Visual Studio, running and debugging them in a local Service Fabric cluster, and publishing the applications to Azure Service Fabric Mesh.
The applications based on Service Fabric resource model will be able to run in Mesh as well as on your local development environment, standalone clusters, and existing Azure clusters. Currently as part of this private preview, this resource application model is available in Azure Service Fabric Mesh and in the Service Fabric SDK 6.3 preview runtime for Windows clients (OneBox). The applications based on Service Fabric resource model will be able to run in Mesh as well as on your local development environment, standalone clusters, and existing Azure clusters. Currently as part of this private preview, this resource application model is available in Azure Service Fabric Mesh and in the Service Fabric SDK 6.3 preview runtime for Windows clients (OneBox).

Просмотреть файл

@ -2,9 +2,9 @@
Service Fabric Mesh documentation is organized in the following two broad categories. Service Fabric Mesh documentation is organized in the following two broad categories.
[**1. Conceptual docs**](./conceptual-docs) [**1. Preview docs**](./preview-docs)
The conceptual documentation provides an overview of the Service Fabric Mesh project and the scope of the preview program. If you are new to the platform, conceptual documentation is a great place to start. It includes quick starts and samples for you to get started with using the platform. A first look at the public preview documentation. The conceptual documentation provides an overview of the Service Fabric Mesh project and the scope of the preview program. If you are new to the platform, conceptual documentation is a great place to start. It includes quick starts and samples for you to get started with using the platform.
[**2. Reference docs**](./reference-docs) [**2. Reference docs**](./reference-docs)

Просмотреть файл

@ -16,5 +16,5 @@ az extension remove --name mesh
3. Install the Azure Service Fabric Mesh CLI extension module. For the preview, Azure Service Fabric Mesh CLI is written as an extension to Azure CLI, however, at public preview it would ship as a part of the Azure CLI. 3. Install the Azure Service Fabric Mesh CLI extension module. For the preview, Azure Service Fabric Mesh CLI is written as an extension to Azure CLI, however, at public preview it would ship as a part of the Azure CLI.
```cli ```cli
az extension add --source https://meshcli.blob.core.windows.net/cli/mesh-0.6.0-py2.py3-none-any.whl az extension add --source https://meshcli.blob.core.windows.net/cli/mesh-0.7.0-py2.py3-none-any.whl
``` ```

Просмотреть файл

@ -72,7 +72,7 @@ Restart your computer.
Install the Service Fabric runtime, SDKs, and tools. The different packages will have to be installed in the order outlined below. Install the Service Fabric runtime, SDKs, and tools. The different packages will have to be installed in the order outlined below.
1. Download the [Service Fabric Runtime][download-runtime]. Then run it with the **/AcceptEULA** flag from an elevated command line, e.g. c:\users\<you>\downloads\MicrosoftServiceFabric.6.3.116.9494.exe /AcceptEULA 1. Download the [Service Fabric Runtime][download-runtime]. Then run it with the **/AcceptEULA** flag from an elevated command line, e.g. c:\users\<you>\downloads\MicrosoftServiceFabric.6.3.159.9494.exe /AcceptEULA
2. Install the [Service Fabric SDK][download-sdk]. 2. Install the [Service Fabric SDK][download-sdk].
3. Install the [Service Fabric Mesh SDK][download-sdkmesh]. 3. Install the [Service Fabric Mesh SDK][download-sdkmesh].
4. Install the [Visual Studio Service Fabric Tools (preview)][download-tools]. 4. Install the [Visual Studio Service Fabric Tools (preview)][download-tools].

Просмотреть файл

@ -0,0 +1,42 @@
# Service Fabric Mesh Documentation
## Overview
[About Service Fabric Mesh](service-fabric-mesh-overview.md)
## Quickstarts
[Deploy Hello World](service-fabric-mesh-quickstart-deploy-container.md)
[Deploy a Service Fabric application](service-fabric-mesh-quickstart-dotnet-core.md)
## Tutorials
### Deploy an Azure Service Fabric Mesh app
[1- Build a Service Fabric Mesh application](service-fabric-mesh-tutorial-create-dotnetcore.md)
[2- Debug the application](service-fabric-mesh-tutorial-debug-service-fabric-mesh-app.md)
[3- Deploy the application](service-fabric-mesh-tutorial-deploy-service-fabric-mesh-app.md)
## Concepts
[Terminology](service-fabric-mesh-terminology.md)
[Service Fabric resources](service-fabric-mesh-service-fabric-resources.md)
[Monitoring and diagnostics](service-fabric-mesh-monitoring-diagnostics.md)
[Storing state](service-fabric-mesh-storing-state.md)
## How-to guides
[Set up your development environment](service-fabric-mesh-setup-developer-environment-sdk.md)
[Deploy an app (CLI)](service-fabric-mesh-deploy-app-template.md)
[Deploy an app with Azure Files volume](service-fabric-mesh-deploy-app-azurefiles-volume.md)
[Deploy an app from a private registry](service-fabric-mesh-deploy-app-private-registry.md)
[Scale services in an app](service-fabric-mesh-app-scale-out.md)
## Resources
[Common questions](service-fabric-mesh-faq.md)

Просмотреть файл

@ -0,0 +1,15 @@
---
title: include file
description: include file
services: service-fabric-mesh
author: TylerMSFT
ms.service: service-fabric-mesh
ms.topic: include
ms.date: 05/24/2018
ms.author: twhitney
ms.custom: include file
---
| |
| --- |
| Service Fabric Mesh is in currently in preview. Previews are made available to you on the condition that you agree to the [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). Some aspects of this feature may change prior to general availability (GA). |

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 40 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 39 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 53 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.0 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 17 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 28 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 11 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 12 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 11 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 40 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 13 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 17 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 35 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 17 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 20 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 12 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.8 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 9.2 KiB

Просмотреть файл

@ -0,0 +1,118 @@
---
title: Scale services in an Azure Service Fabric application | Microsoft Docs
description: Learn how to independently scale services within an application running on Service Fabric Mesh using the Azure CLI.
services: service-fabric
documentationcenter: .net
author: rwike77
manager: timlt
editor: ''
ms.assetid:
ms.service: service-fabric-mesh
ms.devlang: azure-cli
ms.topic: conceptual
ms.tgt_pltfrm: NA
ms.workload: NA
ms.date: 06/26/2018
ms.author: ryanwi
ms.custom: mvc, devcenter
---
# Scale services within an application running on Service Fabric Mesh
This example shows how to independently scale microservices within an application. In this example, Visual Objects application consists of two microservices; `web` and `worker`.
The `web` service is an ASP.NET Core application with a web page that shows triangles in the browser. The browser displays one triangle for each instance of the `worker` service.
The `worker` service moves the triangle at a predefined interval in the space and sends location of the triangle to `web` service. It uses DNS to resolve the address of the `web` service.
## Example JSON templates
### Base
Linux: [https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.base.linux.json](https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.base.linux.json)
Windows: [https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.base.windows.json](https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.base.windows.json)
### Scaled Out
Linux: [https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.scaleout.linux.json](https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.scaleout.linux.json)
Windows: [https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.scaleout.windows.json](https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.scaleout.windows.json)
## Setup Service Fabric Mesh CLI
[!INCLUDE [cloud-shell-try-it.md](../../includes/cloud-shell-try-it.md)]
You can use the Azure Cloud Shell or a local installation of the Azure CLI to complete these steps. If you choose to install and use the CLI locally, you must install the Azure CLI version 2.0.35 or later. Run `az --version` to find the version. To install or upgrade to the latest version of the CLI, see [Install Azure CLI 2.0][azure-cli-install].
Install the Azure Service Fabric Mesh CLI extension module. For the preview, Azure Service Fabric Mesh CLI is written as an extension to Azure CLI.
```azurecli-interactive
az extension add --source https://meshcli.blob.core.windows.net/cli/mesh-0.7.0-py2.py3-none-any.whl
```
## Log in to Azure
Log in to Azure and set your subscription.
```azurecli-interactive
az login
az account set --subscription "<subscriptionName>"
```
## Create resource group
Create a resource group (RG) to deploy this example or you can use an existing resource group and skip this step. The preview is available only in `eastus` location.
```azurecli-interactive
az group create --name <resourceGroupName> --location eastus
```
## Deploy the template with one worker service
Create the application and related resources using the following command.
```azurecli-interactive
az mesh deployment create --resource-group <resourceGroupName> --template-uri https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.base.linux.json
```
In a minute or so, your command should return with `"provisioningState": "Succeeded"`. Once it does, get the public IP address by querying for the network resources created in this deployment.
To deploy, Windows application use[https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.base.windows.json](https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.base.windows.json) template. Note that for Windows, container images are large compared to Linux, so it may take more time than deploying Linux application.
## Obtain public IP address and connect to it
Once the application status is returned as `"provisioningState": "Succeeded"`, get the public IP address for the service endpoint, and open it on a browser.
The network resource name for this example is `visualObjectsNetwork`, fetch information about it using the following command.
The network resource name for Windows example is `visualObjectsNetworkWindows`.
```azurecli-interactive
az mesh network show --resource-group <resourceGroupName> --name visualObjectsNetwork
```
Get the `publicIpAddress` property and connect to it using a browser. It should display a web page with one triangle moving through the space.
## Scale `worker` service
Scale the `worker` service to three instances using the following command.
```azurecli-interactive
az mesh deployment create --resource-group <resourceGroupName> --template-uri https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.scaleout.linux.json
```
To deploy, Windows application use[https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.scaleout.windows.json](https://seabreezequickstart.blob.core.windows.net/templates/visualobjects/stateless/mesh_rp.scaleout.windows.json) template. Note for Windows, container images are large compared to Linux, so it may take more time than deploying Linux application.
Once the command return with `"provisioningState": "Succeeded"`, the browser should be displaying a web page with three triangles moving through the space.
## Delete the resources
To conserve the limited resources assigned for the preview program, delete the resources frequently. To delete resources related to this example, delete the resource group in which they were deployed.
```azurecli-interactive
az group delete --resource-group <resourceGroupName>
```
## Next steps
For more information, see [Service Fabric resources](service-fabric-mesh-service-fabric-resources.md)

Просмотреть файл

@ -0,0 +1,91 @@
---
title: Deploy an application that uses an Azure Files volume to Service Fabric Mesh | Microsoft Docs
description: Learn how to deploy an application that uses the Azure Files volume to Service Fabric Mesh using the Azure CLI.
services: service-fabric
documentationcenter: .net
author: rwike77
manager: timlt
editor: ''
ms.assetid:
ms.service: service-fabric-mesh
ms.devlang: azure-cli
ms.topic: conceptual
ms.tgt_pltfrm: NA
ms.workload: NA
ms.date: 06/26/2018
ms.author: ryanwi
ms.custom: mvc, devcenter
---
# Deploy an application that uses the Azure Files volume
This sample illustrates the use of storage volumes in a container running in Azure Service Fabric Mesh. As a part of this sample:
- Create a file share with [Azure Files](/azure/storage/files/storage-files-introduction)
- Reference that share as a volume for a container instnace that we'll deploy
- When the container starts, it mounts that share as a specific location within the container
- The code running inside the container writes a text file to that location
- Verify the file is written correctly in the share that backs the volume
## Example JSON templates
Linux: [https://seabreezequickstart.blob.core.windows.net/templates/azurefiles-volume/sbz_rp.linux.json](https://seabreezequickstart.blob.core.windows.net/templates/azurefiles-volume/sbz_rp.linux.json)
Windows: [https://seabreezequickstart.blob.core.windows.net/templates/azurefiles-volume/sbz_rp.windows.json](https://seabreezequickstart.blob.core.windows.net/templates/azurefiles-volume/sbz_rp.windows.json)
## Create the Azure Files file share
Follow the instructions in the [Azure Files documentation](/azure/storage/files/storage-how-to-create-file-share) to create a file share for the application to use.
## Setup Service Fabric Mesh CLI
[!INCLUDE [cloud-shell-try-it.md](../../includes/cloud-shell-try-it.md)]
You can use the Azure Cloud Shell or a local installation of the Azure CLI to complete these steps. If you choose to install and use the CLI locally, you must install the Azure CLI version 2.0.35 or later. Run `az --version` to find the version. To install or upgrade to the latest version of the CLI, see [Install Azure CLI 2.0][azure-cli-install].
Install the Azure Service Fabric Mesh CLI extension module. For the preview, Azure Service Fabric Mesh CLI is written as an extension to Azure CLI.
```azurecli-interactive
az extension add --source https://meshcli.blob.core.windows.net/cli/mesh-0.7.0-py2.py3-none-any.whl
```
## Log in to Azure
Log in to Azure and set your subscription.
```azurecli-interactive
az login
az account set --subscription "<subscriptionName>"
```
## Create resource group
Create a resource group (RG) to deploy this example or you can use an existing resource group and skip this step. The preview is available only in `eastus` location.
```azurecli-interactive
az group create --name <resourceGroupName> --location eastus
```
## Deploy the template
Create the application and related resources using one of the following commands.
For Linux:
```azurecli-interactive
az mesh deployment create --resource-group <resourceGroupName> --template-uri https://seabreezequickstart.blob.core.windows.net/templates/azurefiles-volume/sbz_rp.linux.json
```
For Windows:
```azurecli-interactive
az mesh deployment create --resource-group <resourceGroupName> --template-uri https://seabreezequickstart.blob.core.windows.net/templates/azurefiles-volume/sbz_rp.windows.json
```
Follow the prompts to enter the file share name, account name, and account key for the Azure File share that provides the volume. In a minute or so, your command should return with `"provisioningState": "Succeeded"`.
The password parameter in the template is of `string` type for ease of use. It will be displayed on the screen in clear-text and in the deployment status.
## Verify that the application is able to use the volume
The application creates a file named _data.txt_ in the file share (if it does not exist already). The content of this file is a number that is incremented every 30 seconds by the application. To verify that the example works correctly, open the _data.txt_ file periodically and verify that the number is being updated.
The file may be downloaded using any tool that enables browsing an Azure Files file share. The [Microsoft Azure Storage Explorer](https://azure.microsoft.com/features/storage-explorer/) is an example of such a tool.
## Next steps
For more information, see [Service Fabric resources](service-fabric-mesh-service-fabric-resources.md)

Просмотреть файл

@ -0,0 +1,98 @@
---
title: Deploy an application to Service Fabric Mesh on Azure | Microsoft Docs
description: Learn how to deploy an application that uses a private container registry to Service Fabric Mesh using the Azure CLI.
services: service-fabric
documentationcenter: .net
author: rwike77
manager: timlt
editor: ''
ms.assetid:
ms.service: service-fabric-mesh
ms.devlang: azure-cli
ms.topic: conceptual
ms.tgt_pltfrm: NA
ms.workload: NA
ms.date: 06/26/2018
ms.author: ryanwi
ms.custom: mvc, devcenter
---
# Deploy an application that uses a private container image registry
This example shows how to deploy an application that uses private container image registry.
## Example JSON templates
Linux: [https://seabreezequickstart.blob.core.windows.net/templates/private-registry/sbz_rp.linux.json](https://seabreezequickstart.blob.core.windows.net/templates/private-registry/sbz_rp.linux.json)
## Setup Service Fabric Mesh CLI
[!INCLUDE [cloud-shell-try-it.md](../../includes/cloud-shell-try-it.md)]
You can use the Azure Cloud Shell or a local installation of the Azure CLI to complete these steps. If you choose to install and use the CLI locally, you must install the Azure CLI version 2.0.35 or later. Run `az --version` to find the version. To install or upgrade to the latest version of the CLI, see [Install Azure CLI 2.0][azure-cli-install].
Install the Azure Service Fabric Mesh CLI extension module. For the preview, Azure Service Fabric Mesh CLI is written as an extension to Azure CLI.
```azurecli-interactive
az extension add --source https://meshcli.blob.core.windows.net/cli/mesh-0.7.0-py2.py3-none-any.whl
```
## Log in to Azure
Log in to Azure and set your subscription.
```azurecli-interactive
az login
az account set --subscription "<subscriptionName>"
```
## Create a container registry and push image to it
Create Azure Container Registry by following [this](/azure/container-registry/container-registry-get-started-azure-cli) guide. Perform the steps up to ["List container images"](/azure/container-registry/container-registry-get-started-azure-cli#list-container-images) step. At this time, `aci-helloworld:v1` should be present in this private container registry.
## Retrieve credentials for the registry
In order to deploy a container instance from the registry that was created, credentials must be provided during the deployment. The production scenarios should use a [service principal for container registry access](/azure/container-registry/container-registry-auth-service-principal), but to keep this quickstart brief, enable the admin user on your registry with the following command:
```azurecli-interactive
az acr update --name <acrName> --admin-enabled true
```
Once admin access is enabled, get the registry server name, user name, and password using the following commands.
```azurecli-interactive
az acr list --resource-group <resourceGroupName> --query "[].{acrLoginServer:loginServer}" --output table
az acr credential show --name <acrName> --query username
az acr credential show --name <acrName> --query "passwords[0].value"
```
## Deploy the template
Create the application and related resources using the following command and provide the credentials from the previous step.
The password parameter in the template is of `string` type for ease of use. It will be displayed on the screen in clear-text and in the deployment status.
```azurecli-interactive
az mesh deployment create --resource-group <resourceGroupName> --template-uri https://seabreezequickstart.blob.core.windows.net/templates/private-registry/sbz_rp.linux.json
```
In a minute or so, your command should return with `"provisioningState": "Succeeded"`. Once it does, get the public IP address by querying for the network resources created in this deployment.
## Obtain public IP address and connect to it
The network resource name for this example is `privateRegistryExampleNetwork`, fetch information about it using the following command.
```azurecli-interactive
az mesh network show --resource-group <resourceGroupName> --name privateRegistryExampleNetwork
```
Get the `publicIpAddress` property and connect to it using a browser. It should display a web page with a welcome message.
## Delete the resources
To conserve the limited resources assigned for the preview program, delete the resources frequently. To delete resources related to this example, delete the resource group in which they were deployed.
```azurecli-interactive
az group delete --resource-group <resourceGroupName>
```
## Next steps
For more information, see [Service Fabric resources](service-fabric-mesh-service-fabric-resources.md)

Просмотреть файл

@ -0,0 +1,126 @@
---
title: Deploy an application to Service Fabric Mesh on Azure | Microsoft Docs
description: Learn how to deploy a .NET Core application to Service Fabric Mesh from a template using the Azure CLI.
services: service-fabric
documentationcenter: .net
author: rwike77
manager: timlt
editor: ''
ms.assetid:
ms.service: service-fabric-mesh
ms.devlang: azure-cli
ms.topic: quickstart
ms.tgt_pltfrm: NA
ms.workload: NA
ms.date: 04/04/2018
ms.author: ryanwi
ms.custom: mvc, devcenter
---
# Deploy an application to Service Fabric Mesh from a template
This article shows how to deploy a .NET Core application to Service Fabric Mesh using a template. When you're finished, you have a voting application with an ASP.NET Core web front end that saves voting results in a stateful back-end service in the cluster.
You can easily create a free Azure subscription, [create a free account](https://azure.microsoft.com/free/) before you begin.
[!INCLUDE [preview note](./includes/include-preview-note.md)]
[!INCLUDE [cloud-shell-try-it.md](../../includes/cloud-shell-try-it.md)]
You can use the Azure Cloud Shell or a local installation of the Azure CLI to complete these steps. If you choose to install and use the CLI locally, you must install the Azure CLI version 2.0.35 or later. Run `az --version` to find the version. To install or upgrade to the latest version of the CLI, see [Install Azure CLI 2.0][azure-cli-install].
Also install the [Service Fabric Mesh CLI module](service-fabric-mesh-setup-developer-environment-sdk.md#install-the-service-fabric-mesh-cli) if it's not already installed.
## Deploy the application
Login to Azure and set your subscription.
```azurecli-interactive
az login
az account set --subscription "<subscriptionID>"
```
Create a resource group to deploy the application to. You can use an existing resource group and skip this step.
```azurecli-interactive
az group create --name MeshTest-rg --location eastus
```
Create your application in the resource group using the `deployment create` command, using our [quickstart-linux.json](https://github.com/Azure/service-fabric-mesh-preview-pr/blob/master/samples/templates/votingapp/quickstart-linux.json), or [quickstart-windows.json](https://github.com/Azure/service-fabric-mesh-preview-pr/blob/master/samples/templates/votingapp/quickstart-windows.json):
```azurecli-interactive
az mesh deployment create --resource-group MeshTest-rg --template-file C:\templates\votingapp\quickstart-linux.json
```
In a few seconds, your command should return with `"provisioningState": "Succeeded"`.
## Check the application deployment status
Your application is now deployed. You can check the application's status using the `app show` command. The application name for the deployed application is "SbzVoting", so fetch its details.
```azurecli-interactive
az mesh app show --resource-group MeshTest-rg --name VotingApp
```
## List the deployed applications
You can use the "app list" command to get a list of applications you have deployed to your subscription.
```azurecli-interactive
az mesh app list -o table
```
## Open the application
Once the application status is returned as ""provisioningState": "Succeeded", get the ingress endpoint of the service. Query the network resource to find the IP address of the container where the service is deployed.
The network resource for the application is "SbzVotingNetwork", so fetch its details.
```azurecli-interactive
az mesh network show --resource-group MeshTest-rg --name VotingAppNetwork
```
The command should now return with the following information:
```json
{
"addressPrefix": "10.0.0.4/22",
"description": "Private network for application",
"id": "/subscriptions/<subscriptionID>/resourcegroups/MeshTest-rg/providers/Microsoft.ServiceFabric/networks/SbzVotingNetwork",
"ingressConfig": {
"layer4": [
{
"applicationName": "SbzVoting",
"endpointName": "Endpoint1",
"publicPort": "80",
"serviceName": "VotingWeb"
}
],
"publicIpAddress": "13.68.129.22",
"qosLevel": "Bronze"
},
"location": "eastus",
"name": "SbzVotingNetwork",
"provisioningState": "Succeeded",
"resourceGroup": "MeshTest-rg",
"tags": {},
"type": "Microsoft.ServiceFabric/networks"
}
```
From the output, copy the public IP address of the service (13.68.129.22 in the preceding example) and open in a browser.
![Voting application](./media/service-fabric-mesh-deploy-app-template/VotingApplication.png)
You can now add voting options to the application and vote on it, or delete the voting options.
## Clean up resources
When you no longer need the application and it's related resources, delete the resource group containing them.
```azurecli-interactive
az group delete --resource-group MeshTest-rg
```
## Next steps
To learn more about Service Fabric Mesh, read the overview:
> [!div class="nextstepaction"]
> [Service Fabric Mesh overview](service-fabric-mesh-overview.md)
[azure-cli-install]: /cli/azure/install-azure-cli

Просмотреть файл

@ -0,0 +1,103 @@
---
title: Common questions for Azure Service Fabric Mesh | Microsoft Docs
description: Learn about commonly asked questions and answers for Azure Service Fabric Mesh.
services: service-fabric-mesh
keywords:
author: chackdan
ms.author: chackdan
ms.date: 06/25/2018
ms.topic: troubleshooting
ms.service: service-fabric-mesh
manager: timlt
---
# Commonly asked Service Fabric Mesh questions
Azure Service Fabric Mesh is a fully managed service that enables developers to deploy microservices applications without managing virtual machines, storage, or networking. This article has answers to commonly asked questions.
## Quota and Cost
**What is the cost of participating in the preview?**
There are no charges for deploying applications or containers to Mesh preview. However you are encouraged to delete the resources you deploy and not leave them running, unless you are actively testing it.
**Is there a quota limit of the number of cores and RAM?**
Yes, you are allocated restricted quota for use in the preview.
- You are allocated a total of six cores and 24-GB RAM.
- The largest container you can deploy is limited to two cores, 8-GB RAM.
- You can allocate partial cores to your containers in increments of 0.5 cores up to a maximum of 8 cores.
**Can I leave my application running overnight?**
Yes, you can, however you are encouraged to delete the resources you deploy and not leave them running, unless you are actively testing it. This policy may change in the future and the resources may be deleted if they are being misused.
## Supported container OS images
The following container OS images can be used when deploying services.
- Windows - windowsservercore and nanoserver
- Windows Server 2016
- Windows Server version 1709
- Linux
- No known limitations
## Features Gaps and Known Issues
**After deploying my application, the network resource associated with it does not seem to an IP address**
There is a known issue today with the IP address coming up after a delay. Check the status of the network resource in a few minutes to see the associated IP address.
**My application is failing to access the right network/volume resource**
In your application model, you need to use the full resource ID for networks and volumes to be able to access the associated resource. Here is what this looks like in the quickstart sample:
```json
"networkRefs": [
{
"name": "[resourceId('Microsoft.ServiceFabric/networks', 'SbzVotingNetwork')]"
}
]
```
**I do not see the current application model supporting a way to encrypt my secrets**
Yes, encrypting secrets is not supported in the current Private Preview.
**DNS does not work the same way in my Service Fabric development cluster and in Mesh**
There is a known issue, where you might have to reference services differently in your local development cluster and in Azure Mesh. In your local development cluster use {serviceName}.{applicationName}. In Azure Service Fabric Mesh, use {servicename}. Azure Mesh does not currently support dns resolution across applications.
For other known DNS issues with running a Service Fabric development cluster on Windows 10, see here: [Debug Windows containers](/azure/service-fabric/service-fabric-how-to-debug-windows-containers).
**I get this error when using the CLI module _ImportError: cannot import name 'sdk_no_wait'**
If you are using older CLI version than 2.0.30, you may get this error -
```
cannot import name 'sdk_no_wait'
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\knack\cli.py", line 193, in invoke cmd_result = self.invocation.execute(args)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\commands_init_.py", line 241, in execute self.commands_loader.load_arguments(command)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core_init_.py", line 201, in load_arguments self.command_table[command].load_arguments() # this loads the arguments via reflection
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core\commands_init_.py", line 142, in load_arguments super(AzCliCommand, self).load_arguments()
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\knack\commands.py", line 76, in load_arguments cmd_args = self.arguments_loader()
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core_init_.py", line 332, in default_arguments_loader op = handler or self.get_op_handler(operation)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\site-packages\azure\cli\core_init_.py", line 375, in get_op_handler op = import_module(mod_to_import)
File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\importlib_init_.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level)
File "", line 978, in _gcd_import
File "", line 961, in _find_and_load
File "", line 950, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 678, in exec_module
File "", line 205, in _call_with_frames_removed
File "C:\Users\annayak.azure\cliextensions\azure-cli-sbz\azext_sbz\custom.py", line 18, in
from azure.cli.core.util import get_file_json, shell_safe_json_parse, sdk_no_wait
ImportError: cannot import name 'sdk_no_wait'.
```
**I get a mismatch distribution name error when installing the CLI extension package**
This does not mean that the extension did not install. You should still be able to use the CLI commands without a problem.
**When I scale out, I see that all my containers are affected, including my running ones**
This is a bug and should be fixed in the next runtime refresh.

Просмотреть файл

@ -0,0 +1,49 @@
---
title: Monitoring and diagnostics in Azure Service Fabric Mesh applications | Microsoft Docs
description: Learn about monitoring and diagnosing application in Service Fabric Mesh on Azure.
services: service-fabric-mesh
documentationcenter: .net
author: srrengar
manager: timlt
editor: ''
ms.assetid:
ms.service: service-fabric-mesh
ms.devlang: dotNet
ms.topic: conceptual
ms.tgt_pltfrm: NA
ms.workload: NA
ms.date: 06/22/2018
ms.author: srrengar
ms.custom: mvc, devcenter
---
# Monitoring and diagnostics
Azure Service Fabric Mesh is a fully managed service that enables developers to deploy microservices applications without managing virtual machines, storage, or networking. Monitoring and diagnostics for Service Fabric Mesh is categorized into three main types of diagnostics data:
- Application logs - these are defined as the logs from your containerized applications, based on how you have instrumented your application (e.g. docker logs)
- Platform events - events from the Mesh platform relevant to your container operation, currently including container activation, deactivation, and termination.
- Container metrics - resource utilization and performance metrics for your containers (docker stats)
This article discusses the monitoring and diagnostics options for the latest preview version available.
## Application logs
You can view your docker logs from your deployed containers, on a per container basis. In the Service Fabric Mesh application model, each container is a code package in your application. To see the associated logs with a code package, use the following command:
```cli
az mesh code-package-log get --resource-group <nameOfRG> --app-name <nameOfApp> --service-name <nameOfService> --replica-name <nameOfReplica> --code-package-name <nameOfCodePackage>
```
> [!NOTE]
> You can use the "az mesh servicereplica" command to get the replica name. Replica names are incrementing numbers from 0.*
Here is what this looks like for seeing the logs from the VotingWeb.Code container from the voting application:
```cli
az mesh code-package-log get --resource-group <nameOfRG> --application-name SbzVoting --service-name VotingWeb --replica-name 0 --code-package-name VotingWeb.Code
```
## Next steps
To learn more about Service Fabric Mesh, read the overview:
- [Service Fabric Mesh overview](service-fabric-mesh-overview.md)

Просмотреть файл

@ -0,0 +1,69 @@
---
title: Overview of Azure Service Fabric Mesh
description: An overview of Azure Service Fabric Mesh. With Service Fabric Mesh, you can deploy and scale your application without worrying about the infrastructure needs of your application.
services: Azure Service Fabric Mesh
keywords:
author: rwike77
ms.author: ryanwi
ms.date: 06/27/2018
ms.topic: overview
ms.service: service-fabric-mesh
manager: timlt
#Customer intent: As a developer, I want to deploy and manage services in containers on a serverless platform.
---
# What is Service Fabric Mesh?
Azure Service Fabric Mesh is a fully managed service that enables developers to deploy microservices applications without managing virtual machines, storage, or networking. Applications hosted on Service Fabric Mesh run and scale without you worrying about the infrastructure powering it. Service Fabric Mesh consists of clusters of thousands of machines. All cluster operations are hidden from the developer. Simply upload your code and specify resources you need, availability requirements, and resource limits. Service Fabric Mesh automatically allocates the infrastructure requested by your application deployment and also handles infrastructure failures, making sure your applications are highly available. You only need to care about the health and responsiveness of your application, not the infrastructure.
[!INCLUDE [preview note](./includes/include-preview-note.md)]
This article provides an overview of the key benefits of Service Fabric Mesh.
## Great developer experience
Tooling in Visual Studio and Visual Studio Code provides a powerful editing and debugging experience. Multiple programing languages and frameworks are supported, giving you the ability to create applications that run any code.
With Service Fabric Mesh you can:
- "Lift and shift" existing applications into contianers to modernize and run your current applications at scale.
- Build and deploy new microservices applications at scale in Azure. Integrate with other Azure services or existing applications running in containers. Each microservice is part of a secure, network isolated application with resource governance policies defined for CPU cores, memory, disk space, and more.
- Integrate with and extend existing applications without making changes to those applications. Use your own virtual network to connect existing application to the new application.
- Modernize your existing Cloud Services applications by migrating to Service Fabric Mesh.
## Simple operational lifecycle
Easily manage running applications, including application upgrades and versioning, monitoring applications and debugging in production environments. These applications can consist of a single microservice or multiple microservices isolated within their own network. Applications run efficiently with fast deployment, placement, and failover times.
With Service Fabric Mesh you can:
- Deploy and manage applications without having to explicitly provision and manage infrastructure. Service Fabric Mesh provisions, upgrades, patches, and maintains the underlying infrastructure for you.
- Setup continuous integration using the integrated tooling to easily package and deploy applications.
- Leverage all the features of Azure Resource Manager resources (for example, audit trail and [role-based access control (RBAC)](/azure/role-based-access-control/overview)) because all the resources (like Applications, Services, Secrets etc) you deploy to SF Mesh service in Azure are Azure Resource Manager resources.
- Deploy and manage resources using the [Azure portal](https://portal.azure.com), Resource Manager templates, or Azure CLI/PowerShell libraries.
- Set up operational monitoring and alerting using [Application Insights](/azure/application-insights/) (or your tool of choice) to capture operational and diagnostic traces from the platform.
- Access application diagnostics information emitted from the application model using [Application Insights](/azure/application-insights/) or your tool of choice.
- Optimize resources usage by specifying auto-scale rules for the services in the application definition. (coming soon)
- Create network isolation and security boundaries for applications, a powerful feature when combined with Hyper-V containers. Isolate the network traffic to and from the services using multiple IPs per service and isolated virtual networks per application. (coming soon)
## Mission critical platform capabilities
Service Fabric Mesh creates a collection of clusters that span [Azure Availability Zones](/azure/availability-zones/az-overview) and/or geo-political regional boundaries. Applications are described with a set of intents such as scale, hardware requirements, durability requirements, and security policies. When the application deploys, Service Fabric Mesh finds the optimal place to run it.
With Service Fabric Mesh you can:
- Take advantage of high availability, scaling in/out, discoverability, orchestration, message routing, reliable messaging, no-downtime upgrades, security/secrets management, disaster recovery, state management, configuration management, and distributed transactions.
- Choose between multiple application models when creating applications.
- Use platform capabilities exposed through REST endpoints by consuming language-specific bindings generated using Swagger.
- Deploy applications across [Availability Zones](/azure/availability-zones/az-overview) and multiple regions for geo-reliability.
- Use all the security and compliance features that Azure provides.
## Next steps
It only takes a few steps to deploy a sample project with Visual Studio. For more information, see [Create an ASP.NET Core website](service-fabric-mesh-quickstart-dotnet-core.md).
<!-- Links -->
[service-fabric-overview]: ../service-fabric/service-fabric-overview.md

Просмотреть файл

@ -0,0 +1,141 @@
---
# Mandatory fields. See more on aka.ms/skyeye/meta.
#Intent: I want to use my existing containers as is and deploy them to Azure. (Windows or Linux)
title: Quickstart - Deploy Hello World to Azure Service Fabric Mesh | Microsoft Docs
description: This quickstart shows you how to deploy a application to Azure Service Fabric Mesh.
services: service-fabric-mesh
keywords: Dont add or edit keywords without consulting your SEO champ.
author: rwike77
ms.author: ryanwi
ms.date: 06/27/2018
ms.topic: quickstart
ms.service: service-fabric-mesh
manager: timlt
---
# Quickstart: Deploy Hello World to Service Fabric Mesh
[Service Fabric Mesh](service-fabric-mesh-overview.md) makes it easy to create and manage microservices applications in Azure, without having to provision virtual machines. In this quickstart, you will create a Hello World application in Azure and expose it to the internet. This operation is completed in a single command. Within just a couple minutes, you'll see this in your browser:
![Hello world app in the browser][sfm-app-browser]
[!INCLUDE [preview note](./includes/include-preview-note.md)]
If you don't already have an Azure account, [create a free account](https://azure.microsoft.com/free/) before you begin.
[!INCLUDE [cloud-shell-try-it.md](../../includes/cloud-shell-try-it.md)]
You can use the Azure Cloud Shell or a local installation of the Azure CLI to complete this quickstart. If you choose to install and use the CLI locally, this quickstart requires that you're running the Azure CLI version 2.0.35 or later. Run `az --version` to find the version. To install or upgrade to the latest version of the CLI, see [Install Azure CLI 2.0][azure-cli-install].
## Install the Azure Service Fabric Mesh CLI
Remove any previous install of the Azure Service Fabric Mesh CLI module.
```azurecli-interactive
az extension remove --name mesh
```
Install the Azure Service Fabric Mesh CLI extension module. For the preview, Azure Service Fabric Mesh CLI is written as an extension to Azure CLI, however, at public preview it would ship as a part of the Azure CLI.
```azurecli-interactive
az extension add --source https://meshcli.blob.core.windows.net/cli/mesh-0.7.0-py2.py3-none-any.whl
```
## Create a resource group
Create a resource group to deploy the application to. Alternatively, you can use an existing resource group and export rg to the name.
```azurecli-interactive
az account set --subscription "SubscriptionID"
export rg=myResourceGroup
az group create --name $rg --location eastus
```
## Deploy the application
Create your application using the `az mesh deployment create` command:
```azurecli-interactive
az mesh deployment create --resource-group $rg --template-uri https://raw.githubusercontent.com/Azure-Samples/service-fabric-configuration/master/container-configuration.json
```
In just over a minute, your command should return with `"provisioningState": "Succeeded"`.
## Check application deployment status
At this point, your application has been deployed. You can check to see its status by using the `az mesh app show` command. This command provides useful information that you can follow up on.
The application name for this quickstart application is helloWorldApp, to gather the details on the application execute the following command:
```azurecli-interactive
az mesh app show --resource-group $rg --name helloWorldApp
```
## Browse to the application
Once the application status is returned as `"provisioningState": "Succeeded"`, you will need the ingress endpoint of the service. To retrieve the IP address query the network resource for the application where the service is deployed, and open it on a browser.
The network resource for this quickstart application is helloWorldNetwork, you can use the `az mesh network show` command to get the IP address:
```azurecli-interactive
az mesh network show --resource-group $rg --name helloWorldNetwork
```
The command will return with information like the json snippet below when running the command in [Cloud Shell](https://docs.microsoft.com/azure/cloud-shell/overview).
From the output, copy the IP address.
```json
"publicIpAddress": "40.121.47.57",
"qosLevel": "Bronze"
},
"location": "eastus",
"name": "helloWorldNetwork",
"provisioningState": "Succeeded",
"resourceGroup": "myResourceGroup",
"tags": {},
"type": "Microsoft.ServiceFabric/networks"
}
```
In the example above, the service end point IP is 40.121.47.57. Take your corresponding IP address and open it in your favorite browser.
## See all the application you have currently deployed to your subscription
You can use the `az mesh app list` command to get a list of applications you have deployed to your subscription.
```azurecli-interactive
az mesh app list --output table
```
## See the application logs
Examine the logs for the deployed application using the `az mesh code-package-log get` command:
```azurecli-interactive
az mesh code-package-log get --resource-group $rg --application-name helloWorldApp --service-name helloWorldService --replica-name 0 --code-package-name helloWorldCode
```
## Clean up resources
When you are ready to delete the application run the `az mesh app delete` command, you'll be prompted to confirm deletion enter `y` to confirm the command.
```azurecli-interactive
az mesh app delete -g $rg -n helloWorldApp
```
If you no longer need any of the resources you created in this quickstart, you can execute the [az group delete][az-group-delete] command to remove the resource group and all the resources it contains.
```azurecli-interactive
az group delete --name $rg
```
## Next steps
To learn more about Service Fabric Mesh, take a look at this tutorial.
> [!div class="nextstepaction"]
> [Next steps](service-fabric-mesh-tutorial-create-dotnetcore.md)
<!-- Images -->
[sfm-app-browser]: ./media/service-fabric-mesh-quickstart-deploy-container/HelloWorld.png
<!-- Links / Internal -->
[az-group-delete]: /cli/azure/group#az_group_delete
[azure-cli-install]: https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest

Просмотреть файл

@ -0,0 +1,119 @@
---
title: Quickstart - Deploy an app to Azure Service Fabric Mesh | Microsoft Docs
description: This quickstart shows you how to create an ASP.NET Core website and publish it to Azure Service Fabric Mesh.
services: service--fabric-mesh
documentationcenter: .net
author: tylermsft
manager: jeconnoc
editor: ''
ms.assetid:
ms.service: service-fabric-mesh
ms.devlang: dotNet
ms.topic: conceptual
ms.tgt_pltfrm: NA
ms.workload: NA
ms.date: 06/12/2018
ms.author: twhitney
ms.custom: mvc, devcenter
#Customer intent: As a developer, I want to use visual studio to locally run an ASP.NET Core website on Service Fabric Mesh so that I can see it run.
---
# Quickstart: Deploy an Azure Service Fabric Mesh app
Azure Service Fabric Mesh is a fully managed service that enables developers to deploy microservices applications without managing virtual machines, storage, or networking.
In this quickstart you'll create a new Service Fabric Mesh app (an ASP.NET Core website), run it on the local development cluster, and then publish it to run on Azure.
You'll need an Azure subscription. If you don't have one, you can easily create a free Azure subscription, [create a free account](https://azure.microsoft.com/free/) before you begin. You will also need to [setup your developer environment](service-fabric-mesh-setup-developer-environment-sdk.md)
[!INCLUDE [preview note](./includes/include-preview-note.md)]
## Create a Service Fabric Mesh project
Open Visual Studio and select **File** > **New** > **Project...**
In the **New Project** dialog, type **mesh** into the **Search** box at the top. Select the **Service Fabric Mesh Application** template.
In the **Name** box, type **ServiceFabricMesh1** and in the **Location** box, set the folder path of where the files for the project will be stored.
Make sure that **Create directory for solution** is checked, and click **OK** to create the Service Fabric Mesh project.
![Visual studio new Service Fabric Mesh project dialog](media/service-fabric-mesh-quickstart-dotnet-core/visual-studio-new-project.png)
### Create a service
After you click **OK**, the **New Service Fabric Service** dialog appears. Select the **ASP.NET Core** project type, make sure **Container OS** is set to **Windows**.
You must set the **Service Name** to something unique because the name of the service is used as the repository name of the Docker image. If you have an existing Docker image with the same repository name, it will be overwritten by Visual Studio. Open a terminal and use the Docker command `docker images` to make sure your project name isn't already being used.
Press **OK** to create the ASP.NET Core project.
![Visual studio new Service Fabric Mesh project dialog](media/service-fabric-mesh-quickstart-dotnet-core/visual-studio-new-service-fabric-service.png)
The **New ASP.NET Core Web Application** dialog appears. Select **Web Application** and then press **OK**.
![Visual studio new ASP.NET core application](media/service-fabric-mesh-quickstart-dotnet-core/visual-studio-new-aspnetcore-app.png)
Visual Studio will create both the Service Fabric Application project and the ASP.NET Core project.
## Build and publish to your local cluster
A Docker image will automatically be built and published to your local cluster as soon as your project loads. This process may take some time. You can monitor the progress of the Service Fabric tools in the **Output** pane if you want. Select the **Service Fabric Tools** item in the pane. You can continue to work while the docker image is being deployed.
After the project has been created, press **F5** to debug your service locally. When the local deployment is finished, and Visual Studio is running your project, a browser window will open with a sample webpage.
When you're done browsing the deployed service, you can stop debugging your project by pressing **Shift+F5** in Visual Studio.
## Publish to Azure
To publish your Service Fabric Mesh project to Azure, right-click on the **Service Fabric Mesh project** in Visual studio and select **Publish...**
![Visual studio right-click Service Fabric Mesh project](media/service-fabric-mesh-quickstart-dotnet-core/visual-studio-right-click-publish.png)
You will see a **Publish Service Fabric Application** dialog.
![Visual studio Service Fabric Mesh publish dialog](media/service-fabric-mesh-quickstart-dotnet-core/visual-studio-publish-dialog.png)
Select your Azure account and subscription. Choose a **Location**. This article uses **East US**.
Under **Resource group**, select **\<Create New Resource Group...>**. A dialog appears where you will create a new resource group. This article uses the **East US** location and names the group **sfmeshTutorial1RG** (if your organization has multiple people using the same subscription, choose a unique group name). Press **Create** to create the resource group and return to the publish dialog.
![Visual studio Service Fabric Mesh new resource group dialog](media/service-fabric-mesh-quickstart-dotnet-core/visual-studio-publish-new-resource-group-dialog.png)
Back in the **Publish Service Fabric Application** dialog, under **Azure Container Registry**, select **\<Create New Container Registry...>**. In the **Create Container Registry** dialog, use a unique name for the **Container registry name**. For **Location**, pick **East US**. Select the **sfmeshTutorial1RG** resource group (the group you created above). Set the **SKU** to **Basic** and then press **Create** to return to the publish dialog.
![Visual studio Service Fabric Mesh new resource group dialog](media/service-fabric-mesh-quickstart-dotnet-core/visual-studio-publish-new-container-registry-dialog.png)
In the publish dialog, press the **Publish** button to deploy your Service Fabric application to Azure.
When you publish to Azure for the first time, the docker image is pushed to the Azure Container Registry (ACR) which takes time depending on the size of the image. Subsequent publishes of the same project will be faster. You can monitor the progress of the deployment by selecting the **Service Fabric Tools** pane in the Visual Studio **Output** window. Once the deployment has finished, the **Service Fabric Tools** output will display the IP address and port of your application in the form of a URL.
```json
Packaging Application...
Building Images...
Web1 -> C:\Code\ServiceFabricMesh1\Web1\bin\Any CPU\Release\netcoreapp2.0\Web1.dll
Uploading the images to Azure Container Registry...
Deploying application to remote endpoint...
The application was deployed successfully and it can be accessed at http://...
```
Open a web browser and navigate to the URL to see the website running in Azure.
## Clean up resources
When no longer needed, delete all of the resources you created for this quickstart. Since you created a new resource group to host both the ACR and Service Fabric Mesh service resources, you can safely delete this resource group which is an easy way to delete all of the resources associated with it.
```azurecli
az group delete --resource-group sfmeshTutorial1RG
```
```powershell
Remove-AzureRmResourceGroup -Name sfmeshTutorial1RG
```
Alternatively, you can delete the resource group [from the Azure portal](https://portal.azure.com).
## Next steps
To learn more about Service Fabric Mesh, read the overview:
> [!div class="nextstepaction"]
> [Service Fabric Mesh overview](service-fabric-mesh-overview.md)

Просмотреть файл

@ -0,0 +1,24 @@
---
title: Scaling apps on Azure Service Fabric Mesh | Microsoft Docs
description: Learn about scaling applications deployed to Azure Service Fabric Mesh.
services: service-fabric-mesh
keywords:
author: chackdan
ms.author: chackdan
ms.date: 06/12/2018
ms.topic: conceptual
ms.service: service-fabric-mesh
manager: timlt
---
# Scaling applications deployed to Azure Service Fabric Mesh
Azure Service Fabric Mesh is a fully managed service that enables developers to deploy microservices applications without managing virtual machines, storage, or networking. Applications scale on demand. You optimize resource usage by specifying auto-scale rules for the container(s) in the application definition.
Auto scaling is a capability of Service Fabric Mesh to dynamically scale your services based on the load that services are reporting, or based on their usage of resources. Auto scaling gives great elasticity and enables provisioning of additional instances or partitions of your service on demand. The entire auto scaling process is automated and transparent, and once you set up your policies on a service there is no need for manual scaling operations at the service level.
A common scenario where auto-scaling is useful is when the load on a particular service varies over time. For example, a service such as a gateway can scale based on the amount of resources necessary to handle incoming requests. Let's take a look at an example of what those scaling rules could look like:
- If all instances of my gateway are using more than two cores on average, then scale the gateway service out by adding one more instance. Do this every hour, but never have more than seven instances in total.
- If all instances of my gateway are using less than 0.5 cores on average, then scale the service in by removing one instance. Do this every hour, but never have fewer than three instances in total.
To learn more about Service Fabric Mesh, read the overview:
- [Service Fabric Mesh overview](service-fabric-mesh-overview.md)

Просмотреть файл

@ -0,0 +1,98 @@
---
title: Introduction to Azure Service Fabric resources | Microsoft Docs
description: Learn about the Service Fabric resources, the simple, unified way to deploy and manage Service Fabric applications.
services: service-fabric-mesh
documentationcenter: .net
author: vturecek
manager: timlt
editor: ''
ms.assetid:
ms.service: service-fabric-mesh
ms.devlang: dotNet
ms.topic: conceptual
ms.tgt_pltfrm: NA
ms.workload: NA
ms.date: 06/26/2018
ms.author: vturecek
ms.custom: mvc, devcenter
---
# Introduction to Service Fabric resources
Service Fabric resources are a simple, unified way to deploy and manage applications anywhere Service Fabric runs.
## How it works
A Service Fabric resource describes how something should run in the Service Fabric environment. The following types of resources are currently supported:
- Applications and services
- Volumes
- Networks
Each resource is described declaratively in a resource file. A resource file is a simple YAML or JSON document that describes how to run an instance of an application, service, volume, or network. Service Fabric will then ensure the resource continues to run as described in the resource file.
## Resource overview
### Applications and services
A service resource describes how to run a set of container images together. The container images can be anything, such as an IIS web server with a web application, or a single microservice.
Each service resource contains any number of *code packages*. A code package describes everything needed to run a single container image, including:
- Container name, version, and registry
- CPU and memory resources required for each container
- Network endpoints
- Volumes to mount in the container, referencing a separate volume resource.
All the code packages defined in a service resource are always deployed and activated together as a group. This means each instance of a service will include all code packages together on the same node. The service resource also describes how many instances of the service to run, and the network the service belongs to.
```yaml
services:
- name: helloWorldService
properties:
description: Hello world service.
osType: linux
codePackages:
- name: helloworld
image: myapp:1.0-alpine
resources:
requests:
cpu: 2
memoryInGB: 2
endpoints:
- name: helloWorldEndpoint
port: 8080
replicaCount: 5
networkRefs:
- name: mynetwork
```
An application resource is a way to group services that should be deployed and upgraded together as a unit. This does not mean services will always run together on the same node. However, during an application upgrade, if the upgrade of one service fails, all services are rolled back to their previous version.
The lifecycle of each application instance can be managed independently. For example, one application can be upgraded independently from other application. Typically, you keep the number of services in an application fairly small, as the more services you put into an application, the more difficult it becomes to manage each service independently.
### Networks
Networks are individually deployable resources, just like applications and services. A network resource is used to create a private network for your applications. Multiple services from different applications can be part of the same network.
> [!NOTE]
> The current preview only supports a one to one mapping between applications and networks
### Volumes
Volumes are directories that get mounted inside your container instances that you can use to write files. The volume resource is a declarative way to describe how a volume is mounted and the backing storage for the volume.
## Programming models
Service resources only define a container image to run. There are no frameworks or base classes you need to implement in your service code. Instead, you can run any code, written in any language, using any framework inside the container without implementing Service Fabric-specific APIs.
Your application code remains portable even outside of Service Fabric and your application deployments remain consistent regardless of the language or framework used to implement your services. Whether your application is ASP.NET Core, Go, or just a set of processes and scripts, the service resource deployment model remains the same.
## Deployment
Service Fabric resources can be deployed anywhere Service Fabric runs. When deploying to Service Fabric locally, in your own datacenter, or in the cloud, resources are deployed to your cluster's HTTP management endpoint or through the Service Fabric CLI. When deploying to Service Fabric Mesh, resources are deployed as Azure Resource Manager templates to Azure through HTTP or the Azure CLI. You can deploy the same Service Fabric resource to any of these Service Fabric environments without making any changes to your application code.
## Next steps
To learn more about Service Fabric Mesh, read the overview:
- [Service Fabric Mesh overview](service-fabric-mesh-overview.md)

Просмотреть файл

@ -0,0 +1,137 @@
---
title: Set up your development environment to build Service Fabric Mesh apps
description: The prerequisites required before you can create a Service Fabric app and deploy it to Azure Service Fabric Mesh.
services: Azure Service Fabric Mesh
keywords:
author: tylermsft
ms.author: twhitney
ms.date: 06/13/2018
ms.topic: get-started-article
ms.service: service-fabric-mesh
manager: timlt
#Customer intent: As a developer, I need to prepare install the prerequisites to enable service fabric mesh development in visual studio.
---
# Set up your development environment to build Service Fabric apps
To build and run Azure Service Fabric apps on your Windows development machine, install the Service Fabric runtime, SDK, and tools.
[!INCLUDE [preview note](./includes/include-preview-note.md)]
## Supported operating system versions
The following operating system versions are supported for development:
* Windows 10 (Enterprise, Professional, or Education)
* Windows Server 2016
## Enable Hyper-V
Hyper-V must be enabled for you to create Service Fabric apps.
### Windows 10
Open PowerShell as an administrator and run the following command:
```powershell
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
```
Restart your computer. For more information about how to enable Hyper-V, see [Install Hyper-V on Windows 10](https://docs.microsoft.com/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v).
### Windows Server 2016
Open PowerShell as an administrator and run the following command:
```powershell
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools
```
Restart your computer. For more information about how to enable Hyper-V, see [Install the Hyper-V role on Windows Server 2016](https://docs.microsoft.com/windows-server/virtualization/hyper-v/get-started/install-the-hyper-v-role-on-windows-server).
## Visual Studio
Visual Studio 2017 is required to deploy Service Fabric apps. [Install version 15.6.0][download-visual-studio] or greater and enable the following workloads:
- ASP.NET and web development
- Azure Development
## Docker
Install Docker to support the containerized Service Fabric apps used by Service Fabric Mesh.
### Windows 10
Download and install the latest version of [Docker Community Edition for Windows][download-docker].
During the installation, select **Use Windows containers instead of Linux containers** when asked. You'll need to then log off and log back in. After logging back in, if you did not previously enable Hyper-V, you may be prompted to enable Hyper-V. You must enable Hyper-V and then restart your computer.
After your computer has restarted, Docker will prompt you to enable the **Containers** feature, enable it and restart your computer.
### Windows Server 2016
Use the following PowerShell commands to install Docker. For more information, see [Docker Enterprise Edition for Windows Server][download-docker-server].
```powershell
Install-Module DockerMsftProvider -Force
Install-Package Docker -ProviderName DockerMsftProvider -Force
Install-WindowsFeature Containers
```
Restart your computer.
## SDK and tools
Install the Service Fabric runtime, SDK, and tools in a dependent order.
1. Download the [Service Fabric Runtime][download-runtime] executable, save it and manually run it with the **/AcceptEULA** flag on the command line, for example:
`c:\users\<user name>\downloads\MicrosoftServiceFabric.6.3.116.9494.exe /AcceptEULA`
2. Install the [Service Fabric SDK][download-sdk].
3. Install the [Service Fabric Mesh SDK][download-sdkmesh].
4. Install the [Visual Studio Service Fabric Tools (preview)][download-tools].
## Build a cluster
For the best debugging performance when you create and run Service Fabric apps, we recommend creating a single-node local development cluster. This cluster must be running whenever you deploy or debug a Service Fabric Mesh project.
Docker **must** be running before you can build a cluster. Test that Docker is running by opening a terminal window and running `docker ps` to see if an error occurs. If the response does not indicate an error, Docker is running and you're ready to build a cluster.
After you install the runtime, SDKs and Visual Studio tools, create a development cluster.
1. Close your PowerShell window
2. Open new, elevated PowerShell window. This step is necessary to load the Service Fabric modules you just installed.
3. Run the following PowerShell commands to create a development cluster:
```powershell
. "C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1" -CreateOneNodeCluster -UseMachineName
```
You're now ready to create Service Fabric Mesh apps!
## Install the Service Fabric Mesh CLI
The Azure Service Fabric Mesh CLI is used to deploy and manage resources. It requires that you're running the Azure CLI version 2.0.35 or later. Run `az --version` to find the version. To install or upgrade to the latest version of the CLI, see [Install Azure CLI 2.0][azure-cli-install].
Remove any previous installation of the Azure Service Fabric Mesh CLI module.
```azurecli
az extension remove --name mesh
```
Install the Azure Service Fabric Mesh CLI extension module. For the preview, Azure Service Fabric Mesh CLI is written as an extension to Azure CLI.
```azurecli
az extension add --source https://meshcli.blob.core.windows.net/cli/mesh-0.7.0-py2.py3-none-any.whl
```
## Next steps
Read through the [Create an Azure Service Fabric app](service-fabric-mesh-tutorial-create-dotnetcore.md) tutorial.
[azure-cli-install]: https://docs.microsoft.com/cli/azure/install-azure-cli
[download-docker]: https://store.docker.com/editions/community/docker-ce-desktop-windows
[download-docker-server]: https://docs.docker.com/install/windows/docker-ee/
[download-runtime]: http://aka.ms/sfruntime
[download-sdk]: http://aka.ms/sfsdk
[download-sdkmesh]: http://aka.ms/sfmeshsdk
[download-tools]: https://aka.ms/sfvstools
[download-visual-studio]: https://www.visualstudio.com/downloads/

Просмотреть файл

@ -0,0 +1,34 @@
---
title: State storage options on Azure Service Fabric Mesh | Microsoft Docs
description: Learn about reliably storing state in Service Fabric applications running on Azure Service Fabric Mesh.
services: service-fabric-mesh
keywords:
author: rwike77
ms.author: ryanwi
ms.date: 06/19/2018
ms.topic: conceptual
ms.service: service-fabric-mesh
manager: timlt
---
# State management with Service Fabric
Service Fabric supports many different options for state storage. For a conceptual overview of the state management patterns and Service Fabric, see [Service Fabric Concepts: State](/azure/service-fabric/service-fabric-concepts-state). All these same concepts apply whether your services run inside or outside of Service Fabric Mesh.
## State storage options in Azure Service Fabric Mesh
With Service Fabric Mesh, you can easily deploy a new application and connect it to an existing data store hosted in Azure. Besides using any remote database, there are several options for storing data, depending on whether the service desires local or remote storage.
* Locally stored replicated data
* Reliable Collections (not available in preview)
* A library which implements data structures like queues and key-value pairs to use in the service
* This gives the easiest and fastest way to interact with data, while providing easy partition routing in combination with Intelligent Routing in Service Fabric Mesh
* Service Fabric volume driver (not available in preview)
* A docker volume driver to mount a local volume to a container
* This gives you the ultimate flexibility in storing data locally, through any API, which supports file storage.
* Remote storage
* Azure Files volume driver
* A docker volume driver to mount an Azure Files share to a container
* Gives you a less performant, but also cheaper full flexible and reliable data option, through any API, which supports file storage.
## Next steps
For information on the application model, see [Service Fabric resources](service-fabric-mesh-service-fabric-resources.md)

Просмотреть файл

@ -0,0 +1,65 @@
---
title: Terminology for Azure Service Fabric Mesh | Microsoft Docs
description: Learn about common terms for Azure Service Fabric Mesh.
services: service-fabric-mesh
keywords:
author: rwike77
ms.author: ryanwi
ms.date: 06/26/2018
ms.topic: conceptual
ms.service: service-fabric-mesh
manager: timlt
---
# Service Fabric Mesh terminology
Azure Service Fabric Mesh is a fully managed service that enables developers to deploy microservices applications without managing virtual machines, storage, or networking. This article details the terminology used by Azure Service Fabric Mesh to understand the terms used in the documentation.
## Service Fabric
Service Fabric is a distributed systems platform that makes it easy to package, deploy, and manage scalable and reliable microservices. Service Fabric is the orchestrator that powers Service Fabric Mesh. Service Fabric provides options for how you can build and run your microservices applications. You can use any framework to write your services and choose where to run the application from multiple environment choices.
## Frameworks
[Service Fabric](/azure/service-fabric/service-fabric-overview) as a platform is agnostic to the framework you choose for writing services. For example, can write services using ASP.NET, Java, Node.js, or Python. The Service Fabric ecosystem also provides frameworks, which enable you to take advantage of platform features (such as highly available state). [Reliable services](/azure/service-fabric/service-fabric-reliable-services-introduction) and [reliable actors](/azure/service-fabric/service-fabric-reliable-actors-introduction) are specific examples of Service Fabric frameworks.
## Deployment models
To deploy your services, you need to describe how they should run. Service Fabric supports three different deployment models.
**Resource model**: Describes Service Fabric applications and resources. Resources are defined using a YAML file or JSON file (using the Azure Resource Model schema). Applications described using the resource model are deployed as running instances.
**Manifest model**: Describes reliable services applications. Application and service types are defined using XML manifest files. Multiple instances of application and service types can run at the same time.
**Docker Compose**: A tool for defining and running multi-container Docker applications. [Compose](https://docs.docker.com/compose/) is part of the Docker project. Service Fabric provides limited support for deploying applications using the Compose model.
## Environments
Service Fabric is the platform technology, which several different services and products are based on. Microsoft provides the following options:
**Service Fabric Mesh**: A fully managed service for running Service Fabric applications in Microsoft Azure.
**Azure Service Fabric**: The Azure hosted Service Fabric cluster offering. It provides integration between Service Fabric and the Azure infrastructure, along with upgrade and configuration management of Service Fabric clusters.
**Service Fabric standalone**: A set of installation and configuration tools to [deploy Service Fabric clusters anywhere](/azure/service-fabric/service-fabric-deploy-anywhere) (on-premises or on any cloud provider). Not managed by Azure.
**Service Fabric onebox or development cluster**: Provides the developer experience on Windows, Linux, or Mac for creating Service Fabric applications.
## Environment, framework, and deployment model support matrix
Different environments have different level of support for frameworks and deployment models. The following table describes the supported framework and deployment model combinations.
|Frameworks\Deployment model |Resource model |Manifest model | Compose|
|---|---|---|---|
|Reliable Actors and Reliable Services |Not supported |Supported |Not supported |
|Any other framework |Supported in containers |Supported as processes and in containers |Supported in containers |
The following table describes the supported environment and deployment model combinations.
|Environment\Deployment model |Resource model |Manifest model |Compose |
|---|---|---|---|
|Azure Service Fabric Mesh |Supported |Not supported|Not supported |
|All other environments |Supported (Some resources have prerequisites to work in an environment) |Supported |Limited Support |
## Next steps
To learn more about Service Fabric Mesh, read the overview:
- [Service Fabric Mesh overview](service-fabric-mesh-overview.md)

Просмотреть файл

@ -0,0 +1,389 @@
---
title: Tutorial Create an Azure Service Fabric app | Microsoft Docs
description: In this tutorial, you create an Azure Service Fabric application consisting of an ASP.NET Core website that communicates with a back-end web service, and publish it to Azure.
services: service-fabric-mesh
documentationcenter: .net
author: TylerMSFT
manager: jeconnoc
editor: ''
ms.assetid:
ms.service: service-fabric-mesh
ms.devlang: dotNet
ms.topic: tutorial
ms.tgt_pltfrm: NA
ms.workload: NA
ms.date: 06/27/2018
ms.author: twhitney
ms.custom: mvc, devcenter
#Customer intent: As a developer, I want learn how to create a Service Fabric Mesh app that communicates with another service, and then publish it to Azure.
---
# Tutorial: Create an Azure Service Fabric app
This tutorial is part one of a series. You'll learn how to create an Azure Service Fabric app that has an ASP.NET web front end and an ASP.NET Core Web API back-end service. Then you'll debug the app on your local development cluster and publish the app to Azure. When you're finished, you'll have a simple to-do app that demonstrates a service-to-service call in a Service Fabric application running in Service Fabric Mesh.
If you don't want to manually create the to-do app, you can [download the source code](https://github.com/azure-samples/service-fabric-mesh) for the completed application (under the basicservicefabricmeshapp directory) and skip ahead to [Debug the app locally](service-fabric-mesh-tutorial-debug-service-fabric-mesh-app.md).
In part one of the series, you learn how to:
> [!div class="checklist"]
> * Create a Service Fabric application consisting of an ASP.NET web front end.
> * Create a model to represent to-do items.
> * Create a back-end service & retrieve data from it.
> * Add a controller and DataContext as part of that Model View Controller pattern for the back-end service.
> * Create a web page to display to-do items.
> * Create environment variables that identify the back-end service
In this tutorial series you learn how to:
> [!div class="checklist"]
> * Build a Service Fabric application
> * [Debug the app locally](service-fabric-mesh-tutorial-debug-service-fabric-mesh-app.md)
> * [Publish the app to Azure](service-fabric-mesh-tutorial-deploy-service-fabric-mesh-app.md)
[!INCLUDE [preview note](./includes/include-preview-note.md)]
## Prerequisites
Before you begin this tutorial:
* If you don't have an Azure subscription, you can [create a free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
* Make sure that you've [set up your development environment](service-fabric-mesh-setup-developer-environment-sdk.md) which includes installing the Service Fabric runtime, SDK, Docker, and Visual Studio 2017.
## Create a Service Fabric Mesh project
Run Visual Studio and select **File** > **New** > **Project...**
In the **New Project** dialog, type **mesh** into the **Search** box at the top. Select the **Service Fabric Mesh Application** template. (If you don't see the template, make sure that you installed the Mesh SDK and the VS tools preview as described in [set up your development environment](service-fabric-mesh-setup-developer-environment-sdk.md).
In the **Name** box, type **ServiceFabricMeshApp** and in the **Location** box, set the folder path to where the files for the project will be stored.
Make sure that **Create directory for solution** is checked, and click **OK** to create the Service Fabric Mesh project. Next you'll see the **New Service Fabric Service** dialog.
![Visual studio new Service Fabric Mesh project dialog](./media/service-fabric-mesh-tutorial-deploy-dotnetcore/visual-studio-new-project.png)
### Create the web front-end service
In the **New Service Fabric Service** dialog, select the **ASP.NET Core** project type, make sure **Container OS** is set to **Windows**.
Set the **Service Name** to **WebFrontEnd**. Press **OK** to create the ASP.NET Core service. Next you'll see the **New ASP.NET Core Web Application** dialog.
![Visual studio new Service Fabric Mesh project dialog](./media/service-fabric-mesh-tutorial-deploy-dotnetcore/visual-studio-new-service-fabric-service.png)
In the **New ASP.NET Core Web Application** dialog, select **Web Application** and then click **OK**.
![Visual studio new ASP.NET core application](./media/service-fabric-mesh-tutorial-deploy-dotnetcore/visual-studio-new-aspnetcore-app.png)
Now you have a Service Fabric Application. Next, create the model for to-do information.
## Create the to-do items model
For simplicity, the to-do items are stored in a list in memory. Create a class library for the to-do items and a list to hold them. In Visual Studio, which currently has the **ServiceFabricMeshApp** loaded, select **File** > **Add** > **New Project**.
In the **New Project** dialog, type **C# .net core class** into the **Search** box at the top. Select the **Class Library (.NET Core)** template.
In the **Name** box, type **Model**. Click **OK** to create the class library.
In the Solution explorer, under **Model**, right-click **Class1.cs** and choose **Rename**. Rename the class **ToDoItem.cs**. A prompt will appear asking whether to rename all references to `Class1`. Click **Yes**.
Replace the contents of the empty `class ToDoItem` with:
```csharp
public class ToDoItem
{
public string Description { get; set; }
public int Index { get; set; }
public bool Completed { get; set; }
public ToDoItem(string description)
{
Description = description;
Index = 0;
}
public static ToDoItem Load(string description, int index, bool completed)
{
ToDoItem newItem = new ToDoItem(description)
{
Index = index,
Completed = completed
};
return newItem;
}
}
```
This class represents individual to-do items.
Create a list to hold the to-do items. In Visual Studio, right-click the **Model** class library, and select **Add** > **Class...** The **Add New Item** dialog will appear. Set the **Name** to **ToDoList.cs** and click **Add**.
In **ToDoList.cs**, replace the empty `class ToDoList` with:
```csharp
public class ToDoList
{
private List<ToDoItem> _items;
public string Name { get; set; }
public IEnumerable<ToDoItem> Items { get => _items; }
public ToDoList(string name)
{
Name = name;
_items = new List<ToDoItem>();
}
public ToDoItem Add(string description)
{
var item = new ToDoItem(description);
_items.Add(item);
item.Index = _items.IndexOf(item);
return item;
}
public void Add(ToDoItem item)
{
_items.Add(item);
item.Index = _items.Count - 1;
}
public ToDoItem RemoveAt(int index)
{
if (index >= 0 && index < _items.Count)
{
var result = _items[index];
_items.RemoveAt(index);
// Reorder items
for (int i = index; i < _items.Count; i++)
{
_items[i].Index = i;
}
return result;
}
else
{
throw new IndexOutOfRangeException();
}
}
}
```
Next, create the service fabric service (a Web API project) that will track the to-do items.
## Create the back-end service
In the Visual Studio **Solution Explorer** window, right-click **ServiceFabricMeshApp** and click **Add** > **New Service Fabric Service...**
The **New Service Fabric Service** dialog appears. Select the **ASP.NET Core** project type, and make sure **Container OS** is set to **Windows**.
Set the **Service Name** to **ToDoService**. Click **OK** to create the ASP.NET Core service. Next, the **New ASP.NET Core Web Application** dialog will appear. In that dialog select **API** and then **OK**, and a project for the service is added to the solution.
![Visual studio new ASP.NET core application](./media/service-fabric-mesh-tutorial-deploy-dotnetcore/visual-studio-new-webapi.png)
Because the back-end service doesn't provide any UI, turn off launching the browser when the service is launched. In the **Solution Explorer**, right-click **ToDoService**, and select **Properties**. In the properties window that appears, select the **Debug** tab on the left, and uncheck **Launch browser**. Press Ctrl+S to save the change.
Because this service maintains the to-do information, add a reference to the Model class library. In the Solution Explorer, right-click **ToDoService** and then select **Add** > **Reference...**. The **Reference Manager** dialog will appear.
In the **Reference Manager**, select the checkbox for **Model**, and click **OK**.
### Add a data context
ASP.Net Web API projects use the model view controller (MVC) pattern. Next create a data context that coordinates serving up the data from the data model.
To add the data context class, in the solution explorer right-click **ToDoService** and then **Add** > **Class**.
In the **Add New Item** dialog that appears, make sure that **Class** is selected, and set the **Name** to `Datacontext.cs`, and click **Add**.
In **Datacontext.cs**, replace the contents of the empty 'class DataContext' with:
```csharp
public static class DataContext
{
public static Model.ToDoList ToDoList { get; } = new Model.ToDoList("Azure learning List");
static DataContext()
{
ToDoList = new Model.ToDoList("Main List");
// Seed to-do list
ToDoList.Add(Model.ToDoItem.Load("Learn about microservices", 0, true));
ToDoList.Add(Model.ToDoItem.Load("Learn about Service Fabric", 1, true));
ToDoList.Add(Model.ToDoItem.Load("Learn about Service Fabric Mesh", 2, false));
}
}
```
The minimal data context populates some sample to-do items and provides access to them.
### Add a controller
Also part of the MVC pattern is a controller that handles the HTTP requests and creates the HTTP response. A default controller was provided by the template when the **ToDoService** project was created. In the **Solution Explorer**, under **ToDoService**, open the **Controllers** folder to see the **ValuesController.cs** file.
Right-click **ValuesController.cs** and then **Rename**. Rename the file to `ToDoController.cs`. A prompt to rename all references will appear, click **Yes**.
Open the **ToDoController.cs** file and replace the contents of `class ToDoController` with:
```csharp
[Route("api/[controller]")]
public class ToDoController : Controller
{
// GET api/todo
[HttpGet]
public IEnumerable<Model.ToDoItem> Get()
{
return DataContext.ToDoList.Items;
}
// GET api/todo/5
[HttpGet("{index}")]
public Model.ToDoItem Get(int index)
{
return DataContext.ToDoList.Items.ElementAt(index);
}
//// POST api/values
//[HttpPost]
//public void Post([FromBody]string value)
//{
//}
//// PUT api/values/5
//[HttpPut("{id}")]
//public void Put(int id, [FromBody]string value)
//{
//}
// DELETE api/values/5
[HttpDelete("{index}")]
public void Delete(int index)
{
}
}
```
This tutorial does not implement add, delete, and so on. The focus is on communicating with another service.
## Create the web page that displays to-do items
With the back-end service implemented, code the web site that will display the to-do items it provides. The following steps take place within the **WebFrontEnd** project.
The web page that displays the to-do items needs access to the **ToDoItem** class and list. Add a reference to the Model project in the **Solution Explorer** by right-clicking **WebFrontEnd** and selecting **Add** > **Reference...** The **Reference Manager** dialog will appear.
In the **Reference Manager**, select the checkbox for **Model**, and click **OK**.
In the **Solution Explorer**, open the Index.cshtml page by navigating to **WebFrontEnd** > **Pages** > **Index.cshtml**. Open **Index.cshtml**.
Replace the contents of the entire file with the following HTML that defines a simple table to display to-do items:
```HTML
@page
@model IndexModel
@{
ViewData["Title"] = "Home page";
}
<div>
<table class="table-bordered">
<thead>
<tr>
<th>Description</th>
<th>Done?</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Items)
{
<tr>
<td>@item.Description</td>
<td>@item.Completed</td>
</tr>
}
</tbody>
</table>
</div>
```
Open the code for the Index page in the **Solution Explorer** by opening **Index.cshtml** and then opening **Index.cshtml.cs**.
At the top of **Index.cshtml.cs**, add `using System.Net.Http;`
Replace the contents of `public class IndexModel` with:
```csharp
public class IndexModel : PageModel
{
public Model.ToDoItem[] Items = new Model.ToDoItem[] { };
public void OnGet()
{
HttpClient client = new HttpClient();
using (HttpResponseMessage response = client.GetAsync(backendUrl).GetAwaiter().GetResult())
{
if (response.StatusCode == System.Net.HttpStatusCode.OK)
{
Items = Newtonsoft.Json.JsonConvert.DeserializeObject<Model.ToDoItem[]>(response.Content.ReadAsStringAsync().Result);
}
}
}
private static string backendDNSName = $"{Environment.GetEnvironmentVariable("ServiceName")}.{Environment.GetEnvironmentVariable("AppName")}";
private static Uri backendUrl = new Uri($"http://{backendDNSName}:{Environment.GetEnvironmentVariable("ApiHostPort")}/api/todo");
}
```
### Create environment variables
The URL for the back-end service is required to communicate with that service. For the purpose of this tutorial, the following code (defined above as part of the IndexModel) reads environment variables to compose the URL:
```csharp
private static string backendDNSName = $"{Environment.GetEnvironmentVariable("ServiceName")}.{Environment.GetEnvironmentVariable("AppName")}";
private static Uri backendUrl = new Uri($"http://{backendDNSName}:{Environment.GetEnvironmentVariable("ApiHostPort")}/api/todo");
```
The URL is composed of the application name, the service name, and the port. All of this information is found in the service.yaml file found in the **ToDoService** project. Navigate in **Solution Explorer** to the **ToDoService** project and open **Service Resources** > **service.yaml**.
![Figure 1 - The ToDoService service.yaml file](./media/service-fabric-mesh-tutorial-deploy-dotnetcore/visual-studio-serviceyaml-port.png)
* The app name, `ServiceFabricMeshApp`, is found under `application:` after `name:` See (1) in the figure above.
* The service name, `ToDoService`, is found under `services:` after `name:` See (2) in the figure above.
* The port, `20006`, is found under `endpoints:` after `port:` See (3) in the figure above.
With the app name, service name, and port number, environment variables can be defined that the app will use to communicate with the back-end service. In **Solution Explorer**, navigate to **WebFrontEnd** > **Service Resources** > **service.yaml** to define the variables that specify the back-end service address.
In the service.yaml file, add the following variables under `environmentVariables`.
> [!IMPORTANT]
> Spaces, not tabs, must be used to indent the variables in the service.yaml file or it won't compile. Visual Studio may insert tabs as you create new lines. Replace all tabs with spaces. You'll see errors in the Error List when you compile but the app will still run--although it won't work until you convert the tabs to spaces. To ensure that no tabs are in the service.yaml file, make whitespace visible in the Visual Studio editor with **Edit** > **Advanced** > **View White Space**.
``` xml
- name: AppName
value: ServiceFabricMeshApp
- name: ApiHostPort
value: 20006
- name: ServiceName
value: ToDoService
```
Your **WebFrontEnd** project's **service.yaml** file should look something like this although your `ApiHostPort` value will probably be different:
![Service.yaml in the WebFrontEnd project](./media/service-fabric-mesh-tutorial-deploy-dotnetcore/visual-studio-serviceyaml-envvars.png)
Now you are ready to build and deploy the image the Service Fabric app, along with the back-end web service, to your local cluster.
## Next steps
In this part of the tutorial, you learned how to:
> [!div class="checklist"]
> * Create a Service Fabric application consisting of an ASP.NET web front end.
> * Create a model to represent to-do items.
> * Create a back-end service & retrieve data from it.
> * Add a controller and DataContext as part of that Model View Controller pattern for the back-end service.
> * Create a web page to display to-do items.
> * Create environment variables that identify the back-end service
Advance to the next tutorial:
> [!div class="nextstepaction"]
> [Debug the application](service-fabric-mesh-tutorial-debug-service-fabric-mesh-app.md)

Просмотреть файл

@ -0,0 +1,96 @@
---
title: Tutorial Debug an Azure Service Fabric application | Microsoft Docs
description: In this tutorial, debug an Azure Service Fabric application running on your local cluster.
services: service-fabric-mesh
documentationcenter: .net
author: TylerMSFT
manager: jeconnoc
editor: ''
ms.assetid:
ms.service: service-fabric-mesh
ms.devlang: dotNet
ms.topic: tutorial
ms.tgt_pltfrm: NA
ms.workload: NA
ms.date: 06/27/2018
ms.author: twhitney
ms.custom: mvc, devcenter
#Customer intent: As a developer, I want learn how to debug a Service Fabric Mesh app that communicates with another service.
---
# Tutorial: Debug an Azure Service Fabric application
This tutorial is part two of a series and shows you how to debug an Azure Service Fabric application on your local development cluster.
In this tutorial you will learn:
> [!div class="checklist"]
> * What happens when you build an Azure Service Fabric application
> * How to set a breakpoint to observe a service-to-service call
In this tutorial series you learn how to:
> [!div class="checklist"]
> * [Build a Service Fabric application](service-fabric-mesh-tutorial-create-dotnetcore.md)
> * Debug the app locally
> * [Publish the app to Azure](service-fabric-mesh-tutorial-deploy-service-fabric-mesh-app.md)
[!INCLUDE [preview note](./includes/include-preview-note.md)]
## Prerequisites
Before you begin this tutorial:
* If you don't have an Azure subscription, you can [create a free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
* Make sure that you've [set up your development environment](service-fabric-mesh-setup-developer-environment-sdk.md) which includes installing the Service Fabric runtime, SDK, Docker, and Visual Studio 2017.
## Download the to-do sample application
If you did not create the to-do sample application in [part one of this tutorial series](service-fabric-mesh-tutorial-create-dotnetcore.md), you can download it. In a command window, run the following command to clone the sample app repository to your local machine.
```
git clone https://github.com/azure-samples/service-fabric-mesh
```
The application is under the basicservicefabricmeshapp directory.
## Build and debug on your local cluster
A Docker image is automatically built and deployed to your local cluster as soon as your project loads. This process may take a while. To monitor the progress in the Visual Studio **Output** pane, set the Output pane **Show output from:** drop-down to **Service Fabric Tools**.
Press **F5** to compile and run your service locally. Whenever the project is run and debugged locally, Visual Studio will:
* Make sure that Docker for Windows is running and set to use Windows as the container operating system.
* Download any missing Docker base images. This part may take some time
* Build (or rebuild) the Docker image used to host your code project.
* Deploy and run the container on the local Service Fabric development cluster.
* Run your services and hit any breakpoints you have set.
After the local deployment is finished, and Visual Studio is running your app, a browser window will open to a default sample web page.
**Debugging tips**
* If you get error that "No Service Fabric local cluster is running", make sure that the Service Local Custer Manager (SLCM) is running. Right-click the SLCM icon in the task bar, and click **Start Local Cluster**. Once it has started, return to Visual Studio and press **F5**.
* If you get a 404 when the app starts, it probably means that your environment variables in **service.yaml** are incorrect. Make sure that `AppName`, `ApiHostPort` and `ServiceName` are set correctly per the instructions in [Set environment variables](#set-environment-variables).
* If you get a build error in **service.yaml**, make sure that you used spaces and not tabs when you added the environment variables.
### Debug in Visual Studio
When you debug a Service Fabric application in Visual Studio, you are using a local Service Fabric development cluster. To see how to-do items are retrieved from the back-end service, debug into the OnGet() method.
1. In the **WebFrontEnd** project, open **Pages** > **Index.cshtml** > **Index.cshtml.cs** and set a breakpoint in the **Get** method (line 17).
2. In the **ToDoService** project, open **TodoController.cs** and set a breakpoint in the **Get** method (line 16).
3. Go back to the browser and refresh the page. You hit the breakpoint in the web front end `OnGet()` method. You can inspect the `backendUrl` variable to see how the environment variables that you defined in the **service.yaml** file are combined into the URL used to contact the back-end service.
4. Step over (F10) the `client.GetAsync(backendUrl).GetAwaiter().GetResult())` call and you'll hit the controller's `Get()` breakpoint. In this method, you can see how the list of to-do items is retrieved from the in-memory list.
5. When you are done looking around, you can stop debugging your project in Visual Studio by pressing **Shift+F5**.
## Next steps
In this part of the tutorial, you learned:
> [!div class="checklist"]
> * What happens when you build an Azure Service Fabric application
> * How to set a breakpoint to observe a service-to-service call
Advance to the next tutorial:
> [!div class="nextstepaction"]
> [Publish the application](service-fabric-mesh-tutorial-deploy-service-fabric-mesh-app.md)

Просмотреть файл

@ -0,0 +1,170 @@
---
title: Tutorial Create an Azure Service Fabric application | Microsoft Docs
description: Learn how to create an Azure Service Fabric application consisting of an ASP.NET Core website that communicates with a back-end web service, and publish it to Azure.
services: service-fabric-mesh
documentationcenter: .net
author: TylerMSFT
manager: jeconnoc
editor: ''
ms.assetid:
ms.service: service-fabric-mesh
ms.devlang: dotNet
ms.topic: tutorial
ms.tgt_pltfrm: NA
ms.workload: NA
ms.date: 06/27/2018
ms.author: twhitney
ms.custom: mvc, devcenter
#Customer intent: As a developer, I want learn how to publish a Service Fabric Mesh app to Azure.
---
# Tutorial: Publish an Azure Service Fabric application
This tutorial is part three of a series and shows you how to deploy an Azure Service Fabric application to a new cluster in Azure directly from Visual Studio.
In this tutorial you learn how to:
> [!div class="checklist"]
> * Publish the app to Azure.
> * Check application deployment status
> * See all applications currently deployed to your subscription
> * See the application logs
> * Clean up the resources used by the app.
In this tutorial series, you learn how to:
> [!div class="checklist"]
> * [Build a Service Fabric application](service-fabric-mesh-tutorial-create-dotnetcore.md)
> * [Debug the app locally](service-fabric-mesh-tutorial-debug-service-fabric-mesh-app.md)
> * Publish the app to Azure
You'll learn how to create an Azure Service Fabric app that has an ASP.NET web front end and an ASP.NET Core Web API back-end service. Then you'll debug the app on your local development cluster and publish the app to Azure. When you're finished, you'll have a simple to-do app that demonstrates how to make a service-to-service call in a Service Fabric application.
## Prerequisites
Before you begin this tutorial:
* If you don't have an Azure subscription, you can [create a free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
* Make sure that you've [set up your development environment](service-fabric-mesh-setup-developer-environment-sdk.md) which includes installing the Service Fabric runtime, SDK, Docker, and Visual Studio 2017.
## Download the to-do sample application
If you did not build the to-do sample application in [part two of this tutorial series](service-fabric-mesh-tutorial-debug-service-fabric-mesh-app.md), you can download it. In a command window, run the following command to clone the sample app repository to your local machine.
```
git clone https://github.com/azure-samples/service-fabric-mesh
```
The application is under the basicservicefabricmeshapp directory.
## Publish to Azure
To publish your Service Fabric Mesh project to Azure, right-click on **ServiceFabricMeshApp** in Visual studio and select **Publish...**
Next, you'll see a **Publish Service Fabric Application** dialog.
![Visual studio Service Fabric Mesh publish dialog](./media/service-fabric-mesh-tutorial-deploy-dotnetcore/visual-studio-publish-dialog.png)
Select your Azure account and subscription. Choose a **Location**. This article uses **East US**.
Under **Resource group**, select **\<Create New Resource Group...>**. This results in a dialog where you'll create a new resource group. Choose the **East US** location and name the group **sfmeshTutorial1RG**. Press **Create** to create the resource group and return to the publish dialog.
![Visual studio Service Fabric Mesh new resource group dialog](./media/service-fabric-mesh-tutorial-deploy-dotnetcore/visual-studio-publish-new-resource-group-dialog.png)
Back in the **Publish Service Fabric Application** dialog, under **Azure Container Registry**, select **\<Create New Container Registry...>**. In the **Create Container Registry** dialog, use a unique name for the **Container registry name**. For **Location**, pick **East US**. Select the **sfmeshTutorial1RG** resource group. Set the **SKU** to **Basic** and then press **Create** to return to the publish dialog.
![Visual studio Service Fabric Mesh new resource group dialog](./media/service-fabric-mesh-tutorial-deploy-dotnetcore/visual-studio-publish-new-container-registry-dialog.png)
In the publish dialog, press the **Publish** button to deploy your Service Fabric application to Azure.
When you publish to Azure for the first time, it can take up to 10 or more minutes. Subsequent publishes of the same project generally take around five minutes. Obviously, these estimates will vary based on your internet connection speed and other factors. You can monitor the progress of the deployment by selecting the **Service Fabric Tools** pane in the Visual Studio **Output** window. Once the deployment has finished, the **Service Fabric Tools** output will display the app's IP address and port in the form of a URL.
```json
Packaging Application...
Building Images...
Web1 -> C:\Code\ServiceFabricMeshApp\ToDoService\bin\Any CPU\Release\netcoreapp2.0\ToDoService.dll
Uploading the images to Azure Container Registy...
Deploying application to remote endpoint...
The application was deployed successfully and it can be accessed at http://10.000.38.000:20000.
```
Open a web browser and navigate to the URL to see the website running in Azure.
[!INCLUDE [cloud-shell-try-it.md](../../includes/cloud-shell-try-it.md)]
You can use the Azure Cloud Shell or a local installation of the Azure CLI for the remaining steps.
If you choose to install and use the CLI locally, this tutorial requires that you're running the Azure CLI version 2.0.35 or later. Run `az --version` to find the version. To install or upgrade to the latest version of the CLI, see [Install Azure CLI 2.0][azure-cli-install].
## Install the az mesh cli
At the cli prompt
1) Remove any previous install of the Azure Service Fabric Mesh CLI module.
```cli
az extension remove --name mesh
```
2) Install the Azure Service Fabric Mesh CLI extension module. For the preview, Azure Service Fabric Mesh CLI is written as an extension to Azure CLI, however, at public preview it would ship as a part of the Azure CLI.
```cli
az extension add --source https://meshcli.blob.core.windows.net/cli/mesh-0.7.0-py2.py3-none-any.whl
```
## Check application deployment status
At this point, your application has been deployed. You can check to see its status by using the `app show` command.
The application name for the tutorial app is `ServiceMeshApp`. Gather the details on the application with the following command:
```azurecli-interactive
az mesh app show --resource-group $rg --name ServiceMeshApp
```
## See all applications currently deployed to your subscription
You can use the "app list" command to get a list of applications you have deployed to your subscription.
```cli
az mesh app list --output table
```
## See the application logs
Examine the logs for the deployed application:
```azurecli-interactive
az mesh code-package-log get --resource-group $rg --application-name ServiceMeshApp --service-name todoservice --replica-name 0 --code-package-name ServiceMeshApp
```
## Clean up resources
When no longer needed, delete all of the resources you created. Since you created a new resource group to host both the ACR and Service Fabric Mesh service resources, you can safely delete this resource group.
```azurecli
az group delete --resource-group sfmeshTutorial1RG
```
```powershell
Remove-AzureRmResourceGroup -Name sfmeshTutorial1RG
```
Alternatively, you can delete the resource group [from the portal](../azure-resource-manager/resource-group-portal.md#delete-resource-group-or-resources).
## Next steps
In this part of the tutorial, you learned:
> [!div class="checklist"]
> * Publish the app to Azure.
> * Check application deployment status
> * See all the application you have currently deployed to your subscription
> * See the application logs
> * Clean up the resources used by the app.
Now that you have completed publishing a Service Fabric application to Azure, try the following:
* Explore the [Voting app sample](https://github.com/Azure/service-fabric-mesh-preview-pr/tree/master/samples/src/votingapp) to see another example of service-to-service communication.
* Read [Service Fabric resources](service-fabric-mesh-service-fabric-resources.md)
* Read about the [Cloud Shell](https://docs.microsoft.com/azure/cloud-shell/overview)
[azure-cli-install]: https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest

Просмотреть файл

@ -0,0 +1,8 @@
.dockerignore
.env
.git
.gitignore
.vs
.vscode
*/bin
*/obj

Просмотреть файл

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
</Project>

Просмотреть файл

@ -0,0 +1,28 @@
using System;
namespace Model
{
public class ToDoItem
{
public string Description { get; set; }
public int Index { get; set; }
public bool Completed { get; set; }
public ToDoItem(string description)
{
Description = description;
Index = 0;
}
public static ToDoItem Load(string description, int index, bool completed)
{
ToDoItem newItem = new ToDoItem(description)
{
Index = index,
Completed = completed
};
return newItem;
}
}
}

Просмотреть файл

@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
public class ToDoList
{
private List<ToDoItem> _items;
public string Name { get; set; }
public IEnumerable<ToDoItem> Items { get => _items; }
public ToDoList(string name)
{
Name = name;
_items = new List<ToDoItem>();
}
public ToDoItem Add(string description)
{
var item = new ToDoItem(description);
_items.Add(item);
item.Index = _items.IndexOf(item);
return item;
}
public void Add(ToDoItem item)
{
_items.Add(item);
item.Index = _items.Count - 1;
}
public ToDoItem RemoveAt(int index)
{
if (index >= 0 && index < _items.Count)
{
var result = _items[index];
_items.RemoveAt(index);
// Reorder items
for (int i = index; i < _items.Count; i++)
{
_items[i].Index = i;
}
return result;
}
else
{
throw new IndexOutOfRangeException();
}
}
}
}

Просмотреть файл

@ -0,0 +1,5 @@
# ServiceFabricMeshApp
Create an Azure Service Fabric app that has an ASP.NET web front end and an ASP.NET Core Web API back-end service.
You'll debug the app on your local development cluster and publish the app to Azure.
When you're finished, you'll have a simple to-do app that demonstrates a service-to-service call in a Service Fabric Mesh app.

Просмотреть файл

@ -0,0 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27428.2043
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9B56FCB0-63B4-404F-8A09-42EF52B53347}") = "ServiceFabricMeshApp", "ServiceFabricMeshApp\ServiceFabricMeshApp.sfaproj", "{715A44F3-6534-4BEF-B4A8-E41668C4F0BF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebFrontEnd", "WebFrontEnd\WebFrontEnd.csproj", "{E73BAE6F-5568-4D7E-994E-712FC9292C7D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Model", "Model\Model.csproj", "{3D014384-D167-46C7-957E-A87340292FF2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToDoService", "ToDoService\ToDoService.csproj", "{DA3AED09-E0C3-4899-ABDA-00CCD6154423}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{715A44F3-6534-4BEF-B4A8-E41668C4F0BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{715A44F3-6534-4BEF-B4A8-E41668C4F0BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{715A44F3-6534-4BEF-B4A8-E41668C4F0BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{715A44F3-6534-4BEF-B4A8-E41668C4F0BF}.Release|Any CPU.Build.0 = Release|Any CPU
{E73BAE6F-5568-4D7E-994E-712FC9292C7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E73BAE6F-5568-4D7E-994E-712FC9292C7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E73BAE6F-5568-4D7E-994E-712FC9292C7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E73BAE6F-5568-4D7E-994E-712FC9292C7D}.Release|Any CPU.Build.0 = Release|Any CPU
{3D014384-D167-46C7-957E-A87340292FF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D014384-D167-46C7-957E-A87340292FF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D014384-D167-46C7-957E-A87340292FF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3D014384-D167-46C7-957E-A87340292FF2}.Release|Any CPU.Build.0 = Release|Any CPU
{DA3AED09-E0C3-4899-ABDA-00CCD6154423}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA3AED09-E0C3-4899-ABDA-00CCD6154423}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA3AED09-E0C3-4899-ABDA-00CCD6154423}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA3AED09-E0C3-4899-ABDA-00CCD6154423}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {78D5E43F-A96B-4AE3-ADD5-607D08941D3A}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -0,0 +1,4 @@
application:
schemaVersion: 0.0.1
name: ServiceFabricMeshApp
description: ServiceFabricMeshApp description.

Просмотреть файл

@ -0,0 +1,13 @@
## Network definition ##
network:
schemaVersion: 0.0.1
name: ServiceFabricMeshAppNetwork
description: ServiceFabricMeshAppNetwork description.
addressPrefix: 10.0.0.4/22
ingressConfig:
layer4:
- name: WebFrontEndIngress
publicPort: 20001
applicationName: ServiceFabricMeshApp
serviceName: WebFrontEnd
endpointName: WebFrontEndListener

Просмотреть файл

@ -0,0 +1,3 @@
## Visual Studio SFApp Publish Profile ##
vsSFAppPublishProfile:
schemaVersion: 0.0.1

Просмотреть файл

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.SFApp.Sdk">
<PropertyGroup Label="Globals">
<ProjectGuid>715a44f3-6534-4bef-b4a8-e41668c4f0bf</ProjectGuid>
<SFApplicationProjectVersion>0.7</SFApplicationProjectVersion>
<SFApplicationTargetsVersion>0.7</SFApplicationTargetsVersion>
<SFApplicationToolingVersion>0.7.0.0</SFApplicationToolingVersion>
</PropertyGroup>
<ItemGroup>
<None Include="App Resources\app.yaml" />
<None Include="App Resources\network.yaml" />
<None Include="Publish Profiles\cloud.yaml" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace ToDoService.Controllers
{
[Route("api/[controller]")]
public class ToDoController : Controller
{
// GET api/todo
[HttpGet]
public IEnumerable<Model.ToDoItem> Get()
{
return DataContext.ToDoList.Items;
}
// GET api/todo/5
[HttpGet("{index}")]
public Model.ToDoItem Get(int index)
{
return DataContext.ToDoList.Items.ElementAt(index);
}
//// POST api/values
//[HttpPost]
//public void Post([FromBody]string value)
//{
//}
//// PUT api/values/5
//[HttpPut("{id}")]
//public void Put(int id, [FromBody]string value)
//{
//}
// DELETE api/values/5
[HttpDelete("{index}")]
public void Delete(int index)
{
}
}
}

Просмотреть файл

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace ToDoService
{
public static class DataContext
{
public static Model.ToDoList ToDoList { get; } = new Model.ToDoList("Azure learning List");
static DataContext()
{
ToDoList = new Model.ToDoList("Main List");
// Seed to-do list
ToDoList.Add(Model.ToDoItem.Load("Learn about microservices", 0, true));
ToDoList.Add(Model.ToDoItem.Load("Learn about Service Fabric", 1, true));
ToDoList.Add(Model.ToDoItem.Load("Learn about Service Fabric Mesh", 2, false));
}
}
}

Просмотреть файл

@ -0,0 +1,19 @@
FROM microsoft/aspnetcore:2.0 AS base
WORKDIR /app
EXPOSE 20006
FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src
COPY ToDoService/ToDoService.csproj ToDoService/
RUN dotnet restore ToDoService/ToDoService.csproj
COPY . .
WORKDIR /src/ToDoService
RUN dotnet build ToDoService.csproj -c Release -o /app
FROM build AS publish
RUN dotnet publish ToDoService.csproj -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "ToDoService.dll"]

Просмотреть файл

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace ToDoService
{
public class Program
{
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseApplicationInsights()
.Build();
}
}

Просмотреть файл

@ -0,0 +1,26 @@
## Service definition ##
application:
schemaVersion: 0.0.1
name: ServiceFabricMeshApp
services:
- name: ToDoService
description: ToDoService description.
osType: Windows
codePackages:
- name: ToDoService
image: todoservice:dev
endpoints:
- name: ToDoServiceListener
port: 20006
environmentVariables:
- name: ASPNETCORE_URLS
value: http://+:20006
# - name: ApplicationInsights:InstrumentationKey
# value: "<Place AppInsights key here, or reference it via a secret>"
resources:
requests:
cpu: 0.5
memoryInGB: 1
replicaCount: 1
networkRefs:
- name: ServiceFabricMeshAppNetwork

Просмотреть файл

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
namespace ToDoService
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseMvc();
}
}
}

Просмотреть файл

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<IsSFAppServiceProject>true</IsSFAppServiceProject>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.7" />
<PackageReference Include="Microsoft.VisualStudio.Azure.SFApp.Targets" Version="1.0.0-preview.1.0" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Model\Model.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,10 @@
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}

Просмотреть файл

@ -0,0 +1,15 @@
{
"Logging": {
"IncludeScopes": false,
"Debug": {
"LogLevel": {
"Default": "Warning"
}
},
"Console": {
"LogLevel": {
"Default": "Warning"
}
}
}
}

Просмотреть файл

@ -0,0 +1,19 @@
FROM microsoft/aspnetcore:2.0 AS base
WORKDIR /app
EXPOSE 20001
FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src
COPY WebFrontEnd/WebFrontEnd.csproj WebFrontEnd/
RUN dotnet restore WebFrontEnd/WebFrontEnd.csproj
COPY . .
WORKDIR /src/WebFrontEnd
RUN dotnet build WebFrontEnd.csproj -c Release -o /app
FROM build AS publish
RUN dotnet publish WebFrontEnd.csproj -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "WebFrontEnd.dll"]

Просмотреть файл

@ -0,0 +1,9 @@
@page
@model AboutModel
@{
ViewData["Title"] = "About";
}
<h2>@ViewData["Title"]</h2>
<h3>@Model.Message</h3>
<p>Use this area to provide additional information.</p>

Просмотреть файл

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace WebFrontEnd.Pages
{
public class AboutModel : PageModel
{
public string Message { get; set; }
public void OnGet()
{
Message = "Your application description page.";
}
}
}

Просмотреть файл

@ -0,0 +1,19 @@
@page
@model ContactModel
@{
ViewData["Title"] = "Contact";
}
<h2>@ViewData["Title"]</h2>
<h3>@Model.Message</h3>
<address>
One Microsoft Way<br />
Redmond, WA 98052-6399<br />
<abbr title="Phone">P:</abbr>
425.555.0100
</address>
<address>
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br />
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a>
</address>

Просмотреть файл

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace WebFrontEnd.Pages
{
public class ContactModel : PageModel
{
public string Message { get; set; }
public void OnGet()
{
Message = "Your contact page.";
}
}
}

Просмотреть файл

@ -0,0 +1,23 @@
@page
@model ErrorModel
@{
ViewData["Title"] = "Error";
}
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>Development environment should not be enabled in deployed applications</strong>, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>, and restarting the application.
</p>

Просмотреть файл

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace WebFrontEnd.Pages
{
public class ErrorModel : PageModel
{
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}

Просмотреть файл

@ -0,0 +1,25 @@
@page
@model IndexModel
@{
ViewData["Title"] = "Home page";
}
<div>
<table class="table-bordered">
<thead>
<tr>
<th>Description</th>
<th>Done?</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Items)
{
<tr>
<td>@item.Description</td>
<td>@item.Completed</td>
</tr>
}
</tbody>
</table>
</div>

Просмотреть файл

@ -0,0 +1,31 @@
using System.Net.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace WebFrontEnd.Pages
{
public class IndexModel : PageModel
{
public Model.ToDoItem[] Items = new Model.ToDoItem[] { };
public void OnGet()
{
HttpClient client = new HttpClient();
using (HttpResponseMessage response = client.GetAsync(backendUrl).GetAwaiter().GetResult())
{
if (response.StatusCode == System.Net.HttpStatusCode.OK)
{
Items = Newtonsoft.Json.JsonConvert.DeserializeObject<Model.ToDoItem[]>(response.Content.ReadAsStringAsync().Result);
}
}
}
private static string backendDNSName = $"{Environment.GetEnvironmentVariable("ServiceName")}.{Environment.GetEnvironmentVariable("AppName")}";
private static Uri backendUrl = new Uri($"http://{backendDNSName}:{Environment.GetEnvironmentVariable("ApiHostPort")}/api/todo");
}
}

Просмотреть файл

@ -0,0 +1,71 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - WebFrontEnd</title>
<environment include="Development">
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="~/css/site.css" />
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
</environment>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a asp-page="/Index" class="navbar-brand">WebFrontEnd</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a asp-page="/Index">Home</a></li>
<li><a asp-page="/About">About</a></li>
<li><a asp-page="/Contact">Contact</a></li>
</ul>
</div>
</div>
</nav>
<div class="container body-content">
@RenderBody()
<hr />
<footer>
<p>&copy; 2017 - WebFrontEnd</p>
</footer>
</div>
<environment include="Development">
<script src="~/lib/jquery/dist/jquery.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
</environment>
<environment exclude="Development">
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"
asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
asp-fallback-test="window.jQuery"
crossorigin="anonymous"
integrity="sha384-K+ctZQ+LL8q6tP7I94W+qzQsfRV2a+AfHIi9k8z8l9ggpc8X+Ytst4yBo/hH+8Fk">
</script>
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
crossorigin="anonymous"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa">
</script>
<script src="~/js/site.min.js" asp-append-version="true"></script>
</environment>
@RenderSection("Scripts", required: false)
</body>
</html>

Просмотреть файл

@ -0,0 +1,18 @@
<environment include="Development">
<script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
</environment>
<environment exclude="Development">
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min.js"
asp-fallback-src="~/lib/jquery-validation/dist/jquery.validate.min.js"
asp-fallback-test="window.jQuery && window.jQuery.validator"
crossorigin="anonymous"
integrity="sha384-Fnqn3nxp3506LP/7Y3j/25BlWeA3PXTyT1l78LjECcPaKCV12TsZP7yyMxOe/G/k">
</script>
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validation.unobtrusive/3.2.6/jquery.validate.unobtrusive.min.js"
asp-fallback-src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"
asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive"
crossorigin="anonymous"
integrity="sha384-JrXK+k53HACyavUKOsL+NkmSesD2P+73eDMrbTtTk0h4RmOF8hF8apPlkp26JlyH">
</script>
</environment>

Просмотреть файл

@ -0,0 +1,3 @@
@using WebFrontEnd
@namespace WebFrontEnd.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

Просмотреть файл

@ -0,0 +1,3 @@
@{
Layout = "_Layout";
}

Просмотреть файл

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace WebFrontEnd
{
public class Program
{
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseApplicationInsights()
.Build();
}
}

Просмотреть файл

@ -0,0 +1,32 @@
## Service definition ##
application:
schemaVersion: 0.0.1
name: ServiceFabricMeshApp
services:
- name: WebFrontEnd
description: WebFrontEnd description.
osType: Windows
codePackages:
- name: WebFrontEnd
image: webfrontend:dev
endpoints:
- name: WebFrontEndListener
port: 20001
environmentVariables:
- name: ASPNETCORE_URLS
value: http://+:20001
- name: AppName
value: ServiceFabricMeshApp
- name: ApiHostPort
value: 20006
- name: ServiceName
value: ToDoService
# - name: ApplicationInsights:InstrumentationKey
# value: "<Place AppInsights key here, or reference it via a secret>"
resources:
requests:
cpu: 0.5
memoryInGB: 1
replicaCount: 1
networkRefs:
- name: ServiceFabricMeshAppNetwork

Просмотреть файл

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace WebFrontEnd
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseBrowserLink();
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
}
app.UseStaticFiles();
app.UseMvc();
}
}
}

Просмотреть файл

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<IsSFAppServiceProject>true</IsSFAppServiceProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.7" />
<PackageReference Include="Microsoft.VisualStudio.Azure.SFApp.Targets" Version="1.0.0-preview.1.0" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Model\Model.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,10 @@
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Warning"
}
}
}

Просмотреть файл

@ -0,0 +1,24 @@
// Configure bundling and minification for the project.
// More info at https://go.microsoft.com/fwlink/?LinkId=808241
[
{
"outputFileName": "wwwroot/css/site.min.css",
// An array of relative input file paths. Globbing patterns supported
"inputFiles": [
"wwwroot/css/site.css"
]
},
{
"outputFileName": "wwwroot/js/site.min.js",
"inputFiles": [
"wwwroot/js/site.js"
],
// Optionally specify minification options
"minify": {
"enabled": true,
"renameLocals": true
},
// Optionally generate .map file
"sourceMap": false
}
]

Просмотреть файл

@ -0,0 +1,35 @@
body {
padding-top: 50px;
padding-bottom: 20px;
}
/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
padding-left: 15px;
padding-right: 15px;
}
/* Carousel */
.carousel-caption p {
font-size: 20px;
line-height: 1.4;
}
/* Make .svg files in the carousel display properly in older browsers */
.carousel-inner .item img[src$=".svg"] {
width: 100%;
}
/* QR code generator */
#qrCode {
margin: 15px;
}
/* Hide/rearrange for smaller screens */
@media screen and (max-width: 767px) {
/* Hide captions */
.carousel-caption {
display: none;
}
}

Просмотреть файл

@ -0,0 +1 @@
body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}#qrCode{margin:15px}@media screen and (max-width:767px){.carousel-caption{display:none}}

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 31 KiB

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

После

Ширина:  |  Высота:  |  Размер: 9.5 KiB

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

После

Ширина:  |  Высота:  |  Размер: 8.2 KiB

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

После

Ширина:  |  Высота:  |  Размер: 11 KiB

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

После

Ширина:  |  Высота:  |  Размер: 12 KiB

Просмотреть файл

@ -0,0 +1 @@
// Write your Javascript code.

Просмотреть файл

Просмотреть файл

@ -0,0 +1,45 @@
{
"name": "bootstrap",
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
"keywords": [
"css",
"js",
"less",
"mobile-first",
"responsive",
"front-end",
"framework",
"web"
],
"homepage": "http://getbootstrap.com",
"license": "MIT",
"moduleType": "globals",
"main": [
"less/bootstrap.less",
"dist/js/bootstrap.js"
],
"ignore": [
"/.*",
"_config.yml",
"CNAME",
"composer.json",
"CONTRIBUTING.md",
"docs",
"js/tests",
"test-infra"
],
"dependencies": {
"jquery": "1.9.1 - 3"
},
"version": "3.3.7",
"_release": "3.3.7",
"_resolution": {
"type": "version",
"tag": "v3.3.7",
"commit": "0b9c4a4007c44201dce9a6cc1a38407005c26c86"
},
"_source": "https://github.com/twbs/bootstrap.git",
"_target": "v3.3.7",
"_originalSource": "bootstrap",
"_direct": true
}

Просмотреть файл

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2011-2016 Twitter, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Просмотреть файл

@ -0,0 +1,587 @@
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
.btn-default,
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
}
.btn-default:active,
.btn-primary:active,
.btn-success:active,
.btn-info:active,
.btn-warning:active,
.btn-danger:active,
.btn-default.active,
.btn-primary.active,
.btn-success.active,
.btn-info.active,
.btn-warning.active,
.btn-danger.active {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
.btn-default.disabled,
.btn-primary.disabled,
.btn-success.disabled,
.btn-info.disabled,
.btn-warning.disabled,
.btn-danger.disabled,
.btn-default[disabled],
.btn-primary[disabled],
.btn-success[disabled],
.btn-info[disabled],
.btn-warning[disabled],
.btn-danger[disabled],
fieldset[disabled] .btn-default,
fieldset[disabled] .btn-primary,
fieldset[disabled] .btn-success,
fieldset[disabled] .btn-info,
fieldset[disabled] .btn-warning,
fieldset[disabled] .btn-danger {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-default .badge,
.btn-primary .badge,
.btn-success .badge,
.btn-info .badge,
.btn-warning .badge,
.btn-danger .badge {
text-shadow: none;
}
.btn:active,
.btn.active {
background-image: none;
}
.btn-default {
text-shadow: 0 1px 0 #fff;
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #dbdbdb;
border-color: #ccc;
}
.btn-default:hover,
.btn-default:focus {
background-color: #e0e0e0;
background-position: 0 -15px;
}
.btn-default:active,
.btn-default.active {
background-color: #e0e0e0;
border-color: #dbdbdb;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
background-color: #e0e0e0;
background-image: none;
}
.btn-primary {
background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #245580;
}
.btn-primary:hover,
.btn-primary:focus {
background-color: #265a88;
background-position: 0 -15px;
}
.btn-primary:active,
.btn-primary.active {
background-color: #265a88;
border-color: #245580;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #265a88;
background-image: none;
}
.btn-success {
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #3e8f3e;
}
.btn-success:hover,
.btn-success:focus {
background-color: #419641;
background-position: 0 -15px;
}
.btn-success:active,
.btn-success.active {
background-color: #419641;
border-color: #3e8f3e;
}
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
fieldset[disabled] .btn-success.focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
background-color: #419641;
background-image: none;
}
.btn-info {
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #28a4c9;
}
.btn-info:hover,
.btn-info:focus {
background-color: #2aabd2;
background-position: 0 -15px;
}
.btn-info:active,
.btn-info.active {
background-color: #2aabd2;
border-color: #28a4c9;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
fieldset[disabled] .btn-info.focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
background-color: #2aabd2;
background-image: none;
}
.btn-warning {
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #e38d13;
}
.btn-warning:hover,
.btn-warning:focus {
background-color: #eb9316;
background-position: 0 -15px;
}
.btn-warning:active,
.btn-warning.active {
background-color: #eb9316;
border-color: #e38d13;
}
.btn-warning.disabled,
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled.focus,
.btn-warning[disabled].focus,
fieldset[disabled] .btn-warning.focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
background-color: #eb9316;
background-image: none;
}
.btn-danger {
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #b92c28;
}
.btn-danger:hover,
.btn-danger:focus {
background-color: #c12e2a;
background-position: 0 -15px;
}
.btn-danger:active,
.btn-danger.active {
background-color: #c12e2a;
border-color: #b92c28;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
fieldset[disabled] .btn-danger.focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
background-color: #c12e2a;
background-image: none;
}
.thumbnail,
.img-thumbnail {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
background-color: #e8e8e8;
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
background-repeat: repeat-x;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
background-color: #2e6da4;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
.navbar-default {
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .active > a {
background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
background-repeat: repeat-x;
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
}
.navbar-brand,
.navbar-nav > li > a {
text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.navbar-inverse {
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-radius: 4px;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .active > a {
background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
background-repeat: repeat-x;
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
}
.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-nav > li > a {
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
}
.navbar-static-top,
.navbar-fixed-top,
.navbar-fixed-bottom {
border-radius: 0;
}
@media (max-width: 767px) {
.navbar .navbar-nav .open .dropdown-menu > .active > a,
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #fff;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
}
.alert {
text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
}
.alert-success {
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
background-repeat: repeat-x;
border-color: #b2dba1;
}
.alert-info {
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
background-repeat: repeat-x;
border-color: #9acfea;
}
.alert-warning {
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
background-repeat: repeat-x;
border-color: #f5e79e;
}
.alert-danger {
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
background-repeat: repeat-x;
border-color: #dca7a7;
}
.progress {
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar {
background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-success {
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-info {
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-warning {
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-danger {
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-striped {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
}
.list-group {
border-radius: 4px;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
}
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
text-shadow: 0 -1px 0 #286090;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
background-repeat: repeat-x;
border-color: #2b669a;
}
.list-group-item.active .badge,
.list-group-item.active:hover .badge,
.list-group-item.active:focus .badge {
text-shadow: none;
}
.panel {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.panel-default > .panel-heading {
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
background-repeat: repeat-x;
}
.panel-primary > .panel-heading {
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
.panel-success > .panel-heading {
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
background-repeat: repeat-x;
}
.panel-info > .panel-heading {
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
background-repeat: repeat-x;
}
.panel-warning > .panel-heading {
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
background-repeat: repeat-x;
}
.panel-danger > .panel-heading {
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
background-repeat: repeat-x;
}
.well {
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
background-repeat: repeat-x;
border-color: #dcdcdc;
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
}
/*# sourceMappingURL=bootstrap-theme.css.map */

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше