Updated Using Azure resources (markdown)

Tarun Jain 2023-03-06 17:30:21 +05:30
parent cb355ef2a0
commit 0d9ecbc508

@ -36,30 +36,28 @@ With the steps explained in the next section, you will be able to run the applic
# Azure Storage Account service
To enable Azure storage of Azure in eShopOnAzure solution it is necessary having created previously the storage service through ARM file or manually through Azure portal. You can use the ARM files find under **deploy/az/storage** folder already created in eShop. Once the storage account is created, it is very important to create a new container(blob kind) and upload the solution catalog pics files before to continue.Later, it is necessary to set to true the "AzureStorageEnabled" environment variable from `settings.json` in Catalog.API and Marketing.API.Finally, it is necessary to get the container endpoint url from information service in the Azure portal, This url must be declared on .env file located in the solution root folder with `ESHOP_AZURE_STORAGE_CATALOG` for the Catalog.API content and `ESHOP_AZURE_STORAGE_MARKETING` for the Marketing.API content.
To enable Azure storage of Azure in eShopOnContainers solution it is necessary having created previously the storage service through ARM file or manually through Azure portal. You can use the ARM files find under **deploy/az/storage** folder already created in eShop. Once the storage account is created, it is very important to create a new container(blob kind) and upload the solution catalog pics files before to continue. Later, it is necessary to set to true the "AzureStorageEnabled" environment variable from `appsettings.json` in `Catalog.API`, `docker-compose.override.yml` and `docker-compose.prod.yml`. Finally, it is necessary to get the container endpoint url from information service in the Azure portal. This url must be declared on .env file located in the solution root folder with `ESHOP_AZURE_STORAGE_CATALOG` for the Catalog.API content.
Do not forget to put a slash character '/' in the end of the url.
Do not forget to put a slash character '/' in the end of the URL.
For example:
>ESHOP_AZURE_STORAGE_CATALOG=https://yourcatalogstorageaccountservice.blob.core.windows.net/yourcontainername/
>ESHOP_AZURE_STORAGE_MARKETING=https://yourmarketingstorageaccountservice.blob.core.windows.net/yourcontainername/
To use Azure Storage, you can refer to [comment](https://github.com/dotnet-architecture/eShopOnContainers/issues/2047#issuecomment-1437084043) answered in issue.
## Check status of Azure Storage Account with Health Checks
It is possible to add status check for the Azure Storage Account inside the Catalog Web Status. In case that the status check is enabled, for the Catalog and/or Marketing section in the WebStatus page, Azure Storage will be checked as one of the dependencies for theses APIs. To enable this check add the account name and key to the .env file for your account.
It is possible to add status check for the Azure Storage Account inside the Catalog Web Status. In case that the status check is enabled, for the Catalog section in the WebStatus page, Azure Storage will be checked as one of the dependencies for theses APIs. To enable this check add the account name and key to the .env file for your account.
For example:
>ESHOP_AZURE_STORAGE_CATALOG_NAME=storageaccountname
>ESHOP_AZURE_STORAGE_CATALOG_KEY=storageaccountkey
>ESHOP_AZURE_STORAGE_MARKETING_NAME=storageaccountname
>ESHOP_AZURE_STORAGE_MARKETING_KEY=storageaccountkey
With the steps explained in the next section, you will be able to run the application with Azure SQL Database instead of local storage.
# Azure SQL Database
To enable Azure SQL Database in eShop is required to have a Azure SQL with the databases for Ordering.API, Identity.API, Catalaog.API and Marketing.API. You can use the [ARM files](deploy/az/sql/readme.md) already created in this project or do it manually. Once the databases are created, it is necessary to get the connection string for each service and set the corresponding variable in the .env file.
To enable Azure SQL Database in eShop is required to have a Azure SQL with the databases for Ordering.API, Identity.API, and Catalaog.API. You can use the [ARM files](deploy/az/sql/readme.md) already created in this project or do it manually. Once the databases are created, it is necessary to get the connection string for each service and set the corresponding variable in the .env file.
For example:
>ESHOP_AZURE_CATALOG_DB=catalogazureconnectionstring