Thursday, 10 September 2020

Backup In Azure Cloud with Recovery Service Vault

Azure Backup

Azure backup is a service to provide a solution to backup your data and recover it from the Cloud.


What do you want to backup?












As shown in the above snapshot, you can backup Virtual machines, File Share, SQL Server, SAP Hana database running on Azure VMs.

In this article, we will pick a simple use case for backup of File Share. Let start with adding a Backup Service.

Step 1: Go to Create a Resource & select Backup and Site Recovery as shown in the snapshot below

Step 2: Click on the Create button as shown below.


Step 3: Create Recovery Services Vault, Create/Select the existing Resource Group. Enter the vault name and select the region and press the review + Create button.


Step 4: It will create a new vault for you. Now Go to a resource that you have just created and click the Backup button as shown below.















Step 5: We are going to create our first backup. You start your back up with a goal. Azure backup runs on both Azure resources or On-Premises resources. We will select Azure in the workload and Azure File Share as a backup. Click on the Backup button as shown below.
























Step 6: There are a couple of things we need to do here. You need to select an Azure storage account where you have Azure files and you want to backup. If you don't have an Azure storage account then you first create the new storage account and then create a new File share and then place some files there.

Once your storage account is ready then you need to follow the below steps.
  • Chose the existing storage account, as I selected below "azstoragebackup" as shown below. I have only 1 file in the file share i.e. test_file.png
  • Click on the Add button, it will open the right panel.
  • Select the File share folder. I have selected backupFileShare
  • You need to create your new policy
  • You need to specify at what time you need a backup.

















Step 7: Backup Policy
  • Specify the time and for how many days you need a backup.
  • I have selected 10 PM and for 5 days only.
  • Press the enable backup button.





















Step 8: Go to Resource Services Vault --> Backup Items and you will find 1 item in Azure Storage backup.






















When you click on the Count(1) then you can see your backup is created successfully 














Restore Backup

You can click backupfileshare Items for restoring the backup as shown above. 
You need to specify the storage account where you want your backup. Also, you need to specify the file for backup. Once your press the restore button it will automatically restore the backup in that folder.


As shown in the snapshot below. I have opened my restoreShareFile Storage and you can see the file there. It successfully restored the file from the Backup.

This is all about this article. I hope you like it.

Monday, 1 June 2020

Deploy Angular/Vue/React App to Azure Portal through Azure DevOps CI/CD


Overview

Today we will learn how to deploy the angular app to Azure Portal through CI/CD. For this, first of all, you need to create new App Services in the Azure portal. You can follow the first 3 steps as mentioned in the link below. Below URL is to deploy the angular app manually through Visual studio code.



Once your app service is ready then make sure code is check-in the Azure DevOps. The first step is to create a new build.

Step 1: Build a Pipeline

Login to Azure DevOps and click on the Pipeline link as shown in the snapshot below and then press New Pipeline











Step 2: Specify where is your code?

I'm selecting Other Git options for the angular app as our code exists in the Azure DevOps Repo.
























Step 3: Select a source

Specify your Project and repository as shown below























Step 4: Select a template

I'm selecting an empty job here. So, we perform all the steps manually here.










Step 5: Add New Tasks

In the pipeline Task, you can specify the default Agent pool and specifications.
Get sources Task, Project, and Repository is already selected. if not, select your project.
Add your 3 new tasks, as shown below.

  1. Npm task
  2. Npm task
  3. Publish build artifact

1. You need to press the "+" symbol and add a new npm task here. The First npm task is to install all npm package that is required for the angular app.

2. The second npm task is to build the project. I'm selecting custom command here and specify the working folder where you package.json exists.
Then write build command. In my example, we have run the build command 

















OR












You can add build:prod for production env.















3. Add a new publish artifact task and specify the path to publish, it should be in the dist folder. In my case, it is in the folder/dist. your package.json might be outside the folder then you will write only dist and specify the artifact name, it can be anything.

















OR












Step 6: Press the save and queue button.

You can see the build has succeeded and will create artifacts for you.



























Step 7: Create a release

Click on the release button as shown in the snapshot below and click the "Create Release" button.



Step 8: Select the template


We will select the default template i.e Azure App Service deployment



Step 9: Add an artifact

Specify your Project and build pipeline here, so it can pick the code from that pipeline.

Step 10: Select the Deploy Azure app service task

Specify the following options

  1. Connection Type
  2. Subscription (Your Azure Subscription)
  3. App Service Type (it should be a Web app) as we have an angular app.
  4. App Service Name (Once you select the subscription, it will automatically fetch all the Web App that you have created on Azure Portal). Select that app service name here.























Step: 11 Create the release.

Once the release is succeeded, It will automatically deploy all the code to the Azure web app.
















This is all about this article and let me know if you have any questions.

Tuesday, 12 May 2020

Deploy Angular/Vue App to Azure Portal Through Visual Studio Code

Create a new App Service in Azure Portal

Step 1: The first step is to create a web app in the Azure portal. Go to the Azure Portal and click App Services and then click Add button


















Step 2 Select the following options

  • Subscription, 
  • Resource Group (If a resource group is not available then create a new)
  • App Name(Unique name), 
  • Runtime Stack - Asp.net 4.7/Node latest version
  • OS (Windows)
  • App Service Plan (Create a new service plan if it is not available)

Press review + Create to create a web app.

Step 3 - Once the app is created then you can see the URL in the overview as shown in the snapshot below.








Deploy your code to Azure Portal 

Step 1 - Open your code in Visual Studio Code
Step 2 - You need a Visual Code Code Extension to deploy the code
Step 3 - Search Azure App Service in the extension and install.


Step 4 - Click on the Azure Menu and log in with your Azure credentials and it will load your web app here.
























Step 5 - Right-click on the web app/dist folder and click on Deploy to the Web app.























Step 6 - You need to browse your code folder. For the angular/vue app, you need to upload the dist folder
The application will automatically create the folder once you build the angular project with the npm run build. 

Note: If the dist folder is not available then you need to run the ng build command. It will create a dist folder automatically.

Once you select the folder, you can see the below-deploying message.












Step 7 - Once the deployment is completed it will display the message below.







Hurray!! The website is deployed and you can click on the Browse Website button.

Note: If your dist folder contains a subfolder then your side won't work. Then you need to go to Azure portal --> App Services --> Configuration --> Path Mappings --> Update Physical Path.
























This is all about this article, if you have any questions then do let me know.


Saturday, 7 December 2019

The chromedriver.exe or geckodriver.exe file does not exist in Selenium

Selenium Driver Setup


If you are getting an error like "The chromedriver.exe file does not exist in the current directory"
or "geckodriver.exe does not exist"

Step 1:


For Chrome, open the URL mentioned below. Here you need to download chromedriver.exe
You can choose the latest version of this file.

For Firefox, open the URL mentioned below. Here you need to download geckodriver.exe

Step 2: 


After downloading the file, place the .exe file in your project under any directory. 
Note: Location choice is yours.
















Step 3: 


Specify the location in the code.








Step 4: 


If you are working on the console application then you can specify a generic path as shown in the snapshot below.


















Alternate and Easy Step


















Install the chrome driver only as mentioned in the snapshot below. You don't need .exe in this case.
Run the code as shown in the snapshot below















Note: You might get chrome version error. Make sure you have the latest chrome installed or update your browser.

It will open the browser successfully. In the above example, it will open the chrome browser.




Tuesday, 29 October 2019

Azure Data Factory: Copy Data from SQL database to Dynamic365

The below article will provide you step by step instructions to load data from SQL database to dynamic CRM.

Step 1: Go to portal.azure.com
Step 2: Create a new resource and select data factory













Step 3: Press Create button
Step 4: Select name, resource group etc.


















Step 5: Press Create button
Step 6: Once the data factory is created, click on it and press the "Author & Monitor" rectangle.
Step 7: It will open a new window for adf.azure.com















Step 8: Click on Create pipeline tab
Step 9: Drag Copy Data task to the right.


Step 10: The next step is to set Source and Sink. (Sink is destination)
Step 11: Select Source, and press the New button and select the Azure SQL database.













Step 12: Set the properties, In linked Service, Select New option and enter the server name, database, username and password and press create button.



























Step 13: Go to Sink, and press the New button in the Sink Dataset and search for Dynanic365 database and select














Step 14: Edit Dataset and create new linked service















Step 15: Set Service URL, Username and password for dynamic 365. Test  your connection and press the create button.
Step 16: Select the entity named in the dropdown.
Step 17: Go to Pipeline, Select Copy data and press mapping options.
              Click the button Import schema, and check your mappings are as expected. If mapping is not loaded properly the specify manually destination columns.










Step 18: Click on Publish All.
Step 19: Press Debug and it will load the data to Dynamic 365










Now it will start loading the data, If the data and mappings are correct then you will see a success message otherwise you will get a failure message.

This is all about this article. I hope you will like it.

How to get PowerBI Embed Token

 Here's a step-by-step guide to help you through the process. Step 1: Register Your App in Azure 1. Go to Azure Portal → App registratio...