Exam 71-532 Microsoft Azure Solutions – Study Guide

Here is a somewhat uncomplete list of resources for the 71-532 exam.

Create and manage virtual machines

Configure VM Networking

  • Configure reserved-ip addresses
    Get-AzureStaticVNetIP -vm ( Get-AzureVM -Name "thegu" -ServiceName "thegu-teyc" )
    Set-AzureStaticVNetIP -vm {{VM}} -IPAddress {{IP}}
    Set-AzureStaticVNetIP -vm ( Get-AzureVM -Name "thegu" -ServiceName "thegu-teyc" ) - IPAddress 192.168.0.10 | Update-AzureVM
    Test-AzureStaticVNetIP -VNetName "lab1" -IPAddress "192.168.0.10"
    
  • ACL can be used to restrict access to particular IP ranges. The CIDR format e.g. /24 means the first 24 bits are fixed, i.e 74.207.253. The last 8 bits can vary from 0-255.
  • DNS
  • Load Balance Endpoints. Delete the existing endpoint, and add new ones, but put them into a new load balanced set. Note at present, you cannot configure multiple endpoint on the same private port.
  • HTTP and TCP Health probes
  • Public IPs
  • Firewall Rules
  • Direct Server Return – Load Balancer configuration that takes load off the load balancer by permitting server to respond directly. Use cases are UDP and RTSP.
  • Keep-Alive

Management application and network services

Integrate an app with Azure Active Directory

  • Using WS-Federation
  • OAuth
  • SAML-P
  • Query using Graph API

Configure virtual network

  • Deploy VM into virtual network

    This is a straightforward exercise, involving creating a virtual network from the top level menu, and then going to virtual machines top menu and creating a new instance (do not use Quick Create, instead create from the standard template, and your virtual network should appear in the list if you select the right subscription)

  • Deploy cloud service onto virtual network

Modify network configuration

  • Modify subnet
  • Import, export network configuration – From the Network menu

Powershell

Add-AzureAccount
Get-AzureVM
Get-AzureVMImage | where { $_.IsPremium -eq "False" }

Stackoverflow-Style Permalinks with WordPress

I like how Stackoverflow implements permalinks. For instance, take a look at this URL:

http://stackoverflow.com/questions/26497051/python-how-to-append-file-content-into-format-string

The URL includes both the post_id as well as the slug. This way, if the slug was changed, the system still retains a post id and can find the correct article.

On WordPress, this is implemented as a custom permalink. I think it ought to be standard.stackoverflow-style-permalinks on WordPress using Custom Permalink setting

For example, this post can be referenced as
http://cognoware.com/132/stackoverflow-style-permalinks-with-wordpress/
However, if the slug was different in the past, say it was xyz, the links will not rot.
http://cognoware.com/132/xyz/

Older programmers

There has been a spate of articles and blog posts around programmers with over 10 years experience.

Robert Martin at CleanCoder suggests that seasoned programmers deployed correctly can have a tremendous positive effect on the junior programmers around them. However, the question remains – why is the distribution skewed towards younger programmers.

The question is – where are the older programmer’s now?

Michael writes

But it gets harder and harder to be taken seriously the older you get. Which is funny because as the value of what you have to say goes up — people’s willingness to listen to it goes down.

And the pay goes down over time (I’m now making the same salary I was making 20 years ago — and that’s not adjusted for inflation). Frankly, I’m just happy to not be homeless.

Programmers are expected to act their age. There is a persistent perception out in the market place that an older programmers ought to be doing something more senior. Given the low barriers of entry, programming is a younger person’s game.

In particular, location may be a very big factor. Dave writes

I’m not a developer, but a manager. I have a number of older developer friends who are having a hard time getting any interviews. It seems like the companies where we live (Ontario, Canada), just toss any resumes over 40.

There is also a running joke that at a large company they keep a stable of their older programmers around so that every year they can cull a few to increase company profits.

Of course there are survivor tales, such as this one:

Well… I’m 69. I started in 1968 with Fortran at engineering college. Don’t ask for my CV or my github because I’m very happy as a consultant in ThoughtWorks Brazil doing a lot of things especially those most directly related with innovation and agile development

However, the days of older software assembly-worker will one day be gone. When the last of those jobs go, it will be like what happened to manufacturing. The managerial work will be gone too. However, it does not mean the end of software. It just means the stacks get higher, and increasing specialization – be it SAP or Salesforce. Or you may need to go into consulting.

On Docker

Docker is a name for several technologies:

  • a toolchain that creates dockerized images,
  • an engine that runs images as containers and stops them,
  • and Docker Hub – a SAAS that manages application stacks.

What is a dockerized image? A dockerized image is similar in concept to Portable Apps – isolated software packages that bundles its own dependencies. It is a packaging format that includes a specification of the linux kernel, application files, and open ports. While conceptually this sounds like a virtual machine, in practice, a docker is implemented as a LXC process container. In fact, shutting down a docker conatiner is more akin to killing a process. The entire filesystem of the dockerized image is deleted.

Conceptually, this is how every maps

Technology Build Image Execution Persistence
Portable Apps not specified – e.g. Makefile Standard Directory + Executables Process not specified – any where on the user’s file system
Docker Dockerfile Docker Image Docker Containers (LXC processes) Data Volumes, or Data Volume Containers
Virtual Machines not specified Primary Configuration file .vmx and Disks .vmd Guest OS Disks .vmd
AWS EC2 Snapshots AMI EC2 instances RDS, S3

This concept is not entirely new. EC2 architecture requires persistent data to be written to a persistent data store/service. You have two options: you can mount local directories onto Docker images so that MySQL writes the database files into the host directories. Alternately, you can create a data volume container.

The main attraction of docker is this: modern applications tend to span multiple services. For example, besides the database server, there might be a mail server, a caching server, logging servers. The cost of mocking these services for development and testing can increase, and it gets brittle very quickly. Running up lightweight docker images is the cheaper and faster way creating all the services a developer needs. Some benchmarks show docker being much more performant than virtual machines.

Furthermore, a docker image is also a convenient deployment unit for production. Higher level tools allow docker images to be composed into applications. Others layer monitoring and auto scaling.

A shout out to the ImagePaste WordPress Plugin

The ImagePaste plugin is a great timesaver if you are blogging screenshots.  It copies images from your clipboard and uploads it to the server automatically.

I usually use the Windows Snipping Tool to capture my screenshots

In the past, I’d have to save this to a file and then upload to the server. Now, with ImagePaste, it’s a matter of CTRL+V into the mce text area.

NB:

  1. The presence of JetPack interferes with ImagePaste.
  2. You need to be in Visual Mode for ImagePaste to work.

How to create a JavaFX control from scratch

Thanks to Richard Bair

  1. Extend Control class,
  2. Set the Stylesheet,
  3. Provide no arg-constructor
    public class MoneyField extends Control {
        /**
         * Creates a new MoneyField. The style class is set to "money-field".
         */
        public MoneyField() {
            getStyleClass().setAll("money-field");
        }
     
        @Override protected String getUserAgentStylesheet() {
            return getClass().getResource("MoneyField.css").toExternalForm();
        }
    }
    
  4. Create .css file in the same package
  5. Define .money-field class (see how constructor sets style to “money-field”)
  6. Define -fx-skin: “fully-qualified-name-of-ControlSkin”;
  7. Create Skin class
    public class MoneyFieldSkin implements Skin<moneyfield> {
    }
    

  8. In constructor, create the controls required for the shadow-DOM
    public class MoneyFieldSkin implements Skin<moneyfield> {
        /**
         * Create a new MoneyFieldSkin.
         * @param control The MoneyField
         */
        public MoneyFieldSkin(final MoneyField control) {
            this.control = control;
     
            // Create the TextField that we are going to use to represent this MoneyFieldSkin.
            // The textField restricts input so that only valid digits that contribute to the
            // Money can be input.
            textField = new TextField() { // ...
            };
     
            // ... and a lot more stuff!
        }
    }
    

Continue reading

On Ubuntu’s new smartphone OS

BBC reports:

The Ubuntu operating system has been adapted to run on smartphones.

The Linux-based software will allow users to run desktop apps on their handsets, allowing them to double for PCs when docked to monitors.

Here are the reasons why I think Mark Shuttleworth is doing this:

Today, Linux is everywhere in the sense that beneath Android – runs Linux. Unfortunately, Ubuntu doesn’t figure in the equation. Tablets, phones are all locked down devices and enthusiast/hobbyist open source doesn’t figure unless drivers are available. To maintain relevance, Ubuntu needs to exist in the mobile space.

Today’s announcement is an early one, and is making the same value proposition as Android did early on, before Google’s acquisition. i.e. an open source system that any phone vendor can use to build their smartphone platforms on.

The Problems

Ubuntu has a remarkably polished desktop product for years but it has remained a fringe product and the PC market has simply stopped growing. Jobs has carefully taken Apple around MS’s hegemony on the desktop by tackling music players first, then a pincer movement through Windows Mobile dominance by producing a very expensive smartphone.

Shuttleworth faces not one but several well established and cashed up competitors – Apple, Google/Samsung, Amazon. I haven’t even mentioned Microsoft, or the Chinese Korean and Taiwanese versions of a smartphone OS. Each of them have an arsenal of patents and services that gives them degrees of freedom to move around the space. Google for example commands the email/contacts/calendar integration, YouTube, Maps and Navigation. Google’s approach is to deny competitors full functionality of these services to cripple their smartphone offerings. e.g. turn by turn in the case of iOS, YouTube search APIs in the case of Windows Phones. Apple and Amazon have offered cloud locker services for those who purchased music and books from their online stores. Microsoft has some cards left in enterprise management and server integration.

Next steps

I believe this is just an initial salvo. Promising compatibility with Android kernel level drivers is a good start. Right now there isn’t enough value proposition for Ubuntu phone in terms of apps or services. Integrating a phone and desktop are novel but it is far from a sure bet. A reference phone design might be good bet if they think it will persuade some of the smaller Chinese manufacturers to jump onboard. However, this will not please Dell. It might make a MIUI-like play, and remain a niche phone OS for several years until the opportunity is right.

What Ubuntu really needs to do now as an organisation is to make a sideways bet into iOS and Android. It needs to kick start development of its own mail app, or acquire a navigation maker like Waze, and get these loaded onto the popular phones today. There is still some geek-cred left in Ubuntu for people to load these apps on, and who knows, they might catch on in the enterprise space.

T-SQL when SQL Server Management Studio is not available

C:\Program Files\Microsoft SQL Server\100\Tools>sqlcmd -S .\SQLEXPRESS

1> — Fetches the logical names from a backup file
2> RESTORE FILELISTONLY FROM DISK=’C:\VMS\2mtsam_com.bak’
3> GO

1> — Restore the back up file
2> RESTORE DATABASE SAMDB FROM DISK=’C:\VMs\2MTSAM_COM.BAK’
3> WITH
4> MOVE ‘SAMDB’ TO ‘C:\VMs\SAMDB.mdf’,
5> MOVE ‘SAMDB_LOG’ TO ‘C:\VMs\SAMDB.ldf’
6> GO

C:\Program Files\Microsoft SQL Server\100\Tools>sqlcmd -S .\SQLEXPRESS
1> create login SamDbUser with password=’SamDbUser’
2> go
1> use samdb
2> go
Changed database context to ‘SamDb’.
1> create user SamDbUser FROM LOGIN SamDbUser
2> GO
1> sp_addrolemember ‘db_owner’, ‘SamDbUser’
2> GO

with thanks to StackOverflow

Reference:
Create User TSQL
TSQL Map User To Database

Seagate Momentus XT 500 GB benchmark

Seagate Momentus XT

As the figure above shows, 105 Mb/s isn’t particularly outstanding. Here’s a site giving HDD speed benchmarks.

Hitachi Ultrastar 15K450 SAS 450GB – 95.8 – 154.1 – 132.2 repman244
Western Digital 06000 600GB – 84.8 – 139.1 – 118.0 rfowler30
SAMSUNG Spinpoint F3 2TB – 67.0 – 147.7 – 116.3 Me
Western Digital Green WD20EARS 2TB – 66.3 – 147.7 – 114.4 Silkstone
Samsung HD502HJ – 68.6 – 139.0 – 111.5 0x0000007b
Samsung Spinpoint F3 500GB – 55.4 – 146.6 – 111.5 Jetster
Western Digital Black 640GB – 78.5 – 136.4 – 111.2 LifeOnMars
Western Digital Caviar Black 2TB – 9.7 – 142.5 – 111.0 arnoo1
Seagate Barracuda Green 2TB – 59.0 – 147.6 – 109.7 – repman244
Samsung F3 2TB – 18.2 – 126.9 -108.4 JATownes
Samsung EcoGreen F4 2TB – 63.3 – 142.0 – 108.3 Jetster
Seagate Barracuda 7200.12 500GB – 51.3 – 134.0 – 105.1 stefanels
ST3205318AS 250GB – 65.8 – 127.5 – 105.0 Romeopp
Toshiba MBD2147RC SAS-2 (6 GB/s) 146GB – 74.4 – 127.3 – 103.9 repman244
SAMSUNG HD502HJ 500GB – 5.2 – 134.4 – 103.5 Silkstone
Western Digital Black 500GB Sata 3 – 62.9 – 138.1 – 102.4 james888
Western Digital WD5000 500GB – 58.1 – 126.8 – 101.5 Specks
Western Digital WD5000 500GB – 57.1 – 118.6 – 95.7 Romeopp
Seagate Momentus XT 750GB – 57.2 – 122.1 – 94.8 VulkanBros
1 TB Spinpoint F3 – 52.5 – 116.5 – 93.0 HTC
Seagate 1TB – 2.8 – 117.1 – 90.6 JATownes
Seagate 500 GB Momentus XT ST95005620AS – 19.6 – 109.5 – 83.2 (On Dell Vostro laptop)
Seagate 320GB SATA – 82.1 bogmali
Western Digital WD2500 250GB – 49.1 – 101.6 – 81.7 Silkstone
Toshiba 500GB 7200rpm – 44.5 – 98.7 – 75.1 repman244
Western Digital Green Cav. 500GB – 43.0 – 91.3 – 72.8 de.das.dude
Seagate Barracuda 7200.10 250GB – 54.1 – 81.2 – 70.0 – repman244
Toshiba MK3265 320GB – 43.5 – 88.0 – 67.8 Derek12
Seagate ST3320620AS 320GB – 39.4 – 69.7 – 61.8 bogmali
Western Digital Scorpio Blue 250GB – 37.7 – 65.9 – 51.8 – Derek12
P4 Northwood PATA 160GB – 25.0 – 55.5 – 43.8 Completely Bonkers (LOL)