Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
update instructions for visual objects and rename the template files
Browse files Browse the repository at this point in the history
  • Loading branch information
vipul-modi authored and Deep Kapur committed Dec 4, 2018
1 parent feb6f2a commit faed6a8
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion templates/helloworld/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ az mesh deployment create --resource-group myResourceGroup --template-uri https:

If you're using a PowerShell console, run the following:

```azurecli
```PowerShell
az mesh deployment create --resource-group myResourceGroup --template-uri https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/helloworld/helloworld.linux.json --parameters "{'location': {'value': 'eastus'}}"
```
In a few minutes, if the deployment is successful the command will return the list of created resources and an output property for the public IP address.
Expand Down
29 changes: 17 additions & 12 deletions templates/visualobjects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,32 @@ az group create --name myResourceGroup --location eastus

## Deploy the base version of the application

Create the application and related resources in the resource group using the `az mesh deployment create` command. The following will deploy the Visual Objects Linux application using the [mesh_rp.base.linux.json template](https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/mesh_rp.base.linux.json). If you want to deploy a Windows application instead, use the [mesh_rp.base.windows.json template](https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/mesh_rp.base.windows.json) instead. Windows container images are larger than Linux container images and may take more time to deploy.
Create the application and related resources in the resource group using the `az mesh deployment create` command. The following will deploy the Visual Objects Linux application using the [visualobjects.base.linux.json template](https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/visualobjects.base.linux.json). If you want to deploy a Windows application instead, use the [visualobjects.base.windows.json template](https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/visualobjects.base.windows.json) instead. Windows container images are larger than Linux container images and may take more time to deploy.

Deploy Visual Object using the following steps:
If you're using a Bash console or Windows Command Prompt, run the following:

```azurecli
az mesh deployment create --resource-group myResourceGroup --template-uri https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/mesh_rp.base.linux.json --parameters "{\"location\": {\"value\": \"eastus\"}}"
az mesh deployment create --resource-group myResourceGroup --template-uri https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/visualobjects.base.linux.json --parameters "{\"location\": {\"value\": \"eastus\"}}"
```

## See it in action
If you're using a PowerShell console, run the following:
```PowerShell
az mesh deployment create --resource-group myResourceGroup --template-uri https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/visualobjects.base.linux.json --parameters "{'location': {'value': 'eastus'}}"
```
In a few minutes, if the deployment is successful the command will return the list of created resources and an output property for the public IP address.

## See the app in action

### Open the application

Once the application successfully deploys, copy the public IP address from the `publicIPAddress` output property in the CLI. Open up `<IP address>:8080` in your web browser to see the UI displayed from the web service.
Once the application successfully deploys, copy the public IP address from the `publicIPAddress` output property. Open the IP address in a web browser. You should see one triangle flying around, representing the single instance worker service that was deployed. Leave this page open as you progress through the scale out and upgrade steps to see the changes!

You can also obtain the public IP address from the details of the `visualObjectsGateway` resource using the following command.
You can also obtain the public IP address from the details of the `visualObjectsGateway` resource using the following command. The name of the gateway for Windows application is `visualObjectsGatewayWindows`.

```azurecli
az mesh gateway show -g myResourceGroup -n visualObjectsGateway -o table
```

You should see one triangle flying around, representing the single instance worker service that was deployed. Leave this page open as you progress through the scale out and upgrade steps to see the changes!

### Check the application details

Expand All @@ -55,17 +60,17 @@ You can check the application's status using the `az mesh app show` command. Thi
The application name for the Linux app is `visualObjectsApp` (`visualObjectsAppWindows` for the Windows app). To see more details on the application, run the following command:

```azurecli
az mesh app show --resource-group myResourceGroup --name helloWorldApp
az mesh app show --resource-group myResourceGroup --name visualObjectsApp
```

## Scale the application

The next step here is to scale the worker service up to 3 instances. 3 is the current limit imposed for service instances while Mesh is still in private previw - see [Mesh FAQ](https://docs.microsoft.com/azure/service-fabric-mesh/service-fabric-mesh-faq) for updated information on resource limits for Mesh.

For this step, we will be using the [mesh_rp.scaleout.linux.json template](https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/mesh_rp.scaleout.linux.json). If you chose to deploy the sample as a Windows application in the prior step, use the [mesh_rp.scaleout.windows.json template](https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/mesh_rp.scaleout.windows.json) in the following command instead.
For this step, we will be using the [visualobjects.scaleout.linux.json template](https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/visualobjects.scaleout.linux.json). If you chose to deploy the sample as a Windows application in the prior step, use the [visualobjects.scaleout.windows.json template](https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/visualobjects.scaleout.windows.json) in the following command instead.

```azurecli
az mesh deployment create --resource-group myResourceGroup --template-uri https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/mesh_rp.scaleout.linux.json --parameters "{\"location\": {\"value\": \"eastus\"}}"
az mesh deployment create --resource-group myResourceGroup --template-uri https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/visualobjects.scaleout.linux.json --parameters "{\"location\": {\"value\": \"eastus\"}}"
```

There is only one difference between the template used in this step and the one prior (scalout vs. base) - where the `worker` service is being described in the JSON, you will see `"replicaCount"` set to 3 instead of 1.
Expand All @@ -74,10 +79,10 @@ In a few minutes, your web service should update and be rendering 3 triangles in

## Upgrade the application

We're now going to upgrade the same `worker` service to use a "new" image. Previously, the worker service replicas were using the seabreeze/azure-mesh-visualobjects-worker:1.1-stretch image, but with this deployment, we will be using a template that uses the seabreeze/azure-mesh-visualobjects-worker:1.1-rotate-stretch image. The template being used to upgrade the app is the [mesh_rp.upgrade.linux.json template](https://github.com/Azure-Samples/service-fabric-mesh/blob/2018-09-01-preview/templates/visualobjects/mesh_rp.upgrade.linux.json). If you chose to deploy the sample as a Windows application in the prior steps, use the [mesh_rp.upgrade.windows.json template](https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/mesh_rp.upgrade.windows.json) in the following command instead.
We're now going to upgrade the same `worker` service to use a "new" image. Previously, the worker service replicas were using the seabreeze/azure-mesh-visualobjects-worker:1.1-stretch image, but with this deployment, we will be using a template that uses the seabreeze/azure-mesh-visualobjects-worker:1.1-rotate-stretch image. The template being used to upgrade the app is the [visualobjects.upgrade.linux.json template](https://github.com/Azure-Samples/service-fabric-mesh/blob/2018-09-01-preview/templates/visualobjects/visualobjects.upgrade.linux.json). If you chose to deploy the sample as a Windows application in the prior steps, use the [visualobjects.upgrade.windows.json template](https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/2018-09-01-preview/templates/visualobjects/visualobjects.upgrade.windows.json) in the following command instead.

```azurecli
az mesh deployment create --resource-group myResourceGroup --template-uri https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/master/templates/visualobjects/mesh_rp.upgrade.linux.json --parameters "{\"location\": {\"value\": \"eastus\"}}"
az mesh deployment create --resource-group myResourceGroup --template-uri https://raw.githubusercontent.com/Azure-Samples/service-fabric-mesh/master/templates/visualobjects/visualobjects.upgrade.linux.json --parameters "{\"location\": {\"value\": \"eastus\"}}"
```

The difference between this template and the one previously deployed is in the container image being use in the code package for the `worker` service. Another thing to point out here is that though both the scale out and the upgrade were just deployments of an updated template on the same application resource, they did result in two different types of changes - the former is more of a config change since the code packages being deployed are not change and only the request number of replicas changed, whereas the latter results in a full rolling upgrade for the applciation, where the container images are updated for a specific code package in a service.
Expand Down

0 comments on commit faed6a8

Please sign in to comment.