You can deploy the preceding template by following the Azure Resource Manager documentation.
You can start this tutorial series from the minimum viable scale set template article.
You can see how to modify the minimum viable scale set template to deploy the scale set into an existing virtual network.
For more general information about scale sets, refer to the scale set overview page.