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.

37 lines
1.5 KiB

  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.
  5. ## Deploy the template
  6. Once parameter file is edited you can deploy it using [create-resources script](../readme.md).
  7. i. e. if you are in windows, to deploy sql databases in a new resourcegroup located in westus, go to `deploy\az` folder and type:
  8. ```
  9. create-resources.cmd azurefunctions\azurefunctionsdeploy newResourceGroup -c westus
  10. ```
  11. ## Deploy Marketing azure function with Visual Studio.
  12. Alternatively, instead of using ARM templates, you can deploy Marketing azure function directly by publishing the project Marketing-functions in eShopOnContainers-AzureFunctions.sln with Visual Studio publish tool.
  13. ## Setting Azure function configurations
  14. 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.
  15. Example:
  16. "SqlConnection": "Server=tcp:eshopsql.database.windows.net,1433;Initial Catalog=marketingdb;"
  17. 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.
  18. Example:
  19. "MarketingStorageUri": "https://marketingcampaign.blob.core.windows.net/pics/"