Reading Notes #157

microsoftazurewebsitescheatsheetSuggestion of the week


Cloud


Programming

  • Inception-Style Nested Data Formats (Scott Hanselman) - What seem to be a good solution at one point could put you in a big problem tomorrow. This post explains one possible cause.

Database


Miscellaneous

  • Markdown Style Guide - This post gives some simple tips to keep our Markdown document easy to read when not converted.

~Frank


Let's play with Azure SQL Database backup and the Point in Time Restore

Did you know that you can have: a full database backup once a week, a differential database backups once a day, and a transaction log backups every 5 minutes of your Azure SQL Database? Did you know that all this is done automatically when you are using the new Azure SQL Basic, Standard or Premier service tiers? Even more, you will have access to the Point in Time Restore self-service. In this post, I will show how to "configure" the database to get the automatic backups, and how to do a restore.

Setup the automatic backup


If you are like me, your Azure SQL Databases are set to Web or Business edition.  The first thing to do will be to change that. You will need to do it anyway since the Web and Business service tiers will be retired in September 2015[1].  That the only required since backup service are built-in the Basic, Standard and Premium tiers.
For the demo purpose, I will use the Basic tier. To change the tier of the database, go on the Azure Portal. In the left panel click on the SQL Databases et select the database that you want to update (ie: FrankDemo). Once the right section is updated, select the Scale tab and change the Service Tiers for: Basic.

Tiers_Basic

Now, if you return in the Dashboard tab, a new option will be available.

Restore_button

Your database now has built-in backups to support self-service Point in Time Restore and Geo-Restore. Azure SQL Database automatically creates backups using the following schedule:
  • Full database backup once a week
  • differential database backups once a day
  • transaction log backups every 5 minutes.
The full and differential backups are replicated across regions.

The retention period will vary between 7 and 35 days base on the selected tiers.[2]

Restore an Azure SQL Database


Restoring a database is really easy. Remember that new button at the bottom of the screen, it's now time to click on it.


Restore_setings

This will bring the settings options. It's now time to type the name of your restored database. Note that you must use a different name than the original.  It's always a good practice to double-check that you are pointing on the good database on the correct server. Pick a restore point using the slider or by filling the date and time fields. When you are done click the button. The portal will let you know that the restore is successfully completed by a notification.


Restore_done

I hope that this post shows you how easy it is to use the backup/restore with Azure SQL Database. Thank you for ready, Any comments, suggestions and/or questions are welcome.



[1]: Web and Business service tiers will be retired in September 2015, more
details on the Windows Azure site.
[2]: Detail about the retention period on Azure SQL Database Backup and Restore



~ Frank Boucher




Reading Notes #156

IMG_20140927_092417Suggestion of the week


Cloud


Programming


Miscellaneous


~Frank

Reading Notes #155

CloudenFrancais_cover_400Suggestion of the week


Cloud


Programming

  • Git: It’s Just Data! - This post shows us Git from a database point of view. Julie also gives really good reference for tool and book.

Databes


Miscellaneous


~Frank


Setup an automatic deployment on Azure with Dropbox in 5 minutes

(this post is also available in French)

This post is about creating an automatic deployment that could be used by everyone. I picked Dropbox as source control because today mostly everyone got is account. If you need one, feel free to use this invite it will gives you 500 MB of bonus space for free!

Step 1: Configure the automatic deployment

To configure the deployment, connect to the Azure management portal. Although the new portal is my favourite to manage and visualize information on websites, as I write this post the features needed for the Dropbox deployment were not yet available. We must connect to "old" portal and select the Web site. You a website is not already created you can add one using the quick create.
After selecting the site, you need to click on the option: Set the deployment from source control, which is located at the bottom right of the dashboard code.


Step 1

From the dropdown list, choose Dropbox and click the arrow. Microsoft Azure deployment will now aks you to have to access on a directory in your Dropbox account.

Step 2


Step 2: Publish Web Site

From your computer, access Dropbox. If you left the default settings, the directory should be under Apps / Azure / [dirname]. You can now copy the code, images and all other files that you need. After synchronization with DroxBox completed (the small green checks everywhere) you can return to Azure portal.

It is now time to deploy. To do this you need to click Sync.


Step 5

Once completed you'll get a message informing you that the deployment is done. You can now check the log to see the deployment steps in detail if you wish.

Step 7

The new version of your website is now available!


Conclusion

Deploy a blog, a static business site, a family owned site with Dropbox is so simple! It`s even better than the good old FTP, if something goes wrong, you can redeploy by one click.





References


~Frank


Reading Notes #154

 

compare_iaas_paas_saasSuggestion of the week


Cloud


Programming


Miscellaneous


~Frank


Reading Notes #153

Suggestion of the week


Cloud


Programming


Miscellaneous

~Frank


Reading Notes #152

Suggestion of the week


Cloud


Programming


Databases


UX


Miscellaneous


~Frank


Reading Notes #151

Suggestion of the week

Cloud

Programming

UX

Miscellaneous


~Frank

Reading Notes #150

 

deployAzureDropboxSuggestion of the week


Cloud


Programming


Integration


Miscellaneous


Reading Notes #149

Cloud

P1010785

Programming


Miscellaneous

Reading Notes #148

Suggestion of the week


Cloud


Programming


Miscellaneous


Quick Tips:How to save money with your VM

(This post was originally published on Matricis Blog)
(Version anglaise de: Astuces rapides pour économiser avec les machines virtuelles Windows Azure)

At the office, we use a lot of virtual machines for our development and tests. It's really useful to be able to pop any number of VM in just few minutes and dispose of them once the job is completed. However, sometimes we need them for a long period, wouldn't it be great if we could save money? In this post, I will show you how you can achieve that.

Tip #1

The first tip is to shut down the VM when you don't need them. Why should you pay for it 24/7 if you only use them from 9 to 5, five days a week?! The common way to do it is by log-in into the Windows Azure management portal and to go in the virtual machine list. Select one by one the VM you want to close and click the shutdown button in the center of the bottom screen.
If you have many VMs, this task could become very boring. A PowerShell script is the perfect tool for that. Here are two scripts to start of stop one virtual machine.

Script to start the VM

#Full path of the publish Setting file downloaded from Azure.
$NameOfSettingFile = ".\MySettings.publishsettings"

# The name of the machine to get started
$VMName = "dev2"

# Azure Subscription Name
$SubscriptionName = "Frank Dev"

cls

if(!(Test-Path $NameOfSettingFile)){
    echo "Download the Publishing Setting files, and re-run the script."
    Get-AzurePublishSettingsFile
    exit
}

Import-AzurePublishSettingsFile  $NameOfSettingFile

Select-AzureSubscription -SubscriptionName $SubscriptionName

Write-Host "Starting the VM $VMName" -ForegroundColor Cyan
Start-AzureVM -Name $VMName -ServiceName $VMName

do{
    Start-Sleep –Seconds 2
    $vmInfo = Get-AzureVM -ServiceName $VMName -Name $VMName
    $vmStatus = $vmInfo.InstanceStatus
    Write-Host "The VM $VMName is still $vmStatus..."
}
while($vmStatus -ne "ReadyRole")

Write-Host "The VM $VMName is now accessible by Remote Connection." -ForegroundColor Green

read-host "Press enter key to close"

Script to stop the VM

#Full path of the publish Setting file downloaded from Azure.
$NameOfSettingFile = ".\MySettings.publishsettings"

# The name of the machine to get started
$VMName = "dev2"

# Azure Subscription Name
$SubscriptionName = "Frank Dev"

cls

if(!(Test-Path $NameOfSettingFile)){
    echo "Download the Publishing Setting files, and re-run the script."
    Get-AzurePublishSettingsFile
    exit
}

Import-AzurePublishSettingsFile  $NameOfSettingFile

Select-AzureSubscription -SubscriptionName $SubscriptionName

Write-Host "Stop the VM $VMName" -ForegroundColor Cyan
Stop-AzureVM -Name $VMName -ServiceName $VMName -Force

Write-Host "The VM $VMName is now shuting down." -ForegroundColor Green
read-host "Press enter key to close"

Tip #2


The second tip could be applied only on VM that don't need to scale or to be under a load balancer. A developer's machine is the perfect case for that. We need to change the tier of the VM. That a new feature since (put the date of the release here), so all your VM should be presently to standard.

Quick_tip2_en

We need to change the tier for basic. With this change apply the Billing rate will change. You could go on the pricing page to see more detail, but to give you an idea on a large VM this represent 40$. Interested? Here's how to change this setting. First, if you are not already, connect to the Windows Azure management portal. Then in the list of the virtual machine select the VM you want to change. Click on the Setting tab then change the tier. If the VM is running it will need a reboot, so save any work before.

I hope this quick tips could help you. Let me know if you have other idea and I will add them.


~Frank




Reading Notes #147

Suggestion of the week


Cloud


Programming


Miscellaneous


~Frank


Reading Notes #146

flagsSuggestion of the week


Cloud


Programming


Architecture


Miscellaneous


~Frank



Reading Notes #145


enter image description here

Suggestion of the week


Cloud


Programming


Mobile


Architecture


Miscellaneous




Reading Notes #144

 

Tortue[1]Programming


Miscellaneous

Reading Notes #143

DeadPCCloud


Programming


Miscellaneous

Note: Less reading this week, I spent some time re-installing my PC. Thanks to boxstarter.org, part of it was really easy.

~Frank


Reading Notes #142

keyboardSuggestion of the week


Programming


Mobile

  • Xamarin.Forms - Write Once, Run Everywhere, AND Be Native? (Scott Hanselman) - Very interesting post that proved how amazing Xamarin is becoming.

Miscellaneous




Reading Notes #141

Image from hubspot.comSuggestion of the week

  • Moving to Microsoft Azure (Filip Ekberg) - Another story about a blog migration on Azure. It's always interesting to learn what kind of trouble the people got while doing that.

Cloud


Programming


Mobile


Miscellaneous




Reading Notes #140

Azure2014-05_new_features 

Suggestion of the week

 

Cloud

Programming


~Frank


Reading Notes #139

Suggestion of the week


Cloud


Programming


Mobile


Miscellaneous


~Frank