You are about to test the last version of your solution. You just need to change some configuration in the Micosoft Azure Portal, and you are good to go. To do it, you log in the portal at http://portal.azure.com and navigate to your component and... Error! What you see is a little sad cloud.
The Problem
This just happened to the team I'm working with. They needed to change the traffic manager's endpoint to do a traffic test. Unfortunately, the grid that contains the Endpoint was in a bad status and was not available. It looked like a deadened!
But it is really? Of course not. Here what you can do.
The Solution
Remember Microsoft is sharing the same API the Azure portal is using. That the beauty of the Azure Portal, you can use it has a convivial way to do your what you need, or you can access it via many different SDKs that are available today: .Net, Java, Node.js, Php, Python, Ruby and more! You also have command line tools that could help to manage your Azure services and apps using scripts.
To know more about all the SDK available or the command-line refer to the Azure SDKs documentation pages online.
This time we were in a Windows environment, and we needed to modify one Endpoint of a Taffic Manager. Here what we did using Azure PowerShell Cmdlets:
# Login to our account
Login-AzureRmAccount
# Set the context we will work in. Use Get-AzureRmSubscription to list all your subscriptions.
Set-AzureRmContext -SubscriptionName "MySubscriptionName"
# List All Traffic Manager Profile
Azure Get-AzureTrafficManagerProfile
# Load our endpoint in a variable, change the value we need and put it back.
$endpoint = Get-AzureRmTrafficManagerEndpoint -Name myendpoint -ProfileName myprofile -ResourceGroupName "MyResourceGroupName" -Type ExternalEndpoints
$endpoint.Weight = 50
Set-AzureRmTrafficManagerEndpoint -TrafficManagerEndpoint $endpoint
In this case, we used the Azure Resource Manager (ARM) commands, but all the commands are also available in the service mode. To know more about how to deploy with ARM you can read my previous post. To see all the command available supported with ARM to configure your solution, go see the documentation online.
Happy testing!
Check out Azure Test Drives in preview (Bryon Surace) - If you wanna test an application on Azure without subscription or anything... Look at test drives.
Detecting threats with Azure Security Center (Tomer Teller) - Interesting post that explains fundamental difference between servers and individual attack and introduces briefly Azure security center.
You know that image where you see people pulling a cart with square wheels, a man on the side wants to show them a circle wheel but the group reply they are too busy to care... Well, that was me with Azure Resource Manager (ARM). I knew it was good, but it looks too complicated, so I was waiting. Last weekend, I decided it was enough I needed to learn it! Right after few minutes, you cannot imagine my disappointment! It's so simple, so powerful and also so fast. This post explains how to deploy an ARM template, and how it works.
5 easy steps to deploy our first ARM template
To get started the easiest way possible I decided to use Visual Studio. For this sample let's create simple Windows Virtual Machine (VM). Only five steps are required to do it:
Step #1 - Create an Azure Resource Project
From Visual Studio create a new project of type Azure Resource Group. Be sure to have already installed on your machine the latest version of Azure SDK and Visual Studio updates.
Step #2 - Select the Arm template
This is where we select what we want in our template. Many options are available in VisualStudio and a lot more can be found on Github at: Azure Arm Git Template. In our case, let's select the sample Windows Virtual Machine, and click the Ok button.
Step #3 - Deploy the new template
Visual Studio will now generate multiple files, we will come back to it later, right now we will only deploy our solution. Right-click on the project et select Deploy.
Step #4 - Configure the deployment
Our first deployment is mostly ready, we just need to specify few details like the subscription and the resource group. Once you click Deploy, one last thing will be asked: the adminPassword.
Step #5 (the easiest one) - Enjoy
Voila! After few minutes, the virtual machine will be created, and we should be able to connect remotely to it.
Let's explain the magic
When the project was created, three folders were populated: Script, Template, and Tools. The last one is a bit obvious, it contains AzCopy, a tool to copy files. If you don't know AzCopy, you can learn more in a post I wrote recently.
Open the Deploy-AzureResourceGroup.ps1 contained in the Scripts folder. It's this script that will do all the hard lifting to deploy our rescourceGroup. If we look a bit closer, you will notice some parameters are declared, at the beginning of the file. Two of then should catch our attention.
TemplateFile is the path of our template (the one we selected previously), and the second TemplateParametersFile will contained all the parameters values to fill the blank of our template. This will be especially useful to deploy the same template in a different environment. In fact, this is a really big advantage. You can deploy the exact same schema to your development and production environment just by having two parameters.json file.
Let's have a peek at the template, in this case WindowsVirtualMachine.json. It's a 'json' file, so it's human-friendly, but it can be a bit scary at first. In the image just below, I collapse the collections to be able to emphases the visibility of the three prime elements: parameters, variables, and resources.
We already know parameters, so let's jump the variables. This section contains a list of key pair value like: imagePublisher, vmSize, virtualNetworkName, diagnosticsStorageAccountName, etc. Those can be fixed value or dynamics by using other variables or parameters. Here some example:
Last section but not least: the resources. This is where everything is put together to build the solution you will deploy. The resources are defined by specifying their type, name, and properties. You can assign any value from a static string, parameter value or a variable value.
Now that we know it works, why should we use it
Explain all the advantages to use ARM template could be a post by itself, and go further of the scope of that post. However, here few reasons:
A template file is light and easy to keep in a repository.
It's very simple to have the exact same template deployed in multiple environments.
ARM templates are really fast to deploy.
Easy to edit/ customize/ expand.
Easy to delete.
In Video Please
If you prefer, I also have a video version of this post.
Introducing docs.microsoft.com - Great post that explains all the nice features of the first glimpse of the new Microsoft documentation. They did a fantastic work, a post to read; a site to remember.
Cloud
Why Service Fabric? - You heard about the buzz word your tech guys are exited, but you would like to know why service fabric could be good for your business? This post is for you.
Become a Visual Studio 2015 Power User (Allison Buchholtz-Au, Andrew Hall) - All Visual Studio developers must watch this video, big chance you had a d in your hand and didn't know about it.
Miscellaneous
It's a new blog! (Troy Hunt) - A delicious post, thanks Troy to share that with us.
During the last Global Azure Bootcamp (April 16), the Montreal edition focused on Azure Service Fabric. The schedule for that day was packed with dynamic presentation and hand-on labs. Either because you were unable to be present or just because you want to learn more, it is not too late. The MsDevMtl team is happy to share with you all our documents we used.
Before you start
To be able to do the Hand on Labs you will need:
A PC with Windows 7, 8, 8.1 or 10
VisualStudio 2015 Update 1 or 2
Service Fabric SDK v2.0.135 (or more recent)
A Microsoft Azure subscription. If you don't already have one, here a free trial to get you started aka.ms/azuretrialmtl
The One-day Schedule
As you see the complete edition of the Azure Fabric Learning Path contains much more details and labs. Since we had only one day we decided to cherry picked what we thought was the best to get started, but feel free do more.
All the presentations were done by Alexandre Brisebois (@Brisebois), Stepahne Laporte (@s_lapointe), myself (@fboucheros), and under the supervision of our fantastic bandmaster Guy Barette (@GuyBarrette). Feel free to ask us questions if you get blocked during your journey.
But Why Do You Trust Your Data? (Buck Woody) - I consider this post as a really great teaser. After ready his post most chances are you will check the video it recommended... and next give a shot to Azure data Catalog.
Analyzing your Azure Search traffic (Berni Torres Garayar) - Great post that explains how to improve our services by listening to our client's search requests, leveraging the new Azure Search Analytics and PowerBi.
Miscellaneous
Give yourself permission to have work-life balance - In a connected world, it's easy not to slow down a moment and raise our head to look around us. Interesting post to read before you win the race to the burnout.
Using SOAP Services with Logic Apps (Jeff Hollan) - Interesting tutorial that gives all the details about how to configure SOAP Services with Azure LogicApp.
Since two years now, the first of April is very special for me. Not because of all the April fool, but because that the date you made me a Microsoft Azure MVP.
I'm very proud and happy to be renew this year again. I wanted to take time to thank you all. I will continue to write and talk about my passions!
See you soon...
An application revolution powered by the cloud (Mark Russinovich) - This post is a great introduction to the air of micro-services. It explains the evolution from the monolithic architecture and introduces some container system.
Azure Active Directory Application (Vincent-Philippe Lauzon) - This post is a good intro to Azure Active Directory and how it could help us in our cloud applications.
Why Microsoft Azure? - Interesting post that explains major reasons why Microsoft is a lead in cloud computing.
Getting to Know #Azure Mobile App - Nice tutorial that leverage the recently GA Azure Mobile App to build AskAlex: an universal application that looks promising...;)
Exception Handling with Logic Apps (Jeff Hollan) - Great tutorial that shows how to solve a extremely frequent problem... the exception handling.
Using Logic Apps Webhook Triggers (Jeff Hollan) - Fantastic tutorial that shows how to create an HTTP trigger in today's interface/ designer.
Everything started when I wanted to share a blog post in progress to someone for review. I didn't want to create a copy, and I was looking for an extremely simple way to share; like an url. This blog post is about all my journey to find that method and all the great possibilities available. I was really happy to that Azure Web App.
I'm writing in Markdown, it's a syntax I really like because it's simple no special application is required to use it. To know more about it see my previous post: Why I switch to Markdown, First VSCode Tasks in less than 5 minutes and Meet my new best friend: Visual Studio Code. The more I use it, the more I like it. I started using it not only not only for blogging, but also for all kinds of notes.
DropBox
One very good thing about Markdown is the fact that is compatible with all platforms. Because of that, I keep my texts in Dropbox. Why not Google Drive or OneDrive? Because Dropbox automatically generates the HTML version so my reviewer could read it in a beautiful format. The file is share-able very easily and if authenticated my reviewer could write comment.
In the PRO version, of DropBox, you can give access only to specific user. That would be very nice for sharing files inside a business or more sensible information.
Unfortunately for me, I don't want to force my reviewer to register. Another interesting fact is that relative paths for images aren't supported. So all images/ charts need also to be share individually before added in the text.
Repositories: GitHub, Bitbucket, etc.
By default, most repositories convert markdown file to HTML so very easy to read. It's also a very good way to have a saved copy. But then you need to have a public repository or give access to people...
Only using repository was not good enough in my case because I don't wish to share unfinished work with everyone.
Jekyll
Option 1 - Jekyll
Jekyll is a static website generator written in Ruby. It's really well integrated to Github, and you can even host your blog in a Github repository. However, since I would prefer to keep my in progress work more private, I decided to go with Bitbucket. Bitbucket is a great repository that supports Git and Mercurial system and allowed private repositories.
We could have Jekyll in a Git repository host on Bitbucket that would be hook-up to an Azure Web App with a continuous deployment.
Here the steps:
First create a private repository from Bitbucket.
Clone that fresh repository on your local machine.
Now it's time to create your Jekyll site.
If you don't have Ruby or Jekyll already installed on your machine now it's time. It's very easy just follow the instruction on the official website.
To create a new site, open a command prompt and type the command: jekyll new NameOfMySite then cd ./NameOfMySite and jekyll serve
To see your new site you just need to browse to http:localhost:4000. Add your Markdown files to the folder _posts and be sure they respect the naming convention YYYY-MM-DD-Title.md
Now it's time to add all the files to our Git repository with the command git add -A, and before pushing let create a new Azure Web App.
Go to http://portal.azure.com a create a new Azure Web App.
From the top left click the "+ New" button.
Select Web+ Mobile, then click on Web App
Fill-up the name, subscription plan and click the create button.
After few second, the Web App will be ready. It's time to add a continuous deployment to it. Note: that right now the deployment settings are FTP.
In the Web App blade, if not already go in the Setting section.
Scroll done the Settings to Continuous deployment and click on it.
Now choose your source control, in this case Bitbucket.
It's now time to publish our site to our Remote repository with git push.
In the Azure portal, you will see the deployment progress and history.
The combination Jekyll / Bitbucket / Azure Web App work great, but we need to generate the code locally and checked-in both source and generated content in the repository. Furthermore, since we need to generate the code, Ruby and Jekyll need to be installed on every machine we will be using.
Option 2 - Jekyll Extension to Azure Web App
I found a really great Azure Web App Extension Jekyll Extenstion on GitHub. That will simplify a lot the process thanks to Cory's works. To use it simple follow the four steps explain on the Github page:
Create an Azure Web App
Set an App Setting for SCM_COMMAND_IDLE_TIMEOUT to 600. From the Web App blade click on Settings and select Application settings. Add the new line, and click the save button.
Install the Jekyll Site Extension
Always From the Web App blade click on Tools, then select Extension
Click Add button
Found and select Jekyll Extension
Now we need to hook up your Git repository or Push a local (in Azure) Git repository with your Jekyll site.
I really liked this solution. It's very simple to install. Because it used a repository, I can keep a historic of all my texts. Moreover, only the texts and images are in the repository, and since the site is generated in the cloud, no need to install anything on other machines.
Directly from Visual Studio Code, I can write my article, and when I'm read I just need to do a push (still inside VSCode). The site will automatically be built and deployed in my Azure Web App.
Santra.Snow
While doing my research, I found Sandra.Snow another static site generator inspired from Jekyll but in .Net using Nancy library.
To use it, a little bit of work is required. The easiest way is to fork the Github project and compile the solution to get dlls and exes.
Create a new folder for your site [MySnowSite].
In MySnowSite folder, create another folder Sandra.Snow.Processor and copy/paste: Nancy.dll, Nancy.Testing.dll, Nancy.ViewEngines.Razor.dll and Snow.exe generated previously.
You can now copy the Sandra.Snow/SnowSite/Snow folder into MySnowSite folder.
Add deployment and deploy.cmd files from Sandra.Snow/SnowSite into MySnowSite folder.
Few changes were required in deploy.cmd (line: 29, 31, 56, 57)
@echo off
:: ----------------------
:: KUDU Deployment Script
:: ----------------------
:: Setup
:: -----
setlocal enabledelayedexpansion
SET ARTIFACTS=%~dp0%artifacts
IF NOT DEFINED DEPLOYMENT_SOURCE (
SET DEPLOYMENT_SOURCE=%~dp0%.
)
IF NOT DEFINED DEPLOYMENT_TARGET (
SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------
:: 3. Build Snow Site
echo -----
echo Start - Building the Snow Site
echo Running Snow.exe config=%DEPLOYMENT_SOURCE%\Snow\
pushd %DEPLOYMENT_SOURCE%
call %DEPLOYMENT_SOURCE%\Sandra.Snow.Processor\Snow.exe config=%DEPLOYMENT_SOURCE%\Snow\
IF !ERRORLEVEL! NEQ 0 goto error
echo Finish - Building the Snow Site
echo -----
IF NOT DEFINED NEXT_MANIFEST_PATH (
SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest
IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
SET PREVIOUS_MANIFEST_PATH=%ARTIFACTS%\manifest
)
)
IF NOT DEFINED KUDU_SYNC_COMMAND (
:: Install kudu sync
echo Installing Kudu Sync
call npm install kudusync -g --silent
IF !ERRORLEVEL! NEQ 0 goto error
:: Locally just running "kuduSync" would also work
SET KUDU_SYNC_COMMAND=node "%appdata%\npm\node_modules\kuduSync\bin\kuduSync"
)
echo Kudu Sync from "%DEPLOYMENT_SOURCE%\Snow\Website" to "%DEPLOYMENT_TARGET%"
call %KUDU_SYNC_COMMAND% -q -f "%DEPLOYMENT_SOURCE%\Snow\Website" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.deployment;deploy.cmd" 2>nul
IF !ERRORLEVEL! NEQ 0 goto error
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto end
:error
echo An error has occured during web site deployment.
exit /b 1
:end
echo Finished successfully.
Like previously created a Azure Web App and hook up a Git repository or push to an Azure one. You can find a lot of information on the blog of Sandra.Snow creator Phillip Haydon.
Bonus
For both Jekyll (option 2) and Sandra.Snow that used Azure Web App continuous deployment use can use Dropbox instead of Git repository. Why would you use Dropbox? Well, since Dropbox is available on any kind of platform, you would be able to write from your iPad or android tablet, or anything! To learn more about how to do it, see one of my previous post: Setup an automatic deployment on Azure with Dropbox in 5 minutes.
Just for the fun, I created one theme for Sandra.Snow that I put on GitHub: Sandra.Snow.NotesTheme, feel free to use it.
Why You Should Learn JavaScript in 2016 (Ken Powers) - I eared a lot of people complaining about Javascript, this excellent post explains why you undeniably, we should all know it, an if it's not the case why 2016 is a great time to learn it.
Search now available on Visual Studio Marketplace (Harysh Menon) - Did you know you can add extension to visual studio team services (vsts) and code (vscode)? This is the perfect post to get started.
Chris Pietschmann - Nice post that explains very clearly why we really soundn't be writing none tested code.
Data
Power BI Service February Update (Amanda Cofsky) - Fantastic! This update will give us the possibility to share outside ou organization... And many other things.
Azure Search .NET SDK roadmap (Bruce Johnston) - All in one post, the list of new features and the ones coming next.
What is Azure Stack? - Usually, we refer to the stack as a group of products from the same provider. Azure stack is a little of that, but with a little twist... it's on-premises! This post explains it all.
Why I No Longer Use MVC Frameworks - Very complete and moreover, very interesting article about strengths and weaknesses of different patterns and frameworks.
Introducing Insiders Builds (Chris Dias [MSFT]) - The Insider's previews are back in a more convivial structure.
Queries To Debug SQL Server Replication Issues (Tim Smith) - If you are using database synchronization in your system, you should definitely bookmark this post that provides nice tools to us to diagnose problems.
Book
Software Development Book Giveaway! - Cool! A great opportunity, 3 free books are given: Building Microservices, Working Effectively with Legacy Code, and Javascript: The Good Parts.
Microservices in Azure (Jon Hilton) - Excellent post to get started and do you first Hello word micro-services application.
Programming
.NET Rocks! vNext (dotnetrocks.com) - Another great show... And so happy about Glimpse.
Tips for Deploying your .Net project (Gregor Suttie) - Looking for some quick suggestion from some on with experience? Here is the perfect post for that.
Submitting your first Pull Request (David Paquette) - Nice post, that demystifies a lo o things, if Git is new for you or that open source projects.
Task runners in Visual Studio 2015 (Mads Kristensen) - This post regroups many extensions to Visual Studio that will definitely speed up repetitive process.