Azure worker reset module for Sitecore PaaS

Azure

Hi Champs,

Today I am going to introduce my new Module for Sitecore Azure PaaS. This module is called Azure Worker Exchanger details for this are as below.

What is Azure Worker Exchanger?

Azure Worker Exchanger Module is a facility created in association with Microsoft Azure Worker API to kill and replace any of the corrupt or non-performing workers created in Azure PaaS. This module should be used only when any worker process is showing a spike in performance and behaving abnormally or got corrupted, to analyze these below are the symptoms.

  1. Website loading slowly.
  2. Some of the users are not able to visit the website.
  3. Azure is throwing many alerts for performance issues.
  4. Azure matrics showing spikes for performance.

How to use this Module?

  1. Download the Module here.
  2. Install on CM role with Sitecore Package Installer.
  3. Once done you can navigate to the below URL to find the Form.
    https://yourdomain/InstanceExchanger.aspx
  4. Once the form is open you need to supply few details about your Azure Web app. (These are very simple and exactly as mentioned in below photo)
  5. Once you filled the form submit it.
  6. You will get a response message back.
  7. After that wait for 5-10 minutes for Azure to settle everything.
  8. Once everything is settled you need to go to the Azure Web app and open a kudu to see a new worker created with new underlying resources.

Happy Learning !! Keep Learning !!

Advertisement

Sumo Logic integration with Sitecore Azure PaaS

Hi Champs,

Today I am going to take you to the new product called Sumo Logic which we can integrate with Sitecore Azure PaaS for better log management.

Before starting you may have below two questions.

What is Sumo Logic?

Sumo Logic is a cloud-based machine data analytics company focusing on security, operations and BI use-cases. It provides log management and analytics services that leverage machine-generated big data to deliver real-time IT insights

Why Sumo Logic?

As per my experience Sumo Logic is coolest tool I ever seen for Log Management and monitoring. It gives a GUI based Live log management system by which you can track everything and not losing your time for checking logs from files. One more advantage is it alerts you one basis of exception captured in Log.

We will move without killing more time to the steps of configurations which are as below. Note all below steps you need to perform against your Sitecore Azure PaaS resource group.

Step 1. Configure Azure storage account

In this step you configure a storage account to which you will export monitoring data for your Azure service.

If you have a storage account with a container that you want to use for this purpose, make a note of its resource group, storage account name and container name and proceed to Step 2.

To configure an Azure storage account, do the following:

  1. Create a new storage account General-purpose v2 (GPv2) storage account. For instructions, see Create a storage account in Azure help.
  2. In the Azure portal, navigate to the storage account you just created (in the previous step).
  3. Select Blobs under Blob Service.
    Make a note of the container name, you will need to supply later in this procedure.

    1. Select + Container,
    2. Enter the Name
    3. Select Private for the Public Access Level.
    4. Click OK.

Step 2. Configure an HTTP source

In this step, you configure an HTTP source to receive logs from the Azure function.

  1. Select a hosted collector where you want to configure the HTTP source. If desired, create a new hosted collector, as described on Configure a Hosted Collector.
  2. Configure an HTTP source, as described on HTTP Logs and Metrics Source. Make a note of the URL for the source, you will need it in the next step.

Step 3. Configure Azure resources using ARM template

In this step, you use a Sumo-provided Azure Resource Manager (ARM) template to create an Event Hub, three Azure functions, Service Bus Queue, and a Storage Account.

  1. Download the blobreaderdeploy.json ARM template.
  2. Click Create a Resource, search for Template deployment in the Azure Portal, and then click Create.
  3. On the Custom deployment blade, click Build your own template in the editor.
  4. Copy the contents of the template and paste it into the editor window.
  5. Click Save.
  6. On the Custom deployment blade, do the following:
    1. Create a new Resource Group (recommended) or select an existing one.
    2. Choose Location.
    3. Set the values of the following parameters:
  • SumoEndpointURL: URL for the HTTP source you configured in Step 2 above.
  • StorageAccountName: Name of the storage account where  you are storing logs from Azure Service, that you configured in Step 1 above.
  • StorageAccountResourceGroupName: Name of the resource group of the storage account you configured in Step 1 above.
  • Filter Prefix (Optional): If you want to filter logs from a specific container, enter the following, replacing the variable with your container name: /blobServices/default/containers/<container_name>/
  1. Select the check box to agree to the terms and conditions, and then click Purchase.

Azure_Blob_Storage_Custom_Deployment.png

  1. Verify the deployment was successful by looking at Notifications at top right corner of Azure Portal.

notification-success.png

  1. (Optional) In the same window, click Go to resource group to verify the all resources were successfully created, such as shown in the following example:

Azure_Blob_all-resources.png

  1. Go to Storage accounts and search for sumobrlogs, then select sumobrlogs<random-string>.

storage-accounts.png

  1. Under Table Service do the following:
    1. Click Tables.
    2. Click + Table.
    3. For Name, enter FileOffsetMap.
  2. Click OK.

Azure_Blob_create-table.png

Step 4. Push logs from Azure Service to Azure Blob Storage

This section describes how to push logs from an Azure service to Azure Blob Storage by configuring Diagnostic Logs. The instructions use the Azure Web Apps Service as an example.

  1. Login to the Azure Portal.
  2. Click AppServices > Your Function App > Diagnostic Logs under Monitoring.
  3. You will see the Diagnostic Logs blade. Enable Application Logging, Web Server Logging, or both, and click Storage Settings.
  4. Select the Storage Account whose connection string you configured in Step 1.
  5. In the Containers blade, select the container you created in Step 1.
  6. In the Diagnostic Logs blade, specify the Retention Period (Days), and click Save to exit Diagnostic Logs configuration.export-webapp-logs.png

Happy learning and innovating Sitecore.

Sitecore Fake SMTP Server Module

Hi Champs,

Today I am going to introduce a Sitecore Module especially to developers who can use this to capture Emails from their Sitecore implementation in Sitecore Tab itself for their Local machine.

So not losing more time I like to give a small pathway to use this module, which is as below.

Installation:

  1. You need to download the module from the below link.
    https://marketplace.sitecore.net/en/Modules/S/SitecoreFakeSMTPModule10.aspx
  2. Install this module to your dev local machine environment.
  3. After installation, you will find one new folder created in your website folder as below.                                                                                        wwwroot\<your website folder>\FakeSmtp\website\
  4. You need to create a simple website for this by following below simple steps.
    • Create a new website in IIS with the name “fakesmtp”.
    • Point this website to the new folder created above.        fake(wwwroot\<your website folder>\FakeSmtp\website\)
    • Create a new binding for this website with “sitecore.fake.smtp” as below.bin
    • And the last step is to add new host entry for this like below. 127.0.0.1         sitecore.fake.smtp

How to use this module from Sitecore:

  1. After installing this module you need to login to Sitecore.
  2. Then you need to go to Developer Menu.
  3. In the developer’s menu, you will find the new tab called “Fake SMTP”
  4. This tab has a button called “Start Fake SMTP” click the button.

smf

  1. Now, this will open new tab which will have different menu but initial page has some instruction implementing the code in your Sitecore .NET project to get these email capture in this module.

        ffdsf

  1. I believe everyone most of the time uses the library (System.Net.Mail.SmtpClient) which is mentioned in instruction page.
  2. If yes then you can directly get to Messages tab where you can see next email captured when it gets triggered.
  3. If no then you just need to add/update few lines of code to get this working

Note:  Right now model doesn’t have close button which will come in next release.

Please leave comments/query/suggestions.

Happy innovating Sitecore.