You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.6 KiB

7 years ago
7 years ago
  1. # Deploying Azure Functions
  2. The ARM template `azurefunctionsdeploy.json` and its parameter file (`azurefunctionsdeploy.parameters.json`) are used to deploy Marketing azure functions.
  3. ## Editing azurefunctionsdeploy.parameters.json file
  4. You can edit the `azurefunctionsdeploy.parameters.parameters.json` file to set your values, but is not needed. The only parameter that can be set is:
  5. 1. `SitesEshopfunctionsName` is a string that is used to create the Azure function app name.
  6. ## Deploy the template
  7. Once parameter file is edited you can deploy it using [create-resources script](../readme.md).
  8. i. e. if you are in Windows, to deploy the Azure Functions environment in a new resourcegroup located in westus, go to `deploy\az` folder and type:
  9. ```
  10. create-resources.cmd azurefunctions\azurefunctionsdeploy newResourceGroup -c westus
  11. ```
  12. ## Deploy Marketing azure function with Visual Studio.
  13. You need to deploy the Marketing azure function from Visual Studio 2017 15.3 from the the Marketing-functions project in the solution eShopOnContainers-AzureFunctions.sln (Visual Studio publish tool).
  14. ## Setting Azure function configurations
  15. Once deployed, go to azure portal and set the connection string for the azure function under the name "SqlConnection". The value must be the connection string which points to MarketingDB.
  16. Example:
  17. "SqlConnection": "Server=tcp:eshopsql.database.windows.net,1433;Initial Catalog=marketingdb;"
  18. In appsettings section, add a new entry named "MarketingStorageUri". The value must be the uri of the blob storage where the campaign images are stored.
  19. Example:
  20. "MarketingStorageUri": "https://marketingcampaign.blob.core.windows.net/pics/"